feat(vitals): vitals status update and vitals queue workflow
Problem Statement
Currently, there is no enforced workflow to ensure that patient vitals are completed before a doctor starts a consultation. This can lead to inconsistent patient flow and missing clinical data.
Queue Status Workflow
The patient queue must follow this strict and sequential status flow:
- vitals
- Created when a doctor assigns a patient to themselves
- Patient is assigned but vitals are not yet recorded
- waiting
- Automatically updated once vitals entry is completed
- in_consultation
- Triggered when the doctor clicks Start Consultation
- Must not be allowed if vitals are incomplete
- consultation_completed
- Triggered when the doctor clicks Complete Consultation
Vitals Queue Page
Introduce a Vitals Queue page similar to the Consultation Queue.
Display patients:
- Assigned to the logged-in doctor
- With queue status
vitals
Purpose:
- Allow staff to easily identify patients who require vitals entry
Consultation Queue Updates
Consultation Queue should:
- Display all patients assigned to the doctor
- Clearly show the current vitals status for each patient
Business Rules:
- Start Consultation must be disabled/blocked when status is
vitals - Start Consultation must be enabled only when status is
waiting
Constraints & Validation
- A patient must not transition to
in_consultationunless vitals are completed - Status transitions must be enforced at:
- Backend level (API validation)
- Frontend level (button states / UI guards)
Acceptance Criteria
-
Vitals Queue page lists only vitalsstatus patients assigned to the doctor -
Consultation cannot be started unless vitals are completed -
Queue status transitions strictly follow: vitals→waiting→in_consultation→consultation_completed -
UI and backend remain in sync for all transitions -
TypeScript compilation passes with 0 errors -
WebSocket broadcasts include statusfor real-time updates
Expected Outcome
- Clear separation of responsibilities between vitals and consultation stages
- No consultations without vitals
- Improved patient flow and clinical data completeness
Implementation Details
- Add
vitalsstatus to QueueStatusEnum - Create
VitalsQueuePagecomponent - Enhance
RecordVitalsPagewith auto-load and sequential API calls - Update
PatientCardwith vitals indicators - Add vitals route and dashboard button
- Validate vitals before consultation start
Edited by Kushal Lagichetty