0.1.0 - trial-use

KisimScheduling - Local Development build (v0.1.0). See the Directory of published versions

OperationDefinition: Search Slots by Plan-Icode

Official URL: http://fhir.kisimdocs.ch/ig/KisimScheduling/OperationDefinition/slot-query-searchByPlan Version: 0.1.0
Draft as of 2022-09-05 Computable Name: SearchSlotByPlan

Search for free slots in a time-period. The period is defined by a start timestamp and a number of days to search. Additionally, the search requires a predefined search plan which is identified by a uuid.

Additional search parameters include the possibility to filter the results by type of resource (Either a user or a room), 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.

SearchSlotByPlan

QUERY: SearchSlotByPlan

The official URL for this operation definition is:

http://fhir.kisimdocs.ch/ig/KisimScheduling/OperationDefinition/slot-query-searchByPlan

Parameters

UseNameCardinalityTypeBindingDocumentation
IN_query1..1string
(string)
http://hl7.org/fhir/ValueSet/binding-strength (Required)

Extended search parameter as defined by the fhir-specification. Value has to be "searchByPlan"

INplanIcode1..1string
(string)
http://hl7.org/fhir/ValueSet/binding-strength (Required)

Search definition which is created in KISIM. The identifier is a UUID.

INstart0..1string
(string)
http://hl7.org/fhir/ValueSet/binding-strength (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.

INmaxDays1..1string
(string)
http://hl7.org/fhir/ValueSet/binding-strength (Required)

Defines the number of days from "start" during which empty slots are searched. Value of 1 equals 24 hours. Max Value=10

INsplitSlots0..1string
(string)
http://hl7.org/fhir/ValueSet/binding-strength (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.

INdurationMinutes0..1string
(string)
http://hl7.org/fhir/ValueSet/binding-strength (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.

INresourceFilter0..1string
(string)
http://hl7.org/fhir/ValueSet/binding-strength (Required)

Filter the slots by location. Those values equal the values inside KISIM. The balue can be either "USER" for practitioners or "KONS" for locations(rooms)

OUTreturn0..1Bundlehttp://hl7.org/fhir/ValueSet/binding-strength (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.

Notes:

Examples

Search for a time period

Search free slots starting from now for the next 5 days (or 120 hours):

GET [base]/Slot?_query=searchByPlan&planIcode=[UUID]&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=searchByPlan&start=2021-03-09&planIcode=[UUID]&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=searchByPlan&start=2021-03-09&planIcode=[UUID]&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"
            }
        }, ...
}