As we all know, \"What happens when a coronavirus pandemic strikes,\" and we require access to medical services 24 hours a day, seven days a week, we came up with the notion of a healthcare chatbot. As Healthcare chatbots offer a personalized approach to every user; in ways that can be more convenient, and efficient that they surpass human capabilities. It\'s crucial to remember that, while chatbots can provide useful facts and symptoms, they aren\'t equipped to make a formal diagnosis. This project makes predictions about various illnesses using the machine learning algorithm. The chatbot will ask to state the symptoms which the user is experiencing. The user can state their symptoms one by one and receive the predicted output. The user can state their symptoms one by one and receive the predicted output. It will also provide the description of the illness occurring based on the symptoms. The main premise behind these talking or texting is smart machine learning algorithms is to become the first point of contact before any human involvement is needed.
Even as we become accustomed to the most recent alterations brought on by the Covid-19 pandemic, the fear of becoming infected is growing as new varieties emerge. The case have yet to be recovered, despite the stringent lockdown limitations, causing a disruption in our daily lives. Applying for a doctor's appointment is one of the challenges. Despite the fact that hospitals follow the Covid-19 rules to the letter, the public has the impression that hospitals are a hotbed for Corona patients. We came up with the idea of self-diagnosis at home to ease this worry and prevent people from leaving their homes too much.
The user can review their health reports for critical concerns such as Cancer, Diabetes, Heart, Liver, Kidney, Malaria, and Pneumonia, all of which are major health concerns in India. This is accomplished through the usage of Flask to create a Medical Web page where users may input their health report information and receive a diagnosis. This website was created with the use of machine learning and web development techniques. Other health-related questions are answered by the chatbot service. The chatbot will ask the user to describe their symptoms, such as "I'm feeling cold," "I have skin rashes," "Vomiting," "Fatigue," and so on, and the model will then predict that the user has "Dengue." Further, it will list out precautions that the user may take in order to decrease its severity. It also provides a description of the predicted disease which helps us understand it better. It helps to figure out what is wrong and how urgent the situation is and recommends expert doctors with their profile to book an appointment in the case of an emergency.
B. Problem Definition
To create a Healthcare chatbot designed to simulate the diagnosis of a general physician. To create a user-friendly interface where patients can diagnose themselves with the help of a chatbot. The chatbot can make predictions of the disease with the help of the symptoms experienced by the patients; provide its description and precautions. If the severity is high, it will recommend a doctor with their profile link. The user can also validate their medical reports using the Report prediction pages in the webpage.
The key benefit of this study is that users will be able to assess the severity of their illnesses and take necessary action as a result of their findings. They can then decide whether a hospital visit or clinic appointment is required, or whether self-diagnosis and telephonic consultation will sufficient. The user can save time by doing this task instead of waiting for hours and making frequent journeys to the hospital.
Here different datasets related to disease are used. Total of 70% data is used for training our model and the rest is used for testing. Few python libraries like pandas, numpy and sklearn are used for reading the dataset and visualizing it. Machine learning model used here is Decision Tree Classifier. Flask is used to create a web page.
The csv files are required to train the model according to its purpose.
The dataset contains ‘disease’ and ‘symptoms’ attributes. The ‘disease’ attribute contains the disease name and ‘symptoms’ contain its corresponding symptoms.
The dataset contains ‘disease’ and ‘description’ attributes. The ‘disease’ attributecontains the disease name and ‘description’ contains its corresponding meaning.
The dataset contains ‘disease’ and ‘precaution’ attributes. The ‘disease’ attribute contains the disease name and ‘precaution’ contains its corresponding precautions.
The dataset contains ‘symptom’ and ‘weight’’ attributes. The ‘symptom’ attribute contains the symptom name and ‘weight’ contains its corresponding severity level which ranges from 1 to 7 with 1 being least severe and 7 being the most severe.
Libraries like pandas, skLearn and numpy are imported. Algorithm used here is Decision Tree Classifier. Dataset is imported for training and testing purpose.
PANDAS: This will allow us to import our dataset from various file format. This works with tabular data.
SkLearn: Sklearn is the most useful library for machine learning in python. It provides classification, regression and clustering of data.
Numpy: Numpy module works with numerical data. This supports multidimensional arrays.
Dataset: 30% of data is used for testing purpose and rest is being used in training the model.
Decision Tree Classifier: This is a tree structured classifier. Here internal node represents the features of data, branches represent the decision rules and the nodes represents the outcome.
Flask:Flask is a compact and lightweight Python web framework that offers helpful tools and capabilities to facilitate the development of online applications. Since you can quickly create a web application using only one Python file, it allows developers flexibility and is a more approachable framework for beginning developers.
Machine Learning Algorithm:The approach used by the AI system to carry out its task generally, predicting output values from given input data is known as a machine learning algorithm. Our machine learning model in this case is a decision tree classifier.
Pytesseract: An OCR tool for Python called Pytesseract, commonly known as Python-tesseract, also acts as a wrapper for the Tesseract-OCR Engine. It helps to read text in images.
Flask_mail:Theflask mail extension provides an interface to set up our flask application and to send mail and messages.
III. MODELING AND ANALYSIS
Below figures gives an overview on the implementation of our machine learning model
At first, required python libraries are being imported. Then the dataset is read and it’s preprocessing, cleaning and removing null values process is completed. Total of 70% of data is trained using our machine learning model and the rest is used for testing. Decision Tree Classifier is implemented. Then the trained model is stored in a file. Some predictions predictions are made using our model to check its accuracy.
We upload the report and to read the text in our report we are using pytesseract. It is an OCR(Object Character Recognition) tool, used to read text from images. Then we focus on some important categories and display the fields which need attentions.
IV. RESULTS AND DISCUSSION
The functioning of the chatbot is given in Fig-(4) and Fig-(5). The home page can be seen in Fig(3) and the working of the appointment booking and report summary can be seen in Fig-(6) and Fig-(9).
Here we took an exmaple of stomach pain to show the functionalities of the chatbot. And as a result it suggested GERD(Gastroesophageal reflux disease), it also suggested some precautions like avoid spicy foods, avoid lying down, maintain healthy weight etc for better reuslts.
Even though there are various norms and regulations implemented, the severity of the disease should not be neglected. Though proper precautions are maintained, people still have a fear of going to hospitals, risking their chances of getting infected. This work will help create a healthy and safe environment without going through the fear and risk of getting infected. People who are finding it difficult to afford the hospital bills can also be benefitted from this project. We hope to develop our chatbot capacity in the future by adding capabilities like translation so that those who aren\'t fluent in English may utilize it without difficulty. More features, such as prescribing common drugs, can be added, and the dataset can be expanded to support more healthcare providers.
 M. Polignano, F. Narducci, A. Iovine, C. Musto, M. De Gemmis and G. Semeraro, ‘HealthAssistantBot: A Personal Health Assistant for the Italian Language’ in IEEE Access, vol. 8, pp. 107479-107497, 2020, doi: 10.1109/ACCESS.2020.3000815.
 X. Ren, G. Spina, S. De Vries, A. Bijkerk, B. Faber and A. Geraedts, ‘Understanding Physician’s ExperienceWith Conversational Interfaces During Occupational Health Consultation’ in IEEE Access, vol. 8, pp. 119158-119169, 2020, doi: 10.1109/ACCESS.2020.3005733.
 R. Oruche et al. ‘Evidence-Based Recommender System for a COVID-19 Publication Analytics Service’ in IEEE Access, vol. 9, pp. 79400-79415, 2021, doi: 10.1109/ACCESS.2021.3083583.
 Kavitha, B. R., and Chethana R. Murthy. ‘Chatbot for healthcare system using Artificial Intelligence’ Int J Adv Res Ideas Innov Technol 5 (2019): 1304-1307.
 Linder, Courtney. The Effects of a Healthcare Chatbots; Language and Persona on User Trust, Satisfaction, and Chatbot Effectiveness. Diss. Clemson University, 2020.
 Dharwadkar, Rashmi, and Neeta A. Deshpande. \"A medical chatbot.\" International Journal of Computer Trends and Technology (IJCTT) 60.1 (2018): 41-45.
 Gentner, Tobias, et al. \"A Systematic literature review of medical chatbot research from a behavior change perspective.\" 2020 IEEE 44th Annual Computers, Software, and Applications Conference (COMPSAC). IEEE, 2020.
 Tjiptomongsoguno, Andrew Reyner Wibowo, et al. \"Medical chatbot techniques: A review.\" Proceedings of the Computational Methods in Systems and Software (2020): 346-356.  Athota, Lekha, et al. \"Chatbot for healthcare system using artificial intelligence.\" 2020 8th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions)(ICRITO), IEEE, 2020.