Waiting Room
Register patients for the virtual waiting room, check their queue status, and cancel registrations.
Register Patient
Register a patient for the waiting room in a specific shop.
POST /v1/management/waiting-room/register
Required permission: waiting_room:write
Request Body
{
"shop_uid": "shop-abc123",
"patient_profile_uid": "pp-xyz789",
"preferred_doctor_uid": "doc-456",
"visit_reason": "Follow-up consultation"
}
| Field | Type | Required | Description |
|---|
shop_uid | string | Yes | Shop UID where the patient is registering |
patient_profile_uid | string | Yes | Patient profile UID |
preferred_doctor_uid | string | No | Preferred doctor UID |
visit_reason | string | No | Reason for the visit |
Example Request
curl -X POST "https://api.rxscale.com/v1/management/waiting-room/register" \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"shop_uid": "shop-abc123",
"patient_profile_uid": "pp-xyz789",
"preferred_doctor_uid": "doc-456",
"visit_reason": "Follow-up consultation"
}'
Response (201 Created)
{
"queue_uid": "q-abc123",
"position": 3,
"estimated_wait_minutes": 15
}
Check Queue Status
Get the current status of a queue entry, including position and estimated wait time.
GET /v1/management/waiting-room/{queue_uid}/status
Required permission: waiting_room:read
Example Request
curl -X GET "https://api.rxscale.com/v1/management/waiting-room/q-abc123/status" \
-H "X-API-Key: your-api-key-here"
Response
{
"queue_uid": "q-abc123",
"status": "waiting",
"position": 2,
"estimated_wait_minutes": 10,
"video_room_id": null,
"allocated_at": null
}
Status Values
| Status | Description |
|---|
waiting | Patient is waiting in the queue |
allocated | Patient has been allocated to a doctor |
completed | Consultation has been completed |
cancelled | Registration was cancelled |
When a patient is allocated, video_room_id and allocated_at will be populated.
Cancel Registration
Cancel a queue registration.
DELETE /v1/management/waiting-room/{queue_uid}
The queue entry UID to cancel
Required permission: waiting_room:write
Example Request
curl -X DELETE "https://api.rxscale.com/v1/management/waiting-room/q-abc123" \
-H "X-API-Key: your-api-key-here"
Response
{
"message": "Registration cancelled"
}