# ahmedsk2/dmc-patient-flow-hub architecture

> Architecture diagram of the GitHub repository ahmedsk2/dmc-patient-flow-hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmedsk2/dmc-patient-flow-hub
- Repository: https://github.com/ahmedsk2/dmc-patient-flow-hub
- Video tour (about a minute): https://gitdiagram.com/ahmedsk2/dmc-patient-flow-hub/video

## Overview

DMC Patient-Flow Hub is a hospital system for managing patient movement and clinical records. Its principal workflow is staff authentication, admission and consultant assignment, ward/ICU transfers, and two-phase discharge; consultations and handovers support ongoing care. Registry search, dashboards, statistics, and printable/PDF reports provide follow-on lookup and oversight. The README identifies the Laravel app as the feature-complete product and documents these capabilities. Sampled source confirms selected controller, auth, and UI wiring; several other feature links below reflect documented capabilities and the file tree, not inspected call sites.

Main entry points: [`laravel/app/Http/Controllers/PatientActionController.php`](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/PatientActionController.php) (Patient actions), [`laravel/app/Http/Controllers/AdmissionsController.php`](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/AdmissionsController.php) (Admission management), [`laravel/app/Http/Controllers/Auth/AuthController.php`](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/Auth/AuthController.php) (Authentication), [`laravel/app/Http/Controllers/Auth/RegisterController.php`](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/Auth/RegisterController.php) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_care["Patient Care"]
  node_admissions["Admission management"]
  node_patient_actions["Patient actions"]
  node_admission_model["Admission records<br/>[Admission.php]"]
end

subgraph group_clinical["Clinical Coordination"]
  node_consultations["Consultations"]
  node_handover["Handover records<br/>[Handover.php]"]
end

subgraph group_insight["Search And Insights"]
  node_registry["Patient registry"]
  node_dashboard["Dashboards"]
  node_statistics["Statistics"]
  node_reports["Reports and PDFs"]
end

subgraph group_security["Identity And Governance"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_registration["Registration"]
  node_audit["Audit trail<br/>[AuditLog.php]"]
end

subgraph group_presentation["Application Interface"]
  node_app["Inertia app<br/>[app.js]"]
  node_admissions_ui["Admissions and patients<br/>[Index.vue]"]
  node_consult_ui["Consultation views<br/>[Index.vue]"]
  node_auth_ui["Sign-in and MFA<br/>[Login.vue]"]
end

node_staff(("Hospital staff"))
node_data_store[("Application database")]

node_staff -->|"uses"| node_app
node_app -->|"loads pages"| node_admissions_ui
node_admissions_ui -->|"requests admission work"| node_admissions
node_admissions -->|"reads and writes"| node_admission_model
node_admissions -->|"persists records"| node_data_store
node_admissions_ui -->|"requests patient changes"| node_patient_actions
node_patient_actions -->|"updates admissions"| node_admission_model
node_patient_actions -->|"records actions"| node_audit
node_patient_actions -->|"persists changes"| node_data_store
node_app -->|"loads pages"| node_consult_ui
node_consult_ui -->|"requests consultation work"| node_consultations
node_consultations -->|"reads and writes"| node_data_store
node_staff -->|"searches records"| node_registry
node_registry -->|"reads records"| node_data_store
node_staff -->|"views status"| node_dashboard
node_dashboard -->|"reads metrics"| node_data_store
node_staff -->|"requests statistics"| node_statistics
node_statistics -->|"reads metrics"| node_data_store
node_staff -->|"requests reports"| node_reports
node_reports -->|"reads report data"| node_data_store
node_staff -->|"signs in"| node_auth_ui
node_auth_ui -->|"submits credentials"| node_auth
node_auth -->|"checks accounts"| node_data_store
node_auth -->|"records sign-in events"| node_audit
node_staff -->|"registers"| node_registration
node_registration -->|"stores registration state"| node_data_store
node_registration -->|"records registration"| node_audit
node_handover -->|"persists handovers"| node_data_store

click node_app "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/app.js"
click node_admissions_ui "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/Pages/Admissions/Index.vue"
click node_admissions "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/AdmissionsController.php"
click node_patient_actions "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/PatientActionController.php"
click node_admission_model "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Models/Admission.php"
click node_consult_ui "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/Pages/Consultations/Index.vue"
click node_consultations "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/ConsultationsController.php"
click node_handover "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Models/Handover.php"
click node_registry "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/RegistryController.php"
click node_dashboard "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/DashboardController.php"
click node_statistics "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/StatisticsController.php"
click node_reports "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/ReportsController.php"
click node_auth_ui "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/Pages/Auth/Login.vue"
click node_auth "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/Auth/AuthController.php"
click node_registration "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/Auth/RegisterController.php"
click node_audit "https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Models/AuditLog.php"

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_admissions,node_patient_actions,node_admission_model toneBlue
class node_consultations,node_handover,node_data_store toneAmber
class node_registry,node_dashboard,node_statistics,node_reports toneMint
class node_auth,node_registration,node_audit toneRose
class node_app,node_admissions_ui,node_consult_ui,node_auth_ui,node_staff toneIndigo
```

## Components

### Patient Care

- [Admission management](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/AdmissionsController.php): `laravel/app/Http/Controllers/AdmissionsController.php`
- [Patient actions](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/PatientActionController.php): `laravel/app/Http/Controllers/PatientActionController.php`
- [Admission records](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Models/Admission.php): `laravel/app/Models/Admission.php`

### Clinical Coordination

- [Consultations](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/ConsultationsController.php): `laravel/app/Http/Controllers/ConsultationsController.php`
- [Handover records](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Models/Handover.php): `laravel/app/Models/Handover.php`

### Search And Insights

- [Patient registry](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/RegistryController.php): `laravel/app/Http/Controllers/RegistryController.php`
- [Dashboards](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/DashboardController.php): `laravel/app/Http/Controllers/DashboardController.php`
- [Statistics](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/StatisticsController.php): `laravel/app/Http/Controllers/StatisticsController.php`
- [Reports and PDFs](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/ReportsController.php): `laravel/app/Http/Controllers/ReportsController.php`

### Identity And Governance

- [Authentication](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/Auth/AuthController.php): `laravel/app/Http/Controllers/Auth/AuthController.php`
- [Registration](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Http/Controllers/Auth/RegisterController.php): `laravel/app/Http/Controllers/Auth/RegisterController.php`
- [Audit trail](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/app/Models/AuditLog.php): `laravel/app/Models/AuditLog.php`

### Application Interface

- [Inertia app](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/app.js): `laravel/resources/js/app.js`
- [Admissions and patients](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/Pages/Admissions/Index.vue): `laravel/resources/js/Pages/Admissions/Index.vue`
- [Consultation views](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/Pages/Consultations/Index.vue): `laravel/resources/js/Pages/Consultations/Index.vue`
- [Sign-in and MFA](https://github.com/ahmedsk2/dmc-patient-flow-hub/blob/main/laravel/resources/js/Pages/Auth/Login.vue): `laravel/resources/js/Pages/Auth/Login.vue`

### Other components

- **Hospital staff**
- **Application database**

## Connections

- Hospital staff → Inertia app: uses
- Inertia app → Admissions and patients: loads pages
- Admissions and patients → Admission management: requests admission work
- Admission management → Admission records: reads and writes
- Admission management → Application database: persists records
- Admissions and patients → Patient actions: requests patient changes
- Patient actions → Admission records: updates admissions
- Patient actions → Audit trail: records actions
- Patient actions → Application database: persists changes
- Inertia app → Consultation views: loads pages
- Consultation views → Consultations: requests consultation work
- Consultations → Application database: reads and writes
- Hospital staff → Patient registry: searches records
- Patient registry → Application database: reads records
- Hospital staff → Dashboards: views status
- Dashboards → Application database: reads metrics
- Hospital staff → Statistics: requests statistics
- Statistics → Application database: reads metrics
- Hospital staff → Reports and PDFs: requests reports
- Reports and PDFs → Application database: reads report data
- Hospital staff → Sign-in and MFA: signs in
- Sign-in and MFA → Authentication: submits credentials
- Authentication → Application database: checks accounts
- Authentication → Audit trail: records sign-in events
- Hospital staff → Registration: registers
- Registration → Application database: stores registration state
- Registration → Audit trail: records registration
- Handover records → Application database: persists handovers
