1.0.0 - release Switzerland flag

KisimScheduling - Local Development build (v1.0.0). See the Directory of published versions

Use Case Move Appointment

Description

After a successful booking or after receiving an appointment from KISIM via the Move appointment from KISIM use-case the requester might want to move his existing appointment.

Booking procedure

Query available slots

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"
            }
        }, ...
}

						```
					

Update your existing appointment with a new slot

To move an appointment to a new slot, one must simply post the appointment on the corresponding resource url. The same rules as with a normal booking apply. However, the “status” of the appointment will be reset to “proposed”. You should send the status in your appointment, if you do not want to send a “start” and an “end” parameter. The serviceType can be changed. If the Slot is big enough, start and stop inside the slot can be sent with 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"
        }
    ]
}
						```