# caano-geel/hospital-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/caano-geel/hospital-management-system
- Repository: https://github.com/caano-geel/hospital-management-system

## Overview

This is a PHP/MySQL hospital-management web application. An administrator signs in, reaches the dashboard, and uses it to manage patient care, staff, pharmacy, laboratory, surgery, finance, and assets, with reports across several of those domains. The sampled pages show direct SQL access and server-rendered detail views; other subsystem links reflect the README’s description of dashboard navigation, not inspected call paths.

Main entry points: [`backend/admin/his_admin_dashboard.php`](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_dashboard.php) (Dashboard), [`backend/admin/index.php`](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/index.php) (Admin login), [`backend/admin/his_admin_view_single_medical_record.php`](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_medical_record.php) (Medical records), [`backend/admin/his_admin_view_single_lab_record.php`](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_lab_record.php) (Laboratory and vitals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and overview"]
  node_login["Admin login<br/>[index.php]"]
  node_dashboard["Dashboard"]
end

subgraph group_care["Patient care"]
  node_patient["Patient management"]
  node_patient_detail["Patient records"]
  node_patient_flow["Patient transfers"]
  node_patient_admit["Registration and discharge"]
end

subgraph group_clinical["Clinical operations"]
  node_medical["Medical records"]
  node_laboratory["Laboratory and vitals"]
  node_surgery["Surgery records"]
  node_pharmacy["Pharmacy and prescriptions"]
end

subgraph group_resources["People and assets"]
  node_employees["Employee management"]
  node_equipment["Equipment inventory"]
  node_vendors["Vendor management"]
end

subgraph group_finance["Finance and reporting"]
  node_payroll["Payroll"]
  node_accounts["Accounts"]
  node_payables["Payables"]
  node_reporting["Operational reports"]
end

node_admin(("Administrator"))
node_mysql[("MySQL database")]

node_admin -->|"signs in"| node_login
node_login -->|"redirects to"| node_dashboard
node_dashboard -->|"navigates to"| node_patient
node_dashboard -->|"navigates to"| node_patient_flow
node_dashboard -->|"navigates to"| node_patient_admit
node_dashboard -->|"navigates to"| node_employees
node_dashboard -->|"navigates to"| node_medical
node_dashboard -->|"navigates to"| node_laboratory
node_dashboard -->|"navigates to"| node_surgery
node_dashboard -->|"navigates to"| node_pharmacy
node_dashboard -->|"navigates to"| node_equipment
node_dashboard -->|"navigates to"| node_vendors
node_dashboard -->|"navigates to"| node_payroll
node_dashboard -->|"navigates to"| node_accounts
node_dashboard -->|"navigates to"| node_payables
node_dashboard -->|"navigates to"| node_reporting
node_dashboard -->|"queries counts"| node_mysql
node_patient_detail -->|"reads patient"| node_mysql
node_medical -->|"reads records"| node_mysql
node_laboratory -->|"reads results"| node_mysql
node_surgery -->|"reads records"| node_mysql
node_pharmacy -->|"reads medicine"| node_mysql
node_equipment -->|"reads equipment"| node_mysql
node_accounts -->|"reads account"| node_mysql

click node_login "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/index.php"
click node_dashboard "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_dashboard.php"
click node_patient "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_manage_patient.php"
click node_patient_detail "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_patient.php"
click node_patient_flow "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_patient_transfer.php"
click node_patient_admit "https://github.com/caano-geel/hospital-management-system/tree/main/backend/admin"
click node_medical "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_medical_record.php"
click node_laboratory "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_lab_record.php"
click node_surgery "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_patient_surgery.php"
click node_pharmacy "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_pharm.php"
click node_employees "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_manage_employee.php"
click node_equipment "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_eqp.php"
click node_vendors "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_manage_vendor.php"
click node_payroll "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_generate_single_employee_payroll.php"
click node_accounts "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_account.php"
click node_payables "https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_payable_account.php"
click node_reporting "https://github.com/caano-geel/hospital-management-system/tree/main/backend/admin"

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_login,node_dashboard toneBlue
class node_patient,node_patient_detail,node_patient_flow,node_patient_admit,node_mysql toneAmber
class node_medical,node_laboratory,node_surgery,node_pharmacy toneMint
class node_employees,node_equipment,node_vendors toneRose
class node_payroll,node_accounts,node_payables,node_reporting,node_admin toneIndigo
```

## Components

### Access and overview

- [Admin login](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/index.php): `backend/admin/index.php`
- [Dashboard](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_dashboard.php): `backend/admin/his_admin_dashboard.php`

### Patient care

- [Patient management](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_manage_patient.php): `backend/admin/his_admin_manage_patient.php`
- [Patient records](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_patient.php): `backend/admin/his_admin_view_single_patient.php`
- [Patient transfers](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_patient_transfer.php): `backend/admin/his_admin_patient_transfer.php`
- [Registration and discharge](https://github.com/caano-geel/hospital-management-system/tree/main/backend/admin): `backend/admin`

### Clinical operations

- [Medical records](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_medical_record.php): `backend/admin/his_admin_view_single_medical_record.php`
- [Laboratory and vitals](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_lab_record.php): `backend/admin/his_admin_view_single_lab_record.php`
- [Surgery records](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_patient_surgery.php): `backend/admin/his_admin_view_single_patient_surgery.php`
- [Pharmacy and prescriptions](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_pharm.php): `backend/admin/his_admin_view_single_pharm.php`

### People and assets

- [Employee management](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_manage_employee.php): `backend/admin/his_admin_manage_employee.php`
- [Equipment inventory](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_eqp.php): `backend/admin/his_admin_view_single_eqp.php`
- [Vendor management](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_manage_vendor.php): `backend/admin/his_admin_manage_vendor.php`

### Finance and reporting

- [Payroll](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_generate_single_employee_payroll.php): `backend/admin/his_admin_generate_single_employee_payroll.php`
- [Accounts](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_account.php): `backend/admin/his_admin_view_single_account.php`
- [Payables](https://github.com/caano-geel/hospital-management-system/blob/main/backend/admin/his_admin_view_single_payable_account.php): `backend/admin/his_admin_view_single_payable_account.php`
- [Operational reports](https://github.com/caano-geel/hospital-management-system/tree/main/backend/admin): `backend/admin`

### Other components

- **Administrator**
- **MySQL database**

## Connections

- Administrator → Admin login: signs in (evidence: `backend/admin/index.php`)
- Admin login → Dashboard: redirects to (evidence: `backend/admin/index.php`)
- Dashboard → Patient management: navigates to (evidence: `README.md`)
- Dashboard → Patient transfers: navigates to (evidence: `README.md`)
- Dashboard → Registration and discharge: navigates to (evidence: `README.md`)
- Dashboard → Employee management: navigates to (evidence: `README.md`)
- Dashboard → Medical records: navigates to (evidence: `README.md`)
- Dashboard → Laboratory and vitals: navigates to (evidence: `README.md`)
- Dashboard → Surgery records: navigates to (evidence: `README.md`)
- Dashboard → Pharmacy and prescriptions: navigates to (evidence: `README.md`)
- Dashboard → Equipment inventory: navigates to (evidence: `README.md`)
- Dashboard → Vendor management: navigates to (evidence: `README.md`)
- Dashboard → Payroll: navigates to (evidence: `README.md`)
- Dashboard → Accounts: navigates to (evidence: `README.md`)
- Dashboard → Payables: navigates to (evidence: `README.md`)
- Dashboard → Operational reports: navigates to (evidence: `README.md`)
- Dashboard → MySQL database: queries counts (evidence: `backend/admin/his_admin_dashboard.php`)
- Patient records → MySQL database: reads patient (evidence: `backend/admin/his_admin_view_single_patient.php`)
- Medical records → MySQL database: reads records (evidence: `backend/admin/his_admin_view_single_medical_record.php`)
- Laboratory and vitals → MySQL database: reads results (evidence: `backend/admin/his_admin_view_single_lab_record.php`)
- Surgery records → MySQL database: reads records (evidence: `backend/admin/his_admin_view_single_patient_surgery.php`)
- Pharmacy and prescriptions → MySQL database: reads medicine (evidence: `backend/admin/his_admin_view_single_pharm.php`)
- Equipment inventory → MySQL database: reads equipment (evidence: `backend/admin/his_admin_view_single_eqp.php`)
- Accounts → MySQL database: reads account (evidence: `backend/admin/his_admin_view_single_account.php`)
