Patch an appointment
/Appointment/{ID}
Patches an existing appointment.
Note:
- Only the body fields mentioned below are supported. Unsupported fields are ignored, or can result in errors.
- Video Visit functionality requires additional licensing, configuration, and application support.
- For Video Visit link patch operations, both
Appointment.read
andAppointment.write
scopes are required. - This implementation follows the JSON PATCH specification.
- Only operations on the paths listed below are supported.
- For Video Visit link patch operation paths,
contained
index 0 represents the provider link andcontained
index 1 represents the patient link.
Errors
In addition to the common errors and operation outcomes, the following errors may be returned:
- Updating an Appointment resource with the incorrect version returns a
409 (Conflict)
response. - Updating an Appointment resource without sending the
If-Match
header returns a412 (Precondition Failed)
response. - Updating an Appointment resource that is currently being modified returns a
423 (Locked)
response. - If the Appointment resource could not be updated because of an operation that is necessary for the update (for example, encounter association), a
424 (Failed Dependency)
response is returned. - Patching a Video Visit Appointment with add operations that has previously been patched for Video Visit links returns a
409 (Conflict)
response. - Mixing add and replace patch operations is not supported while patching a Video Visit Appointment and returns a
422 (Unprocessable Entity)
response. - Patching a Video Visit Appointment with any missing required patch operations returns a
422 (Unprocessable Entity)
response. - Patching an Appointment with a participant status other than
accepted
returns a422 (Unprocessable Entity)
response.
Authorization Types
This operation supports the following authorization types:
Patch Operations
Path | Operation | Value Type | |
---|---|---|---|
/status
|
replace |
code |
|
|
|||
/slot
|
add |
Reference (Slot ) |
|
|
|||
/slot
|
replace |
Reference (Slot ) |
|
|
|||
/reasonCode
|
add |
List of CodeableConcept |
|
|
|||
/cancelationReason
|
add |
CodeableConcept |
|
|
|||
/contained/0/telecom/0/value
|
add |
string |
|
|
|||
/contained/1/telecom/0/value
|
add |
string |
|
|
|||
/contained/0/telecom/0/period/start
|
add |
datetime |
|
|
|||
/contained/0/telecom/0/period/end
|
add |
datetime |
|
|
|||
/contained/0/telecom/0/value
|
replace |
string |
|
|
|||
/contained/1/telecom/0/value
|
replace |
string |
|
|
|||
/contained/0/telecom/0/period/start
|
replace |
datetime |
|
|
|||
/contained/0/telecom/0/period/end
|
replace |
datetime |
|
|
|||
/patient-status
|
replace |
code |
|
|
|||
/extension
|
replace |
Extension |
|
|
|||
/comment
|
replace |
string |
|
|
|||
/extension
|
add |
Extension |
|
|
Request
- application/json-patch+json
-
ID(required): string
The logical resource ID.
-
Authorization(required): string
Contains the credentials to authenticate a consumer to the service. This should be the OAuth2 Bearer token.
-
If-Match(required): string
The current version of the Appointment resource.
-
accept(required): string
The media type to be requested. See what the resource's operation produces for what is supported.
-
content-type(required): string
Specifies the content type of the request entity body.
object
-
op(required):
string
Allowed Values:
[ "add", "replace" ]
-
path(required):
string
-
value(required):
The new value to add or update. See the examples for proper formats.
Response
- application/fhir+json
Default Response
Example patch for an appointment to booked
status.
PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
'op': 'add',
'path': '/slot',
'value': [
{
'reference': 'Slot/24477854-21304876-62852027-0'
}
]
},
{
'op': 'replace',
'path': '/status',
'value': 'booked'
}
]
Example Response:
Cache-Control: no-cache
Content-Length: 0
Content-Type: text/html
Date: Tue, 26 Mar 2019 15:42:29 GMT
Etag: W/"10"
Last-Modified: Tue, 26 Mar 2019 15:42:27 GMT
Vary: Origin
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-add-cancelationReason Response
Example patch for an appointment to add a cancelationReason
.
PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
'op': 'replace',
'path': '/status',
'value': 'cancelled'
},
{
'op': 'add',
'path': '/cancelationReason',
'value': {
'coding': [
{
'system': 'https://terminology.hl7.org/CodeSystem-appointment-cancellation-reason.html',
'code': 'oth-err'
}
]
}
}
]
Example Response:
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
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-add-rescheduleReason Response
Example patch for an appointment to add a rescheduleReason
.
PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
'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": 'https://terminology.hl7.org/CodeSystem-appointment-cancellation-reason.html',
"code": 'oth-err'
}
]
}
}
]
}
]
Example Response:
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
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-add-video-visit-links Response
Example patch for an appointment to add video visit links.
Example Request:PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4627745
Example Request Body:
[
{
'op': 'add',
'path': '/contained/0/telecom/0/value',
'value': 'http://providerlink.vmr.net'
},
{
'op': 'add',
'path': '/contained/1/telecom/0/value',
'value': 'http://patientlink.vmr.net'
},
{
'op': 'add',
'path': '/contained/0/telecom/0/period/start',
'value': '2019-07-13T08:00:00.000Z'
},
{
'op': 'add',
'path': '/contained/0/telecom/0/period/end',
'value': '2019-07-13T08:10:00.000Z'
}
]
Example Response:
Cache-Control: no-cache
Content-Length: 0
Content-Type: text/html
Date: Tue, 26 Mar 2019 15:42:29 GMT
Etag: W/"10-1"
Last-Modified: Tue, 26 Mar 2019 15:42:27 GMT
Vary: Origin
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-replace-slot Response
Example patch for an appointment to replace the slot.
Example Request:PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
'op': 'replace',
'path': '/slot',
'value': [
{
'reference': 'Slot/2582093771-22784981-63303788-60'
}
]
}
]
Example Response:
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
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-replace-video-visit-links Response
Example patch for an appointment to replace video visit links.
Example Request:PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4627745
Example Request Body:
[
{
'op': 'replace',
'path': '/contained/0/telecom/0/value',
'value': 'http://providerlink.vmr.net'
},
{
'op': 'replace',
'path': '/contained/1/telecom/0/value',
'value': 'http://patientlink.vmr.net'
},
{
'op': 'replace',
'path': '/contained/0/telecom/0/period/start',
'value': '2019-07-13T08:00:00.000Z'
},
{
'op': 'replace',
'path': '/contained/0/telecom/0/period/end',
'value': '2019-07-13T08:10:00.000Z'
}
]
Example Response:
Cache-Control: no-cache
Content-Length: 0
Content-Type: text/html
Date: Tue, 26 Mar 2019 15:42:29 GMT
Etag: W/"10-1"
Last-Modified: Tue, 26 Mar 2019 15:42:27 GMT
Vary: Origin
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-update-action-comment-and-replace-status Response
Example patch for an appointment with an updated action comment and replace status.
Example Request:PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
'op': 'replace',
'path': '/extension',
'value': [
{
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/action-comment',
'valueString': 'not required cancelled'
}
]
},
{
'op': 'replace',
'path': '/status',
'value': 'cancelled'
},
{
'op': 'add',
'path': '/cancelationReason',
'value': {
'coding': [
{
'system': 'https://terminology.hl7.org/CodeSystem-appointment-cancellation-reason.html',
'code': 'oth-err'
}
]
}
}
]
Example Response:
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
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-update-action-comment-and-slot Response
Example patch for an appointment with an updated action comment and replaced slot.
Example Request:PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
"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'
}
]
}
]
Example Response:
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
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-update-participant-status Response
Example patch for an appointment with updated participant status.
Example Request:PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
'op': 'replace',
'path': '/patient-status',
'value': 'accepted'
}
]
Example Response:
Cache-Control: no-cache
Content-Length: 0
Content-Type: text/html
Date: Tue, 26 Mar 2019 15:42:29 GMT
Etag: W/"10"
Last-Modified: Tue, 26 Mar 2019 15:42:27 GMT
Vary: Origin
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.
x-patch-update-reasonCode Response
Example patch for an appointment with updated reasonCode
.
PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4817517
Example Request Body:
[
{
'op': 'add',
'path': '/slot',
'value': [
{
'reference': 'Slot/24477854-21304876-62852027-0'
}
]
},
{
'op': 'replace',
'path': '/status',
'value': 'booked'
},
{
'op': 'add',
'path': '/reasonCode',
'value': [
{
'text': 'I have a headache'
}
]
}
]
Example Response:
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
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.