Skip to content

Resolve "feat(frontend): show Active Consultations count on doctor cards in Assign Doctor flow(requires backend)"

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/registered response to include active consultation stage counts:
    • vitals_count
    • waiting_count
    • in_consultation_count
  • Ensured pending_queue_count correctly 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)

Merge request reports

Loading