Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Hospital Management System (C)

A console-based Hospital Management System written in C, built as a data structures showcase with three role-based logins — Admin, Doctor, and Patient — layered on top of six classic data structures working together instead of standing alone as toy demos.

The three portals

  • Admin — manage doctors, set booking limits, browse/search patients, view today's appointments.
  • Doctor — dashboard with live stats, treat next patient (heap checked first), toggle availability.
  • Patient — register, book/cancel appointments, view medical history.

Data structures at a glance

Structure Used for Why it fits
Circular Queue Regular appointment line per doctor FIFO, fixed size, no shifting overhead
Min-Heap Emergency triage per doctor Highest urgency always at the root
Binary Search Tree Patient records by ID O(log n) lookup, soft-delete keeps it simple
Hash Table Doctor ID → Doctor* lookup O(1) average lookup, open addressing
Doubly Linked List Doctor registry Easy full traversal for Admin
Singly Linked List Medical history per patient Simple append-only record trail

How it flows

flowchart TD
    Start[Homepage] --> Role{Select Role}

    Role -->|Admin| AdminPortal[Admin Portal]
    Role -->|Doctor| DoctorPortal[Doctor Portal]
    Role -->|Patient| PatientPortal[Patient Portal]

    AdminPortal --> Manage[Manage Doctors & Patients]

    PatientPortal --> Book[Book Appointment]
    Book --> Check{Emergency?}
    Check -->|Yes| Heap[(Min-Heap)]
    Check -->|No| Queue[(Circular Queue)]

    Heap --> Wait[Waiting for Doctor]
    Queue --> Wait
    Wait --> Treat[Doctor Treats Patient]
    DoctorPortal --> Treat
    Treat --> History[(Medical History)]

    Manage --> Storage[(Saved to Storage)]
    History --> Storage
Loading

The three portals sit at the top, feeding into two simple branches: Admin manages records directly, while Patient bookings get sorted by urgency — emergencies through the min-heap, everyone else through the FIFO queue — before a doctor treats them. Every path ends up saved to disk.

About

Pranto Protim Choudhury sir has assigned the project "Hospital Mangement System" to our group in Data Structures course. This GitHub repository contains the full C program with a short project overview..

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages