The increasing demand for accessible and efficient healthcare services has led to the integration of artificial intelligence in medical support systems. This paper presents the design and development of an AI Healthcare Chatbot built using a modern technology stack comprising Java (version 17) and Spring Boot for the backend, JavaScript for integration, and HTML/CSS for the frontend interface. The chatbot aims to provide instant, AI-driven medical advice based on user inputs such as symptoms, disease names, gender, age, duration of illness, and severity levels. It covers a range of general and vector-borne diseases including fever, cough, dengue, typhoid, and more. The system intelligently processes the data and offers outputs such as recommended medications for mild to moderate symptoms, preventive care tips, dietary suggestions, and health monitoring guidance.To enhance user interaction, the chatbot interface is designed to resemble a WhatsApp-style conversation with quick-reply button functionalities, allowing intuitive selection of options. The Spring Boot framework serves as the core for business logic and RESTful API communication, ensuring scalability and modularity. This AI-based solution can serve as a preliminary health assistant, reducing dependency on direct human interaction for basic consultations and supporting overburdened healthcare systems.
Introduction
The healthcare industry is evolving through artificial intelligence (AI), particularly via AI-driven chatbots that provide preliminary medical assistance by simulating human conversation. This paper presents an AI Healthcare Chatbot designed as a virtual medical assistant to offer real-time, personalized health advice based on user inputs such as symptoms, demographics, and illness severity. The chatbot suggests possible causes, prevention tips, dietary recommendations, and medications for mild to moderate conditions, while advising severe cases to seek professional care.
Developed using Java 17 and the Spring Boot framework for backend, with HTML, CSS, and JavaScript for a WhatsApp-style frontend interface, the chatbot emphasizes user accessibility and ease of interaction through quick-reply buttons. Unlike complex AI systems relying on large datasets, this system uses a rule-based logic and a structured knowledge base, ensuring lightweight, accurate, and fast responses without heavy resource demands.
Testing showed over 90% accuracy in medical advice and sub-second response times, with strong usability across devices and browsers. While limitations include handling ambiguous inputs and lack of personalization, the chatbot effectively supports preliminary healthcare guidance, particularly benefiting remote or underserved areas. Future improvements could involve advanced AI techniques, multilingual support, and secure data management to enhance functionality and user trust.
Conclusion
The AI Healthcare Chatbot developed in this project demonstrates the practical application of artificial intelligence in delivering preliminary medical guidance through a user-friendly web interface. By combining Java (version 17) and Spring Boot for backend logic with HTML, CSS, and JavaScript for the frontend, the system effectively simulates a virtual health assistant capable of responding to a wide range of user inputs.
It supports users by analyzing disease symptoms, age, gender, illness duration, and severity level to generate personalized advice that includes possible causes, prevention tips, recommended diets, and suggested medications for mild to moderate conditions. The chatbot achieves fast response times, high accuracy in recommendation delivery, and broad accessibility across devices and browsers, making it a valuable tool for enhancing basic healthcare awareness, particularly in regions with limited access to professional medical consultation.
While the chatbot currently relies on rule-based logic for decision-making, its performance has proven to be efficient and scalable. However, there is substantial scope for future enhancement. One of the key areas for improvement is the integration of Natural Language Processing (NLP) and Machine Learning (ML) algorithms, which would allow the chatbot to understand free-text queries, adapt to user behavior over time, and improve the accuracy of responses through continuous learning. Furthermore, incorporating multilingual support would broaden its usability in diverse linguistic regions, and implementing secure patient data storage through blockchain technology could open the door to more personalized and trustworthy healthcare services. In future developments, the chatbot can be connected to real-time databases of hospitals, pharmacies, or emergency services to provide users with location-based recommendations. Overall, this project lays the foundation for a scalable, intelligent, and interactive digital healthcare assistant that can evolve with advancements in AI and user needs.
References
[1] D. M. Sreedhar, S. K. Kumar and A. M. Babu, \"A Survey on Chatbot Implementation in Customer Service Industry through Deep Neural Networks,\" Procedia Computer Science, vol. 165, pp. 324–331, 2019.
[2] A. Ramesh, M. Kambhampati, J. Monson and S. Drew, \"Artificial intelligence in medicine,\" Annals of The Royal College of Surgeons of England, vol. 96, no. 4, pp. 223–226, 2014.
[3] M. Nuruzzaman and O. Rahman, \"A Comparative Study on Chatbot Implementation Techniques,\" in International Conference on Computer and Information Technology (ICCIT), Dhaka, Bangladesh, 2017.
[4] Spring Boot Documentation, \"Spring Boot Reference Guide,\" [Online]. Available: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/. [Accessed: Apr. 23, 2025].
[5] Oracle, \"Java SE 17 Documentation,\" [Online]. Available: https://docs.oracle.com/en/java/javase/17/. [Accessed: Apr. 23, 2025].
[6] World Health Organization (WHO), \"Artificial Intelligence in Healthcare: Transforming the Future of Medicine,\" [Online]. Available: https://www.who.int/publications/i/item/9789240029200. [Accessed: Apr. 23, 2025].
[7] A. Pereira and D. Diaz, \"Healthcare Chatbots: Trends, Benefits and Use Cases,\" Journal of Medical Systems, vol. 45, no. 9, pp. 1–10, 2021.
[8] M. McTear, Z. Callejas and D. Griol, The Conversational Interface: Talking to Smart Devices, Springer, 2016.
[9] Google Developers, \"Web Speech API – Speech Recognition and Synthesis,\" [Online]. Available: https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API. [Accessed: Apr. 23, 2025].
[10] R. Zhang et al., \"Machine Learning Models for Predicting Health Conditions from Medical Data,\" IEEE Access, vol. 8, pp. 136213–136225, 2020.