Skip to content

Surya63023/hospital-management-system-java-full-stack-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ Hospital Management System (HMS)

Enterprise-grade role-based hospital management system for streamlined clinical, administrative, and operational workflows.


πŸ“Œ Problem Statement

Hospitals require centralized control over patient records, doctor management, department administration, appointment scheduling, prescriptions, and audit tracking.

Manual or disconnected systems introduce inefficiencies, security risks, and poor traceability.
This system provides a structured, secure, database-driven platform to manage multi-role healthcare operations in a unified environment.


πŸ‘₯ Target Users & Capabilities

πŸ” Admin

  • Manage Doctors, Patients, Departments
  • Monitor Appointments
  • View Audit Logs
  • Access system-wide operational data

🩺 Doctor

  • View assigned appointments
  • Manage patient records
  • Create prescriptions
  • Access medical reports

πŸ§‘β€βš•οΈ Patient

  • Access dashboard
  • View appointments
  • View prescriptions
  • Access medical reports

πŸš€ Technology Stack

  • Java 11+
  • Jakarta Servlet 6.0 (Jakarta EE 10)
  • JSP (Server-Side Rendering)
  • JDBC
  • MySQL 8.x
  • Apache Tomcat 10+
  • mysql-connector-j-9.1.0

πŸ— Architecture

Architecture Style

  • Layered Architecture
  • MVC Pattern
  • DAO Pattern
  • Monolithic Deployment

Layer Breakdown

Presentation Layer β†’ JSP
Controller Layer β†’ Servlets
Business Logic β†’ Embedded within Servlets
Data Access Layer β†’ DAO + DAOImpl
Model Layer β†’ POJOs
Security Layer β†’ Filters (AuthFilter, RoleFilter)

Request Flow

Client β†’ Servlet β†’ DAO β†’ Database β†’ JSP Response


πŸ“¦ Major Modules

πŸ” Authentication Module

  • LoginServlet
  • LogoutServlet
  • Session-based authentication
  • Role-based filtering

πŸ‘€ User Management

  • Users entity
  • Role control and validation

πŸ‘¨β€βš•οΈ Doctor Management

  • CRUD operations
  • Department mapping
  • Consultation fee tracking

πŸ§‘β€βš•οΈ Patient Management

  • CRUD operations
  • Profile management

πŸ₯ Department Management

  • Department CRUD
  • Medical specialization classification

πŸ“… Appointment Management

  • Book appointments
  • Doctor-specific scheduling
  • Status tracking (Completed, Cancelled, Scheduled)

πŸ’Š Prescription Management

  • Prescription entity
  • Appointment-based linkage
  • DAO-driven persistence

🧾 Medical Reports Module

  • MedicalReports entity
  • Database-stored report entries
  • Report type classification (MRI, ECG, BLOOD_TEST, etc.)

πŸ“Š Admin Dashboard

  • System overview
  • Operational visibility

πŸ“ Audit Logging

  • Tracks critical system actions
  • Maintains traceability

πŸ”’ Security Implementation

  • Session-based authentication
  • Role-based authorization
  • AuthFilter for login protection
  • RoleFilter for endpoint-level access control
  • Restricted dashboard access per role
  • Direct JSP access prevention

πŸ“ Project Structure

Hospital_Management_System/ β”‚ β”œβ”€β”€ src/ β”‚ └── main/ β”‚ β”œβ”€β”€ java/ β”‚ β”‚ └── com/ β”‚ β”‚ └── hospital/ β”‚ β”‚ β”œβ”€β”€ dao/ β”‚ β”‚ β”‚ β”œβ”€β”€ AppointmentsDAO.java β”‚ β”‚ β”‚ β”œβ”€β”€ AuditLogsDAO.java β”‚ β”‚ β”‚ β”œβ”€β”€ DepartmentsDAO.java β”‚ β”‚ β”‚ β”œβ”€β”€ DoctorsDAO.java β”‚ β”‚ β”‚ β”œβ”€β”€ MedicalReportsDAO.java β”‚ β”‚ β”‚ β”œβ”€β”€ PatientsDAO.java β”‚ β”‚ β”‚ β”œβ”€β”€ PrescriptionsDAO.java β”‚ β”‚ β”‚ └── UsersDAO.java β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ daoimpl/ β”‚ β”‚ β”‚ β”œβ”€β”€ AppointmentsDAOImpl.java β”‚ β”‚ β”‚ β”œβ”€β”€ AuditLogsDAOImpl.java β”‚ β”‚ β”‚ β”œβ”€β”€ DepartmentsDAOImpl.java β”‚ β”‚ β”‚ β”œβ”€β”€ DoctorsDAOImpl.java β”‚ β”‚ β”‚ β”œβ”€β”€ MedicalReportsDAOImpl.java β”‚ β”‚ β”‚ β”œβ”€β”€ PatientsDAOImpl.java β”‚ β”‚ β”‚ β”œβ”€β”€ PrescriptionsDAOImpl.java β”‚ β”‚ β”‚ └── UsersDAOImpl.java β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ model/ β”‚ β”‚ β”‚ β”œβ”€β”€ Appointments.java β”‚ β”‚ β”‚ β”œβ”€β”€ AuditLogs.java β”‚ β”‚ β”‚ β”œβ”€β”€ Departments.java β”‚ β”‚ β”‚ β”œβ”€β”€ Doctors.java β”‚ β”‚ β”‚ β”œβ”€β”€ MedicalReports.java β”‚ β”‚ β”‚ β”œβ”€β”€ Patients.java β”‚ β”‚ β”‚ β”œβ”€β”€ Prescriptions.java β”‚ β”‚ β”‚ └── Users.java β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ servlet/ β”‚ β”‚ β”‚ β”œβ”€β”€ AdminDashboardServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ AppointmentsServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ DepartmentsServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ DoctorAppointmentsServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ DoctorDashboardServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ DoctorsServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ LoginServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ LogoutServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ PatientDashboardServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ PatientsServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ PrescriptionsServlet.java β”‚ β”‚ β”‚ β”œβ”€β”€ RegisterServlet.java β”‚ β”‚ β”‚ └── ReportUploadServlet.java β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ filter/ β”‚ β”‚ β”‚ β”œβ”€β”€ AuthFilter.java β”‚ β”‚ β”‚ └── RoleFilter.java β”‚ β”‚ β”‚ β”‚ β”‚ └── util/ β”‚ β”‚ └── DBConnection.java β”‚ β”‚ β”‚ └── webapp/ β”‚ β”œβ”€β”€ META-INF/ β”‚ β”œβ”€β”€ WEB-INF/ β”‚ β”‚ β”œβ”€β”€ lib/ β”‚ β”‚ β”‚ └── mysql-connector-j-9.1.0.jar β”‚ β”‚ └── web.xml β”‚ β”‚ β”‚ β”œβ”€β”€ admin-dashboard.jsp β”‚ β”œβ”€β”€ appointment-form.jsp β”‚ β”œβ”€β”€ appointments.jsp β”‚ β”œβ”€β”€ department-form.jsp β”‚ β”œβ”€β”€ departments.jsp β”‚ β”œβ”€β”€ doctor-dashboard.jsp β”‚ β”œβ”€β”€ doctor-appointments.jsp β”‚ β”œβ”€β”€ doctor-form.jsp β”‚ β”œβ”€β”€ doctors.jsp β”‚ β”œβ”€β”€ error.jsp β”‚ β”œβ”€β”€ login.jsp β”‚ β”œβ”€β”€ patient-dashboard.jsp β”‚ β”œβ”€β”€ patient-profile.jsp β”‚ β”œβ”€β”€ prescription-form.jsp β”‚ β”œβ”€β”€ register.jsp β”‚ β”œβ”€β”€ report-form.jsp β”‚ └── reports.jsp β”‚ β”œβ”€β”€ database/ β”‚ └── hospital_schema.sql β”‚ β”œβ”€β”€ screenshots/ β”‚ β”œβ”€β”€ register.png β”‚ β”œβ”€β”€ medical-reports.png β”‚ β”œβ”€β”€ doctors.png β”‚ β”œβ”€β”€ appointments.png β”‚ β”œβ”€β”€ departments.png β”‚ β”œβ”€β”€ login.png β”‚ β”œβ”€β”€ admin-dashboard.png β”‚ β”œβ”€β”€ doctor-dashboard.png β”‚ └── patient-dashboard.png β”‚ └── README.md


πŸ—„ Database

Database: MySQL 8.x
Connection: JDBC
Utility Class: DBConnection.java

Schema file located at:

database/hospital_schema.sql

Includes:

  • Referential integrity constraints
  • Foreign key relationships
  • Audit logging table
  • Role-based user model

πŸ“Έ Application Screenshots

πŸ“ Registration Page

Register

πŸ” Login Page

Login

πŸ§‘β€πŸ’Ό Admin Dashboard

Admin Dashboard

🩺 Doctor Dashboard

Doctor Dashboard

πŸ§‘β€βš•οΈ Patient Dashboard

Patient Dashboard

πŸ‘¨β€βš•οΈ Doctors Management

Doctors

πŸ“… Appointments Management

Appointments

πŸ₯ Departments Management

Departments

🧾 Medical Reports Module

Medical Reports


⚠ Current Limitations

  • No pagination implementation
  • No PDF/export report generation
  • No physical file upload storage
  • Direct JDBC (no ORM abstraction)
  • Business logic embedded in Servlets (no service layer)

πŸ“ˆ Future Enhancements

  • Pagination support
  • File-based report storage
  • PDF report export
  • Spring Boot migration
  • REST API layer
  • Docker containerization
  • CI/CD pipeline integration
  • Unit and integration testing

πŸ“„ License

Educational and portfolio demonstration project.

πŸ‘¨β€πŸ’» Author

**Surya Teja **
Java Full Stack Developer
Specialized in scalable backend systems, RESTful API architecture, Spring ecosystem, and production-grade application design.

πŸ“§ Email: suryateja36200@gmail.com
🌍 Location: India
πŸ”— GitHub: https://github.com/Surya63023

⭐ If you found this project useful, consider giving it a star.

About

Enterprise-grade Hospital Management System built using Java 11, Jakarta Servlet 6, JSP, JDBC, and MySQL. Implements layered MVC architecture with DAO pattern, role-based authentication, appointment scheduling, medical reports management, and audit logging.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages