NHS Digital Profile:
HL7 FHIR STU3 Resource:
Provider interaction to support the update of NRL pointers. The update functionality will be used in cases where a Provider wishes to update a pointer status value, changing it from “current” to “entered-in-error”.
In addition to the requirements on this page the general guidance and requirements detailed on the Development Guidance page MUST be followed when using this interaction.
Update Request Headers
Provider API update requests support the following HTTP request headers:
||Client System ASID||REQUIRED|
||The Spine ASID||REQUIRED|
PATCH [baseUrl]/DocumentReference/da2b6e8a-3c8f-11e8-baae-6c3be5a609f5-584d385036514c383142Update the DocumentReference resource status for a pointer with the logical id of 'da2b6e8a-3c8f-11e8-baae-6c3be5a609f5-584d385036514c383142'.
The API supports the conditional update interaction which allows a provider to update a pointer using the masterIdentifier so they do not have to persist or query for the NRL generated logical id for the pointer. The query parameters should be used as shown:
PATCH [baseUrl]/DocumentReference?subject=https://demographics.spineservices.nhs.uk/STU3/Patient/9876543210&identifier=urn:ietf:rfc:3986%7Curn:oid:184.108.40.206.4.1.21367.2005.3.71Update the DocumentReference resource status for a pointer with a subject and identifier.
[nhsNumber] - The NHS number of the patient whose
DocumentReferences the client is requesting
[system] - The namespace of the masterIdentifier value that is associated with the DocumentReference(s)
[value] - The value of the masterIdentifier that is associated with the DocumentReference(s)
Providers systems MUST only update pointers for records where they are the pointer owner (custodian). For all update requests the custodian ODS code in the DocumentReference resource MUST be affiliated with the Client System ASID value in the fromASID HTTP request header sent to the NRL.
The FHIRPath PATCH operation must be encoded in a Parameters resource as follows:
- A single operation as a Parameter named “operation”
- The single parameter has a series of mandatory parts, with required values as listed in following table:
Only the first parameter within the Parameters resource will be used to perform a PATCH. Any additional parameters included within the request will not be processed. More details on the validation of the Parameters resource can be found in the error handling guidance.
XML and JSON examples of the FHIRPath Parameters resource are shown below.
XML FHIRPath PATCH Parameters Resource
JSON FHIRPath PATCH Parameters Resource
- MUST return a
200SUCCESS HTTP status code on successful execution of the interaction and the entry has been successfully updated in the NRL.
- MUST return a response body containing a payload with an
OperationOutcomeresource that conforms to the ‘Operation Outcome’ core FHIR resource (see the table below).
- When a resource has been updated, its
versionIdwill be incremented.
versionIdis an integer that is assigned and maintained by the NRL server. When a new DocumentReference is created, the server assigns it a
versionIdof 1. The
versionIdwill be incremented during an update or supersede transaction.
The NRL server will ignore any
versionIdvalue sent by a client in a
createinteraction. Instead, the server will ensure that the newly assigned
versionIdadheres to the rules laid out above.
The table summarises the
update interaction HTTP response code and the values expected to be conveyed in the successful response body
|200||information||informational||RESOURCE_UPDATED||Resource has been updated||Spine message UUID||Successfully updated resource DocumentReference|
The following errors can be triggered when performing this operation: