AI-Integrated Health Management System
Team
- E/23/100, Apurwa Fernando, email
- E/23/098, Ryan Fernando, email
- E/23/012, Dimal Alagiyawanna , email
- E/23/093, Kavidu Kalhara, email
Table of Contents
Introduction
website Hospitals manage many daily tasks such as patient registration, appointments, medical reports, and doctor consultations. When these tasks are handled manually, it can cause delays, misplaced records, and poor communication between patients and hospital staff.
This project provides a web-based Health Management System to manage these tasks in one place. Patients can register, view appointments, update their profile, make payments, and view reports. Doctors can view appointments and patient details, while receptionists can create appointments and upload reports.
The system improves hospital workflow by reducing manual work, making patient data easier to access, and helping users complete healthcare tasks faster.
Solution Architecture
The system uses a simple client-server architecture. The frontend is built using React, the backend is built using Node.js and Express.js, and the database is MySQL. The frontend communicates with the backend using REST APIs.
JWT authentication is used to protect user accounts and role-based access is used to separate patient, doctor, and receptionist functions. The database stores users, patient profiles, appointments, payments, and reports. The system also includes AI-assisted symptom analysis and hereditary risk support.
Software Designs
The frontend has separate screens for the landing page, login/signup, patient workspace, doctor workspace, and receptionist workspace. React state is used to manage forms, login sessions, dashboard views, loading messages, and errors.
The backend is divided into route, controller, model, and middleware files. Routes receive API requests, controllers handle the main logic, models communicate with the database, and middleware checks authentication and user roles.
The database contains tables for users, patient profiles, appointments, and patient reports. Appointments include doctor name, patient ID, date/time, status, reason, and payment details. Reports are stored with the patient ID, file name, file type, uploaded user, and upload time.
The main user roles are:
- Patient: manage profile, view appointments, pay for appointments, view reports, and use health guidance features.
- Doctor: view appointments, view patient records, update patient details, and complete appointments.
- Receptionist: create/cancel appointments, view patients, and upload reports.
Testing
The application was verified using a two-tiered testing methodology combining automated API integration checks with manual workflow validation.
Automated Integration Tests
An automated Node.js integration test runner validates core server health, user identity management, state persistence, and LLM endpoints prior to compilation:
PASSHealth Endpoint: Confirms Express API and database availability.PASSPatient Signup & Auth: Validates JWT generation and session management.PASSProfile Update & Persistence: Verifies local/MySQL database state mutations.PASSPublic & Protected Symptom Chat: Ensures public triage and authenticated Gemini AI routes respond cleanly.PASSWellness Advice: Validates localized health recommendation array payloads.
Production Build Verification
Frontend compilation is validated using Vite’s production toolchain, compiling 70 React components into minified production assets in 2.13s with zero syntax or import errors. Automated image optimization via vite-plugin-image-optimizer reduces static raster assets by up to 54% to ensure fast loads over low-bandwidth clinical networks.
Manual System Verification
Manual functional tests were conducted across user roles to verify:
- Patient signup, profile customization, and report viewing.
- Receptionist appointment scheduling, confirmation, and report uploading.
- Doctor diagnosis logging and clinical history access.
- Invalid input handling (missing fields, bad credentials, malformed files) with appropriate error handling.
Conclusion
The project achieved a working Health Management System with patient, doctor, and receptionist access. It supports account management, appointments, payments, reports, patient records, and AI-assisted health guidance.
Future improvements include adding prescription management, lab technician access, real payment gateway support, notifications, stronger security, automated testing, and cloud deployment.
The system can be further developed into a commercial hospital management platform for small and medium healthcare centers after adding production-level security, data protection, backups, and compliance features.