AI Health-Care Chat Bot System
By
** Sourav Pravakar* Sonu Kumar * Sonu Pathak* Mr. Ghanshyam **
Student * Student * Student * Assistant Professor *
souravpravakar2@[Link] sonusashwat620@[Link] pathakaditya562@[Link] [Link]@[Link]
* ITS Engineering College , Greater Noida
ABSTRACT
The idea behind the healthcare chatbot system is to reach out to people in rural areas and government hospitals who find it
hard to book appointments or get medical advice from doctors. Imagine how helpful that could be! In a country like India where
the population keeps growing and advancements in medicine are saving more lives than ever, there aren't enough doctors to
go around. This becomes a serious problem, especially in crowded cities with government hospitals lacking sufficient staff -
leading to less-than-ideal patient care and sometimes even tragic outcomes. But hey, what if we had a super-smart chatbot at
our disposal? One that could give guidance to both doctors and patients when they need it most. It would be like having a virtual
medical assistant on call 24/7! This AI-driven bot can take over where human error might creep in, giving accurate advice based
on vast amounts of data. And get this - if it doesn't have the answer right away, it can quickly fetch relevant info from search
engines like Google. Picture this: You're feeling unwell but can't see a doctor immediately. No worries! Just chat with this medical
chatbot and get personalized recommendations tailored just for you. It's like having your own digital health expert at your
fingertips! So, isn't it amazing how technology is revolutionizing healthcare by bridging gaps and saving lives? Let's embrace this
new era of AI-powered solutions making quality medical assistance accessible to everyone, no matter where they are located.
Terms: Natural Language Processing, Artificial Intelligence, Health Care, Chatbot, Python, Symptoms.
INTRODUCTION The evolution of chatbots
An artificial intelligence software called a chatbot is made to mimic
user chats across messaging apps, the web, mobile applications, Alan Turing developed the Turing test in the 1950s to see if a
and phone calls. The use of Natural Language Processing (NLP) in computer could replicate human behavior without being able to tell
question-answering systems is a logical next step. Figure (a) shows the difference. Professor Joseph Weizenbaum created ELIZA, the
how a chatbot functions inside. first chatbot, in the 1960s.
Why are chatbots important?
Many people consider chatbots to be a very sophisticated and
exciting new way for humans and machines to communicate,
demonstrating the advancement of technology. Chatbots are used
in many different domains, such as mental health, diagnostics, and
health education. Based on 40 papers, a study of conversational
agents classifies the many types and applications of chatbots in the
healthcare industry, provides a taxonomy of chatbots, and
highlights the main obstacles.
Fig.(a) Chatbot
RESEARCH PAPERS
How does a chatbot achieve this?
The approach is intended to save users' time and save healthcare
expenses because it is not always practical for them to see
The chatbot responds to user inputs as shown in Figure (b). One
physicians or consultant immediately.
of a chatbot's main duties is "User Request Analysis." The first and
most important phase in a chatbot's functioning is determining
LITERATURE REVIEW
the user's intent and pulling pertinent data and entities from the
user's request. The chatbot next responds to the user's request
with the best appropriate response using Natural Language In a literature review, the existing literature on a certain subject or
Processing (NLP). Chatbots are extensively employed in a variety topic is examined and evaluated. It gives a summary of what is
of fields, including customer service, healthcare, politics, and currently known about the topic. The four basic goals of the
messaging apps. literature review are to analyze the literature in the selected
subject of study, raise awareness of current research and
conversations, communicate that information in a written report,
and advance field knowledge.
Flora Amato backed the idea of artificial intelligence and deep
machine learning, which allowed apps to communicate with
patients in a way that was comparable to that of physicians.
Researchers employed Watson, a language service built and trained
on the BlueMix platform, to construct such a potent application.
A strategy based on user discussion and a linear design from
Fig.(b) Architecture of Chatbot symptom extraction to symptom mapping was put forth by
Priyasankari M. By defining the associated symptom, this approach
determines if the patient is suffering from a serious or minor
Strong AI software called chatbots simplifies interactions between
disease.
users and services, improving the user experience. By cutting back
on the conventional expenses related to customer service, they
Pharma Bot, a chatbot that provides pediatric generic drug advice,
assist businesses in increasing customer engagement and
was introduced by Benilda Eleonor. An informal chatbot called
operational effectiveness at the same time. While there hasn't
Pharma Bot was created to offer guidance and details about
been a comprehensive analysis of chatbots used in lifestyle
children's generic medication. The system uses Left and Right
modification programs, there have been a number of studies of
Parsing algorithms together with a descriptive approach to
chatbots used in healthcare settings, including anything from
combine many regions and activities.
illness detection to mental health assistance to quitting smoking.
PROCESS
METHODOLOGY
The suggested concept is to use artificial intelligence to create a
healthcare chatbot system that can identify illnesses and give
Python Libraries: A library in Python is a group of functions created
general data about them before a patient consults a physician.
for certain tasks. When you want to access code that you use
With the help of this approach, users may interact with the bot in
regularly without having to start from scratch every time, these
an easy-to-use text format. The bot will determine the type of
libraries come in handy. Fig. 1's flowchart shows several Python
ailment and respond to all of the user's inquiries based on the
libraries.
user's symptoms. When this chatbot is able to detect a variety of
Pandas: This toolkit makes working with structured and time-series
illnesses and deliver pertinent information, its actual value will
data simple by offering quick, expressive, and adaptable data
become apparent. To react to user inquiries, the program employs
structures. Pandas makes tasks like modeling and data analysis
a chatbot as a question-and-answer system.
easier.
RESEARCH PAPERS
Numpy:A vital Python library, NumPy supports massive
multidimensional arrays and matrices and provides a wide range
of high-level mathematical functions for effective processing.
Scikit-Learn: Classification, regression, clustering, model
selection, Naive Bayes, gradient boosting, K-means, and
preprocessing are just a few of the many applications that make
extensive use of this package.
Why use Decision Trees?
When creating a model in machine learning, choosing the best
method for a particular dataset and issue is essential. There are
two strong arguments in favor of using decision trees:
Decision trees are easily comprehensible since they usually mimic
human decision-making processes. Because Decision Trees are
represented as trees, the rationale behind them is simple to
Fig.(1) Python Libraries understand.
Decision Trees are an excellent option for machine learning
applications because of their features.
DECISION TREE
How does the Decision Tree algorithm Work?
Although it is most commonly employed for classification tasks, a
decision tree is a supervised learning approach that may be The root node of a decision tree is where the process of guessing
applied to regression and classification issues alike. It is a tree- the class of a given dataset starts. The values of the root attribute
structured classifier, with each leaf node representing the result, and the associated attribute values in the dataset are compared to
branches representing decision rules, and interior nodes start the process. It moves through the branches to get to the next
representing dataset attributes. Decision nodes and leaf nodes node based on this comparison. The algorithm keeps doing this,
are the two different kinds of nodes found in a decision tree. comparing attribute values with succeeding nodes until it reaches
While Leaf Nodes indicate the decisions' results and lack a leaf node, at which point the prediction is produced. A more
additional branches, Decision Nodes make decisions and have thorough comprehension of this procedure can be facilitated by
many branches. The properties of the provided dataset serve as an organized algorithm:
the basis for the judgments or tests. A decision tree offers a
graphical depiction of every option for handling a situation or Step 1: Begin with the root node, represented by the letter S,
choice under certain circumstances. which houses the complete dataset.
The Classification and Regression Tree (CART) algorithm is used to
construct a tree. A decision tree divides the tree further into Step 2: Use an attribute selection measure (ASM) to identify the
subtrees based on the replies (Yes/No) to a series of questions. best attribute in the dataset.
The general structure is depicted in the image below:
RESEARCH PAPERS
Step 3: Divide S into subsets that contain possible values for the EXPERIMENTAL RESULTS
selected best attribute.
Three distinct outputs are displayed, one of which uses the AI-
Step 4: Build the decision tree nodes that are associated with the based chatbot system to identify the condition based on the user's
best feature. current symptoms and provide additional symptoms that are
relevant.
Step 5: Using the subsets produced in Step 3, recursively develop In addition to diagnosing illnesses, our system offers advice on
new decision trees. The terminal node is designated as a leaf medicine, disease descriptions, safety measures, exercise routines,
node when this recursive procedure reaches a point where it is and dietary plans. It differs from previous efforts of this type in that
impractical to classify nodes further. it offers not just the sickness but also additional medicine,
information about the condition, precautions, exercises, and diet
ALGORITHM plans.
The chatbot will present the patient with symptoms. The patient a) FUNGAL INFECTION DETECTED IN THE DISEASE
can then select or enter the symptoms, and the disease is
identified along with other symptoms that are frequently The patient is exhibiting symptoms of itching, skin rash, and nodal
associated with it. If the patient's symptoms match those in its skin eruptions, as shown in output Fig. (a). Based on his selection,
database, the disease is identified based on the symptoms the chatbot identified the illness as "FUNGAL INFECTION" and
provided. In this manner, as seen in fig. 2, the chatbot gives the provided recommendations for medicine, precautions, exercise,
patient 133 symptoms to identify their ailment. and diets.
Fig.(a) Output
Fig.(2) Flowchart of Program
RESEARCH PAPERS
b) IMPETIGO DETECTED IN THE DISEASE
TRAINING AND TESTING DATA
below the result Figure (b) illustrates the patient's yellow crust
oozing, red sore surrounding the nose, tiny nail dents, inflamed Machine learning algorithms learn from datasets, identify patterns
nails, and blister. The disease "IMPETIGO" is located, and the in the data, develop a grasp of its properties, and use this
chatbot offers recommendations for medicine, safety measures, information to make judgments. They then evaluate the precision
exercise, and diets. of their choices in order to improve their prediction skills.
Training and testing data are the two primary subsets of datasets
used in machine learning. The machine learning algorithm is taught
using the training data, and the correctness of the learned model is
evaluated using the testing data. The training data must precisely
reflect the real-world data that the algorithm will come across.
After training, the model has to be assessed using test data, which
is data that has not yet been seen. This is similar to the idea of test
data in software testing in that it guarantees that the model's
performance is evaluated on data that it hasn't encountered during
training. To provide statistically significant testing of the model's
performance, the testing data must fulfill two requirements: it must
be large enough to produce meaningful predictions and reflect the
distribution of characteristics found in the real dataset. Since the
Fig.(b) Output
model has already learnt patterns from the training data, testing on
fresh, unknown data is crucial to assessing its generalization
c) GERD DETECTED IN THE DISEASE capabilities to new data. In addition to evaluating accuracy,
robustness, and fairness, the testing data also helps to pinpoint
The patient presents with stomach discomfort, acidity, tongue areas where the model needs to be improved.
ulcers, and vomiting, as output Fig. (c) below illustrates. The
chatbot then diagnoses the patient with "GERD Typically, 70% of the data are used for training and 30% are used
(Gastroesophageal Reflux Disease)" and offers suggestions on for testing; this divides the data into sections for model assessment
diets, exercise, medicine, and safety measures.
and training.
Fig.(c) Output
RESEARCH PAPERS
With the help of an intelligent agent, people may soon be able to
enter their present symptoms through a portal and receive a
precise diagnosis or prescription without consulting a medical
professional.
FUTURE SCOPE
Technology has had a major impact on the expansion and
diversification of the healthcare and medical industries. This makes
artificial intelligence (AI) in healthcare—especially chatbots—a
crucial element of the landscape going forward. Traditionally,
medical records allow clinicians to easily access and comprehend
medical histories of their patients. But adding chatbots might make
this procedure even more efficient. Doctors may quickly study
COMPARISON WITH EXISTING CHATBOT patient information after being notified of an appointment, which
would improve their capacity to communicate with one other
during consultations.
• You must enter the symptoms when our healthcare chatbot asks
you about different ailments. It indicates the closest likely sickness
The development and diversification of the healthcare and medical
or ailment when you have a symptom. On the other hand, existing
industries have been significantly influenced by technology. For this
chatbots, like [Link], function as personal health assistants,
reason, chatbots and artificial intelligence (AI) in healthcare will be
enabling users to monitor symptoms, ask questions, and complete
increasingly important in the future.
health assessments. Most chatbots do not deliver the greatest
potential conclusion, such as disease or illness, based on the user's
Medical records have historically made it simple for medical
symptoms. However, our chatbot does.
professionals to obtain and understand their patients' medical
history. But using chatbots might improve the efficiency of this
• The best feature is that it not only diagnoses diseases or illnesses
process even further. After being informed of an appointment,
but also offers advice on diets, exercise, medicine, and safety
doctors may swiftly review patient information, which enhances
measures. Some just diagnose illnesses based on reports or data
their ability to interact with one another during consultations.
from several users, which can occasionally be troublesome.
• Our algorithm is straightforward, adequate, and modifiable so
that we may expand its functionality in our chatbot.
CONCLUSION
Programs that use artificial intelligence have progressed to the
point where they can now learn from and accurately mimic
human speech. Although chatbots have been around since 1966,
their ubiquity skyrocketed once Siri and the Facebook Messenger
bot were introduced in 2011. The healthcare industry is seeing
constant growth as more and more entrepreneurs realize the
potential of chatbots to assist healthcare practitioners and
patients alike. The automated revolution in healthcare decision-
making is happening at the same time as autonomous vehicle
development.
RESEARCH PAPERS
REFERENCES
1] Nadarzynski, Oliver Miles, Aimee Cowie and Damien Ridge,
“Acceptability of artificial intelligence (AI)-led chatbot services in
healthcare”, IEEE Research 23, 101-106 (2019).
[2] Jingwen Zhang, Yoo Jung Oh, Patrick Lange, Zhou Yu, “Artificial
Intelligence Chatbot Behavior Change Model for Designing
Artificial Intelligence Chatbots to Promote Physical Activity and a
Healthy Diet”, Journal of Medical Internet Research,305-312
(2020).
[3] Flora Amato, Stefano Marrone, “Chatbots meet
eHealth:automat zing healthcare”, Journal of Medical Internet
Research, 115-123 (2018).
[4] Divya, Indumathi, Ishwarya, Priyasankari, “A Self-Diagnosis
Medical Chatbot Using Artificial Intelligence”, proceeding MAT
Journal, 1256-1264 (2017).
[5] Chin-Yuan Huang, Ming-Chin Yang, Chin-Yu Huang, “A Chatbot-
supported Smart Wireless Interactive Healthcare System for
Weight Control and Health Promotion”, proceeding of the IEEE,
753-760 (2018).
6] Boukricha, H., Wachsmuth, “Modeling Empathy for a Virtual
Human”, Volume 3, International Foundation for Autonomous
Agents and Multiagent Systems, 1135–1136 (2011).
[7] Agarwal, R., Gao, G., DesRoches, C, “The Digital
Transformation of Healthcare: Current Status and the Road
Ahead”. Information Systems Research 21, 796-809 (2010).
[8] Aron, E.N., Smollan, D, “Inclusion of Other in the Self Scale and
the structure of interpersonal closeness”, Journal of Personality
andSocial Psychology 46, 895-902 (2015).
[9] Stefano Marrone, Gabriele Piantadosi, Roberta Fusco,
Antonella Petrillo, Mario Sansone, and Carlo Sansone,”A Novel
Model-Based Measure for Quality Evaluation of Image
Registration Techniques”, International Symposium on Computer-
Based Medical Systems, IEEE,209–214,(2014).
[10] Gabriele Piantadosi, Stefano Marrone, Roberta Fusco,
Antonella Petrillo, Mario Sansone, and Carlo Sansone,”Data-
driven selection of motion correction techniques in breast DCE-
MRI”,IEEE, 273–278, (2015).