A simple hospital management system built with Java Swing and MySQL.
Hospital.management.mp4
- Login: Secure login for authorized users.
- Doctor Records:
- Add new doctors
- View all doctors
- Edit doctor information
- Delete doctors
- Patient Records:
- Admit new patients
- View all patients
- Edit patient information
- Discharge patients
- User-Friendly Interface: All forms are centered and have a clean layout.
- Database Integration: Uses MySQL to store and retrieve data.
-
Clone the repository:
git clone https://github.com/weedu230/Hospital-Management-System
-
Set up the database:
- Make sure you have MySQL installed and running.
- Create a new database named
hms. - Import the
Database File/hms.sqlfile to create the necessary tables.
-
Configure the database connection:
- Open the
DBConnection.javafile and update the following line with your MySQL username and password:return DriverManager.getConnection("jdbc:mysql://localhost:3306/hms", "root", "");
- Open the
-
Run the application:
- Compile and run the
LoginPage.javafile to start the application.
- Compile and run the
- Login: Use the default username and password (
admin/admin) to log in. - Welcome Screen: After logging in, you will be taken to the welcome screen, where you can choose to manage doctor or patient records.
- Doctor Records:
- View Doctors: See a list of all doctors in the database.
- Add Doctor: Add a new doctor by providing their name and specialization.
- Edit Doctor: Update the information of an existing doctor.
- Fire Doctor: Remove a doctor from the database.
- Patient Records:
- View Patients: See a list of all patients in the database.
- Admit Patient: Add a new patient and record their details.
- Edit Patient: Update the information of an existing patient.
- Discharge Patient: Remove a patient from the database.
| Role | Username | Password |
|---|---|---|
| Admin | admin |
admin |
Make sure your MySQL server is running before launching the app. Tested on Java 8+ and MySQL 5.7+.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Made with ☕ and 💻 by weedu230
Student of Bahria University Karachi