Skip to content

Resolve "feat: Add Specialization-Based Filters in Queue Screens"

Closes #136 (closed)

Summary

This MR adds a Specialization filter to queue views while keeping current filters unchanged.

What Changed

  • Updated shared queue component:
    • QueueDisplay.tsx
  • Added Specialization filter state and UI (All + dynamic specialization options).
  • Populated specialization options from queue data (doctor_specialization), with Unspecified fallback for missing values.
  • Integrated specialization filtering into existing filter chain:
    • Doctor -> Specialization -> Gender (if enabled) -> Search

Affected Screens

  • Vitals Queue (/volunteer/vitals-queue)
  • Existing: Doctor + Gender + Search
  • Now: Doctor + Specialization + Gender + Search
  • Consultation Queue (/volunteer/consultation-queue)
  • Existing: Doctor
  • Now: Doctor + Specialization
  • In Consultation / Consultation Completed view (also uses QueueDisplay)
  • Existing: Doctor
  • Now: Doctor + Specialization

Why

Doctor-only filtering is too granular when multiple doctors share the same specialty. Specialization filtering improves queue triage and operational visibility without changing current workflows.

Testing

  • QueueDisplay.tsx
  • ConsultationCompletedPage.test.tsx (39 tests passed)

Notes

  • Change is intentionally scoped to one file (QueueDisplay) to minimize risk and avoid unrelated modifications.
  • Existing doctor/gender/search behavior remains intact.

Merge request reports

Loading