Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

[Millennium-R4]: Reschedule Appointment Workflow Update #1026

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 55 additions & 2 deletions content/millennium/r4/base/workflow/appointment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
joe-explr marked this conversation as resolved.
Show resolved Hide resolved

<%= disclaimer %>

Expand All @@ -67,6 +67,7 @@ The common [errors] and [OperationOutcomes] may be returned.
* [Group Appointment Id]
* [Is Cancelable]
* [Is Reschedulable]
* [Reschedule Reason]

### Custom Extensions

Expand All @@ -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

Expand Down Expand Up @@ -410,6 +412,31 @@ opc-request-id: /95685D1463E5BE27E66427BBDA8725DE/BD2E22EED59A7AD48B938357F8CF72
X-Request-Id: 26ca6d46-bf47-430b-b92f-bf687b80bfbf
</pre>

### 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 %>
<pre class="terminal">
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
</pre>

### Example - Add Video Visit Links

#### Request
Expand Down Expand Up @@ -485,7 +512,32 @@ opc-request-id: /95685D1463E5BE27E66427BBDA8725DE/BD2E22EED59A7AD48B938357F8CF72
X-Request-Id: 26ca6d46-bf47-430b-b92f-bf687b80bfbf
</pre>

### 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 %>
<pre class="terminal">
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
</pre>

### Example - Update Action Comment with Replace Status

#### Request

Expand Down Expand Up @@ -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
51 changes: 51 additions & 0 deletions lib/resources/example_json/r4_examples_appointment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
25 changes: 25 additions & 0 deletions lib/resources/r4/appointment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ operations:
note: >
<ul>
<li>When present, this patch operation must be accompanied by add cancellation reason and replace status patch operation when updating the status to `cancelled`</li>
<li>When present, this patch operation must be accompanied by replace slot when rescheduling the appointment.</li>
<li>Only one value may be provided in the value array</li>
</ul>
- name: replace-comment
Expand All @@ -309,3 +310,27 @@ operations:
<ul>
<li>When present, this patch operation must be accompanied by the replace Slot patch operation</li>
</ul>
- 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: >
<ul>
<li>When present, this patch operation must be accompanied by replace slot operation</li>
<li>Only one value may be provided in the value array</li>
</ul>
Loading