How ankitpolar/hms-final works
This PHP/MySQL hospital management system serves patients, doctors, and administrators through separate web interfaces. The principal patient workflow is appointment booking, followed by payment and confirmation; patients can also review or cancel appointments. Doctors manage appointments and profiles, while administrators manage doctors, patients, and system activity. The excerpts show booking persistence, Razorpay handoff, and appointment-history behavior. Other capabilities are represented from the README and file tree; their internal links are left unverified where source was not sampled.
Main entry points: book-appointment.php Appointment booking · appointment-history.php Appointment history and cancellation · pay.php Payment handoff · payment_success.php Payment confirmation
Components 30
Patient services
- Patient registration and login
hms/registration.php - Patient dashboard
hms/dashboard.php - Appointment booking
hms/book-appointment.php - Doctor availability
hms/check_availability.php - Doctor lookup and fees
hms/get_doctor.php - Appointment history and cancellation
hms/appointment-history.php - Patient profile
hms/edit-profile.php - Payment handoff
hms/pay.php - Payment confirmation
hms/payment_success.php
Doctor services
- Doctor login
hms/doctor/index.php - Doctor dashboard
hms/doctor/dashboard.php - Doctor appointment history
hms/doctor/appointment-history.php - Doctor profile
hms/doctor/edit-profile.php
Administration
- Admin login
hms/admin/index.php - Admin dashboard
hms/admin/dashboard.php - Doctor and specialization management
hms/admin/add-doctor.php - Patient management
hms/admin/manage-users.php - Appointment history
hms/admin/appointment-history.php - Session logs
hms/admin/doctor-logs.php
Shared infrastructure
- MySQL database
- Database connection
hms/include/config.php - Patient login guard
hms/include/checklogin.php - Patient shared interface
hms/include - Doctor shared interface
hms/doctor/include - Admin shared interface
hms/admin/include - Appointment status maintenance
hms/include/update-appointment-status.php
Other components
- Patient
- Razorpay
- Doctor
- Administrator
Connections 31
- Patient → Patient registration and login: registers or signs in
- Patient → Appointment booking: books
- Appointment booking → Doctor lookup and fees: requests doctors
hms/book-appointment.php - Appointment booking → Doctor availability: checks availability
- Appointment booking → MySQL database: writes appointment
hms/book-appointment.php - Appointment booking → Payment handoff: redirects after insert
hms/book-appointment.php - Payment handoff → Razorpay: opens checkout
- Razorpay → Payment confirmation: submits payment result
- Payment confirmation → MySQL database: uses configured connection
hms/payment_success.php - Patient → Appointment history and cancellation: views appointments
- Appointment history and cancellation → MySQL database: reads and updates
hms/appointment-history.php - Patient → Patient profile: updates profile
- Patient → Patient dashboard: uses portal
- Doctor → Doctor login: signs in
- Doctor → Doctor dashboard: uses portal
- Doctor → Doctor appointment history: manages appointments
- Doctor → Doctor profile: updates profile
- Administrator → Admin login: signs in
- Administrator → Admin dashboard: views statistics
- Administrator → Doctor and specialization management: manages doctors
- Administrator → Patient management: manages patients
- Administrator → Appointment history: reviews appointments
- Administrator → Session logs: reviews sessions
- Database connection → MySQL database: connects to
hms/include/config.php - Patient login guard → Patient registration and login: redirects unauthenticated users
hms/include/checklogin.php - Appointment booking → Patient login guard: checks login
hms/book-appointment.php - Appointment history and cancellation → Appointment status maintenance: includes status update
hms/appointment-history.php - Appointment status maintenance → MySQL database: updates expired appointments
hms/include/update-appointment-status.php - Appointment booking → Patient shared interface: includes shared interface
hms/book-appointment.php - Doctor appointment history → Doctor shared interface: includes shared interface
hms/doctor/appointment-history.php - Admin dashboard → Admin shared interface: includes shared interface
hms/admin/dashboard.php