# rsubash2006-hash/smartcare-patient-queue architecture

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

- Interactive diagram: https://gitdiagram.com/rsubash2006-hash/smartcare-patient-queue
- Repository: https://github.com/rsubash2006-hash/smartcare-patient-queue

## Overview

SmartCare is a fictional-data emergency department triage and patient-queue application. Staff register patients with vitals and clinician-confirmed acuity; preliminary screening flags are advisory. The app filters and prioritizes the queue, supports consultation and discharge workflows, and presents operational metrics, alerts, and ESI reference material. App state and demo records persist through browser localStorage. The graph follows documented capabilities where source excerpts do not show implementation details; those links are omitted rather than inferred.

Main entry points: [`src/App.jsx`](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/App.jsx) (Application Shell), [`src/components/registration/PatientRegistrationModal.jsx`](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/registration/PatientRegistrationModal.jsx) (Patient Intake), [`src/components/queue/PatientCard.jsx`](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/queue/PatientCard.jsx) (Patient Queue Card), [`src/constants/triageConstants.js`](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/constants/triageConstants.js) (Triage Definitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Triage Workflow"]
  node_app["Application Shell<br/>[App.jsx]"]
  node_intake["Patient Intake"]
  node_screening["Warning Screening<br/>[triageEngine.js]"]
  node_triage_rules["Triage Definitions<br/>[triageConstants.js]"]
end

subgraph group_operations["Queue Operations"]
  node_queue_controls["Queue Filters<br/>[QueueControls.jsx]"]
  node_patient_card["Patient Queue Card<br/>[PatientCard.jsx]"]
  node_clinical_record["Clinical Record &amp; Re-triage"]
  node_queue_logic["Queue Logic &amp; Metrics<br/>[triageEngine.js]"]
end

subgraph group_insight["Dashboard &amp; Guidance"]
  node_metrics["Metric Cards<br/>[MetricCards.jsx]"]
  node_acuity_chart["Acuity Distribution"]
  node_department_chart["Department Caseload"]
  node_alerts["Triage Alerts"]
  node_protocols["Clinical Protocols"]
end

subgraph group_shared["Shared UI &amp; State"]
  node_demo_store[("Demo Patient Store<br/>[storageService.js]")]
  node_header["Header Actions<br/>[Header.jsx]"]
  node_sidebar["Navigation Sidebar<br/>[Sidebar.jsx]"]
  node_safety_banner["Safety Banner"]
  node_badges["Status &amp; Acuity Badges<br/>[Badge.jsx]"]
  node_modal["Modal Container<br/>[Modal.jsx]"]
  node_notifications["Toast Notifications<br/>[Toast.jsx]"]
end

node_staff(("Clinical Staff"))

node_staff -->|"uses"| node_app
node_app -->|"opens intake"| node_intake
node_intake -->|"checks vitals"| node_screening
node_intake -->|"uses acuity"| node_triage_rules
node_app -->|"filters queue"| node_queue_controls
node_app -->|"filters and sorts"| node_queue_logic
node_app -->|"shows patients"| node_patient_card
node_patient_card -->|"opens record"| node_clinical_record
node_patient_card -->|"formats wait"| node_queue_logic
node_clinical_record -->|"formats elapsed time"| node_queue_logic
node_patient_card -->|"renders badges"| node_badges
node_clinical_record -->|"uses dialog"| node_modal
node_intake -->|"uses dialog"| node_modal
node_screening -->|"uses definitions"| node_triage_rules
node_app -->|"loads and saves"| node_demo_store
node_app -->|"shows metrics"| node_metrics
node_app -->|"shows distribution"| node_acuity_chart
node_app -->|"shows caseload"| node_department_chart
node_app -->|"shows alerts"| node_alerts
node_alerts -->|"renders acuity"| node_badges
node_acuity_chart -->|"uses definitions"| node_triage_rules
node_department_chart -->|"uses departments"| node_triage_rules
node_app -->|"opens reference"| node_protocols
node_app -->|"renders actions"| node_header
node_app -->|"renders banner"| node_safety_banner
node_app -->|"renders navigation"| node_sidebar
node_app -->|"renders notifications"| node_notifications

click node_app "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/App.jsx"
click node_intake "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/registration/PatientRegistrationModal.jsx"
click node_screening "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/services/triageEngine.js"
click node_triage_rules "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/constants/triageConstants.js"
click node_queue_controls "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/queue/QueueControls.jsx"
click node_patient_card "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/queue/PatientCard.jsx"
click node_clinical_record "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/queue/PatientDetailModal.jsx"
click node_queue_logic "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/services/triageEngine.js"
click node_demo_store "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/services/storageService.js"
click node_metrics "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/MetricCards.jsx"
click node_acuity_chart "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/UrgencyDistributionChart.jsx"
click node_department_chart "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/DepartmentFlowChart.jsx"
click node_alerts "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/TriageAlertsPanel.jsx"
click node_protocols "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/protocols/ClinicalProtocolsView.jsx"
click node_header "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/layout/Header.jsx"
click node_sidebar "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/layout/Sidebar.jsx"
click node_safety_banner "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/layout/ClinicalSafetyBanner.jsx"
click node_badges "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/common/Badge.jsx"
click node_modal "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/common/Modal.jsx"
click node_notifications "https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/common/Toast.jsx"

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_app,node_intake,node_screening,node_triage_rules toneBlue
class node_queue_controls,node_patient_card,node_clinical_record,node_queue_logic toneAmber
class node_metrics,node_acuity_chart,node_department_chart,node_alerts,node_protocols toneMint
class node_demo_store,node_header,node_sidebar,node_safety_banner,node_badges,node_modal,node_notifications toneRose
class node_staff toneIndigo
```

## Components

### Triage Workflow

- [Application Shell](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/App.jsx): `src/App.jsx`
- [Patient Intake](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/registration/PatientRegistrationModal.jsx): `src/components/registration/PatientRegistrationModal.jsx`
- [Warning Screening](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/services/triageEngine.js): `src/services/triageEngine.js`
- [Triage Definitions](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/constants/triageConstants.js): `src/constants/triageConstants.js`

### Queue Operations

- [Queue Filters](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/queue/QueueControls.jsx): `src/components/queue/QueueControls.jsx`
- [Patient Queue Card](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/queue/PatientCard.jsx): `src/components/queue/PatientCard.jsx`
- [Clinical Record & Re-triage](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/queue/PatientDetailModal.jsx): `src/components/queue/PatientDetailModal.jsx`
- [Queue Logic & Metrics](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/services/triageEngine.js): `src/services/triageEngine.js`

### Dashboard & Guidance

- [Metric Cards](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/MetricCards.jsx): `src/components/dashboard/MetricCards.jsx`
- [Acuity Distribution](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/UrgencyDistributionChart.jsx): `src/components/dashboard/UrgencyDistributionChart.jsx`
- [Department Caseload](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/DepartmentFlowChart.jsx): `src/components/dashboard/DepartmentFlowChart.jsx`
- [Triage Alerts](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/dashboard/TriageAlertsPanel.jsx): `src/components/dashboard/TriageAlertsPanel.jsx`
- [Clinical Protocols](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/protocols/ClinicalProtocolsView.jsx): `src/components/protocols/ClinicalProtocolsView.jsx`

### Shared UI & State

- [Demo Patient Store](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/services/storageService.js): `src/services/storageService.js`
- [Header Actions](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/layout/Header.jsx): `src/components/layout/Header.jsx`
- [Navigation Sidebar](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/layout/Sidebar.jsx): `src/components/layout/Sidebar.jsx`
- [Safety Banner](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/layout/ClinicalSafetyBanner.jsx): `src/components/layout/ClinicalSafetyBanner.jsx`
- [Status & Acuity Badges](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/common/Badge.jsx): `src/components/common/Badge.jsx`
- [Modal Container](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/common/Modal.jsx): `src/components/common/Modal.jsx`
- [Toast Notifications](https://github.com/rsubash2006-hash/smartcare-patient-queue/blob/main/src/components/common/Toast.jsx): `src/components/common/Toast.jsx`

### Other components

- **Clinical Staff**

## Connections

- Clinical Staff → Application Shell: uses (evidence: `README.md`)
- Application Shell → Patient Intake: opens intake (evidence: `src/App.jsx`)
- Patient Intake → Warning Screening: checks vitals (evidence: `src/components/registration/PatientRegistrationModal.jsx`)
- Patient Intake → Triage Definitions: uses acuity (evidence: `src/components/registration/PatientRegistrationModal.jsx`)
- Application Shell → Queue Filters: filters queue (evidence: `src/App.jsx`)
- Application Shell → Queue Logic & Metrics: filters and sorts (evidence: `src/App.jsx`)
- Application Shell → Patient Queue Card: shows patients (evidence: `src/App.jsx`)
- Patient Queue Card → Clinical Record & Re-triage: opens record (evidence: `src/components/queue/PatientCard.jsx`)
- Patient Queue Card → Queue Logic & Metrics: formats wait (evidence: `src/components/queue/PatientCard.jsx`)
- Clinical Record & Re-triage → Queue Logic & Metrics: formats elapsed time (evidence: `src/components/queue/PatientDetailModal.jsx`)
- Patient Queue Card → Status & Acuity Badges: renders badges (evidence: `src/components/queue/PatientCard.jsx`)
- Clinical Record & Re-triage → Modal Container: uses dialog (evidence: `src/components/queue/PatientDetailModal.jsx`)
- Patient Intake → Modal Container: uses dialog (evidence: `src/components/registration/PatientRegistrationModal.jsx`)
- Warning Screening → Triage Definitions: uses definitions (evidence: `src/services/triageEngine.js`)
- Application Shell → Demo Patient Store: loads and saves (evidence: `src/App.jsx`)
- Application Shell → Metric Cards: shows metrics (evidence: `src/App.jsx`)
- Application Shell → Acuity Distribution: shows distribution (evidence: `src/App.jsx`)
- Application Shell → Department Caseload: shows caseload (evidence: `src/App.jsx`)
- Application Shell → Triage Alerts: shows alerts (evidence: `src/App.jsx`)
- Triage Alerts → Status & Acuity Badges: renders acuity (evidence: `src/components/dashboard/TriageAlertsPanel.jsx`)
- Acuity Distribution → Triage Definitions: uses definitions (evidence: `src/components/dashboard/UrgencyDistributionChart.jsx`)
- Department Caseload → Triage Definitions: uses departments (evidence: `src/components/dashboard/DepartmentFlowChart.jsx`)
- Application Shell → Clinical Protocols: opens reference (evidence: `src/App.jsx`)
- Application Shell → Header Actions: renders actions (evidence: `src/App.jsx`)
- Application Shell → Safety Banner: renders banner (evidence: `src/App.jsx`)
- Application Shell → Navigation Sidebar: renders navigation (evidence: `src/App.jsx`)
- Application Shell → Toast Notifications: renders notifications (evidence: `src/App.jsx`)
