feat(rbac): allow volunteers to start consultation from waiting queue
Allow Volunteers to Transition Patients from Waiting → In Consultation
Description
Currently, the backend restricts the queue status transition from waiting → in_consultation to coordinator/admin roles only. During real medical camp workflows, volunteers are often seated with doctors and actively manage patient flow, including calling patients into consultation when coordinators are occupied.
This restriction leads to operational friction and requires unnecessary coordination, even though volunteers already have permission to complete consultations.
Current Behavior
- Endpoint:
PUT /api/v1/queue/status-update - Transition rules in
consultation_queue_routes.py:-
waiting → in_consultation: coordinator/admin only -
in_consultation → consultation_completed: volunteer/coordinator/admin
-
- When a volunteer attempts
waiting → in_consultation, the backend returns 403 Forbidden.
Expected Behavior
- Volunteers should be allowed to transition patients from:
waiting → in_consultation
- This aligns with real camp workflows where volunteers assist doctors directly and manage patient movement.
Why This Matters
- Reduces dependency on coordinators during peak hours.
- Improves consultation throughput and patient flow.
- Matches the practical responsibilities of volunteers in camps.
- Avoids frontend workarounds or UX limitations caused by backend restrictions.
Proposed Change
Update RBAC logic in consultation_queue_routes.py to allow:
-
waiting → in_consultationfor roles:- volunteer
- coordinator
- admin /estimate 2h