Clinical Workflows
Clinical Workflows & Emergency Care Specifications
This document specifies the technical design for core clinical operational loops within the Level 4 facility. All workflows conform to the Ministry of Health (MoH) clinical guidelines and ensure strict data coupling with the underlying billing state machines.
1. Outpatient Department (OPD) Workflows
The Outpatient Department operates as a high-throughput, distributed queueing environment. The system models the outpatient lifecycle using an explicit state machine attached to the Encounter domain object.
1.1 The Outpatient State Machine
1.2 Triage & Clinical Risk Stratification
The triage module requires the collection of fundamental physiological markers. The system evaluates these markers in real time to calculate an automated Modified Early Warning Score (MEWS), which determines queue prioritization over a standard First-In-First-Out (FIFO) approach.
| Parameter | Critical Low (+3) | Moderate Low (+2) | Mild Low (+1) | Normal (0) | Mild High (+1) | Moderate High (+2) | Critical High (+3) |
|---|---|---|---|---|---|---|---|
| Systolic BP | ≤70 | 71−80 | 81−100 | 101−199 | N/A | ≥200 | N/A |
| Heart Rate | N/A | ≤40 | 41−50 | 51−100 | 101−110 | 111−129 | ≥130 |
| Resp Rate | N/A | ≤8 | N/A | 9−14 | 15−20 | 21−29 | ≥30 |
| Temp (°C) | N/A | ≤35.0 | N/A | 35.1−37.5 | 37.6−38.4 | ≥38.5 | N/A |
System Action Guardrail: Any encounter yielding a total aggregated MEWS score >5 trigger an immediate visual flash on all active nursing monitors, an audio alert at the nursing station, and automatically bumps the patient to position #1 in the clinician's consultation queue with an EMERGENCY_PRIORITY flag.
2. Inpatient Department (IPD) Workflows
The transition to the Inpatient Department moves the patient from a transactional encounter model to a continuous monitoring environment.
2.1 Admission, Bed Allocation, and Transfers
An admission request from an outpatient clinician creates an entry in the Central Bed Tracker.
- Ward Allocation: Wards are categorized structurally (e.g., Male Medical, Female Surgical, Paediatric, Maternity, Isolation).
- Bed Lock Mechanism: When an inpatient nurse clicks "Allocate Bed," a Redis key lock is established with a 15-minute TTL: lock🛏ward_id:bed_num. This prevents multiple ward teams from assigning different patients to the same physical asset during emergencies.
- Financial State Shift: Upon bed confirmation, the billing framework switches the financial session's parameters. Daily bed charges, standard nursing procedure levies, and continuous medication consumption models are activated automatically.
2.2 Continuous Inpatient Monitoring Loops
The active inpatient record is anchored around the electronic Medication Administration Record (eMAR) and fluid balance sheets.
(To be reviewed)
eMAR Validation Loop: Medication administration requires a three-point barcode match scanned at the bedside:
1.Patient Wristband Barcode (Validates patient_id).
2.Nurse ID Badge Barcode (Validates user_id permissions).
3.Unit-Dose Medication Wrap Barcode (Validates item_batch_id and dosage matching the active order).
Fluid Balance Tracking: The system enforces strict fluid intake (intravenous lines, oral fluids, nasogastric inputs) versus output tracking (urine volume, surgical drains, emesis) for specialized cases like renal failure or post-abdominal operations.
3. High-Intensity Care: ICU & HDU State Engines
The Intensive Care Unit (ICU) and High Dependency Unit (HDU) represent the highest density of clinical data ingestion within the HMIS architecture.
3.1 Automated SOFA Scoring Execution
Every 24 hours at exactly 23:59 hours, the system triggers a background cron job for all active ICU/HDU billing sessions to calculate the Sequential Organ Failure Assessment (SOFA) score based on structured laboratory inputs and vital statistics:
- Respiratory System: $PaO_2 / FiO_2$ ratio extracted from blood gas lab parameters.
- Cardiovascular System: Mean Arterial Pressure (MAP) and active vasopressor dosage rates (Dopamine, Epinephrine, Norepinephrine) pulled from the eMAR records.
- Hepatic/Renal: Bilirubin and Creatinine values gathered directly from the chemistry analyzer network interface.
4. Emergency Room (ER) & Code Red Integration
The Emergency Room breaks traditional front-office registration boundaries to preserve life.
4.1 The "John Doe / Jane Doe" Protocol
When a patient arrives unconscious or without identification documents during a trauma event, the ER clerk or triage nurse can activate the Emergency Bypass Protocol:
4.2 Financial Suspension Boundaries during Trauma
When the code red flag is active on an encounter:
- All validation check gates inside the Laboratory Information System (LIS) and Radiology Information System (RIS) are bypassed.
- Blood unit matches can be signed out with zero upfront verification of payment or insurance state.
- The system logs all accrued liabilities to an automated background holding ledger labeled under the Emergency, Chronic, and Critical Illness Fund (ECCIF) framework for retrospective reconciliation once the patient is stabilized or identified.
5. Medical Standards Compliance
To enable long-term statutory compliance and semantic interoperability with national systems, data structures are strict and validated at the API layer.
5.1 WHO ICD-11 Integration Blueprint
Free-text diagnostic entry is prohibited within clinician consultation logs. The diagnostics interface utilizes a typeahead lookup integrated into the official WHO ICD-11 linearizations:
5.2 HL7 FHIR Observation Profile Mapping
Every recorded clinical vital sign map dynamically to an HL7 FHIR Observation resource type before state serialization:JSON{
Target Scope: Level 4 Hospital Production Infrastructure