Resolve "fix(backend): include active consultation stage counts in /doctors/registered response"
requested to merge 35-fix-backend-include-active-consultation-stage-counts-in-doctors-registered-response into develop
Bug Report Template
Title (semantic)
fix(backend): include active consultation stage counts in doctors registered response
Description
This merge request fixes a backend issue where the GET /api/v1/doctors/registered endpoint did not return active consultation stage counts required by the Assign Doctor frontend page.
The API previously exposed only:
consultation_countpending_queue_count
This fix adds real-time queue metrics per doctor:
vitals_countwaiting_countin_consultation_count
These values are aggregated from the active patient flow/consultation queue to correctly reflect current doctor workload.
Checklist
- The bug has been reproduced and confirmed
-
A clear and concise fix has been implemented -
Response schema updated to include stage-wise counts -
Backend aggregation logic added for active queues -
Existing tests are passing
-
Related Issue(s)
Closes #35 (closed)
Edited by Lakshy Yarlagadda