Konstantin Kalinin
Konstantin Kalinin
Head of Content
January 8, 2024

Jane never misses medical appointments with her GP anymore. Neither does she miss a dose of the prescribed antibiotic – a healthcare chatbot app brings her up to speed on those details.

Performing the role of a nurse, in the absence of one, this chatbot called Florence (named after Florence Nightingale, the founder of modern nursing) acts as a personal health assistant to remind Jane to track her activity level, body weight, pills, and doctor appointments.

And there are many more chatbots in medicine developed today to transform patient care.

Top Takeaways:

  • The future of AI chatbots in healthcare couldn’t be brighter these days: they keep patients engaged 24/7 and deliver tremendous cost savings (around $3.6 billion globally by 2022).
  • Top health chatbots run on proprietary AI/ML technologies, support non-scripted intent-based dialogs, protect PHI, and make an impression of an intelligent being overall.
  • A doctor appointment chatbot is the most straightforward variant of implementing AI-powered conversational technology without significant investment.

Table of Contents

  1. What are Chatbots in the Healthcare Industry?
  2. The Role of Artificial Intelligence
  3. Benefits of Chatbots in Healthcare
  4. Use Cases of Chatbots in Healthcare
    1. Informative chatbots
    2. Conversational chatbots
    3. Prescriptive chatbots
  5. Top Health Chatbots
  6. Future of Chatbots in Healthcare
  7. How to Develop a Medical Chatbot App?
    1. Step 1: Design conversation pathway
    2. Step 2: Choose the right UI
    3. Step 3: Fuse the best of human and AI
    4. Step 4: Use Rasa NLU for intent classification and entity extraction
    5. Step 5: Add HIPAA compliance
  8. How Much Does It Cost?
  9. Our Experience in Chatbot Development for the Healthcare Industry
  10. How Healthcare Chatbots Fight COVID-19
  11. Ready to Build Your Chatbot?

1. What are Chatbots in the Healthcare Industry?

Chatbots are software developed with machine learning algorithms, including natural language processing (NLP), to stimulate and engage in a conversation with a user to provide real-time assistance to patients.

Chatbots have already gained traction in retail, news media, social media, banking, and customer service. Many people engage with chatbots every day on their smartphones without even knowing. From catching up on sports news to navigating bank applications to playing conversation-based games on Facebook Messenger, chatbots are revolutionizing the way we live.

Healthcare payers and providers, including medical assistants, are also beginning to leverage these AI-enabled tools to simplify patient care and cut unnecessary costs. Whenever a patient strikes up a conversation with a medical representative who may sound human but underneath is an intelligent conversational machine — we see a healthcare chatbot in the medical field in action.

After reading this blog, you will hopefully walk away with a solid understanding that chatbots and healthcare are a perfect match for each other.

2. The Role of Artificial Intelligence

Patients love speaking to real-life doctors, and artificial intelligence is what makes chatbots sound more human. In fact, some chatbots with complex self-learning algorithms can successfully maintain in-depth, nearly human-like conversations.

Do medical chatbots powered by AI technologies cause significant paradigm shifts in healthcare? Yes. Recently, Northwell Health, an AI company developing chatbots that will help patients navigate cancer care, says more than 96 percent of patients who used its post-discharge care chatbots found it very helpful, demonstrating increased client engagement.

Machine learning applications are beginning to transform patient care as we know it. Although still in its early stages, chatbots will not only improve care delivery, but they will also lead to significant healthcare cost savings and improved patient care outcomes in the near future.

3. Benefits of Chatbots in Healthcare

The advantages of chatbots in healthcare are enormous – and all stakeholders share the benefits.

For once, medical chatbots reduce healthcare professionals’ workload by reducing hospital visits, reducing unnecessary treatments and procedures, and decreasing hospital admissions and readmissions as treatment compliance and knowledge about their symptoms improve. For patients, this comes with a lot of benefits:

  • less time spent commuting to the doctor’s office
  • less money spent on unnecessary treatments and tests
  • easy access to the doctor at the push of a button

Chatbots drive cost savings in healthcare delivery, with experts estimating that cost savings by healthcare chatbots will reach $3.6 billion globally by 2022. Chatbots are gradually reducing hospital wait times, consultation times, unnecessary treatments, and hospital readmissions by connecting patients with the right healthcare providers and helping patients understand their conditions and treatments even without visiting a doctor.

Furthermore, hospitals and private clinics use medical chat bots to triage and clerk patients even before they come into the consulting room. These bots ask relevant questions about the patients’ symptoms, with automated responses that aim to produce a sufficient medical history for the doctor. Subsequently, these patient histories are sent via a messaging interface to the doctor, who triages to determine which patients need to be seen first and which patients require a brief consultation.

The truth is no chatbot in healthcare can replace a doctor’s expertise, neither can they take over patient care; however, combining the best of both worlds improves the efficiency of patient care delivery, simplifying and fast-tracking care without compromising quality. Therefore, the use of chatbots in healthcare is hard to dispute.

4. Use Cases of Chatbots in Healthcare

To develop a chatbot that engages and provides solutions to users, chatbot developers need to determine what types of chatbots in healthcare would most effectively achieve these goals. Therefore, two things that the chatbot developer needs to consider are the intent of the user and the best help the user needs; then, we can design the right chatbot to address these healthcare chatbot use cases.

There are three primary use cases for the utilization of chatbot technology in healthcare – informative, conversational, and prescriptive. These chatbots vary in their conversational style, the depth of communication, and the type of solutions they provide.

Informative chatbots

Informative chatbots provide helpful information for users, often in the form of pop-ups, notifications, and breaking stories. Generally, informative bots provide automated information and customer support.

If you look up articles about flu symptoms on WebMD, for instance, a chatbot may pop up with information about flu treatment and current outbreaks in your area.

Health news websites and mental health websites also use chatbots to help them access more detailed information about a topic. For example, while reading about alcohol addiction and withdrawal, a chatbot may pop up with this: “Do you need help with alcohol addiction? Speak with any of our mental health professionals.”

Related: How to Build a Mental Health App

Conversational chatbots

Conversational chatbots are built to be contextual tools that respond based on the user’s intent. However, there are different levels of maturity to a conversational chatbot – not all of them offer the same depth of conversation.

For instance, a Level 1 maturity chatbot only provides pre-built responses to clearly stated questions without the capacity to follow through with any deviations.

        For example:

an example of a conversational chatbot to explain chatbots in healthcareThese responses are pre-built. At this level of maturity, the chatbot cannot generate answers if John continues with further questions. A level 2 intelligence chatbot, in contrast, can do that.

conversational healthcare chatbotConversational chatbots with higher intelligence levels can understand the context better and provide more than pre-built answers. This is because these chatbots look at a conversation as a whole rather than processing sentences in isolation.

The higher the intelligence of a chatbot, the more personal responses one can expect, and therefore, better customer assistance. That’s when conversations start to resemble human interactions.

Conversational chatbots use natural language processing (NLP) and natural language understanding (NLU), applications of AI that enable machines to understand human language and intent.

You may also be interested: How to Create NLP App

Prescriptive chatbots

Although prescriptive chatbots are conversational by design, they are built not just to answer questions or provide direction, but to offer therapeutic solutions.

One example of a prescriptive chatbot is Woebot. Woebot is a chatbot designed by researchers at Stanford University to provide mental health assistance using cognitive behavioral therapy (CBT) techniques. People who suffer from depression, anxiety disorders, or mood disorders can converse with this chatbot, which, in turn, helps people treat themselves by reshaping their behavior and thought patterns.

Also Read: Guide to building mental health chatbot

For instance, Peter suffers from social anxiety and has a chat with Woebot.

Prescriptive healthcare Chatbot example

First, the chatbot helps Peter relieve the pressure of his perceived mistake by letting him know it’s not out of the ordinary, which may restore his confidence; then, it provides useful steps to help him deal with it better.

Chatbot developers should employ a variety of chatbots to engage and provide value to their audience. The key is to know your audience and what best suits them and which chatbots work for what setting. These medical assistant bots are becoming more and more popular.

Any chatbot you develop that aims to give medical advice should deeply consider the regulations that govern it. There are things you can and cannot say, and there are regulations on how you can say things. Navigating yourself through this environment will require legal counsel to guide you as you build this portion of your bot to address these different chatbot use cases in healthcare.

creating healthcare chatbots to enagage with users

5. Top Health Chatbots

When you think of all the flavors of chatbots out there (in the realm of digital health) waiting to be built, there are quite a few variants that jump to mind immediately:

  • hospital chatbot for appointment scheduling
  • clinical chatbot
  • nurse chatbot
  • chatbot for health insurance

Here are the top chatbots gaining widespread use in the healthcare sector.

5.1 HEALTHILY

This free AI-enabled chatbot allows you to input your symptoms and get the most likely diagnoses. Trained with machine learning models that enable the app to give accurate or near-accurate diagnoses, YourMd provides useful health tips and information about your symptoms as well as verified evidence-based solutions.

chatbot app example HealthilyAlso being a doctor appointment chatbot, Healthily offers information about local health service providers, including diagnostic centers, clinics, and other medical centers you could visit. This medical chatbot is available on iOS, Facebook Messenger, Slick, Android, KIK, and Telegram.

Related: Doctor-on-demand app development guide

5.2 ADA HEALTH

Once the fastest-growing health app in Europe, Ada Health has attracted more than 1.5 million users, who use it as a standard diagnostic tool to provide a detailed assessment of their health based on the symptoms they input.

Ada health homepageAda medical bot asks the user simple questions and runs their answers on a dataset of thousands of similar inputs and cases to provide the most approximate evaluation of their health and offer relevant medical information and solutions. Ada also provides users with detailed information about medical conditions, treatments, and procedures and connects them to local healthcare providers.

Related: Our guide on how to create a health app

5.3 BABYLON HEALTH

Babylon Health offers AI-driven consultations with a virtual doctor, a patient chatbot, and a real doctor.

Babylong health starting screen

With the eHealth chatbot, users submit their symptoms, and the app runs them against a database of thousands of conditions that fit the mold. This is followed by the display of possible diagnoses and the steps the user should take to address the issue – just like a patient symptom tracking tool. This AI chatbot for healthcare has built-in speech recognition and natural language processing to analyze speech and text to produce relevant outputs.

5.4 BUOY HEALTH

Buoy Health was built by a team of doctors and AI developers through the Harvard Innovation Laboratory. Trained on clinical data from more than 18,000 medical articles and journals, Buoy’s chatbot for medical diagnosis provides users with their likely diagnoses and accurate answers to their health questions.

Buoy Health

The medical chatbot matches users’ inquiries against a large repository of evidence-based medical data to provide simple answers. This medical diagnosis chatbot also offers additional med info for every symptom you input.

5.5 FORKSY

Forksy is the go-to digital nutritionist that helps you track your eating habits by giving recommendations about diet and caloric intake. This chatbot tracks your diet and provides automated feedback to improve your diet choices; plus, it offers useful information about every food you eat – including the number of calories it contains, and its benefits and risks to health.

Forksy nutrition app

Please keep scrolling for more healthcare chatbot examples.

5.6 CANCERCHATBOT

The CancerChatbot by CSource is an artificial intelligence healthcare chatbot system for serving info on cancer, cancer treatments, prognosis, and related topics. This chatbot provides users with up-to-date information on cancer-related topics, running users’ questions against a large dataset of cancer cases, research data, and clinical trials.

Cancer Chatbot

This chatbot solution for healthcare helps patients get all the details they need about a cancer-related topic in one place. It also assists healthcare providers by serving info to cancer patients and their families.

Patients and providers are not the only ones who find this healthcare chatbot useful: Families and friends of cancer patients can also get information about the care of cancer patients, what to expect, and how they can contribute to their treatment and recovery.

5.7 SAFEDRUGBOT

Doctors also have a virtual assistant chatbot that supplies them with necessary info – Safedrugbot. This tool is not your typical chatbot for hospitals. The bot offers healthcare providers data the right information on drug dosage, adverse drug effects, and the right therapeutic option for various diseases.

SafedrugbotSafedrugbot functions as a chatbot for doctors, running doctor’s queries against an extensive drug database. This healthcare chatbot also helps medics with up-to-date information on drug prescription and overall health tips for breastfeeding mothers.

5.8 HYRO

Hyro is an adaptive communications platform that replaces common-place intent-based AI chatbots with language-based conversational AI, built from NLU, knowledge graphs, and computational linguistics.

Hyro app - example of an AI powered chatbot

Patients can naturally interact with the bot using text or voice to find medical services and providers, schedule an appointment, check their eligibility, and troubleshoot common issues using FAQ for fast and accurate resolution.

Hopefully, after reviewing these samples of the best healthcare chatbots above, you’ll be inspired by how your chatbot solution for the healthcare industry can enhance provider/patient experiences.

6. Future of Chatbots in Healthcare

Despite the initial chatbot hype dwindling down, medical chatbots still have the potential to improve the healthcare industry. The three main areas where they can be particularly useful include diagnostics, patient engagement outside medical facilities, and mental health. At least, that’s what CB Insights analysts are bringing forward in their healthcare chatbot market research, generally saying that the future of chatbots in the healthcare industry looks bright.

7. How to Develop a Medical Chatbot App?

Healthcare chatbot development can be a real challenge for someone with no experience in the field. Follow these steps to build an engaging HIPAA-compliant medical chatbot.

Step 1: Design conversation pathway

Before chatbots, we had text messages that provided a convenient interface for communicating with friends, loved ones, and business partners. In fact, the survey findings reveal that more than 82 percent of people keep their messaging notifications on. And an average person has at least three messaging apps on their smartphones.

As Erika Hall explains in her book Conversational Design, humans are fond of this mode of conversation not because of the sophisticated features but because of the convenience of maintaining and accessing social connections through brief, unpredictable conversations.

Related: The UI/UX design you need to create a winning app and Healthcare App Design

But as simple as text messaging may seem, there are several rules that guide its efficiency: relevance, tone, quantity, speed, and context. Therefore, in leveraging conversational pathways for chatbots, AI developers must factor in those principles that guide effective and productive conversations, especially within the context of healthcare.

designing healthcare conversational pathways

Conversational cooperation and intent

Before designing a conversational pathway for an AI driven healthcare bot, one must first understand what makes a productive conversation. One of these principles is the principle of cooperation.

As phrased by Philosopher Paul Grice in 1975, the principle of cooperation holds that a conversation between two or more persons can only be useful if there is an underlying contextual agreement or cooperation. This background advances the conversation in an agreed direction and maintains the proper context to achieve a common purpose.

For instance, take this conversation.

John: Do you have an idea what books I should read for this exam?
Greg: Yes, I do.

In this example, Greg does not adhere to the principle of cooperation. This is because his response does not answer John’s question: it leaves John with literally no answers to his question, hence a conversational disagreement.

Although literally asking if Greg knew any books needed for the exam, John’s question was not intended as a yes-or-no question. John was indeed asking to know the books he needed for the exam, and Greg did not provide that.

The same goes for this conversation with a healthcare chatbot.

User: What do I do if my newborn’s eyes have become yellow?
Bot: Yellow discoloration of the eyes is called Jaundice, and it is caused by excess bilirubin…

While it is true that yellow discoloration of the eyes (and skin) is known as jaundice, the bot does not answer the user’s question.

In designing an adequate conversational flow for a medical chatbot app, therefore, understanding intent is vital. Chatbot developers can employ Natural Language Understanding (NLU) platforms such as Google Dialogflow, IBM’s Watson, Facebook’s wit.ai, Amazon’s Lex, and Microsoft Cognitive Services Language Understanding LUIS.ai.

These platforms match utterances and their variants with appropriate intents before generating responses. This maintains natural and free-flowing conversations between the user and the chatbot.

TALK TO AN EXPERT 

Context

Just as effective human-to-human conversations largely depend on context, a productive conversation with a chatbot also heavily depends on the user’s context.

This leads to one of the most important elements of a conversational pathway: Defining your audience. This requires extensive research into who your audience is, their problems and needs, how they want their problems solved, the appropriate language to use for them, and their socio-economic contexts.

importance of context in a healthcare chatbot

You do not design a conversational pathway the way you perceive your intended users, but with real customer data that shows how they want their conversations to be. Fortunately, chatbots for healthcare can mimic various personalities.

A drug bot answering questions about drug dosages and interactions should structure its responses for doctors and patients differently. Doctors would expect essential info delivered in the appropriate medical lexicon.

Similarly, conversational style for a healthcare bot for people with mental health problems such as depression or anxiety must maintain sensitivity, respect, and appropriate vocabulary.

For instance:

User: My panic symptoms have been getting more frequent recently, how do I resolve this?
Bot: It appears you might not have been using your drugs correctly.

While this may be correct, it comes off as an insensitive response for a user with an anxiety disorder. Furthermore, it may not be accurate at all, as there may be other factors predisposing the user to frequent panic attacks.

Identifying the context of your audience also helps to build the persona of your chatbot. The chatbot persona gives a human feel to these conversations. A chatbot persona embodies the character and visual representation of a chatbot.

For example, for a doctor chatbot, an image of a doctor with a stethoscope around his neck fits better than an image of a casually dressed person. Similarly, a picture of a doctor wearing a stethoscope may fit best for a symptom checker chatbot. This relays to the user that the responses have been verified by medical professionals.

The character of a chatbot also depends on the context of the audience. A friendly and funny chatbot may work best for a chatbot for new mothers seeking information about their newborns. Still, it may not work for a doctor seeking information about drug dosages or adverse effects.

Just as patients seeking information from a doctor would be more comfortable and better engaged by a friendly and compassionate doctor, conversational styles for chatbots also have to be designed to embody these personal qualities.

Turn-taking

One of the key elements of an effective conversation is turn-taking, and many bots fail in this aspect.

Here’s one of the examples used above.

User: My newborn’s eyes have become yellow, what do I do?
Bot: Yellow discoloration of the eyes is called Jaundice, and it is caused by excess bilirubin in the bloodstream, which may result from excess production of bilirubin from the breakdown of red blood cells or accumulation of bilirubin due to obstruction in its flow pathway. Jaundice is…

The chatbot goes on and on describing jaundice and leaves no space for the user to respond. Good communication flow involves switching the conversation: allowing the user and the chatbot to take turns in speaking.

Not only do these responses defeat the purpose of the conversation, but they also make the conversation one-sided and unnatural.

This concept is described by Paul Grice in his maxim of quantity, which depicts that a speaker gives the listener only the required information, in small amounts. Doing the opposite may leave many users bored and uninterested in the conversation.

Now that you have understood the basic principles of conversational flow, it is time to outline a dialogue flow for your chatbot. This forms the framework on which a chatbot interacts with a user, and a framework built on these principles creates a successful chatbot experience whether you’re after chatbots for medical providers or patients.

user interacting with a conversational healthcare chatbot

Step 2: Choose the right UI

Chatbots are revolutionizing social interactions on a large scale, with business owners, media companies, automobile industries, and customer service representatives employing these AI applications to ensure efficient communication with their clients.

Also, check out our guide about AI app development.

However, humans rate a process not only by the outcome but also by how easy and straightforward the process is. Similarly, conversations between men and machines are not nearly judged by the outcome but by the ease of the interaction. That’s where a thought-out User Interface (UI) comes in.

A user interface is the meeting point between men and computers; the point where a user interacts with the design. Depending on the type of chatbot, developers use a graphical user interface, voice interactions, or gestures, all of which use different machine learning models to understand human language and generate appropriate responses.

Popular platforms for developing chatbot UIs include Alexa API, Facebook Messenger, Skype, Slack, Google Assistant, and Telegram.

These platforms have different elements that developers can use for creating the best chatbot UIs. Almost all of these platforms have vibrant visuals that provide information in the form of texts, buttons, and imagery to make navigation and interaction effortless.

All these platforms, except for Slack, provide a Quick Reply as a suggested action that disappears once clicked. Users choose quick replies to ask for a location, address, email, or simply to end the conversation.

Some of these platforms, e.g., Telegram, also provide custom keyboards with predefined reply buttons to make the conversation seamless.

Each of these platforms has unique merits and disadvantages. So choosing the right platform may seem daunting. However, let these simple rules guide you for selecting the best UI for your chatbot:

  1. Make UI elements perform predictably, so users can easily navigate through the platform.
  2. Let elements be clearly labeled and indicated to improve usability.
  3. Design layout to improve readability: Ways to do this include avoiding excessive colors and buttons and using fonts, capitals, letters, and italics appropriately.
  4. Avoid numerous tasks on a single page. This can wear the user out and cause a lot of confusion. Restrict the number of tasks to one per page. Furthermore, complex tasks should be divided into subtasks to improve the usability of the bot.
  5. Finally, make the design simple to navigate.

An effective UI aims to bring chatbot interactions to a natural conversation as close as possible. And this involves arranging design elements in simple patterns to make navigation easy and comfortable.

robot using a touchscreen

Step 3: Fuse the best of human and AI

When customers interact with businesses or navigate through websites, they want quick responses to queries and an agent to interact with in real time. Inarguably, this is one of the critical factors that influence customer satisfaction and a company’s brand image (including healthcare organizations, naturally). With standalone chatbots, businesses have been able to drive their customer support experiences, but it has been marred with flaws, quite expectedly.

For example, it may be almost impossible for a healthcare chat bot to give an accurate diagnosis based on symptoms for complex conditions. While chatbots that serve as symptom checkers could accurately generate differential diagnoses of an array of symptoms, it will take a doctor, in many cases, to investigate or query further to reach an accurate diagnosis.

In emergency situations, bots will immediately advise the user to see a healthcare professional for treatment. That’s why hybrid chatbots – combining artificial intelligence and human intellect – can achieve better results than standalone AI powered solutions.

GYANT, HealthTap, Babylon Health, and several other medical chatbots use a hybrid chatbot model that provides an interface for patients to speak with real doctors. The app users may engage in a live video or text consultation on the platform, bypassing hospital visits.

using rasa and nlu

Step 4: Use Rasa NLU for intent classification and entity extraction

For an effective chatbot application and enjoyable user experience, chatbots must be designed to make interactions as natural as possible; and this requires machine learning models that can enable the bot to understand the intent and context of conversations. This is where natural language processing and understanding tools come in.

Rasa NLU is an open-source library for natural language understanding used for intent classification, response generation and retrieval, entity extraction in designing chatbot conversations. Rasa’s NLU component used to be separate but merged with Rasa Core into a single framework.

The NLU is the library for natural language understanding that does the intent classification and entity extraction from the user input. This breaks down the user input for the chatbot to understand the user’s intent and context. The Rasa Core is the chatbot framework that predicts the next best action using a deep learning model.

In this article, we shall focus on the NLU component and how you can use Rasa NLU to build contextual chatbots. Before going further, you must understand a few keywords.

Intent: This describes exactly what the user wants.

Take this example:

“Where can I buy Insulin in Denver, Colorado?” In this statement, the “intent” will be: buy_insulin.

Entity: An entity is a useful unit of data that provides more information about the user’s intent. The entity answers the questions “when” and “where” about the user’s intent.

In the above example, the entities will be: “location”: “Denver”, “Pharmacy”.

To build this structure for a conversational chatbot using Rasa, here are steps you should take:

  1. Installation and setup
  2. Training and testing

Installation and setup

The first step is to set up the virtual environment for your chatbot; and for this, you need to install a python module. Once this has been done, you can proceed with creating the structure for the chatbot.

Read Our Article about Python in Healthcare

Start by defining the pipeline through which the data will flow and the intent classification and entity extraction can be done. Rasa recommends using a spaCy pipeline, but several others, such as the supervised_embeddings pipeline, can be used.

To do this, activate the virtual environment and run this:

pip install rasa

Once this is completed, run the following command on your desired directory:

rasa init --no-prompt

This will generate several files, including your training data, story data, initial models, and endpoint files, using default data.

You now have an NLU training file where you can prepare data to train your bot. You may use your own custom data with a markdown or JSON format. Open up the NLU training file and modify the default data appropriately for your chatbot.

Let’s create a contextual chatbot called E-Pharm, which will provide a user – let’s say a doctor – with drug information, drug reactions, and local pharmacy stores where drugs can be purchased. The first step is to create an NLU training file that contains various user inputs mapped with the appropriate intents and entities. The more data is included in the training file, the more “intelligent” the bot will be, and the more positive customer experience it’ll provide.

Related: How to build an e-pharmacy solution

See examples:

## intent: greet

– Hello
– Hey
– Hi there
– Good day

## intent: ask_Amoxicillin_dosage

– How is Amoxicillin taken?
– What’s the correct dose of Amoxicillin?
– How should I use Amoxicillin?

## intent: Amoxicillin_interactions

– Is Amoxicillin safe to use with Insulin?
– What are the likely interactions with Metformin?
– Which drugs react with Amoxicillin?

This data will train the chatbot in understanding variants of a user input since the file contains multiple examples of single-user intent.

To define entities and values, let’s use a previous example:

“Where can I buy Insulin in Colorado?”

 

The name of the entity here is “location,” and the value is “colorado.” You need to provide a lot of examples for “location” to capture the entity adequately. Furthermore, to avoid contextual inaccuracies, it is advisable to specify this training data in lower case.

You may design a lookup table containing a list of values for a single entity. This is preferable to creating sample sentences for all values.

For example, if a chatbot is designed for users residing in the United States, a lookup table for “location” should contain all 50 states and the District of Columbia.

Once you have all your training data, you can move them to the data folder. Ensure to remove all unnecessary or default files in this folder before proceeding to the next stage of training your bot.

Training and testing

To train the nlu mode, run this command:

rasa train nlu

This command looks for training files in your data folder and creates a trained model. It then saves this model in the model folder. The model is named with a prefix nlu-, which indicates that it is a nlu-only type of model.

You can test a model by running this command:

rasa shell nlu

If you want to test a single model out of multiple models, run this command:

rasa shell -m models/nlu-20190515-144445.tar.gz

This interactive shell mode, used as the NLU interpreter, will return an output in the same format you ran the input, indicating the bot’s capacity to classify intents and extract entities accurately.

The output will look something like this:

{'entities':[{'confidence':0.7756870940230542,
'end': 39,
'entity': 'location',
'extractor': 'ner_crf',
'start': 34,
'value': 'New York'}],
'intent': {'confidence': 0.7036955584872587, 'name': 'Pharmacy'},
'intent_ranking': [{'confidence': 0.7036955584872587, 'name': 'buy_drug'},
{'confidence': 0.08354613362606624, 'name': 'bye'},
{'confidence': 0.07291869896872455, 'name': 'fine_ask'},
'text': 'Where can I buy Insulin in New York?'}

After training your chatbot on this data, you may choose to create and run a nlu server on Rasa.

To do this, run this command:

rasa run --enable-api -m models/nlu-20190515-144445.tar.gz

The output it generates is modifiable to whatever parameters you choose. Once your server is running, you may test it using curl. This indicates the intent and confidence of your server.

That sums up our module on training a conversational model for classifying intent and extracting entities using Rasa NLU. Your next step is to train your chatbot to respond to stories in a dialogue platform using Rasa core. I shall explain this in subsequent articles.

creating a conversational health chatbot flow

Step 5: Add HIPAA compliance

The Health Insurance and Portability and Accountability Act (HIPAA) of 1996 is United States regulation that sets the standards for using, handling, and storing sensitive healthcare data. The act outlines rules for the use of protected health information (PHI).

The act refers to PHI as all data that can be used to identify a patient.

HIPAA considers the following data protected health information:

  • Patient’s name, address, date of birth, and Social Security number
  • A patient’s health status: this includes medical or mental health condition
  • Any health service the patient has received or is currently receiving
  • Information regarding the payment for healthcare services that could be used to identify the patient

Note: The HIPAA Privacy Rule does not consider employment and educational details as PHI. Furthermore, de-identified data – since it is not traceable to the owner of the data – does not fall under the HIPAA Privacy Rule.

Consequently, under the HIPAA Rule, every person involved in developing or managing your AI assistants that can access, handle, or store PHI at any given time must be HIPAA-compliant making it a must for healthcare app development related projects in general.

Related: HIPAA compliant video conference and messaging, HIPAA Compliant app development

Use Rasa stack

Rasa stack provides you with an open-source framework to build highly intelligent contextual models giving you full control over the process flow. Conversely, closed-source tools are third-party frameworks that provide custom-built models through which you run your data files. With these third-party tools, you have little control over the software design and how your data files are processed; thus, you have little control over the confidential and potentially sensitive patient information your model receives.

This is why an open-source tool such as Rasa stack is best for building AI assistants and models that comply with data privacy rules, especially HIPAA.

As long as your chatbot will be collecting PHI and sharing it with a covered entity, such as healthcare providers, insurance companies, and HMOs, it must be HIPAA-compliant.

Using these safeguards, the HIPAA regulation requires that chatbot developers incorporate these models in a HIPAA-complaint environment. This requires that the AI conversations, entities, and patient personal identifiers are encrypted and stored in a safe environment.

This involves all the pipelines and channels for intent recognition, entity extraction, and dialogue management, all of which must be safeguarded by these three measures.

With Rasa Stack, an open-source tool that runs under Apache 2.0 license, building a HIPAA-complaint chatbot is possible.

Rasa offers a transparent system of handling and storing patient data since the software developers at Rasa do not have access to the PHI. All the tools you use on Rasa are hosted in your HIPAA-complaint on-premises system or private data cloud, which guarantees a high level of data privacy since all the data resides in your infrastructure.

Furthermore, Rasa also allows for encryption and safeguarding all data transition between its NLU engines and dialogue management engines to optimize data security. As you build your HIPAA-compliant chatbot, it will be essential to have 3rd parties audit your setup and advise where there could be vulnerabilities from their experience.

Rasa is also available in Docker containers, so it is easy for you to integrate it into your infrastructure. If you need help with this, we can gladly help setup your Rasa chatbot quickly.

Administrative safeguards

The Security Rule defines administrative safeguards as all “administrative actions, policies, and procedures you need to set up to manage the implementation, development, and maintenance of security measures to protect health information and to manage the conduct of the covered entity’s workforce concerning the protection of that information.”

These safeguards include all the security policies you have put in place in your company, including designating a privacy official, to guide the use, storage, and transfer of patient data, and also to prevent, detect, and correct any security violations.

Physical safeguards

The Security Rule describes the physical safeguards as the physical measures, policies, and processes you have to protect a covered entity’s electronic PHI from security violations.

This safeguard includes designating people, either by job title or job description, who are authorized to access this data, as well as electronic access control systems, video monitoring, and door locks restricting access to the data.

Technical safeguards

These are the tech measures, policies, and procedures that protect and control access to electronic health data. These measures ensure that only authorized people have access to electronic PHI. Furthermore, this rule requires that workforce members only have access to PHI as appropriate for their roles and job functions.

Technical safeguarding involves the encryption of electronic PHI. The Rule requires that your company design a mechanism that encrypts all electronic PHI when necessary, both at rest or in transit over electronic communication tools such as the internet. Furthermore, the Security Rule allows flexibility in the type of encryption that covered entities may use.

The HIPAA Security Rule requires that you identify all the sources of PHI, including external sources, and all human, technical, and environmental threats to the safety of PHI in your company.

8. How Much Does It Cost?

Building a chatbot from scratch may cost you from US $48,000 to US $64,000. As is the case with any custom mobile application development, the final cost will be determined by how advanced your chatbot application will end up being. For instance, implementing an AI engine with ML algorithms in a healthcare AI chatbot will put the price tag for development towards the higher end.

Another point to consider is whether your medical AI chatbot will be integrated with existing software systems and applications like EHR, telemedicine platforms, etc.

We recommend using ready-made SDKs, libraries, and APIs to keep the chatbot development budget under control. This practice lowers the cost of building the app, but it also speeds up the time to market significantly.

9. Our Experience in Healthcare Chatbot Development

At Topflight, we’ve been lucky to have worked on several exciting chatbot projects. Here are a couple of solutions where we implemented chatbots in medicine.

XZEVN: mental health chatbot

We built the chatbot as a progressive web app, rendering on desktop and mobile, that interacts with users, helping them identify their mental state, and recommending appropriate content. That chatbot helps customers maintain emotional health and improve their decision-making and goal-setting. Users add their emotions daily through chatbot interactions, answer a set of questions, and vote up or down on suggested articles, quotes, and other content.

Athcorp testimonial for TopflightRead the full case study.

Your SoberBuddy: iPhone chatbot app

SoberBuddy is a virtual recovery coach. The app helps people with addictions  by sending daily challenges designed around a particular stage of recovery and teaching them how to get rid of drugs and alcohol. The chatbot provides users with evidence-based tips, relying on a massive patient data set, plus, it works really well alongside other treatment models or can be used on its own.

Check out this chatbot in the App Store.

10. How Healthcare Chatbots Fight COVID-19

Chatbots educate

With the growing spread of the disease, there comes a surge of misinformation and diverse conspiracy theories, which could potentially cause the pandemic curve to keep rising. Therefore, it has become necessary to leverage digital tools that disseminate authoritative healthcare information to people across the globe. And healthcare chat bots are filling this gap perfectly.

Recently the World Health Organization (WHO) partnered with Ratuken Viber, a messaging app, to develop an interactive chatbot that can provide accurate information about COVID-19 in multiple languages. With this conversational AI, WHO can reach up to 1 billion people across the globe in their native languages via mobile devices at any time of the day.

medical chatbots educate about covid

Once a user subscribes to the Viber chatbot, they receive notifications about the latest news and information about the disease directly from the WHO. The chatbot also allows users to test their knowledge of the coronavirus through interactive quizzes. Through FAQs, this conversational bot may also help users understand the nature and course of the illness.

The Indian government also launched a WhatsApp-based interactive chatbot called MyGov Corona Helpdesk that provides verified information and news about the pandemic to users in India.

Furthermore, conversational chatbots allow for curated information. Information can be customized to the user’s needs, something that’s impossible to achieve when searching for COVID-19 data online via search engines. What’s more, the information generated by chatbots takes into account users’ locations, so they can access only information useful to them.

Also Read: Cloud Computing: Role and Benefits in Healthcare

Chatbots help with diagnosing

Healthcare professionals can’t reach and screen everyone who may have symptoms of the infection; therefore, leveraging AI health bots could make the screening process fast and efficient.

Conversational chatbots can be trained on large datasets, including the symptoms, mode of transmission, natural course, prognostic factors, and treatment of the coronavirus infection. Bots can then pull info from this data to generate automated responses to users’ questions.

A bright example is a chatbot that recognizes the intent of a user’s input about their symptoms, using its machine learning capabilities, and then identifies users who are likely to have the infection and provides instructions or escalates these findings to health professionals.

chatbots-and-AI

That provides an easy way to reach potentially infected people and reduce the spread of the infection.

The challenge here for software developers is to keep training chatbots on COVID-19-related verified updates and research data. As researchers uncover new symptom patterns, these details need to be integrated into the ML training data to enable a bot to make an accurate assessment of a user’s symptoms at any given time.

Recently, Google Cloud launched an AI chatbot called Rapid Response Virtual Agent Program to provide information to users and answer their questions about coronavirus symptoms. Google has also expanded this opportunity for tech companies to allow them to use its open-source framework to develop AI chatbots.

covid 19 pathfinder virtual agentOne of the healthcare companies that used the opportunity was Verily. They launched the Pathfinder, a virtual agent template for hospitals and health systems to track people at risk of contracting the disease. The template allows healthcare professionals to develop voice or chatbots that screen users with a round of typical questions about their age, travel history, recent contacts, smoking history, medical conditions, and current symptoms.

Chatbots in treatment

In the wake of stay-at-home orders issued in many countries and the cancellation of elective procedures and consultations, users and healthcare professionals can meet only in a virtual office.

From those who have a coronavirus symptom scare to those with other complaints, AI-driven chatbots may become part of hospitals’ plans to meet patients’ needs during the lockdown. Many health professionals have taken to telemedicine to consult with their patients, allay fears, and provide prescriptions.

healthcare chatbots for treatment

Furthermore, social distancing and loss of loved ones have taken a toll on people’s mental health. With psychiatry-oriented chatbots, people can interact with a virtual mental health ‘professional’ to get some relief. These chatbots are trained on massive data and include natural language processing capabilities to understand users’ concerns and provide appropriate advice.

Also Read: Guide to Building a Healthcare Startup

11. Ready to Build Your Chatbot?

Now that we’ve gone over all the details that go into designing and developing a successful chatbot, you’re fully equipped to handle this challenging task. We’re app developers in Miami and California, feel free to reach out if you need more in-depth research into what’s already available on the off-the-shelf software market or if you are unsure how to add AI capabilities to your healthcare chatbot.

Related Articles:

  1. mHealth App Development Guide
  2. Machine Learning Use Cases in Healthcare
  3. Healthcare Mobile App Design Guide
  4. How to Start a Healthcare Startup
  5. Build a Mental Health Chatbot
  6. How to Build a Doctor’s Appointment Application
  7. Build a Mental Health Application
  8. Build a HIPAA Compliant Application

[This blog was originally published on August 12, 2022, and has since been refreshed and enhanced with the latest pertinent insights.]

Frequently Asked Questions

 

What chatbot building platforms do you recommend to spearhead my bot development?

We prefer RASA Stack and Dialog Flow, but you can also choose from Microsoft Bot Framework, Wit.ai, IBM Watson, Botkit, and ChatterBot.

How long does it take to create a chatbot from scratch?

2 to 4 months from a prototype to a deployed app.

Can I develop a chatbot for my site?

You can develop chatbots for websites and mobile apps. Although, if you’re looking for a basic chatbot assisting your website visitors, we advise you to take a look at some existing solutions like Smith.ai, Acobot, or Botsify.

What’s the most common flaw causing a chatbot to fail?

Failure to correctly identify the user’s intent. That happens with chatbots that strive to help on all fronts and lack access to consolidated, specialized databases. Plus, a chatbot in the medical field should fully comply with the HIPAA regulation.

How much does it cost to make a chatbot?

Between $40,000 and $70,000 USD.

Discuss your app idea with us
Book Consultation
Konstantin Kalinin

Head of Content
Konstantin has worked with mobile apps since 2005 (pre-iPhone era). Helping startups and Fortune 100 companies deliver innovative apps while wearing multiple hats (consultant, delivery director, mobile agency owner, and app analyst), Konstantin has developed a deep appreciation of mobile and web technologies. He’s happy to share his knowledge with Topflight partners.
Learn how to build winning apps.

Privacy Policy: We hate spam and promise to keep your email address safe

Copy link