8. Create encounter ( interaction between a patient and healthcare provider)

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

With the appointment created, the client application creates an encounter (interaction between a patient and a healthcare provider) which indicates that the patient and the practitioner will have an appointment for a specific medical reason. The Encounter has a reference to the Patient resource in the subject field, it also has a reference to the Practitioner resource in the participant field, and it has a reference to the Appointment resource in the appointment field.

Request Body

{"resourceType"=>"Encounter", "status"=>"planned", "class"=>{"code"=>"virtual", "display"=>"virtual", "userSelected"=>true}, "type"=>[{"text"=>"Virtual appointment"}], "subject"=>{"reference"=>"Patient/{{patient-id}}"}, "participant"=>[{"type"=>[{"text"=>"Doctor"}], "individual"=>{"reference"=>"Practitioner/{{practitioner-id}}"}}], "period"=>{"start"=>"2021-01-01", "end"=>"2021-01-01"}, "reasonCode"=>[{"text"=>"General Medicine"}], "location"=>[{"location"=>{"reference"=>"Location/{{location-id}}"}, "status"=>"planned", "period"=>{"start"=>"2021-01-01", "end"=>"2021-01-01"}}], "appointment"=>[{"reference"=>"Appointment/{{appointment-id}}"}]}

RESPONSES

status: Created

{"resourceType":"Encounter","id":"c28ea11f-04df-4628-a849-fb91bd2ac581","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":"811dcef4-29af-4121-b52c-5c02ebb1a08f","lastUpdated":"2020-11-02T12:23:25.073166+00:00"},"status":"planned","class":{"code":"virtual","display":"virtual","userSelected":true},"type":[{"text":"Virtual appointment"}],"subject":{"reference":"Patient/1c207762-db80-49db-aff5-4a9b81837d68"},"participant":[{"type":[{"text":"Doctor"}],"individual":{"reference":"Practitioner/cbe538c4-6784-4903-bad5-bfc3f6a56ce9"}}],"appointment":[{"reference":"Appointment/01084219-7f18-4d0d-a837-75aa7b482a92"}],"period":{"start":"2021-01-01","end":"2021-01-01"},"reasonCode":[{"text":"General Medicine"}],"location":[{"location":{"reference":"Location/a06e0f17-8d35-48fe-b452-7b1573adc395"},"status":"planned","period":{"start":"2021-01-01","end":"2021-01-01"}}]}