1.0.1 - release
KisimScheduling - Local Development build (v1.0.1). See the Directory of published versions
After a successful creation or after receiving an appointment from KISIM via the Move appointment from KISIM use-case the client might want to reschedule his existing appointment.
At first the client needs to query the actual available slots. This can be done by the search operation searchSlotByAppointment. Found slots are only valid for a certain amount of time and can only be booked with the appointment they were searched with.
The caching time of found slots depends on the configuration of the server but usually is 30 minutes.
Request
GET [base]/Slot?query=searchByAppointment&TERMNR=[AppointmentId]&maxDays=10
Response
```
{
"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"
}
}, ...
}
```
To reschedule an appointment to a new slot, the client needs to send a PUT request on the corresponding resource url. The same rules as with creating a new appointment apply.
Additionally, the following rules apply:
If the client system wants to change the serviceType on an already created appointment, this can be done by simply setting the new serviceType in the updated appointment.
After a successful rescheduling, the “status” of the appointment will be reset to “proposed”.
As with creating a new appointment, not the whole time of a found slot needs to be used. A client system could choose to set the start and stop values inside the appointment. Those parameters must lie in between the start and stop of the found slot. In such a case, the appointment duration would be the duration between the new start and stop.
If a client system chooses not to send those values, the whole slot time will be used as the duration of the appointment.
These parameters are shown in Example 2.
Request
POST [base]/Appointment/[appointmentId]
Request body
```
{
"resourceType": "Appointment",
"identifier": [
{
"system": "http://yourproduct-example.com/fhir/apps/referralids",
"value": "yourproduct_4019"
}
],
"status": "proposed",
"slot": [
{
"reference": "Slot/34_1"
}
],
"participant": [
{
"actor": {
"reference": "Location/KONS-1098",
"display": "Online Resource"
},
"status": "accepted"
}
]
}
```
Response
```
{
"resourceType": "Appointment",
"id": "22875",
"identifier": [
{
"use": "official",
"system": "http://fhir.cistec.com/appointment?identifier",
"value": "136047"
}
],
"status": "proposed",
"serviceCategory": [
{
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/service-category",
"code": "35",
"display": "Hospital"
}
]
}
],
"start": "2021-03-15T08:00:00.000+01:00",
"end": "2021-03-15T08:10:00.000+01:00",
"participant": [
{
"actor": {
"reference": "Location/KONS-1098",
"display": "Online Resource"
},
"status": "accepted"
}
]
}
```
Start and end set in appointment. This overwrites the slot start/stop.
ServiceType set in appointment. This changes the serviceType of the appointment.
Request
POST [base]/Appointment/[appointmentId]
Request body
```
{
"resourceType": "Appointment",
"identifier": [
{
"system": "http://yourproduct-example.com/fhir/apps/referralids",
"value": "yourproduct_4019"
}
],
"slot": [
{
"reference": "Slot/34_1"
}
],
"serviceType": [
{
"coding": [
{
"system": "2.16.756.5.30.1.163.1.2.1.1",
"code": "FKLMAMAB",
"display": "Abschlussko. Mamma"
}
]
}
],
"status": "proposed",
"start": "2021-03-15T08:00:00.000+01:00",
"end": "2021-03-15T08:10:00.000+01:00"
}
```
Response
```
{
"resourceType": "Appointment",
"id": "22875",
"identifier": [
{
"system": "http://cistec.com",
"value": "22875"
}
],
"status": "pending",
"serviceCategory": [
{
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/service-category",
"code": "35",
"display": "Hospital"
}
]
}
],
"start": "2021-03-15T08:00:00.000+01:00",
"end": "2021-03-15T08:10:00.000+01:00",
"participant": [
{
"actor": {
"reference": "Practitioner/CISRBIRR",
"display": "R. Birri"
},
"status": "accepted"
}
]
}
```