Resolve "feat(frontend): show Active Consultations count on doctor cards in Assign Doctor flow(requires backend)"
requested to merge 150-display-active-consulatations-count-in-doctor-assign-requires-backend into develop
Title (semantic)
fix(assign-doctor): show active consultations and add stage-wise queue counts in doctors registered API
Description
This merge request enhances the Assign Doctor workflow by exposing and displaying doctors’ active workload.
Backend Changes
- Updated
GET /api/v1/doctors/registeredresponse to include active consultation stage counts:vitals_countwaiting_countin_consultation_count
- Ensured
pending_queue_countcorrectly reflects active consultations from the queue. - Extended response schema and aggregation logic without introducing new endpoints.
Frontend Changes
- Doctor selection cards now display Active Consultations using
pending_queue_count. - Added safe fallback (
0) when the value is missing or null. - Maintained responsive layout for mobile and desktop.
This improvement allows coordinators to quickly identify less-busy doctors during assignment.
Checklist
- Bug reproduced and confirmed
-
Backend response updated with active queue metrics -
Frontend doctor cards updated to display Active Consultations -
No breaking API changes introduced -
Existing tests passing
-
Related Issue(s)
Closes #150 (closed)