How harshh351998/ai-based-healthcare-chatbot works
This PHP/MySQL healthcare portal serves patients and administrators. Patients register or log in, then browse hospital and doctor listings or submit chatbot questions; administrators log in to maintain the question-and-answer knowledge base, hospital and doctor records, and user information. The chatbot uses stored keyword/answer entries and persists conversations. The graph reflects explicit page includes, AJAX endpoints, and database access; some smaller modules are represented by their exact file paths, but unsampled implementation details are not inferred.
Main entry points: connection.php MySQL database · header.php Session and navigation · index.php Portal and login · login.php Login and logout
Components 20
Portal and access
- Portal and login
index.php - Login and logout
login.php - Registration
Register.php - Session and navigation
header.php
Patient services
- Patient home
user/UserHome.php - Chat interface
user/Query.php - Keyword matching and replies
user/QueryResponse.php - Hospital directory
user/Hospitals.php - Hospital listing endpoint
user/HospitalResponse.php - Doctor directory
user/Doctors.php - Doctor listing endpoint
user/DoctorResponse.php
Administration
- Hospital management
Managehospital.php - Hospital CRUD endpoint
hospitalResponse.php - Doctor management
ManageDoctor.php - Doctor CRUD endpoint
doctorResponse.php - Question management
Question.php - Question CRUD endpoint
QuestionResponse.php - User listing
ViewUser.php
Persistence
- MySQL database
connection.php
Other components
- Visitor
Connections 29
- Visitor → Portal and login: opens portal
README.md - Portal and login → Login and logout: submits credentials
index.php - Portal and login → Registration: offers registration
index.php - Login and logout → MySQL database: checks credentials
login.php - Registration → MySQL database: stores account
Register.php - Login and logout → Patient home: redirects user
- Portal and login → Hospital management: redirects admin
index.php - Patient home → Session and navigation: includes navigation
user/UserHome.php - Session and navigation → Chat interface: links to
header.php - Session and navigation → Hospital directory: links to
header.php - Session and navigation → Doctor directory: links to
header.php - Chat interface → Keyword matching and replies: sends chat AJAX
user/Query.php - Chat interface → MySQL database: loads conversation
user/Query.php - Keyword matching and replies → MySQL database: matches and stores
user/QueryResponse.php - Hospital directory → Hospital listing endpoint: requests listings
user/Hospitals.php - Hospital listing endpoint → MySQL database: reads hospitals
user/HospitalResponse.php - Doctor directory → Doctor listing endpoint: requests listings
user/Doctors.php - Doctor listing endpoint → MySQL database: reads doctors
user/DoctorResponse.php - Hospital management → Hospital CRUD endpoint: routes CRUD
Managehospital.php - Hospital CRUD endpoint → MySQL database: writes hospitals
hospitalResponse.php - Doctor management → Doctor CRUD endpoint: routes CRUD
ManageDoctor.php - Doctor CRUD endpoint → MySQL database: writes doctors
doctorResponse.php - Question management → Question CRUD endpoint: routes CRUD
Question.php - Question CRUD endpoint → MySQL database: writes answers
QuestionResponse.php - User listing → MySQL database: reads users
ViewUser.php - Session and navigation → Hospital management: links to
header.php - Session and navigation → Doctor management: links to
header.php - Session and navigation → Question management: links to
header.php - Session and navigation → User listing: links to
header.php