A simple, functional Java Swing + MySQL desktop app for managing patients, rooms, employees, and more.
- 🔐 Login System: Secure MySQL authentication.
- 🧑⚕️ Add New Patient: Register patients with essential details.
- 📋 All Patient Info: View patient records in a table with search.
- 🏥 Discharge Patient: Update and record discharged patients.
- 🛏 Room Management: Add/view rooms and track availability.
- 👥 Employee Info: Manage hospital staff (add/view).
- 📊 Dashboard: Real-time metrics (total patients, available rooms, etc.).
- 🎨 UI/UX: Clean design with navy sidebar, light blue active tabs, green headers.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
git clone https://github.com/your-username/hospital-management-system.git
- Java 8+ (JDK 17 recommended)
- MySQL 8.0+
- MySQL Connector/J (add to classpath)
- IDE: IntelliJ / Eclipse / NetBeans
CREATE DATABASE hospital_db;
USE hospital_db;
CREATE TABLE users (
username VARCHAR(50) PRIMARY KEY,
password VARCHAR(50)
);
CREATE TABLE patients (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
age INT,
gender VARCHAR(20)
);
CREATE TABLE rooms (
room_number VARCHAR(10) PRIMARY KEY,
type VARCHAR(20)
);
INSERT INTO users (username, password) VALUES ('admin', 'admin123');
- Open in your IDE.
- Update DB credentials in
conn.java. - Run
Login.java. - Use default credentials:
- Username:
admin - Password:
admin123
- Username:
- Complete remaining tabs and CRUD functionality.
- Add form validation and input constraints.
- Enhance UI with better icons and spacing.
- Add print/export patient reports.
Got ideas or issues? File an issue or reach out!
📬 LinkedIn: Sushil Regmi
🌍 Portfolio: Soocil.tech
Built with 💙 in Java and SQL.







