# mohammedhuse01-design/hospitalmanagementsystem architecture

> Architecture diagram of the GitHub repository mohammedhuse01-design/hospitalmanagementsystem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohammedhuse01-design/hospitalmanagementsystem
- Repository: https://github.com/mohammedhuse01-design/hospitalmanagementsystem

## Overview

This is a C++ console hospital-management application. A user enters through the main menu, which dispatches to patient, doctor, emergency, or appointment management. Those subsystems maintain records in the project’s custom linked list, array lists, and circular queue; appointments validate and retrieve existing patient and doctor records before associating them. The README documents the management capabilities, while the sampled code shows the main dispatch and appointment-to-record interactions. Emergency queue operations are documented, but their internal call details were not sampled.

Main entry points: [`HospitalManagementSystem/HospitalManagementSystem.cpp`](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/HospitalManagementSystem.cpp) (Main menu), [`HospitalManagementSystem/AppointmentArrayList.cpp`](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/AppointmentArrayList.cpp) (Appointment array list), [`HospitalManagementSystem/PatientLinkedList.cpp`](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/PatientLinkedList.cpp) (Patient linked list), [`HospitalManagementSystem/DoctorArrayList.cpp`](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/DoctorArrayList.cpp) (Doctor array list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Console workflow"]
  node_main["Main menu"]
end

subgraph group_people["People records"]
  node_patient_data["Patient records<br/>[Patient.cpp]"]
  node_patient_list[("Patient linked list")]
  node_doctor_data["Doctor records<br/>[Doctor.cpp]"]
  node_doctor_list[("Doctor array list")]
end

subgraph group_scheduling["Appointments"]
  node_appointment_data["Appointment record<br/>[Appointment.cpp]"]
  node_appointment_list[("Appointment array list")]
end

subgraph group_emergency["Emergency cases"]
  node_emergency_data["Emergency record<br/>[Emergency.cpp]"]
  node_emergency_queue["Emergency circular queue<br/>[EmergencyQueue.cpp]"]
end

node_user(("Hospital staff"))

node_user -.->|"uses"| node_main
node_main -->|"opens menu"| node_patient_list
node_main -->|"opens menu"| node_doctor_list
node_main -->|"opens menu"| node_emergency_queue
node_main -->|"opens menu"| node_appointment_list
node_patient_list -->|"stores and displays"| node_patient_data
node_doctor_list -->|"stores and displays"| node_doctor_data
node_appointment_list -->|"validates and retrieves"| node_patient_list
node_appointment_list -->|"validates and retrieves"| node_doctor_list
node_appointment_list -->|"creates and displays"| node_appointment_data
node_emergency_queue -->|"manages cases"| node_emergency_data

click node_main "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/HospitalManagementSystem.cpp"
click node_patient_data "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Patient.cpp"
click node_patient_list "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/PatientLinkedList.cpp"
click node_doctor_data "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Doctor.cpp"
click node_doctor_list "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/DoctorArrayList.cpp"
click node_appointment_data "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Appointment.cpp"
click node_appointment_list "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/AppointmentArrayList.cpp"
click node_emergency_data "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Emergency.cpp"
click node_emergency_queue "https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/EmergencyQueue.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main toneBlue
class node_patient_data,node_patient_list,node_doctor_data,node_doctor_list toneAmber
class node_appointment_data,node_appointment_list toneMint
class node_emergency_data,node_emergency_queue toneRose
class node_user toneIndigo
```

## Components

### Console workflow

- [Main menu](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/HospitalManagementSystem.cpp): `HospitalManagementSystem/HospitalManagementSystem.cpp`

### People records

- [Patient records](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Patient.cpp): `HospitalManagementSystem/Patient.cpp`
- [Patient linked list](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/PatientLinkedList.cpp): `HospitalManagementSystem/PatientLinkedList.cpp`
- [Doctor records](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Doctor.cpp): `HospitalManagementSystem/Doctor.cpp`
- [Doctor array list](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/DoctorArrayList.cpp): `HospitalManagementSystem/DoctorArrayList.cpp`

### Appointments

- [Appointment record](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Appointment.cpp): `HospitalManagementSystem/Appointment.cpp`
- [Appointment array list](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/AppointmentArrayList.cpp): `HospitalManagementSystem/AppointmentArrayList.cpp`

### Emergency cases

- [Emergency record](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/Emergency.cpp): `HospitalManagementSystem/Emergency.cpp`
- [Emergency circular queue](https://github.com/mohammedhuse01-design/hospitalmanagementsystem/blob/master/HospitalManagementSystem/EmergencyQueue.cpp): `HospitalManagementSystem/EmergencyQueue.cpp`

### Other components

- **Hospital staff**

## Connections

- Hospital staff → Main menu: uses
- Main menu → Patient linked list: opens menu (evidence: `HospitalManagementSystem/HospitalManagementSystem.cpp`)
- Main menu → Doctor array list: opens menu (evidence: `HospitalManagementSystem/HospitalManagementSystem.cpp`)
- Main menu → Emergency circular queue: opens menu (evidence: `HospitalManagementSystem/HospitalManagementSystem.cpp`)
- Main menu → Appointment array list: opens menu (evidence: `HospitalManagementSystem/HospitalManagementSystem.cpp`)
- Patient linked list → Patient records: stores and displays (evidence: `HospitalManagementSystem/PatientLinkedList.cpp`)
- Doctor array list → Doctor records: stores and displays (evidence: `HospitalManagementSystem/DoctorArrayList.cpp`)
- Appointment array list → Patient linked list: validates and retrieves (evidence: `HospitalManagementSystem/AppointmentArrayList.cpp`)
- Appointment array list → Doctor array list: validates and retrieves (evidence: `HospitalManagementSystem/AppointmentArrayList.cpp`)
- Appointment array list → Appointment record: creates and displays (evidence: `HospitalManagementSystem/AppointmentArrayList.cpp`)
- Emergency circular queue → Emergency record: manages cases (evidence: `HospitalManagementSystem/EmergencyQueue.cpp`)
