The Hospital Management System is a Java-based application designed to efficiently manage hospital operations such as patient records, doctor details, and appointment bookings. The system enables users to add and view patients, check doctor availability, and schedule appointments seamlessly using a MySQL database for data storage.
- Patient Management: Add new patients and view existing records.
- Doctor Management: Retrieve and list available doctors.
- Appointment Booking: Schedule appointments and check doctor availability.
- Database Integration: Uses MySQL for storing and managing data.
- User-Friendly Interface: Interactive CLI-based input system.
- Programming Language: Java (JDK 8+)
- Database: MySQL
- JDBC: For database connectivity
HospitalManagementSystem/
│── src/
│ ├── HospitalManagementSystem.java # Main class
│ ├── Patient.java # Patient-related operations
│ ├── Doctor.java # Doctor-related operations
│── README.md # Documentation
│── hospital_db.sql # Database schema
- Install Java (JDK 8 or later)
- Install MySQL Server and create a database
- Install VS Code (or any Java-supported IDE)
git clone https://github.com/atinbera/Hospital-Management-System.git
cd hospital-management-system- Import
hospital_db.sqlinto MySQL:
CREATE DATABASE hospital;
USE hospital;
CREATE TABLE patients (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
age INT NOT NULL,
gender VARCHAR(10) NOT NULL
);
CREATE TABLE doctors (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
specialization VARCHAR(100) NOT NULL
);
CREATE TABLE appointments (
id INT AUTO_INCREMENT PRIMARY KEY,
patient_id INT,
doctor_id INT,
date DATE NOT NULL,
FOREIGN KEY (patient_id) REFERENCES patients(id),
FOREIGN KEY (doctor_id) REFERENCES doctors(id)
);Update database credentials in HospitalManagementSystem.java:
private static final String url = "jdbc:mysql://localhost:3306/hospital";
private static final String username = "root";
private static final String password = "TypeYourMySQLPasssword";Compile and run the program:
javac -d . src/*.java
java HospitalManagementSystem- Implement GUI using Java Swing/JavaFX
- Add authentication system for secure access
- Implement prescription & billing system
This project is licensed under the MIT License.
Made with ❤️ by Atin Bera

