Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Smart Hospital Patient Management System

A Python-based simulation of a hospital patient management system that prioritizes emergency cases over normal cases using Stack and Queue data structures.


🚀 Overview

In real hospitals, patients are treated based on urgency.

This system simulates that logic:

  • ⚡ Emergency Patients → handled using Stack (LIFO)
  • 🧾 Normal Patients → handled using Queue (FIFO)

The system ensures emergency cases are always treated first.


🧠 Key Concepts

  • Object-Oriented Programming (OOP)
    • Inheritance
    • Polymorphism
  • Data Structures
    • Stack
    • Queue
  • System Design Basics

⚙️ How It Works

  1. Patients are added to the system:

    • Emergency patients → go to Stack
    • Normal patients → go to Queue
  2. Treatment order:

    • Emergency patients are treated first
    • Then normal patients are treated

🏗️ System Design

  • Patient → Base class (name, age)
  • EmergencyPatient → High priority patient
  • NormalPatient → Regular patient
  • Stack → Handles emergency patients (LIFO)
  • Queue → Handles normal patients (FIFO)
  • Hospital → Controls overall workflow

🧪 Example Output

Pushed Alice onto stack. Enqueued Charlie to queue. Pushed Bob onto stack. Enqueued David to queue.

=== Treating patients === Treating emergency patient: Bob Treating emergency patient: Alice Treating normal patient: Charlie Treating normal patient: David


✨ Features

✔ Priority-based patient handling
✔ Real-world hospital simulation
✔ Clean OOP design
✔ Easy to extend


🔮 Future Improvements

  • Replace Stack with Priority Queue
  • Add GUI (Tkinter / Web interface)
  • Store patient data in database
  • Add scheduling system based on time/condition

💻 How to Run

python main.py

Author

Developed by [Ezz]

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages