1.0.1 - release
KisimScheduling - Local Development build (v1.0.1). See the Directory of published versions
| Official URL: http://fhir.kisimdocs.ch/ig/KisimScheduling/OperationDefinition/slot-query-searchByAppointment | Version: 1.0.1 | |||
| Draft as of 2023-11-22 | Computable Name: SearchSlotByAppointment | |||
Search for free slots in a time-period for an already existing appointment. This query should be used if a client wants to move an existing appointment.
Additional search parameters include the possibility to filter the results by type of resource (either a practitioner or a location), the flag to let the server split the slots and the possibility to decide the length of a single slot in minutes.
Due to the dynamics on a resource where external systems and KISIM books appointments, the found slots will only be valid for a short timeframe (Usually 30 minutes). After this time the slots will be deleted and no longer be accessible.
Therefore, it is not advised to cache slots on the implementers side. If you want to cache slots, remember that even though the slots are still free on your system, they might have been booked from a different system already.
Parameters
| Use | Name | Scope | Cardinality | Type | Binding | Documentation |
| IN | _query | 1..1 | string (string) | BindingStrength (Required) | Extended search parameter as defined by the fhir-specification. Value has to be "searchByAppointment" | |
| IN | TERMNR | 1..1 | string (string) | BindingStrength (Required) | ID of existing Appointment | |
| IN | start | 0..1 | string (string) | BindingStrength (Required) | Starting time for the search. Accepted formats are: "yyyy-mm-dd hh:ii" or "yyyy-mm-dd". If the parameter is not set the search starts now. | |
| IN | maxDays | 1..1 | string (string) | BindingStrength (Required) | Defines the number of days from "start" during which empty slots are searched. Value of 1 equals 24 hours. Max Value=10 | |
| IN | splitSlots | 0..1 | string (string) | BindingStrength (Required) | Value of either 0 or 1. If the parameter is set to 1, the slots are split into a KISIM-defined length from the search plan or the durationMinutes parameter. | |
| IN | durationMinutes | 0..1 | string (string) | BindingStrength (Required) | Number of minutes to split the slots into. If nothing is set, the default value from KISIM as defined in the search plan is used. | |
| IN | resourceFilter | 0..1 | string (string) | BindingStrength (Required) | Filter the slots by location or practitioner. Those values equal the values inside KISIM. The value can be either "USER" for practitioners or "KONS" for locations(rooms) | |
| OUT | return | 0..1 | Bundle | BindingStrength (Required) | A bundle of slot resources. The ID is dynamic. Found slots will be cached for a time on the server. After that time, the slot will no longer be accessible. |
Search for a time period
Search free slots starting from now for the next 5 days (or 120 hours):
GET [base]/Slot?_query=searchByAppointment&TERMNR=[AppointmentId]&maxDays=5
Search for a time period with resourceFilter
Search free slots starting from a specific date for the next x days with only KONS-Resources:
GET [base]/Slot?_query=searchByAppointment&start=2021-03-09&TERMNR=[AppointmentId]&maxDays=5&resourceFilter=KONS
Search for a time period and split the slots
Search free slots starting from a specific date for the next x days splitting the slots into 10 minute intervals:
GET [base]/Slot?_query=searchByAppointment&start=2021-03-09&TERMNR=[AppointmentId]&maxDays=5&splitSlots=1&durationMinutes=10
Response
HTTP/1.1 200 OK
[other headers]
Response Body
The response for the different searches will always be a bundle with 0…n entries.
{
"resourceType": "Bundle",
"id": "647e4f74-fa60-419b-bd85-31acd484c3c9",
"meta": {
"lastUpdated": "2021-03-09T18:00:52.264+01:00"
},
"type": "searchset",
"total": 9,
"link": [
{
"relation": "self",
"url": "/fhir/r4/*/Slot?_query=searchByPlan&maxDays=1&planIcode=f7999bfe-b5df-4b52-a636-95532ffa9ea2"
}
],
"entry": [
{
"fullUrl": "/fhir/r4/*/Slot/145_1",
"resource": {
"resourceType": "Slot",
"id": "145_1",
"schedule": {
"reference": "Schedule/145_KONS_1277"
},
"status": "free",
"start": "2021-03-10T09:40:00.000+01:00",
"end": "2021-03-10T10:20:00.000+01:00"
}
}, ...
}