*Updated* Quick Start: Setting Up Your COVID-19 Health Bot

This post has been republished via RSS; it originally appeared at: Healthcare and Life Sciences Blog articles.

Update: Due to new additions to our COVID-19 Health Bot Templates, this guide now includes screenshots from the COVID-19 Assessment, the COVID-19 FAQs and the COVID-19 Metrics. 

Why the Health Bot Service?

The Health Bot Service is an AI-powered, extensible, secure and compliant healthcare experience. Microsoft now has a specific template pre-built for COVID-19. It takes inbound requests, asks about the patient’s symptoms, and assists in getting people access to trusted and relevant healthcare services and information based on the CDC recommendation.

healthbot.jpg

 

We will take you step-by-step through the following, so that you can deploy the health bot with ease:

  1. Deployment Approach
  2. Configuration
  3. Design and Coding
  4. Creating a WebChat Channel
  5. Embedding WebChat in a Web Page
  6. Enhancing COVID-19 bot with CDC-approved FAQ template

  7. Viewing world-wide metrics with COVID-19 Metrics template

 

Deployment Approach

It’s very important to deploy the bot in a phased approach, where you plan to use scenario templates first and then customize and iterate over time. Below is a diagram of the life cycle best practices.

 
 

pic.png

 

 

Configuration

  1. Search For “Microsoft Healthcare Bot Service” in the Azure Marketplace.

1.png

 

  1. Enter Details and Click “Subscribe”. 

2.png

   

     3. You will get an email from Azure Marketplace with a config link that will redirect you to the Health Bot Service. Once configuration is done, you will see this home page. Click "Open scenarios  template catalog” in blue.

3.png

   

    4. Select “COVID-19 Assessment” from the pre-built templates. Then specify the name and click "Import Template".

tempcat.png

      

    5. Once you import the scenario, it will appear in the “Manage” tab under “Scenarios” on the left-hand toolbar. Click on the name of the template to take you to the visual designer.

6.png

 

 

Design and Coding

The relevant code is in Javascript, so if you are familiar more with the code, you can click the “Code” tab on the bottom left.

a.png

 

Click back to the “Designer” tab. It’s Visio-style, but has capabilities like programming. At the top, you can see the range of scenario elements. You have the ability to insert prompts (represented in green), if/else decision (represented in yellow), or add statements to print out messages (represented in blue). There are many different types of scenario elements, and more details that Microsoft documents here so that you can customize further.

b2.png

 

If you click “Run” at the top, it will only run the current scenario in a debug mode.

c3.png

 

Below is how it looks after the run, asking you a set of questions on the right.

d4.png

 

As you answer the series of questions in the chat on the right, you can see that it’s corresponding with the logic on the left hand side. For example, if you click on the “Symptoms” prompt, it’s highlighted in green on the left and reflected in the chat on the right.

e.png

 

After the questions are answered, the bot classifies patients based on the logic. In this example, if you’re classified as a high-risk patient, the bot reads, “We would like to talk with you as soon as possible.” You can have different end results, like a link to virtually schedule an appointment, a connection to a virtual agent, or a link to a virtual physician visit. All of these endpoints can be customized.                 

f.png

 

For customizing further, including integrations with QnA Maker and FHIR API, see the resource appendix at the end of this article.

 

 

 

Creating the WebChat Channel

1. Go back to the Health Bot Service, select "Integrations" and click "Secrets".

1a.png

 

2. Webchat_secret allows you to connect the bot to a web page, just like Azure Bot framework. The webchat channel is enabled by default. Copy the webchat_secret and the app_secret.

secrets.png

More details here on embedding your health bot into your app via webchat.

 

Go to github repository link. Update: The latest web chat framework is on v4 and here is the related github v4-link . This link supports the latest 2 versions of modern browsers like Chrome, Edge, and FireFox. If you need Web Chat in Internet Explorer 11, please use this v4-es5-link

 

Click “Deploy to Azure”. Provide subscription and resource group details to deploy this into. This deploys an app service that will host the healthcare bot. 

MicrosoftTeams-image (22).png

 

  1. Go back to your Azure portal and click on the Resource group that you created/chose in last step.

azure.PNG

 

  1. It will create two things: the app service and the associated app service plan.

4d.png

 

  1. If you click on the app service, go to “Configuration” on the left-hand side. Provide the app_secret and the webchat_secret here, by clicking “Add new application setting” and adding the values directly.

5e.png

 

  1. Now that the configuration is done, we need to run the code. Scroll down to Development Tools, and then “App Service Editor”.

MicrosoftTeams-image (21).png

 

  1. Click “Go”.

7g.png

 

  1. Modify the public/index.js file as in screenshot below if you want to trigger covid19_assessment scenario on startup. If you don’t, it will be a blank chat box.

bot code 2.png

 

  1. Once that’s done, we are ready! Click “Run” on the left and you will get this Azure website.

10.png

 

 

 

Embedding a WebChat into a Web Page

  1. This Azure website now has to be embedded into a web page. See the sample website below.

site.PNG

      2. Open visual studio for the code. Embed an iFrame as a tag. The source is the app service that is hosting the health bot. Front-end developers can then play around with this code.

last2.png

 

     3. If you click the COVID-19 info button, you want the webchat to pop up like this to start the triggered scenario. Now you know how to get the health bot on the web page!

last3.png

 

 

 

Enhancing COVID-19 bot with CDC-approved FAQ Template

1. Navigate to Scenarios -> Template Catalog.

tempcat.png

 

2. Click on COVID-19 FAQs template and Import – provide QnA Maker subscription key if you have a QnA Maker service provisioned. If not, create an Azure QnA Maker on Azure portal.

faqtemp.png

 

3. Once the import succeeds, navigate to Scenarios -> Manage. You can see the scenario here.

scenarioman.png

 

4. If you drill down to see it in Visual Designer, you will see that the code here fetches results from the language model of this custom QnA Maker and adds the source name. See below for how it displays to the user:

userdisplay.png

 

5. Also, it creates a language model in Language -> Models page at the end. The Train button helps you to retrain data in knowledge base created on importing this FAQ template.

language.png

 

6. The import template creates a scenario, it’s underlying language model as seen above – a Custom QnA Maker and a Knowledge Base Healthcare Bot COVID-19 CDC. More information on updating knowledge base can be found here.

language model.png

 

7. Now, we are ready to test the FAQ scenario! Test it here in the in-house chat control as shown below, or test it on the public website:

chatcontrol.png

 

 

 

Viewing world-wide metrics with COVID-19 Metrics template

1. Go back to the Scenario Template Catalog and import COVID-19 Metrics.

tempcat.png

 

2. Provide LUIS Prediction Key. PREREQUISITE: Create an Azure LUIS cognitive service prediction resource to access the COVID-19 Metrics natural language understanding (NLU) model.

luis.png

Once imported, it will appear in your "Scenario Management" dashboard below:

metrics.png

 

3. Click on it to go to the Visual designer. Let’s say you enter: "How many confirmed cases in Italy?". See example answer below.

italy.png

 

The COVID-19 Metrics template can provide up-to-date metrics on COVID-19 cases around the world. Below are some example questions that you can ask the bot about reported cases:

  • How many cases have been reported worldwide?
  • How many cases have been reported in China?
  • What is the Corona Virus situation in Italy?
  • What countries have the highest number of COVID-19 cases?

DISCLAIMER: This COVID-19 Metrics template leverages an external data source provided by the ArcGis API. Users are responsible for complying with any terms and conditions required by the entities licensing the external data source. New information may not be fully reflected in this template. This template is not intended for use in the EU and UK. This template is being made available 'as is' and without any warranties. Users are expected to update and customize the template as appropriate for their own needs. Microsoft is not responsible for the performance, accuracy or results from the use of the template.

 

 

 

Resources for Customizing Further

 

  • For handing off to a live agent via Microsoft Teams, check out this step-by-step guide
  • Health Bot data connections can be used integrate with systems that support FHIR. Here are links from technical documentation to help you with FHIR integration:

 

 

* For a comprehensive overview of Microsoft services and tools for Crisis Management, Business Continuity, and Patient Outreach see “Situational Response Management, Communications, and Virtual Patient Outreach – Webcast Recording
 

Thanks for reading and let us know how else we can help!

 

nikita.jfif

Nikita Pitliya, Microsoft Cloud Solutions Architect

 

sam.jfif

Sam Brown, Microsoft Teams Technical Specialist

 

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.