A comprehensive Hospital Management System to manage patient records, doctor schedules, appointments, surgeries, billing, drugs, tests, and much more. Built using Python and MySQL for efficient database management.
-
Patient Management
- View, add, search, admit, discharge, and migrate patients.
-
Doctor Management
- Manage doctor records, update working hours, and handle appointments.
-
Appointment Management
- Schedule, view, and update appointments for doctors and patients.
- Support for conflict resolution and real-time availability checks.
-
Surgery Management
- Schedule, search, and manage surgeries.
- Link surgeries to doctors and patients for streamlined record-keeping.
-
Billing
- Automated billing with support for various services like tests, drugs, surgeries, and more.
-
Drug Inventory
- Add and update drug stock, view available drugs, and track prescriptions.
-
Test Management
- Schedule and manage tests with detailed patient data.
-
Room and Bed Allocation
- View and allocate beds dynamically.
- Python: For building the application logic.
- MySQL: For database management.
- Tabulate: For pretty table formatting in CLI.
- Python 3.x installed on your system.
- MySQL Server running and configured.
- Required Python libraries:
mysql-connector-python
tabulate
datetime
Install dependencies using:
pip install mysql-connector-python tabulate
-
Create a database named 'hospital' in you MySQL Server by using this command in the MySQL Command Line:
create database hsopital;
-
Download the hospital.sql and hospital.py files.
-
Copy the database to your MySQL server by running this in command prompt:
mysql -u root -p hospital < hospital.sql
Note:
- You'll have to replace root with your MySQL username. (It is root by default if you havent changed it)
hospital.sql
must be present in the same directory where command prompt is running- MySQL needs to be added to Path (environment variables).
- You'll be asked for your MySQL password after you run the command. Enter it and its done!
-
You'll need to replace
your_username
andyour_password
with your MySQL username and password respectively in thehospital.py
file in the statement (Line 10):
con=ms.connect(user="your_username",passwd="your_password",host="localhost",database="hospital")
- Run
hsopital.py
!
Contributions are welcome! Please fork the repository, make your changes, and submit a pull request. Please star the repository if you found it helpful.