Explore documentation

FHIR Scheduling Overview

Introduction to scheduling resources in FHIR R4

What is FHIR Scheduling?

FHIR scheduling resources let you manage appointments, time slots, and healthcare-provider availability. In Esus, the scheduling surface is:

ResourceEndpointPurpose
Schedule/fhir/ScheduleA container of slots for a specific actor (practitioner, room, equipment)
Slot/fhir/SlotAn individual time period that can be booked
Appointment/fhir/AppointmentA booking linking a patient to one or more slots and participants
AppointmentResponse/fhir/AppointmentResponseA participant’s response (accepted, declined, tentative) to an appointment

All four support the standard CRUD interactions (create 201, read, search, PUT, PATCH, DELETE 204) plus _history. Appointment also has the $book operation.

Typical Flow

Create Schedule → Create Slots (status=free) → POST /Appointment/$book (slotId) → Appointment booked + Slot flips to busy → arrived → fulfilled

What Esus does automatically (and what it doesn’t)

BehaviorAutomatic?
Flip the Slot free → busy when bookingOnly with $book (atomic). A plain POST /fhir/Appointment with slot[] does not touch the Slot.
Reject double booking of a participantYes, in $book, and in POST /fhir/Appointment when the body has start + end. Appointments in cancelled, noshow or entered-in-error don’t count.
Enforce the status state machineYes, on PUT/PATCH (not on create).
Free the Slot when an appointment is cancelled, marked noshow or deletedNo. Update the Slot back to free yourself.
Create AppointmentResponse resourcesNo. Always created explicitly.
Send reminders or availability notificationsNo. See “Appointment Reminders” and “Real-Time Availability”.

Appointment Status Lifecycle

proposed → pending → booked → arrived → fulfilled
                           ↘ cancelled
                           ↘ noshow

The valid transitions are exactly: proposed → {pending, cancelled}, pending → {booked, cancelled}, booked → {arrived, cancelled, noshow}, arrived → {fulfilled, cancelled}. Any other change returns HTTP 400. Re-sending the status the appointment already has is not a transition: it is accepted as a no-op.

fulfilled, cancelled and noshow are terminal. The values checked-in, waitlist and entered-in-error are accepted by the schema but no transition leads to them; they can only be set when the appointment is created (create does not check transitions). See “Waitlist Management”.

Who can do what

For user tokens, access to the four scheduling resources is decided by role:

RoleAccess
admin, doctor, receptionistFull access (read, search, create, update, delete)
nurseRead, search and update
patientRead/search their own data and create AppointmentResponse; cannot create appointments (including $book)

API keys are governed by their scopes instead (e.g. Appointment.create, Slot.*).

Use Cases

  1. Online self-scheduling — your patient portal’s backend (with an API key) books a free slot with $book on the patient’s behalf.
  2. Call-center scheduling — staff schedules appointments on behalf of patients.
  3. Walk-in management — register patients without prior appointments.
  4. Resource scheduling — book rooms, equipment, or other resources.