A comprehensive hospital and patient management simulation implemented in Java, focusing on fundamental data structures and algorithms to handle real-world healthcare workflows efficiently.
This project implements various custom and core data structures to solve specific management problems:
-
Binary Search Tree (
BSTByName.java): Fast patient search and lookup operations ordered by patient name ($O(\log n)$ average time complexity). -
General Tree / Hierarchical Tree (
HospitalTree.java): Represents the organizational hierarchy of hospital departments, specializations, and assigned doctors (Doctor.java). -
Priority / Triage Queue (
TriageQueue.java): Manages emergency room (ER) patients by urgency and severity, ensuring critical cases (CriticalPatient.java) are prioritized immediately. -
Stack (
UndoStack.java/Action.java): Implements an undo mechanism for recent user operations and system state modifications using the LIFO (Last-In-First-Out) principle. -
Linked List / Custom List (
VisitList.java): Tracks and displays historical patient visits and consultation records (Visit.java). -
Console UI (
ConsoleUI.java): Interactive, menu-driven CLI interface for managing patients, appointments, and triage flows.
├── Action.java # Interface / class defining undoable operations
├── BSTByName.java # Binary Search Tree implementation for patient lookup
├── ConsoleUI.java # CLI menu and user interaction handler
├── CriticalPatient.java # Model representing emergency/critical priority patients
├── Doctor.java # Doctor entity and attributes
├── HospitalSystem.java # Core system controller coordinating all modules
├── HospitalTree.java # Tree structure mapping hospital units and doctors
├── Main.java # Main application entry point (with test seed data)
├── Patient.java # Base patient entity (demographics, visit links)
├── TriageQueue.java # Queue managing ER patient admission priority
├── UndoStack.java # Stack managing operational undo history
├── Visit.java # Record of an individual patient examination/visit
└── VisitList.java # Custom list structure maintaining patient visit logs