How are medical chatbots arranged - we understand the example of the DOC + bot

    A medical history is an integral part of examining a patient. The doctor interviews the patient about pathologies, surgical interventions, injuries, the course of the disease. Often, he himself writes down the information that the patient tells him, but sometimes asks to fill out a special questionnaire.

    Usually, taking an anamnesis takes up to 60% of the consultation time and lasts about 15 minutes. Therefore, in the West, due to the high cost of a doctor’s working time, there is a practice in which nurses conduct an initial pre-medical examination of a patient. They fill out special forms, which the doctor relies on later. However, this approach only shifts the history process from one person to another.

    Therefore, today, technologies based on artificial intelligence are developed and implemented in the format of chat bots, which reduce the history taking time by several times and reduce the likelihood of an error. This saves the resources of the clinic and “unloads” nurses and doctors, giving the latter the opportunity to better study the symptoms of the disease and make a more accurate diagnosis.

    We will talk about what chat bot solutions already exist today, what they can do, and how the DOC + chat bot works. “Write to the doctor around the clock in the DOC + application




    Who develops chat bots


    There are many different symptom checkers in the world of medical services. Most of them are based on the traditional question-answer system - they do not have artificial intelligence, and all the questions asked are “scripted”. Such decisions can collect patient complaints and medical history in the most common cases. An example of such a system would be WebMD. The application collects data and shows the user information about diseases accompanied by the indicated symptoms.

    With the development of technology and the accumulation of medical data, it became possible to implement more intelligent questionnaires. They adapt to the situation, changing the "line of behavior" depending on user responses.

    Of these chat bots, one can single out the application of German developers - ADA. The system formulates personalized questions based on the information that the patient tells her. After which he asks for clarification of several points, in particular, related to the localization of the source of pain (for example, “do pain occur behind the eyeball with eye movement”). Based on the data received, the system offers 4–5 possible diagnoses. If necessary, the application will connect the patient with a real doctor in a chat for consultation.

    Similarly, the Babylon English telemedicine service works. After analyzing the patient’s answers to the questions, the application says what to do next: go to the pharmacy, book a telemedicine consultation, go to an appointment with a general practitioner or in a specialized clinic.

    The chatbot app is even being tested by the NHS as the first line for patients who need medical attention or advice. More than a million North London residents were given the opportunity to access the Babylon AI system instead of the NHS call center operator. Operators, although supervised by therapists and nurses, may not have knowledge in a particular medical field. During the six months of the experiment, Babylon showed higher accuracy and speed when making a diagnosis - on average, a minute took “one patient” (for comparison, nurses and doctors spent from 2 to 3 minutes on this).

    Another smart system on the market is Your.MD. She works in messengers and allows the patient to enter symptoms in solid text. Your.MD asks additional questions about possible concomitant symptoms. As a result, the bot gives one diagnosis with a description and treatment options or a warning about the need to call an ambulance.

    Such solutions are also being introduced on the Russian market - one of them is the DOC + chat bot. Intelligent algorithms of our application collect symptoms, medical history and prepare data for the doctor. The chatbot may ask whether a person has been sick for a long time, to clarify whether he has taken any drugs, etc.

    So far, the accuracy of diagnosis for all such systems is far from ideal. This is mainly due to the fact that it is unrealistic to make an accurate diagnosis based on patient complaints alone. For this, other information is needed - examination data, analyzes, instrumental studies, etc.

    However, existing algorithms allow you to train the system to ask the right questions and collect more complete information about the disease, compared to what the patient describes. That is why we decided to start laying only this functionality in our bot.

    How does the DOC + chat bot work


    As part of Data Science, we are developing a machine learning algorithm infrastructure at DOC +. The bot is the product closest to the end user, but the technologies underlying it are also used in our other solutions (we wrote about some of them in previous articles).

    The bot is based on algorithms trained on the data of anonymized electronic patient records DOC +, as well as information from open directories and medical databases. At the same time, since this is not about simple recommender algorithms, but about a complex medical system whose work is related to human health, we involved practicing doctors to develop it.

    In total, more than 30 doctors took part in the project: they helped develop rules for the NLP system (after all, patients can describe the same symptom in dozens of different ways), developed lists of clarifying questions for the most popular symptoms, tested the bot itself and gave it (and continue to give ) feedback on his work.

    Why did we create a bot


    The key goal of the bot is to reduce the time that the patient and the doctor spend on consultation. The application collects an anamnesis in 1-3 minutes, which is much faster than answering similar questions to a doctor.

    It is important to understand that the bot does not make decisions, does not make a diagnosis and does not prescribe treatment - the last word always remains with the doctor. Therefore (this is critically important in the field of medicine), an intelligent system does not bear any risks for the patient. In the worst case, the application will ask the user about a complaint that he does not have, spending an extra few seconds.

    The second goal of the bot is to improve quality. The system asks a lot of questions, aggregating a large amount of information and reducing the risk that the doctor will miss something.

    The third goal is a more structured collection of complaints and symptoms data. If earlier they were collected in text form in free form, then thanks to the bot they are collected in a structured manner and have a context, since the patient answers additional questions for most symptoms. Structured data allows us to improve the quality of all our machine learning algorithms.

    Bot components


    The “brain” of the bot consists of 4 key parts: a natural language processing system (NLP), a recommendation system, a module for determining a group of diagnoses and a module that generates additional questions about the history of life and disease.

    Natural language processing. This block is based on the DOC + NLP system, which we wrote about in more detail earlier. In the first question, the bot asks the patient to describe in text what is bothering him. The algorithm analyzes the information received, structures the symptom data and asks clarifying questions. For example, if the user mentioned an elevated temperature, but did not specify a specific value, the bot will ask him to enter. If the patient said about a cough, the bot will clarify whether it was dry or wet. After that, the collected data is transmitted to the input of the recommendation system.


    / The bot asks the patient to indicate the temperature.

    Note that in a simple text only primary complaints are entered. Almost all other questions for speeding up the process are implemented in a special interface - buttons, reels, multiple choice lists, etc. The

    recommendation system. It is based on a neural network. The process of questioning and determining the symptoms of the disease itself resembles systems used, for example, in e-commerce or evaluation services.

    Trained on 100 thousand real complaints from EMC DOC +, our module of the recommendation system is able to find symptoms that are often found together. For example, if a patient says cough and runny nose, the bot will check with him about a sore throat and fever, as well as ask clarifying questions about these symptoms.

    Definition of a group of diagnoses. When questions about all the most likely symptoms are already asked, the third stage of the survey is included. As noted, diagnosing only complaints is problematic. But in many cases this is enough to establish with great accuracy a group of diseases - for example, diseases of the respiratory system or diseases of the digestive tract. This is exactly what the classifier based on the Gradient Boosting and Random Forest algorithms does .

    Within each group, we know in advance the most important symptoms for diagnosis and can clarify their presence in the patient. For example, a headache is not the most common symptom in a respiratory illness, and the recommendation system may not ask about it, but it may be important to distinguish flu from the common cold. Thus, the system asks questions about not the most frequent, but nonetheless important symptoms, supplementing the information collected earlier.

    Additional questions on the history of life and disease. When all complaints are collected, the patient answers a few more questions - when the disease started, whether he took any medications, etc. All of them are formulated based on the analysis of online consultations and interviewing doctors.


    / Example of a bot's work in collecting a medical history

    A system may also ask a patient to attach test results or other information useful to a doctor, for example, a medical history: allergies, chronic diseases, injuries and surgeries. All of these queries are selected from detailed directories.

    At the end of the bot, all the information in a structured form gets into the doctor’s interface, where he can get acquainted with it immediately before the consultation. These data are automatically transferred to the medical record, also reducing the time spent by the doctor on maintaining documentation.

    Future plans


    We will expand the functionality and scope of the chat bot. We plan to create a system that will be useful both in consultation with highly specialized specialists and in the work of the contact center.

    In the future, our bot will learn not only to collect complaints, but also to pre-route patients, automatically identify critical situations when an emergency call is needed, and also identify risk groups for chronic diseases that patients fall into.



    Additional reading: some useful articles from our Ask Only Blog :




    Also popular now: