Healthcare Chatbot
Healthcare Chatbot
Healthcare Chatbot
Bachelor of Technology
in
Computer Science & Engineering / Information Technology
Submitted by
Amisha Chauhan (201117)
Naman Puri (201318)
This is to certify that the work which is being presented in the project report titled “Healthcare
Chatbot using NLP Techniques” in partial fulfilment of the requirements for the award of the
degree of B.Tech in Computer Science and Engineering and submitted to the Department of
Computer Science and Engineering, Jaypee University of Information Technology, Waknaghat
is an authentic record of work carried out by “Amisha Chauhan 201117” and “Naman Puri
201318” during the period from August 2023 to May 2024 under the supervision of Dr. Aman
Sharma, Department of Computer Science and Engineering, Jaypee University of Information
Technology, Waknaghat.
i
Candidate’s Declaration
We hereby declare that the work presented in this report entitled ‘Healthcare Chatbot’ in partial
fulfilment of the requirements for the award of the degree of Bachelor of Technology in Computer
Science & Engineering / Information Technology submitted in the Department of Computer
Science & Engineering and Information Technology, Jaypee University of Information Technology,
Waknaghat is an authentic record of my own work carried out over a period from August 2023 to
May 2024 under the supervision of Dr. Aman Sharma (Asst. Prof. (SG), Department of Computer
Science & Engineering and Information Technology).
The matter embodied in the report has not been submitted for the award of any other degree or
diploma.
This is to certify that the above statement made by the candidate is true to the best of my
knowledge.
ii
ACKNOWLEDGEMENT
Firstly, we express our heartiest thanks and gratefulness to almighty God for His divine blessing
making it possible to complete the project work successfully.
We are grateful and wish my profound indebtedness to Supervisor Dr. Aman Sharma,
Assistant Professor, Department of CSE Jaypee University of Information Technology,
Waknaghat. Deep Knowledge & keen interest of my supervisor in the field of “Cloud
Computing” to carry out this project. His proper guidance, encouragement, constant
supervision, constructive criticism, valuable advice, reviewing our work and correcting them at
all stages have made it possible for partial completion of this project.
We would also generously thank each one of those individuals who have helped us
straightforwardly or in a roundabout way in making this project a win. In this unique situation,
We might want to thank the various staff individuals, both educating and not instructing, which
have developed their convenient help and facilitated our undertaking.
Amisha Chauhan
201117
Naman Puri
201318
iii
TABLE OF CONTENT
Chapter 1: Introduction
1.1) Introduction 1
1.3) Objective 2
3.4) Implementation 30
iv
Chapter 4: Testing
5.1) Results 43
6.1) Conclusion 47
References 50
v
LIST OF FIGURES
Fig 3.2.1 This is a rundown of the process of our project, the steps are 24
implemented to ensure a smooth implementation.
Fig 3.3.1 Description of total instances and symptoms available in the dataset 25
Fig 3.3.4 The above figure of our dataset shows various diseases and their 28
corresponding symptoms. This helps our model to match the disease
with likely symptoms.
Fig 3.3.5 The diseases are then binary encoded which makes it easier to train the 29
model as working on binary digits is way easier.
Fig 3.4.1 List of all the pre included libraries and packages in python which we 30
have made use of.
Fig 3.4.2 The dataset is divided into two categories: training data and testing data 31
to help in better performance.
Fig 3.4.3 Configuration file of our model which lists down various frameworks 32
and their versions to run our code.
Fig 3.4.4 The data is then trained where the disease is matched with the 32
symptoms.
vi
Fig 3.4.5 The user is able to list their symptoms and the chatbot responds back 33
with the likely disease.
Fig 3.4.6 This is the interface which users will be looking at when they first boot 33
the chatbot.
Fig 3.4.7 This figure shows the interaction between the chatbot and the user. 34
Fig 4.2.1 The user is interacting with the chatbot and replying to the queries. 41
Fig 4.2.2 Another user wishes to interact with the chatbot and the corresponding 42
disease is predicted.
Fig. 5.1.1 Result of the working model when data is fed to it. 44
vii
ABSTRACT
Healthcare is rapidly moving toward patient-centred care, and technology has been essential in
developing the quality of personalised healthcare. This is a report about an artefact, which is a
healthcare chatbot that utilises state-of-the-art natural language processing technology. Chatbot
was developed with an aim of enhancing patient participation, provisioning relevant messages
in time, as well building linkage between doctors and patients.
It leverages highly advanced NLP systems that can understand the sentiments of conversations
and respond back as a real human would, making communication easy and relevant within its
context. It can be integrated in existing healthcare platforms and hence made accessible by
patients for queries such as health information to specific medical inquiries. Through artificial
intelligence or machine learning algorithms, it is possible for the chatbot to keep improving on
its performance adjusting according to the ever-changing language and user’s preferences.
The healthcare chatbot's key features include symptom analysis, prescription reminders, and
health-related FAQs. By adhering to healthcare standards and using encryption mechanisms for
sensitive information, the system assures data security and privacy compliance.
This study adds to the expanding body of work in harnessing natural language processing (NLP) for
healthcare applications by providing insights into the creation, deployment, and assessment of a
chatbot targeted at enhancing patient experiences and optimising healthcare communication
channels. The findings highlight the potential for NLP-based chatbots to play an important role in
the future of healthcare by enhancing accessibility, efficiency, and patient-centred treatment.
viii
CHAPTER 1: INTRODUCTION
1.1 Introduction
To fulfil the rising need for accessible and efficient patient services in the quickly expanding
healthcare scene, the integration of cutting-edge technology has become critical. Natural
Language Processing (NLP) has emerged as a transformational force, revolutionising the
way people engage with healthcare providers. This study describes a revolutionary
healthcare chatbot system that uses NLP techniques to improve patient engagement and
communication in the healthcare area.
The healthcare system is by no means perfect. The Indian healthcare system is faced with
several challenges being increased healthcare costs, need for nursing, care for senior
citizens, poor not being able to afford healthcare and negligence of public health due to lack
of utilisation of adequate funds. [1] Only 37% of the total Indian population is covered by
health insurance as of 2022, which indicates that close to a billion are still hanging onto
mere hope to afford when an emergency may arrive.
The chatbot, designed to improve user experience, employs powerful NLP models to grasp
and create contextually relevant replies, mimicking normal human interaction. This
intelligent system is intended to help with a variety of healthcare-related tasks, such as
symptom assessments and the transmission of relevant health information.
With the healthcare sector moving towards a paradigm that is more patient-centric, this
research attempts to add to the increasing amount of information about the use of NLP in
healthcare settings. This study aims to highlight the potential influence of natural language
processing (NLP) technologies on healthcare communication channel optimisation and,
eventually, patient outcome improvement by offering a thorough overview of the healthcare
chatbot's development and deployment.
1
1.2 Problem Statement
An enormous need for easily accessible and effective patient assistance systems exists in the
healthcare industry. Frequently, patients need immediate access to medical information and
basic diagnostic advice. Using cutting-edge tools like Scikit-Learn, Pandas, and Pyfiglet, the
task is to develop a system that elegantly blends these functions.
The need to create a healthcare chatbot that makes use of these technologies to give
individualised healthcare support and provide correct medical information is outlined in
this issue statement. This technology may address significant difficulties in the
healthcare industry and improve the patient experience through accurate information
transmission and personalised replies.
1.3 Objectives
● To study the existing technologies for a chatbot
● We aim to create a platform which provides textual, verbal and visual facilities to the
2
● Enhanced Patient Engagement: The project's goal is to encourage patients to take a
more educated and proactive part in their treatment. Patients may have meaningful
conversations about their health, symptoms, and treatment plans with a chatbot that can
comprehend and answer natural language inquiries. This fosters a sense of empowerment
and engagement in patients' care.
● 24/7 Support and Accessibility: The chatbot offers consumers a continuous support
system and is accessible around-the-clock. This feature is especially important when it
comes to medical situations since it guarantees that people may get advice and
information whenever they need it, which might lessen the load on emergency services.
● Technology Advancement in Healthcare: The initiative is in line with the larger trend
of technology improvement in healthcare by utilising NLP methods. It demonstrates how
cutting-edge technologies may improve patient care, communication, and the provision
of healthcare services.
3
1.5 Organization of Project Report
Chapter 1: An overview of the project that includes information about its purpose, its goals,
and how it will benefit users is provided.
Chapter 2: Survey of the literature for the project. This covers the several project reports on
the healthcare-focused chatbot programmes and their uses.
Chapter 3: System Development: In this section, we have covered the project's primary
design, the connections between its components, the platforms it was built on, and a summary
of the algorithms it employed.
Chapter 5: The model is executed, generating results that are analysed to confirm the expected
output and validate performance in real-world scenarios.
Chapter 6: In conclusion, we have discussed the project's results, its future scope, and what
more may be done right now.
4
CHAPTER 2: LITERATURE REVIEW
Anuj Patil [2] created a healthcare chatbot using AI. In the process, he used the following
techniques: NLP, Google API, Rasa NLU and AWS services. The key point in his research was
his use of a large dataset to help with better accuracy.
In another research [3], author Greeshma Kurup created an AI Conversational Chatbot for
Primary Healthcare Diagnosis. She used NLP and concepts of deep learning. She employed
decision tree classifiers in her methodology. Her flaw was her inconsideration of privacy and
security measures for the users of her chatbot.
One noble research was based on the pre-screening for female breast cancer [4], the authors here
used a variety of tools to help guide their research such as Chatbot Framework, YAML,
Character Based Word Segmentation, Logic Adapters. The SAC's assessment scores were
compared to the doctors' scores, and it achieved a high correlation accuracy. FBC doctors
evaluated based on scaling coefficient and weight factors. However, users giving too much
information might not give back any response due to lack of vocabulary.
Another research instance took the opportunity to work on Natural Language Processing based
Human Assistive Health Conversational Agent for Multi-Users [5]. The authors Jim Elliot
Christopher James; Mahima Saravanan; Deepa Beeta Thiyam; Prasath Alias Surendhar S used
Dialog flow application programming interface (API), which is powered by Google's Natural
Language Processing algorithm. The results of the paper demonstrate the development of a
5
health assistant system using Google's Dialog Flow API, which is a natural language processing
algorithm. Users can make health requests and receive relevant health suggestions and
recommendations through text messages.
In Health Chatbot: Design, Implementation, Acceptance and Usage Motivation [6], the authors
A. Softić, J. Husić, Aida Softić, Sabina Baraković made use of the Chat fuel platform to guide
their research. It allows users to interact with the chatbot in a conversational manner, helping
them identify their symptoms and decide whether or not to seek medical attention.
A simple yet effective system Chatbot for Healthcare System Using Artificial Intelligence [7],
The application uses a question and answers protocol where it consists of a login page. Query is
available in the database or displays similar answers. An expert answering page where experts
answer directly to the user’s question. Though, it failed to solve complex queries.
In Implementation of interactive healthcare advisor model using chatbot and visualisation [8],
Tae-Ho Hwang; JuHui Lee; Se-Min Hyun; KangYoon Lee made a system in which the user’s
biological signals could be supervised and forwarded to the chatbot for further observation.
Limited disease prediction and diagnosis using medical info. It requires artificial intelligence
systems.
Now let us look at the various projects already performed on this specific topic and gather key
takeaways from it such as tools used, results established and limitations of that paper.
6
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
7
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
8
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
9
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
10
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
11
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
12
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
13
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
14
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
15
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
16
S. No. Paper Title Journal/ Tools/ Results Limitations
Conference Techniques/
(Year) Dataset
Fig. 2.1.1: Literature surveys consisting of tools, results and limitations observed
17
2.2 Key Gaps in the Literature
- Ethical issues: Data privacy, security, and prejudice are just a few of the ethical issues
surrounding healthcare chatbots. To employ chatbots in a safe and morally responsible
manner, further study is required to pinpoint and resolve these issues.
- User experience: It has not been given enough attention in study; instead, it is mostly
concerned with the technical features of chatbots rather than how people use and
perceive them. To create chatbots that are more efficient and easier to use, more study is
required to comprehend user demands and preferences.
- Integration issues: Integrating chatbots into the current healthcare systems presents a
variety of difficulties. To overcome these obstacles and improve the deployment of
chatbots, additional research is required.
18
CHAPTER 3: SYSTEM DEVELOPMENT
Python [14] is a popular, advanced, and versatile programming language. Its vast libraries and
ease of reading have contributed to its global appeal. It is the best option for numerous
applications, such as data analysis and web building.
- Readability: Python's syntax places a strong emphasis on the readability and simplicity of
code, which facilitates the writing and maintenance of code by developers. Large codebases
and collaborative projects will benefit from this functionality.
- Large Library: Python's vast library and framework ecosystem allow it to meet a wide
range of needs. These consist of libraries for machine learning (TensorFlow, PyTorch),
web development (Django, Flask), data analysis (NumPy, Pandas), and more. These
libraries' availability makes development easier and gives programmers powerful tools.
An open-source Python package called Streamlit [15] was made to make making dashboards
and web apps easier. With an emphasis on interaction and data presentation, it is excellent at
developing data-driven applications.
- Ease of Use: Developers can design web applications with little difficulty thanks to
Streamlit's user-friendly interface. It offers a straightforward script-based method that
expedites the design and prototyping process.
19
- Data Visualization: Pre-built components are included in the collection to help with the
creation of dynamic and visually attractive visualisations. This makes it particularly
suitable for scenarios where it is imperative to communicate data insights through graphs
and charts.
3.1.3 The Natural Language Toolkit (NLTK): The Untapped Potential of Text Analysis
NLTK [16] is a powerful Python library designed specifically for natural language processing
(NLP). Along with other text analysis features, it provides an abundance of tools for sentiment
analysis, stemming, and tokenization.
- Text analysis capabilities: Because of its wide variety of text analysis skills, NLTK is
a popular choice for NLP work. Tokenization, which divides text into words, stemming,
which restores words to their most basic form, and other functionalities are available to
developers.
- Sentiment Analysis: We perform sentiment analysis through NLTK which will assist
us to ascertain if a certain statement depicts some positive or negative emotion. This
could assist in cases of applications like the capture of recipients input appropriately.
3.1.4 Scikit Learn: For use of statistical modelling and machine learning models on it.
Scikit Learn [17] is a versatile python-based machine learning tool kit, having a lot of features
for different types of machine learning applications.
20
- Simple and Consistent API: Clear and Consistent API has greatly contributed to Scikit-
Learn usage and good image among other machine learners. Its commitment to the
comfort of the practitioner is shown by the simple nature of the library’s API.
- Preparing data: It is a crucial phase in the machine learning process that attempts to
raise the quality of the dataset and prepare it for effective model training. Scikit-learn
offers a variety of tools and capabilities that handle many common preprocessing tasks,
making this process simple.
3.1.5 Pyfiglet:
A Python module known as pyfiglet [18] communicates with FIGlet, a program that generates
text banners in various typefaces using ASCII characters. The library provides Python
programmers with an easy way to incorporate FIGlet functionality into their scripts or programs,
giving users the capacity to create ASCII art text banners with a variety of font styles quickly
and easily.
- Integration with Scripts: Pyfiglet is a well-liked tool that developers use to add a
distinctive and visually appealing style to their command-line scripts or applications.
Applications using textual output can benefit greatly from this, as ASCII art can improve
the user experience.
- Font Customization: A variety of FIGlet fonts, each with a distinct style, are supported
by pyfiglet. By choosing various typefaces, users may alter how the created ASCII art
looks. Furthermore, the library offers developers freedom in font selection by enabling
the usage of bespoke FIGlet font files.
21
3.1.6 Pandas in Python:
Pandas [19] is an open-source data manipulation and analysis toolkit for Python that is both
robust and extensively utilised. Along with capabilities for data cleansing, aggregation, and
analysis, it offers data structures for effectively storing and managing massive datasets.
- Data Input/Output: CSV, Excel, SQL databases, JSON, and other file formats are
among the many file types that Pandas can read. It also offers ways to write data back
into these formats.
3.1.7 gTTS:
A Python package called "Google Text-to-Speech," or gTTS [20], makes it possible to convert
text to speech by using Google's Text-to-Speech API. You can turn any text into spoken words
with gTTS.
- Speech Synthesis: The text is processed by Google's API to create speech that sounds
natural. The API creates speech that sounds natural and human by using sophisticated
algorithms.
- Google Text-to-Speech API: gTTS uses the text that has been supplied as input when
sending a request to Google's Text-to-Speech API.
22
3.2 Project Design and Architecture
A thorough and careful approach is required for the design and architecture of a Python
healthcare chatbot, considering the complex needs and sensitivities of the healthcare sector. One
of the most important decisions in this process is selecting the system architecture. A scalable
and modular design, like microservices, can offer the flexibility required for future maintenance
and expansion.
Another important factor in guaranteeing the safe storage and effective retrieval of data
connected to healthcare is database design. Respecting privacy laws is essential to ensuring
patient data privacy and accuracy.
Natural language processing skills are the main focus of the chatbot's logic implementation,
which is frequently done by utilising well-known Python-based chatbot frameworks like
ChatterBot [21] or Rasa [22]. This makes it possible for the chatbot to comprehend and react to
user requests and questions.
Real-time access to patient records and data requires seamless integration with current
healthcare systems and databases. The chatbot's total usefulness is increased by this smooth
connection, which guarantees that it can respond with accuracy and current information.
Good communication and engagement are made easier by an intuitive and user-friendly
interface, which enhances the user experience.
To provide a dependable and efficient healthcare chatbot solution, efficiency, security, and user
experience are essentially given top priority in the entire design and architecture. Through a
complete approach to these areas, the healthcare chatbot may be easily integrated into current
healthcare ecosystems, offering significant assistance to both users and healthcare professionals.
23
Fig 3.2.1: This is a rundown of the process of our project, the steps are implemented in
order to ensure a smooth implementation.
24
3.3 Data Preparation
Let us look at the statistics of our dataset which we are going to use in our model and the various
variables involved in it.
Primary dataset is comprised of all kinds of diseases with multiple permutations and
combinations of possible and likely symptoms.
4920 3-18
Fig 3.3.1: Description of total instances and symptoms available in the dataset
We have further information about each of the diseases, the symptoms corresponding to them
and the severity of the exposed symptoms. We have also gathered the possible precautions a
patient can avail when they are exposed to a specific disease.
The most important step in any algorithm to separate the dataset between training and testing
phase. If the training accuracy is ideal, only then the testing phase can be considered fit for trial
and hence the algorithm can be successfully implemented.
25
PHASE OF THE DATASET NUMBER OF INSTANCES
PRIMARY 4920
TRAINING 4879
TESTING 41
After splitting the dataset, the symptoms are then binary encoded as it is easier to work with
binary numbers.
To guarantee the efficacy and precision of a healthcare chatbot, data preparation is a rigorous
and multi-step procedure. Clearly describing the chatbot's precise use cases—such as symptom
assessment, prescription writing, or patient education—is the first stage in the process. This
stage makes sure that the model created and the data gathered are appropriate for the intended
uses.
Clinical records, medical literature, and patient encounters are among the sources from which
pertinent healthcare data is acquired. To guarantee excellent quality and consistency, the
gathered data is thoroughly cleansed. To prevent redundancy, this entails eliminating duplicates,
standardising formats for consistency, improving accuracy by fixing mistakes, and managing
missing information to preserve dataset integrity.
First and first, it is essential to identify particular use cases, which might range from evaluating
symptoms to writing prescriptions. After relevant healthcare data is gathered from sources such
as clinical records and medical literature, a thorough data cleansing procedure is performed. To
maintain data quality and consistency, this entails addressing problems including duplication,
standardising formats, fixing mistakes, and managing missing values.
26
The cleaned data is labelled appropriately for supervised learning. This is an important stage
because it lets the model identify links and patterns in the data. Depending on the use case of
the chatbot, annotations may involve labelling medical processes, diagnoses, or symptoms.
After the text has been analysed, feature extraction techniques are used to turn it into numerical
features. This conversion converts text data into an algorithm-readable format, which is essential
for training machine learning models.
The processed text input is subsequently converted into numerical features by feature extraction,
which makes it easier to train machine learning models. To ensure that the model is trained on
one subset and validated and tested on independent subsets to assess its generalizability, the
dataset is thereafter divided into training, validation, and testing sets.
The training, validation, and testing sets are the three subsets that make up the dataset. This
section is essential for evaluating the generalizability and performance of the model. The model
is trained on the training set; it is fine-tuned and protected from overfitting by the validation set;
and its ultimate performance is assessed on the testing set.
Models are trained to comprehend user questions and provide intelligent responses using the
provided dataset. The model gains knowledge from the training set and is refined throughout
training in response to input from the validation set. The last assessment on the testing set
verifies that the model functions effectively on untested data, demonstrating its resilience and
dependability.
These procedures must be carefully followed to supply the healthcare chatbot with a high-quality
dataset that allows it to respond intelligently and accurately to a range of healthcare-related
questions. This careful planning guarantees that the chatbot will be able to assist patients and
healthcare providers in an efficient manner.
The following table describes how a single disease can have different symptoms and negates the
point that only certain symptoms can be directly associated to a particular disease.
27
Fig 3.3.4: The above figure of our dataset shows various diseases and their corresponding
symptoms. This helps our model to match the disease with likely symptoms.
28
To initiate data preparation, we convert the symptoms into binary form by binary encoding.
Fig 3.3.5: The diseases are then binary encoded which makes it easier to train
the model as working on binary digits is way easier.
29
3.4 Implementation
Using Natural Language Processing (NLP) techniques to implement a healthcare chatbot
requires several important processes, from selecting the appropriate tools and libraries to
creating and launching the chatbot. This is a thorough overview of the implementation
procedure:
Fig 3.4.1: List of some of the pre included libraries and packages in python which we have
made use of.
30
● Preprocessing:
While preparing text data for NLP analysis, tokenization, stop word removal, and
lemmatization or stemming are essential processes. The text is divided into discrete
words, or tokens, using tokenization. By eliminating frequent words like "and" or "the,"
which typically do not add much sense, stop words are eliminated. Words are reduced to
their base forms by lemmatization, and to their root forms through stemming. Through
the reduction of noise and concentration on significant material, these procedures
guarantee that the text is in a consistent and streamlined structure that is appropriate for
efficient NLP analysis.
Fig 3.4.2: The dataset is divided into two categories: training data and
testing data to help in better performance.
31
● Model Selection:
Based on our case, we select a suitable NLP model. Conventional machine learning
models or rule-based models can be used for easier jobs.
Fig 3.4.3: Configuration file of our model which lists down various frameworks
and their versions to run our code.
Fig 3.4.4: The data is then trained where the disease is matched with the symptoms.
32
● Integration with Chatbot Framework:
Construct a connection between the chatbot framework and the NLP components.
Through this connection, the chatbot's comprehension and suitable response to user
inputs are guaranteed.
Fig 3.4.5: The user can enter their symptoms in the chatbot.
33
● Testing:
Introduce the chatbot to a comprehensive testing session. Verify that it delivers accurate
and contextually relevant information by testing its replies in a range of healthcare
contexts. Conduct user acceptability, integration, and unit testing.
34
● Monitoring and Maintenance:
Using reliable monitoring solutions is essential for keeping track of user interactions and
evaluating chatbot effectiveness when it comes to monitoring and maintenance. These
technologies make it easier to see possible problems, which enables prompt intervention
and optimisation. Simultaneously, an organised maintenance routine is essential. The
continuous efficacy and relevancy of the chatbot are contingent upon regular updates,
problem fixes, and upgrades. In this process, user input plays an important role as a
compass, helping to prioritise changes and enhancements. Through adherence to a
proactive approach that includes regular monitoring and a methodical maintenance
schedule, companies may cultivate long-term user engagement and happiness,
strengthening the chatbot's usefulness and durability.
● Documentation:
Developers, administrators, and end users are guided towards a full grasp of our chatbot
system with this extensive documentation. Customised for every user group, the
documentation describes the features of the chatbot in great depth and offers a thorough
explanation of each one's capabilities. Users are provided with thorough instructions on
how to use the chatbot to expedite their activities, ranging from simple requests to
complex capabilities. Furthermore, troubleshooting instructions are carefully selected
and provide enlightening answers to frequent problems that could occur during use.
Through summarising the chatbot's capabilities and addressing potential issues, this
handbook functions as a vital resource for optimising efficiency and expertise for users
of all skill levels.
35
● Working with the dataset:
36
Following is the snippet of various symptoms, these are associated to a severity number on a
scale of 1-7, 1 being least severe to 7 being most severe.
We also have associated another sub-dataset that describes every disease in a summarised
and to the pinpoint description. This helps the patient to better know about what they are
dealing with without having to research about their disease in a detailed manner.
37
Fig.3.4.10 Disease description dataset.
38
CHAPTER 4: TESTING
4.1 Testing Strategy
It is vital to do thorough testing on a healthcare chatbot that employs Natural Language
Processing (NLP) methods to guarantee precise, dependable, and secure functionality. An
extensive testing plan for the report is provided below:
● User Acceptance Testing (UAT): Involve actual users in conversation with the
chatbot in a variety of healthcare contexts, gathering input on responding and usability.
● Usability Testing: Evaluate the user interface's intuitiveness while taking user
comments and ease of use into account.
● Integration Testing: The goal of integration tests is to make sure that the various
components of the chatbot function together as planned.
Database interaction: To store and retrieve user data, make sure there is a smooth
interaction with the database.
● Functional Testing: Functional testing confirms that the chatbot accurately carries out
tasks linked to healthcare.
Symptom Checking: Ensure if the chatbot can respond to questions about symptoms.
Medical Advice: Ensure that the chatbot offers accurate and suitable medical advice.
39
4.2 Test Cases and Outcomes
A model intended for diagnostic use, for example, might be evaluated in the healthcare area
utilising a variety of patient profiles and symptoms. Using a variety of data points, we may
evaluate the model's diagnostic accuracy for various circumstances. This comprehensive
analysis is essential since it confirms that the model's predictions hold true in a variety of
possible real-world scenarios. Discrepancies between the model's outputs and predicted results
might be used to identify areas for model improvement.
Determining and resolving the model's biases and shortcomings requires extensive testing with
a variety of inputs. This might entail making sure that the model works equally effectively for
all demographics, such as age groups, genders, and ethnicities, in a healthcare context in order
to prevent biases that can result in uneven treatment. Any biases found may be fixed by rigorous
testing, improving the model's overall fairness and accuracy.
To sum up, test case performance evaluation is essential for confirming the precision of
predictive models, especially in vital domains such as healthcare. It guarantees the robustness
and reliability of the model and aids in locating biases and potential improvement areas. We can
improve the performance of models and make sure they deliver reliable and accurate predictions
in real-world applications by subjecting them to rigorous testing using a variety of inputs.
Building trust in the model's predictions and, eventually, enhancing decision-making in real-
world situations depend heavily on this procedure.
40
- User experiencing stomach ache:
Fig 4.2.1: The user is interacting with the chatbot and replying to the queries.
41
- User experiencing weight loss
Fig 4.2.2: Feeding the symptoms to the chatbot and getting the likely disease.
42
CHAPTER 5: RESULTS AND EVALUATION
5.1 Results
User authentication procedures provide safe access to patient-specific data, and thorough
security testing verifies the chatbot's resistance to typical security risks. The chatbot responds to
unclear requests with clarity or broad information, and it handles errors with efficiency. The
chatbot's usefulness in urgent medical conditions is demonstrated by its smooth emergency
response capabilities.
The chatbot's ability to estimate symptom severity is precise and sophisticated, demonstrating
its mastery of medical context awareness. The system has processes in place for quickly
elevating serious problems, and it responds to user feedback with effectiveness. The chatbot
exhibits scalability even under heavy loads, maintaining constant performance across many
browsers. The chatbot complies with security and privacy regulations, demonstrating its
regulatory compliance.
The chatbot's medical correctness and suitability for healthcare settings are further supported by
positive comments from cooperative testing with medical experts. All these outcomes support
the chatbot's effectiveness, privacy compliance, and user-centred design in providing
trustworthy and safe medical information. It is advised that it be continuously monitored and
adjusted to new standards to maintain its capabilities.
43
Fig. 5.1.1 Result of the working model when data is fed to it
44
5.2 Comparison with Existing Solutions
The use of technology has opened the door for creative ways to improve patient involvement
and expedite communication in the quickly changing healthcare environment. The use of
Natural Language Processing (NLP) methods in healthcare chatbots is one such innovative use.
To give a thorough knowledge of the advantages and disadvantages of the current solutions on
the market, this comparative study attempts to assess and compare them.
45
● User-Friendly Interface and Responsiveness:
In contrast to others, the chatbot has a highly adaptable and user-friendly interface
suitable with numerous devices. Its excellent responsiveness offers a smooth user
experience, resulting in heightened user engagement. This versatility, along with a
flexible design, distinguishes the chatbot, making it an accessible and user-centric
solution that caters to varied user preferences and devices.
Every healthcare chatbot solution that has been described has its own advantages and
disadvantages and aims to meet various healthcare business demands. The organisation's
objectives, financial limits, and desired degree of customisation should all be taken into
consideration while selecting a particular solution. The capabilities and effectiveness of
healthcare chatbots will probably continue to grow as the area develops thanks to continuous
research and advancements in NLP.
46
CHAPTER 6: CONCLUSION AND FUTURE
SCOPE
6.1 Conclusion
The healthcare chatbot, which uses precise Natural Language Processing (NLP) technology to
expedite preliminary health evaluations, is a major improvement in virtual healthcare support.
Through conversational engagement and eliciting symptoms, the chatbot is able to provide
precise illness diagnosis and customised medication recommendations.
This chatbot stands out because of its strong natural language processing (NLP) algorithms,
which are further improved by a prescription tool that considers context to provide tailored
suggestions. By giving personalised guidance, this not only increases the accuracy of diagnoses
but also improves the user experience overall.
A seamless user experience is ensured by the chatbot's adaptable design, which enables seamless
interaction and adjustment to various user demands and preferences. Furthermore, cooperative
testing with medical professionals raises the chatbot's legitimacy and establishes it as a reliable
health advisor.
Frequent upgrades are necessary for it to remain current and keep becoming better. These
improvements not only show the system's dedication to improving virtual healthcare assistance, but
they also guarantee privacy standards are followed and a user-centric design approach is maintained.
All things considered, the healthcare chatbot is a promising advancement in virtual healthcare,
providing precise diagnosis, tailored advice, and a smooth user experience.
47
6.2 Future Scope
The future scope of the healthcare chatbot employing NLP techniques is promising, with
various paths for extension and enhancement:
48
● Accessibility Features:
Enhancing accessibility features, such making sure the interface is easy to use for people
with impairments and being compatible with screen readers, would make the healthcare
system more inclusive.
49
REFERENCES
1) https://www.nih.gov/ : https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6166510/
4) J.-H. Chen et al., “Online Textual Symptomatic Assessment Chatbot Based on Q&A
Weighted Scoring for Female Breast Cancer Pre-screening,” Applied sciences, vol. 11,
no. 11, pp. 5079–5079, May 2021, doi: https://doi.org/10.3390/app11115079.
5) Jim Elliot Christopher James et al., “Natural Language Processing based Human
Assistive Health Conversational Agent for Multi-Users,” 2021 Second International
Conference on Electronics and Sustainable Communication Systems (ICESC), Aug.
2021, doi: https://doi.org/10.1109/icesc51422.2021.9532913.
7) Lekha Athota, Vinod Kumar Shukla, N. Pandey, and A. Rana, “Chatbot for Healthcare
System Using Artificial Intelligence,” Jun. 2020, doi:
https://doi.org/10.1109/icrito48877.2020.9197833.
50
8) T.-H. Hwang, J. Lee, S.-M. Hyun, and K. Lee, “Implementation of interactive healthcare
advisor model using chatbot and visualisation,” Oct. 2020, doi:
https://doi.org/10.1109/ictc49870.2020.9289621.
11) “AI Based Healthcare Chatbot using Natural Language Processing and Pattern
Matching,” © 2023 IJNRD , vol. 8, no. 5, p. 793, 2023.
https://www.ijnrd.org/papers/IJNRD2305598.pdf
13) J. Chang, J. Park, and J. Park, “Using an Artificial Intelligence Chatbot in Scientific
Inquiry: Focusing on a Guided-Inquiry Activity Using Inquiry Bot,” Asia-Pacific science
education, vol. 9, no. 1, pp. 44–74, Jun. 2023, doi: https://doi.org/10.1163/23641177-
bja10062.
51
17) Scikit-learn: https://scikit-learn.org/stable/
52
53
54