feat(backend): add waiting and in_consultation to patient status tracking
🚀 Feature Request
Is your feature request related to a problem? Please describe.
The frontend progress tracker now expects two additional steps (waiting, in_consultation) in the patient status history, but the backend does not currently emit these values in the status array or sync them from consultation queue transitions.
Describe the solution you'd like
- Extend the visit status enum to include
waitingandin_consultation. - When queue status changes to
waitingorin_consultation, append the matching status into patient visit history. - Update
GET /api/v1/patients/{bookNo}/statusto include these queue-derived statuses for the latest camp when applicable.
Describe alternatives you've considered
- Deriving these statuses entirely on the frontend from queue endpoints, but this would duplicate logic and fail when queue data isn’t available.
Additional context
- Expected flow:
vitals → waiting → in_consultation → consultation_completed - Status history must remain unique (no duplicates).
- Add tests covering new status values and queue transitions.
Edited by Banuri Koushik Reddy