This bot is a simple demo that allows clinicians to query for ICD10 codes.
- app.js: The entry point for the app.
- bot.js: Bootstraps the bot instance, and sets up dialogs.
- util.js: Utility/helper functions.
This generator provides the following dialog modules:
- Greetings.js
- SearchCodes.js
Each dialog module exports an object with three properties to help simplify ading new dialogs to the bot.:
- id: Used for the dialog id.
- waterfall: The logic (or waterfall) for the dialog.
- name: The intent name for the dialog for triggering.
- pattern: A regular expression used for determining user intent.
You'll want to review the documentation for the Bot Framework. I highly recommend grabbing one of the simple sample bots and deploying it before running ICD2. Do it once, and it will all make since.
You can deploy the bot locally for testing/debugging/development, or you can host anywhere that supports Node JS. When running locally, the following utilities are recommended:
- Bot Framework Emulator: VERY useful tool for chatting with your bot. Provides simple chat interface with inspectors for incoming/outgoing JSON messages. You'll need NGROK to recieve messages.
- NGROK: You'll need NGROK for serious testing of your bot.
- Node JS v6.14.3 or higher.
- ICD2 Functions Azure web functions to search for ICD10 codes.
- Restify Used to host the web service for the bot, and for making REST calls
- dotenv Used to manage environmental variables
Update .env
with the appropriate keys OR specifiy in your Azure App settings:
- PORT=3978
- LOG_PREFIX=[icd2-bot]
- URL_FUNC_SEARCH_CODES=https://your_url_to_functions_here
- MICROSOFT_APP_ID=your_bot_app_id_here
- MICROSOFT_APP_PASSWORD=your_password_here
To invoke the help dialog, enter the following into the bot:
help
You can query for codes using the command search codes
, then specifying keywords:
search codes edema orbit
search codes obstruction newborn
You can also search for phrases by closing in quotes:
search codes "central nervous system"
You can also combine keywords and phrases:
search codes "central nervous system" neoplasm