Skip to content

Repository files navigation

Hospital Patient Management System

A Java-based Hospital Patient Management System developed as part of the COMP2310 Object-Oriented Programming course at Birzeit University.

Overview

This system simulates hospital operations by managing patients, doctors, departments, and services using Object-Oriented Programming principles.

Features

  • Manage different types of patients:
    • Emergency Patients
    • Long-Term Patients
  • Assign hospital services (X-ray, MRI, lab tests)
  • Calculate patient bills based on type
  • Calculate doctor salaries based on degree and overtime
  • Sort:
    • Patients by total bill amount
    • Doctors by salary
  • Generate formatted bill for a specific patient
  • Calculate total bills for all patients

Classes

PatientBase

  • Stores general patient information
  • Base class for all patient types

EmergencyPatient

  • Inherits from PatientBase
  • Bill = emergencyFee + serviceCosts * (1 + TAX_RATE)

LongTermPatient

  • Inherits from PatientBase
  • Bill = (daysAdmitted * dailyRate + serviceCosts) * (1 + TAX_RATE)

Doctor

  • Stores doctor details and department
  • Calculates salary based on degree:
    • Bachelor → +10%
    • Master → +20%
    • PhD → +30%
  • Includes overtime pay calculation

Department

  • Manages doctors and patients
  • Allows adding doctors and patients

HospitalService

  • Represents services assigned to patients
  • Includes service name and cost

Driver

  • Main class
  • Creates sample data (patients, doctors, departments)
  • Performs sorting and calculations

Key Concepts

  • Object-Oriented Programming (OOP)
  • Inheritance and polymorphism
  • ArrayList usage
  • Custom sorting using Collections.sort
  • Encapsulation (getters/setters)

How to Run

  1. Open the project in Eclipse IDE
  2. Run Driver.java
  3. The program will execute using predefined data

Output Includes

  • Sorted doctors with salaries and departments
  • Sorted patients by bill amount
  • Individual patient bill
  • Total hospital billing

Example Services

  • X-ray
  • MRI
  • Blood Test

Course Info

  • Course: COMP2310 — Object-Oriented Programming
  • University: Birzeit University
  • Semester: Fall 2024/2025

About

Hospital Patient Management System in Java using OOP principles — supports billing, sorting, and department management.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages