0.2.0 - trial-use
KisimScheduling - Local Development build (v0.2.0). See the Directory of published versions
If the client system does know the internal patient identification for KISIM, this use case applies. Those systems need to receive the patient id from a different system. The KISIM FHIR Server does not offer search for patients by any parameters.
This use case is a lot simpler than if the patient is not known by the client.
At first the client needs to query the actual available slots. This can be done by the search operation searchSlotByPlan. Found slots are only valid for a certain amount of time. Usually this is 30 minutes, but depending on the server this might be more or less.
Request
GET [base]/Slot?query=searchByPlan&planIcode=[UUID]&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"
}
}, ...
}
```
The client sends an Appointment resource containing a slot, participant and status to the server. As participant, the client system needs to send the patient reference. The slot time can be overwritten by setting the appointment start and end. Those times need to stay inside the original slot time. This means the client system can only book a slot part-time. This is important if the client system does the time-handling by itself e.g does not use the parameter splitSlots in the searchSlotByPlan query.
Request
POST [base]/Appointment
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",
"participant": [
{
"actor": {
"reference": "Patient/123"
}
}
]
}
```
Response
```
{
"resourceType": "Appointment",
"id": "22876",
"identifier": [
{
"system": "http://cistec.com",
"value": "22876"
}
],
"status": "pending",
"serviceCategory": [
{
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/service-category",
"code": "35",
"display": "Hospital"
}
]
}
],
"start": "2021-03-15T08:10:00.000+01:00",
"end": "2021-03-15T08:20:00.000+01:00",
"participant": [
{
"actor": {
"reference": "Location/KONS_1277",
"display": "Room 1"
},
"status": "accepted"
}
]
}
```
Start and end set in appointment. This overwrites the slot start/stop.
Request
POST [base]/Appointment
Request body
```
{
"resourceType": "Appointment",
"contained": [
{
"resourceType" : "Patient",
"id" : "p1",
"name" : [
{
"family" : "Bond",
"given" : ["James"]
}
],
"gender" : "male",
"birthDate": "1950-01-01T00:00:00.000+00:00"
}
],
"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",
"participant": [
{
"actor": {
"reference": "#p1"
}
}
]
}
```
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"
}
]
}
```
As soon as the appointment is accepted by KISIM, the client receives an AppointmentResponse with the new status of the Appointment. This can be accepted or cancelled. Additionally, the response will contain the start and stop time of the appointment. Usually the start and stop won’t differ from the booked time. The client could receive multiple AppointmentResponses, for example if an appointment is moved after it was accepted. It is the client’s responsibility to handle those responses accordingly.