Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hospital Management System

A desktop Hospital Management System built with Java Swing. The application provides role-based access for hospital staff and covers patient intake, medical records, pharmacy, billing, and user administration.

Overview

This project is a Windows desktop application for hospital staff. It supports multiple user roles, simple file-based persistence, and a custom Swing UI for managing patients, doctors, pharmacy stock, bills, and security audit logs.

Key Features

  • Secure login with username/password authentication
  • Role-based access control for Admin, Receptionist, Doctor, Accountant, Pharmacist
  • Patient management for OPD, Emergency, and Admitted care
  • Doctor profiles and medical record entry
  • Pharmacy inventory management and medicine issue logging
  • Billing generation and accounting support
  • Audit log tracking for user actions and security events
  • Password change workflow and account lockout after failed login attempts

Project Structure

  • src/ — Java source files
    • hospital/auth/ — authentication flow, user management, password utilities, audit logging
    • hospital/gui/ — Swing UI components and application windows
    • hospital/model/ — domain classes for patients, doctors, records, medicines, bills
    • hospital/service/ — business logic managers for patients, doctors, records, pharmacy, billing
    • hospital/util/ — shared utilities such as file handling
  • bin/ — compiled class output (generated by compile.bat, not included in repository)
  • data/ — runtime data files used for persistence (generated at runtime, not included in repository)
  • compile.bat — compile Java source into bin/
  • run.bat — launch the application

Requirements

  • Java JDK installed and available in PATH
  • Windows environment (batch scripts provided)
  • Recommended Java version: 8 or later

Quick Start

  1. Clone the repository and open Command Prompt in the project root:

    cd "Hospital Management System"
  2. Compile the project:

    .\compile.bat
  3. Run the application:

    .\run.bat
  4. If using an IDE, import the folder as a Java project and set hospital.gui.MainLauncher as the main class.

Default Admin Account

On first startup, the app creates a default administrator account if no users exist:

  • Username: admin
  • Password: Admin@123

Important: change the admin password immediately after first login.

Data Storage

  • All application data is stored in plain text files under data/.
  • The data/ folder is created automatically at runtime — it is not included in the repository.
  • Keep the data/ folder in the same project root as the compiled bin/ folder.
  • Removing or renaming files in data/ will reset stored state, including users, patients, bills, and logs.

Troubleshooting

  • Compilation fails: verify javac is available in PATH and that bin/ exists or can be created.
  • Application does not start: inspect console output for runtime exceptions and missing data file errors.
  • User login issues: accounts are locked after 3 failed login attempts; use an admin account to unblock.

Suggested Improvements

  • Add a dedicated signup/register screen for new staff accounts
  • Improve form validation and password-strength feedback
  • Migrate persistence from plain text files to a database for reliability
  • Add export/import support for reports and audit logs

License

This repository does not include an explicit license. Add a LICENSE file if you plan to distribute the project.

About

A Java Swing desktop application for hospital staff with role-based access, patient management, pharmacy, billing, and audit logging.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages