Documentation
Documentation
Documentation
Introduction
The Hospital Management System is designed to efficiently manage hospital
operations, including patient and staff records, doctor management, and
appointment bookings. This project integrates a Python interface with MySQL to
store and manipulate data, ensuring secure and streamlined hospital
administration. The system is divided into three main sections: Admin, Patient,
and Doctor, each with its respective functionalities.
2. System Requirements
Programming Language: Python 3.x
Database: MySQL
Python Libraries:
mysql.connector for database connectivity.
os module for operating system interactions.
3. Database Design
The system uses multiple tables in MySQL to manage data. Below are the key
tables:
• patient: Stores patient details such as name, age, gender, phone number,
admit date, and their medical problem.
• patientrecord: Holds records of discharged patients.
• staff: Maintains information about hospital staff members.
• staffrecord: Keeps track of removed staff members' records.
• doctor: Contains details about the doctors, including department and
experience.
• doctorrecord: Logs historical data for doctors who have left the hospital.
• password: Stores hashed admin passwords.
• apply_job: Records job applications for both doctors and staff.
• symptoms_and_dept: Maps symptoms to relevant medical departments.
• appointment: Manages appointments made by patients with doctors.
4. Functionality Overview
4.1 Admin Section
The admin has full control over the system, including adding or removing patients,
staff, and doctors. Key functionalities include:
Add Patient/Staff/Doctor: Allows the admin to input details and store them
in the database.
View Records: Displays patient and staff records from the database.
Update Records: Admin can modify patient and staff details.
Remove Patient/Staff/Doctor: The admin can discharge a patient or remove
a staff/doctor.
Change Password: Admin can update the system's password for enhanced
security.
Job Application Approval: Admin can approve or reject job applications
from doctors.
4. Patient
2 Section
Patients can:
4.3 Doctor
Section
5. Patient
2 Functions
5. Doctor
3 Functions
doctor_menu(): The doctor section allows doctors to:
Doctors log in using their phone number, which is validated to check if it matches
any entry in the doctor table.
6. Data Validation
To ensure data integrity, various validations are in place:
8. User Interaction
The system uses a console-based interface with clear prompts for inputs and
choices. Users interact by selecting options from the displayed menus and
providing necessary details (e.g., names, IDs, and phone numbers).
9. Conclusion
The Hospital Management System provides a structured and efficient solution for
managing hospital operations. With robust data handling via Python and MySQL,
it simplifies patient management, staff allocation, and doctor scheduling, ensuring
a smooth administrative experience.