✨ Proposal: Specialization-Based Assignment & Multi-Queue Management
Summary
Replace doctor-based assignment and queueing with a specialization-based assignment system, enabling separate queues per specialization and intelligent handling of patients assigned to multiple specializations.
Problem Statement
Currently, the workflow in eHRS follows this pattern:
- Patient registers (new or existing)
- Volunteer manually assigns a doctor
- A single queue is maintained per doctor This approach introduces several limitations:
- Volunteers must know which doctor to assign instead of simply identifying the medical need.
- Doctor assignment happens too early, even before symptoms are fully assessed
- Queueing is rigid (doctor-based) and does not scale well when:
- Multiple doctors belong to the same specialization
- A patient needs consultations across multiple specializations
- Patients assigned to multiple doctors can appear in parallel queues, causing conflicts during consultations.
Proposed Solution
Patient Registration
- After registration, instead of assigning a doctor, the volunteer assigns one or more medical specializations (e.g., General Physician, Gynecology, ENT, Pediatrics) Specialization Assignment
- A new “Assign Specialization” step is introduced immediately after registration.
- The existing “Assign Doctor” option is removed from the Volunteer Home page. Specialization-Based Queues
- Each specialization maintains:
- Its own queue
- Its own token sequence (e.g., GP-01, ENT-05)
- When a patient is assigned to:
- One specialization → added to that specialization’s queue
- Multiple specializations → added to multiple queues, but with controlled progression Consultation Flow (Multi-Specialization Logic)
- When a doctor starts consultation for a patient in one specialization:
- The patient is marked as “In Consultation”
- That patient is temporarily put on hold in all other assigned specialization queues
- After consultation completion:
- The patient is automatically pushed to the next pending specialization queue
- This ensures:
- No parallel consultations
- No token conflicts
- Clear consultation order Doctor Interaction
- Doctors:
- View queues by specialization
- Start consultation from their specialization queue
- Are abstracted from manual patient-doctor assignment logic
Alternatives Considered 1. Auto-Assign Doctor Based on Symptoms
- Rejected because:
- Requires accurate symptom classification
- Reduces flexibility during medical camps
- Specialization-first approach is simpler and more robust 2. Keep Doctor-Based Queues with Multi-Queue Locks
- Rejected due to:
- Higher complexity
- Poor scalability
- Confusing volunteer and doctor experience
Benefits
✅ Improves future extensibility (analytics, load balancing, auto-routing)
Risks or Concerns
- Increased backend complexity for queue and state management
- Requires careful handling of patient states:
- Waiting
- In Consultation
- On Hold
- Completed
- Migration needed for existing doctor-based queues
- UI updates required across Volunteer and Doctor dashboards
Edited by Lakshy Yarlagadda