Queue
Queue items represent same-day visits. List defaults to the branch-local check-in date.
The queue model
Properties
- Name
id- Type
- string
- Description
Queue entry UUID.
- Name
queueNumber- Type
- integer
- Description
Daily queue number for the branch.
- Name
status- Type
- string
- Description
WAITING, IN_PROGRESS, COMPLETED, etc.
- Name
patientId- Type
- string
- Description
Linked patient.
- Name
roomId- Type
- string
- Description
Assigned room when applicable.
GET/api/queue
List queue
Optional date=YYYY-MM-DD, incomplete=true, roomId.
Query parameters
Query parameters: date, incomplete, roomId.
Request
GET
/api/queuecurl -X GET http://localhost:3000/api/queue \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"date": "2026-10-05",
"items": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"queueNumber": 12,
"status": "WAITING",
"patientId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"roomId": null,
"waitTimeMinutes": 8,
"estimatedWaitMinutes": 15,
"patient": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"patientName": "Ahmad bin Ali",
"patientNumber": "P-00042",
"category": "GREEN_FLAG"
},
"room": null,
"doctor": null,
"billedTotal": "0.00"
}
]
}
POST/api/queue
Add to queue
Creates a queue entry for a patient.
Request
POST
/api/queuecurl -X POST http://localhost:3000/api/queue \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d "{\"patientId\":\"PATIENT_UUID\"}"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"queueNumber": 13,
"status": "WAITING",
"patientId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"roomId": null,
"createdAt": "2026-10-05T06:30:00.000Z",
"patient": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"patientName": "Ahmad bin Ali",
"patientNumber": "P-00042"
},
"room": null,
"doctor": null
}
GET/api/queue/:id
Retrieve entry
Single queue row with patient and visit context.
Request
GET
/api/queue/:idcurl -X GET http://localhost:3000/api/queue/:id \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"queueNumber": 12,
"status": "IN_PROGRESS",
"patientId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"currentVisitNumber": "V-2026-0012",
"visitType": "CONSULTATION",
"patient": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"patientName": "Ahmad bin Ali",
"patientNumber": "P-00042"
},
"room": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Room 1",
"code": "R1",
"status": "OCCUPIED"
},
"doctor": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"fullName": "Dr. Lee"
}
}
PATCH/api/queue/:id/admit
Admit
Moves visit to IN_PROGRESS in the queued room.
Request
PATCH
/api/queue/:id/admitcurl -X PATCH http://localhost:3000/api/queue/:id/admit \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "IN_PROGRESS",
"roomId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"consultationRoomId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
PATCH/api/queue/:id/call
Call
Call patient to room.
Request
PATCH
/api/queue/:id/callcurl -X PATCH http://localhost:3000/api/queue/:id/call \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "WAITING",
"calledAt": "2026-10-05T06:30:00.000Z"
}
PATCH/api/queue/:id/complete
Complete
Mark consultation complete.
Request
PATCH
/api/queue/:id/completecurl -X PATCH http://localhost:3000/api/queue/:id/complete \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "COMPLETED"
}
PATCH/api/queue/:id/no-show
No-show
Mark patient as no-show.
Request
PATCH
/api/queue/:id/no-showcurl -X PATCH http://localhost:3000/api/queue/:id/no-show \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "NO_SHOW"
}