Helix AU Core
0.1.0 - ci-build
Helix AU Core - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
The $getSlots operation is a type-level custom operation in the Helix FHIR API which is designed to streamline appointment scheduling workflows.
It returns all available slots for the given schedule and date range.
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=schedule_UUID&fromDate=2025-01-21&toDate=2025-01-21&slotSize=30
Slot resources based on the specified slot size (or the default size if none is provided), and returned as a bundle.scheduleID(mandatory): string (1..1)
fromDate(optional): Date (0..1, YYYY-MM-DD)
toDate(optional): date (0..1, YYYY-MM-DD)
fromData must also be specified. Otherwise, the operation returns a 422 error with the message: 'Invalid request: if toDate is specified, fromDate must also be specified.'fromDate. Otherwise, the operation returns a 422 error with the message: 'Invalid request: toDate must be greater than fromDate.'toDate - fromDate) must not exceed 14 days. Otherwise, the operation returns a 422 error with the message: 'Invalid request: Maximum allowed period is 14 days.'fromDate plus 14 days.slotSize(optional): number (0..1)
Schedule.extensions(appointment-duration). If this value is not set, it will be set to 10 minutes.Schedule resource lacks a planningHorizon, the operation returns a 404 error with the message: 'Requested schedule does not contain a planning horizon.'Schedule.planningHorizon does not overlap with the requested date range, the operation returns a 404 error with the message: 'Requested date range not available.'getSlots scenariosRequest with a single parameter: scheduleId. The date range and slot size will be determined per the rules below:
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=[scheduleId]
Request with scheduleId and start of the date range. The date range and slot size will be determined per the rules below:
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=[scheduleId]&fromDate=[YYYY-MM-DD]
Request with scheduleId, start and end of the data range. Slot size will be determined per the rules below:
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=[scheduleId]&fromDate=[YYYY-MM-DD]&toDate=[YYYY-MM-DD]
Request with scheduleId, start and end of the date range, and slot size.
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=[scheduleId]&fromDate=[YYYY-MM-DD]&toDate=[YYYY-MM-DD]&slotSize=[number]
A request missing scheduleId will result in an error: 'Invalid request: scheduleId must be specified.'
https://<fhir-server>/<tenant>/Slot/$getSlots
A request with scheduleId that does not exist will result in an error: 'HTTP 404 Not Found: getSlots: Error occurred while fetching Schedule with ID non_existing_scheduleId.'
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=non_existing_scheduleId
A request where fromDate is in the past will result in an error: 'Invalid request: fromDate must be greater than now.
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=schedule_UUID&fromDate=2000-01-01
A request with toDate earlier than fromDate will result in an error: 'Invalid request: toDate must be greater than fromDate.
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=schedule_UUID&fromDate=2025-01-21&toDate=2025-01-20
A request with an invalid slotSize will result in an error:'Invalid request: slotSize must be between 5 and 720 minutes.
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=schedule_UUID&slotSize=1
A request with a date range outside the bounds of Schedule.PlanningHorizon will result in an error: 'HTTP 404 Not Found: getSlots: Requested date range not available.'
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=schedule_UUID&fromDate=2025-05-21&toDate=2025-05-21
A request with a data range exceeding 14 days will result in an error: 'Invalid request: Maximum allowed period is 14 days.
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=schedule_UUID&fromDate=2025-01-21&toDate=2025-02-21
If no available slots exist for the specified schedule and date range, an empty bundle will be returned.
{
"resourceType": "Bundle"
}
Context: Requesting available slots for a day when all of the following details are specified:
Request:
https://<fhir-server>/<tenant>/Slot/$getSlots?scheduleId=schedule_UUID&fromDate=2025-01-21&toDate=2025-01-21&slotSize=30
Response:
{
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T07:30:00",
"end": "2025-01-21T08:00:00"
}
},
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T09:00:00",
"end": "2025-01-21T09:30:00"
}
},
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T09:30:00",
"end": "2025-01-21T10:00:00"
}
},
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T10:30:00",
"end": "2025-01-21T11:00:00"
}
},
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T12:00:00",
"end": "2025-01-21T12:30:00"
}
},
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T13:30:00",
"end": "2025-01-21T14:00:00"
}
},
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T15:00:00",
"end": "2025-01-21T15:30:00"
}
},
{
"resource": {
"resourceType": "Slot",
"schedule": {
"reference": "Schedule/schedule_UUID"
},
"status": "free",
"start": "2025-01-21T15:30:00",
"end": "2025-01-21T16:00:00"
}
}
]
}