Hi Chris,
It’s partial update endpoint:
PATCH https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9727690033/
SUCCESS SCENARIO:
request body:
{
"patches" : [ {
"op" : "replace",
"path" : "/name/0/id",
"value" : "NqAYl"
}, {
"op" : "replace",
"path" : "/name/0/given",
"value" : ["Vergnügen", "7Ëavin"]
}, {
"op" : "replace",
"path" : "/name/0/family",
"value" : "RYAN"
}, {
"op" : "test",
"path" : "/name/0/id",
"value" : "NqAYl"
} ]
}
Headers:
X-Correlation-ID:21C46F5F-CDEF-4865-94B2-0EE0EDCC26C1
X-Request-ID:40E0B220-8136-4CA5-AE46-1D97EF59D0A1
If-Match:W/"5"
Authorization:Bearer <valid token>
Content-Type:application/json-patch+json
The response:
202 Accepted
and the name has been successfully changed.
FAILURE (SILENT) SCENARIO:
request body:
{
"patches" : [ {
"op" : "replace",
"path" : "/name/0/id",
"value" : "NqAYl"
}, {
"op" : "replace",
"path" : "/name/0/given",
"value" : ["Vergnügen", "Λavin"]
}, {
"op" : "replace",
"path" : "/name/0/family",
"value" : "RYAN"
}, {
"op" : "test",
"path" : "/name/0/id",
"value" : "NqAYl"
} ]
}
Headers:
X-Correlation-ID:21C46F5F-CDEF-4865-94B2-0EE0EDCC26C7
X-Request-ID:40E0B220-8136-4CA5-AE46-1D97EF59D0A7
If-Match:W/"6"
Authorization:Bearer <valid token>
Content-Type:application/json-patch+json
Reposnse:
202 Accepted
, but no changes to name fields happens:
Response body when retrieve the same patient resource:
...
"meta": {
"security": [
{
"code": "U",
"display": "unrestricted",
"system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality"
}
],
"versionId": "6"
},
"name": [
{
"family": "RYAN",
"given": [
"Vergnügen",
"4avin"
],
"id": "NqAYl",
"period": {
"start": "2019-05-04"
},
"prefix": [
"MS"
],
"use": "usual"
}
],
"resourceType": "Patient"
...
Thanks,
Rokas