diff --git a/content/millennium/r4/base/workflow/appointment.md b/content/millennium/r4/base/workflow/appointment.md index eb3602494..1359375a7 100644 --- a/content/millennium/r4/base/workflow/appointment.md +++ b/content/millennium/r4/base/workflow/appointment.md @@ -51,7 +51,7 @@ The following fields are returned if valued: * [Comment](http://hl7.org/fhir/R4/appointment-definitions.html#Appointment.comment){:target="_blank"} * [Patient Instruction](http://hl7.org/fhir/R4/appointment-definitions.html#Appointment.patientInstruction){:target="_blank"} * [Requested period](http://hl7.org/fhir/R4/appointment-definitions.html#Appointment.requestedPeriod){:target="_blank"} -* [Extensions including action-comment, group-appointment-id, is-cancelable, and is-reschedulable](#extensions){:target="_blank"} +* [Extensions including action-comment, group-appointment-id, is-cancelable, is-reschedulable, and reschedule-reason](#extensions){:target="_blank"} <%= disclaimer %> @@ -67,6 +67,7 @@ The common [errors] and [OperationOutcomes] may be returned. * [Group Appointment Id] * [Is Cancelable] * [Is Reschedulable] +* [Reschedule Reason] ### Custom Extensions @@ -78,6 +79,7 @@ ID | Value\[x] Type `group-appointment-id` | [`string`](https://hl7.org/fhir/r4/datatypes.html#string) | The ID of the appointment group that this appointment is a part of. `is-cancelable` | [`boolean`](https://hl7.org/fhir/r4/datatypes.html#boolean) | Indication of whether the Appointment can be canceled or not. `is-reschedulable` | [`boolean`](https://hl7.org/fhir/r4/datatypes.html#boolean) | Indication of whether the Appointment can be rescheduled or not. +`reschedule-reason` | [`CodeableConcept`](http://hl7.org/fhir/R4/datatypes.html#CodeableConcept) | The coded reason for the appointment being rescheduled. ## Search @@ -410,6 +412,31 @@ opc-request-id: /95685D1463E5BE27E66427BBDA8725DE/BD2E22EED59A7AD48B938357F8CF72 X-Request-Id: 26ca6d46-bf47-430b-b92f-bf687b80bfbf +### Example - Add rescheduleReason + +#### Request + + PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517 + +#### Body + +<%= json(:r4_appointment_rescheduleReason_patch) %> + +#### Response + +<%= headers status: 200 %> +
+Cache-Control: no-cache
+Content-Length: 0
+Content-Type: text/html
+Date: Tue, 26 Mar 2019 15:42:29 GMT
+Etag: W/"1"
+Last-Modified: Tue, 26 Mar 2019 15:42:27 GMT
+Vary: Origin
+opc-request-id: /95685D1463E5BE27E66427BBDA8725DE/BD2E22EED59A7AD48B938357F8CF72E1
+X-Request-Id: 26ca6d46-bf47-430b-b92f-bf687b80bfbf
+
+ ### Example - Add Video Visit Links #### Request @@ -485,7 +512,32 @@ opc-request-id: /95685D1463E5BE27E66427BBDA8725DE/BD2E22EED59A7AD48B938357F8CF72 X-Request-Id: 26ca6d46-bf47-430b-b92f-bf687b80bfbf -### Example - Update Action Comment +### Example - Update Action Comment with Replace Slot + +#### Request + + PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517 + +#### Body + +<%= json(:r4_appointment_extension_action_comment_slot_patch) %> + +#### Response + +<%= headers status: 200 %> +
+Cache-Control: no-cache
+Content-Length: 0
+Content-Type: text/html
+Date: Fri, 11 Aug 2023 15:42:29 GMT
+Etag: W/"10"
+Last-Modified: Fri, 11 Aug 2023 15:42:29 GMT
+Vary: Origin
+opc-request-id: /95685D1463E5BE27E66427BBDA8725DE/BD2E22EED59A7AD48B938357F8CF72E1
+X-Request-Id: 26ca6d46-bf47-430b-b92f-bf687b80bfbf
+
+ +### Example - Update Action Comment with Replace Status #### Request @@ -537,3 +589,4 @@ In addition to the common [errors] and [OperationOutcomes], the following errors [Group Appointment Id]: #custom-extensions [Is Cancelable]: #custom-extensions [Is Reschedulable]: #custom-extensions +[Reschedule Reason]: #custom-extensions diff --git a/lib/resources/example_json/r4_examples_appointment.rb b/lib/resources/example_json/r4_examples_appointment.rb index b0d757942..355a5b606 100644 --- a/lib/resources/example_json/r4_examples_appointment.rb +++ b/lib/resources/example_json/r4_examples_appointment.rb @@ -458,6 +458,35 @@ module Resources } ].freeze + R4_APPOINTMENT_RESCHEDULEREASON_PATCH ||= [ + { + 'op': 'replace', + 'path': '/slot', + 'value': [ + { + 'reference': 'Slot/2582093771-22784981-63303788-60' + } + ] + }, + { + "op": 'add', + "path": '/extension', + "value": [ + { + "url": 'https://fhir-ehr.cerner.com/r4/StructureDefinition/reschedule-reason', + "valueCodeableConcept": { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/appointment-cancellation-reason', + "code": 'oth-err' + } + ] + } + } + ] + } + ].freeze + R4_APPOINTMENT_VIDEO_VISIT_ADD_PATCH ||= [ { 'op': 'add', @@ -542,6 +571,28 @@ module Resources } ].freeze + R4_APPOINTMENT_EXTENSION_ACTION_COMMENT_SLOT_PATCH ||= [ + { + "op": 'replace', + "path": '/slot', + "value": [ + { + "reference": 'Slot/2592955413-2581440805-96118899-0' + } + ] + }, + { + 'op': 'replace', + 'path': '/extension', + 'value': [ + { + 'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/action-comment', + 'valueString': 'Rescheduling Appointment' + } + ] + } + ].freeze + R4_APPOINTMENT_CREATE ||= { 'resourceType': 'Appointment', 'status': 'booked', diff --git a/lib/resources/r4/appointment_patch.yaml b/lib/resources/r4/appointment_patch.yaml index 63a330aea..b073121ab 100644 --- a/lib/resources/r4/appointment_patch.yaml +++ b/lib/resources/r4/appointment_patch.yaml @@ -291,6 +291,7 @@ operations: note: > - name: replace-comment @@ -309,3 +310,27 @@ operations: + - name: add-reschedule-reason + path: /extension + operation: add + type: Extension + url: https://hl7.org/fhir/R4/domainresource-definitions.html#DomainResource.extension + description: The coded reason for the appointment being rescheduled + example: | + { + "op": "add", + "path": "/extension", + "value": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/appointment-cancellation-reason", + "code": "oth-err" + } + ] + } + } + note: > +