3. The Coordinator creates an appointment for the patient

POST https://api-{{tenant-id}}.developer.commure.com/api/v1/r4/Appointment/

The Department coordinator uses the client application to create an appointment based on the Slot resource, the Appointment will have a reference to the Practitioner and Patient resources using the field participant.

We are going to create an Appointment for the Patient with the Practitioner with the status="proposed". All the participants will have the field status (participation status) with the value needs-action, and after they confirm/reject the appointment the status of the participant will be updated. Once all participants have their participation status created/updated then the status of the Appointment is updated.

Request Body

{"resourceType"=>"Appointment", "status"=>"proposed", "priority"=>1, "description"=>"new appointment", "start"=>"2021-01-01T13:00:00.000+00:00", "end"=>"2021-01-01T15:00:00.000+00:00", "minutesDuration"=>120, "slot"=>[{"reference"=>"Slot/{{slot-id}}"}], "created"=>"2020-01-01T13:00:00.000+00:00", "patientInstruction"=>"Patient and Practitioner should confirm", "participant"=>[{"actor"=>{"reference"=>"Patient/{{patient-id}}"}, "required"=>"required", "status"=>"needs-action"}, {"actor"=>{"reference"=>"Practioner/{{practitioner-id}}"}, "required"=>"required", "status"=>"needs-action"}]}

RESPONSES

status: Created

{"resourceType":"Appointment","id":"01084219-7f18-4d0d-a837-75aa7b482a92","meta":{"extension":[{"extension":[{"url":"clientname","valueString":"dashboard"},{"url":"person","valueReference":{"reference":"Person/bea178a0-6ea4-4b47-99af-e4021bba8f99"}}],"url":"https://commure.com/fhir/provenance/StructureDefinition/creator-structure-map"}],"versionId":"bf01cc1d-673c-42b2-8f03-90e0edeff402","lastUpdated":"2020-11-02T12:22:03.331846+00:00"},"status":"proposed","priority":1,"description":"new appointment","start":"2021-01-01T13:00:00+00:00","end":"2021-01-01T15:00:00+00:00","minutesDuration":120,"slot":[{"reference":"Slot/55d83682-cf8a-48f7-9341-fae956fcf3a8"}],"created":"2020-01-01T13:00:00.000+00:00","patientInstruction":"Patient and Practitioner should confirm","participant":[{"actor":{"reference":"Patient/1c207762-db80-49db-aff5-4a9b81837d68"},"required":"required","status":"needs-action"},{"actor":{"reference":"Practioner/cbe538c4-6784-4903-bad5-bfc3f6a56ce9"},"required":"required","status":"needs-action"}]}