FHIR Complete

Queue

Appointment queue management and physio queue

Queue Status

Get current queue state for a practitioner on a given date:

GET /queue-status?date={date}&practitioner={practitionerId}

Response

Returns queue items with:

  • Queue number (N-prefix = normal, U-prefix = urgent)
  • Patient reference
  • Status (waiting, in-progress, completed)
  • Appointment reference
  • Check-in time

Queue Numbering

PrefixTypeAssignment
N001, N002...NormalAuto-assigned when slot is created
U001, U002...UrgentAssigned when urgent appointment is created

Queue records are lazy-createdget_queue_status() auto-creates records if none exist for a slot.

Physio Queue

Physical therapy queue with real-time updates:

GET /PhysioQueue?date={date}&location={locationId}&status={status}
POST /PhysioQueue
PUT /PhysioQueue/{resource_id}

Task Management

The physio queue uses FHIR Task resources for managing treatment sessions:

GET /Task?patient={id}&status={status}&code={code}
POST /Task
PUT /Task/{resource_id}

Staff Tasks

General task management for staff:

GET /StaffTask?owner={practitionerId}&status={status}
POST /StaffTask
PUT /StaffTask/{resource_id}

Real-time Updates

Queue status updates are broadcast via Supabase Realtime. The frontend subscribes to queue changes for live updating of the waiting room display.