Find Available Time Slots for an Appointment

When a call center agent wants to schedule an appointment, the first step is to find the available time slots for providers who match the patient’s needs. The call center agent gathers selection criteria and then initiates a search to obtain the available slots for providers who match the criteria.
  • Type: Controller
  • Verb: POST
  • Default URL Path: <base-url>/Slot/_search
  • Content-Type (Header): application/x-www-form-urlencoded

Your Base URL is configured in Setup > Appointment Scheduling.

All communications with the external system use the FHIR R4 standard.

Request Body

The request payload is sent as single line. It is listed here in separate lines for readability.

Note

Multiple Source Systems

If you are working with more than one source system, the Location._id gets the source system name and ID in pipe-delimited pairs, separated by commas, like this:

For a single source system, the Location._id is the ID only, like this:

Response Codes

  • 200: Success
  • 400: Bad request
  • 401: Unauthorized
  • 5xx: Server error

Response Body

  • To map slots, resource, resourceType, id, schedule, actor, start, and end are required in the FHIR response.
  • Response is a map keyed by CareProvider.careProviderId to give all available slots within the start/end range for a single practitioner+facility pair that can fulfill an appointment for the serviceTypeCode+appointmentTypeCode.
  • If a practitioner+facility pair is not found in the source system, the provider is ignored and nothing is returned for that careProviderId. If a practitioner+facility pair does not have availability that matches the slot range and codes, the careProviderId is returned without any slots.
  • By default, the list of returned slots for each provider is sorted by date/time in ascending order.
  • The sourceSlotId for a slot is the ID of a time slot in the source system for a care provider (eg. practitioner+facility) that can fulfill a specific serviceTypeCode+appointmentTypeCode. Given this ID during appointment booking, the source system is able to identify the practitioner, facility, time slot, service type and appointment type.

Error Response for Multiple Source Systems

Identifier

CodeableConcept

Coding