Patch a related person record
patch
/RelatedPerson/{ID}
Patches an existing encounter-level or patient-level related person record.
Note:- This implementation follows the JSON Patch spec. See JavaScript Object Notation (JSON) Patch for more information.
- Only operations on the paths listed below are supported.
Path | Operation | Value Type | |
---|---|---|---|
/identifier/-
|
add |
Identifier |
|
|
|||
/identifier/{index}/id
|
test |
string |
|
|
|||
/identifier/{index}
|
remove |
N /A |
|
|
|||
/relationship/-
|
add |
CodeableConcept |
|
|
|||
/relationship/{index}/id
|
test |
string |
|
|
|||
/relationship/{index}
|
remove |
N /A |
|
|
|||
/relationship/{index}/extension
|
replace |
Extension |
|
|
|||
/address/-
|
add |
Address |
|
|
|||
/address/{index}/id
|
test |
string |
|
|
|||
/address/{index}
|
remove |
N /A |
|
|
|||
/telecom/-
|
add |
ContactPoint |
|
|
|||
/telecom/{index}/id
|
test |
string |
|
|
|||
/telecom/{index}
|
remove |
N /A |
|
|
|||
/name/{index}/id
|
test |
string |
|
|
|||
/name/{index}/family
|
replace |
string |
|
|
|||
/name/{index}/prefix
|
replace |
String |
|
|
|||
/name/{index}/given
|
replace |
String |
|
|
|||
/name/{index}/suffix
|
replace |
String |
|
|
Request
Supported Media Types
- application/fhir+json
Path Parameters
-
ID(required): string
The logical resource ID.
Header Parameters
-
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 RelatedPerson 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.
The body of the patch operation.
Root Schema : RelatedPersonPatch
Type:
array
Minimum Number of Items:
1
A summary representation of the Patch (PATCH) operation for RelatedPerson.
Show Source
Nested Schema : items
Type:
Show Source
object
-
op(required):
string
Allowed Values:
[ "add", "remove", "replace", "test" ]
-
path(required):
string
-
value:
string
Response
Supported Media Types
- application/json-patch+json
Default Response
Example Request:
PATCH https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/RelatedPerson/E-12467982-97731398
Example Request Body:
[
{
'op': 'add',
'path': '/relationship/-',
'value': {
'coding': [
{
'system': 'http://terminology.hl7.org/CodeSystem/v3-RoleCode',
'code': 'FAMMEMB'
}
],
'extension': [
{
'valuePeriod': {
'start': '2016-12-19T16:44:25.000Z',
'end': '2022-05-01T16:56:56.000Z'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/period'
},
{
'valueCodeableConcept': {
'coding': [
{
'system': 'http://terminology.hl7.org/CodeSystem/v3-RoleCode',
'code': 'SIS'
}
]
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/relation'
}
]
}
},
{
'op': 'add',
'path': '/identifier/-',
'value': {
'type': {
'coding': [
{
'code': 'MR',
'system': 'http://hl7.org/fhir/v2/0203'
}
]
},
'system': '2.16.840.1.113883.6.1000',
'value': 'THIS:IS:A:UNIQUE:IDENTIFIER',
'period': {
'start': '2016-01-02T00:00:00-05:00',
'end': '2020-01-02T00:00:00-05:00'
}
}
},
{
'op': 'add',
'path': '/address/-',
'value': {
'use': 'home',
'line': [
'1212 Faircastle Drive',
'Apartment 406'
],
'city': 'KC',
'district': 'Jackson',
'state': 'KS',
'postalCode': '64199',
'country': 'United States of America',
'period': {
'start': '2012-05-17T15:33:18.000Z'
}
}
},
{
"op": 'add',
"path": '/telecom/-',
"value": {
"use": 'home',
"system": 'email',
"value": 'test@test.com',
"period": {
"start": '2018-01-05T22:24:32.000Z'
}
}
},
{
"op": 'add',
"path": '/telecom/-',
"value": {
"use": 'home',
"system": 'phone',
"value": '913-444-8881',
"period": {
"start": '2018-01-05T22:24:32.000Z'
}
}
},
{
'op': 'test',
'path': '/telecom/0/id',
'value': 'CI-PH-29811920-0'
},
{
'op': 'remove',
'path': '/telecom/0'
},
{
'op': 'test',
'path': '/address/0/id',
'value': 'CI-24079465-0'
},
{
'op': 'remove',
'path': '/address/0'
},
{
'op': 'test',
'path': '/relationship/0/id',
'value': 'CI-98278577-0'
},
{
'op': 'replace',
'path': '/relationship/0/extension',
'value': [
{
'valuePeriod': {
'start': '2016-12-30T22:26:08.000Z',
'end': '2036-12-30T22:26:08.000Z'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/period'
},
{
'valueCodeableConcept': {
'coding': [
{
'system': 'http://terminology.hl7.org/CodeSystem/v3-RoleCode',
'code': 'SIS'
}
]
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/relation'
}
]
},
{
'op': 'test',
'path': '/relationship/1/id',
'value': 'CI-98909708-1'
},
{
'op': 'remove',
'path': '/relationship/1'
},
{
'op': 'test',
'path': '/name/0/id',
'value': 'CI-12467982-0'
},
{
'op': 'replace',
'path': '/name/0/family',
'value': 'Potter'
},
{
'op': 'replace',
'path': '/name/0/prefix',
'value': ['Mr.']
},
{
'op': 'replace',
'path': '/name/0/given',
'value': ['Harry', 'James']
},
{
'op': 'replace',
'path': '/name/0/suffix',
'value': ['Jr.']
}
]
Example Response:
Cache-Control: no-cache
Content-Length: 0
Content-Type: text/html
Date: Tue, 26 Mar 2019 15:42:29 GMT
Etag: W/"7"
Last-Modified: Tue, 21 Jan 2020 15:57:25 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.
Headers
-
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.