References
NHS Digital Profile: DocumentReference |
HL7 FHIR STU3 Resource: DocumentReference |
User Stories: - |
Read
Consumer interaction to support the retrieval of a single NRL pointer.
Pre-requisites
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.
Read Request Headers
Consumer and Provider API read requests support the following HTTP request headers:
Header | Value | Conformance |
---|---|---|
Accept |
The Accept header indicates the format of the response the client is able to understand, this will be one of the following application/fhir+json or application/fhir+xml . See the RESTful API Content types section. |
OPTIONAL |
Authorization |
The Authorization header will carry the base64url encoded JSON web token required for audit on the spine - see Access Tokens (JWT) for details. |
REQUIRED |
fromASID |
Client System ASID | REQUIRED |
toASID |
The Spine ASID | REQUIRED |
Read Operation
The read interaction allows a consumer or provider to retrieve a single pointer (DocumentReference) by logical ID. The consumer or provider must issue an HTTP GET as shown:
GET [baseUrl]/DocumentReference/[id]
GET [baseUrl]/DocumentReference/da2b6e8a-3c8f-11e8-baae-6c3be5a609f5-584d385036514c383142
Read the DocumentReference resource for a pointer with the logical id of 'da2b6e8a-3c8f-11e8-baae-6c3be5a609f5-584d385036514c383142'.
Note the status of the pointer must be “current” for the pointer to be retrieved.
Read Response
Success:
- MUST return a
200
SUCCESS HTTP status code on successful execution of the interaction. - MUST return a response body containing a DocumentReference resource which conforms to the NRL-DocumentReference-1 FIHR profile and has the status “current”.
Example Successful Response:
Failure:
The following errors can be triggered when performing this operation:
Example Scenario
An authorised NRL Consumer retrieves a pointer to patient’s relevant health record using the NRL to discover potentially vital information to support a patient’s emergency crisis care.
Request Query
Return DocumentReference resource (pointer) with logical ID 0353e505-f7be-4c20-8f4e-337e79a32c51-76009894321256642261. The format of the response body will be XML.
cURL
curl -H 'Accept: application/fhir+xml' -H 'Authorization: BEARER [token]' -X GET '[baseUrl]/DocumentReference/0353e505-f7be-4c20-8f4e-337e79a32c51-76009894321256642261'
Query Response Http Headers
HTTP/1.1 200 OK
Server: nginx/1.10.0 (Ubuntu)
Date: Mon, 19 Jun 2017 08:36:12 GMT
Content-Type: application/fhir+xml;charset=utf-8
Last-Modified: Mon, 19 Jun 2017 08:36:12 GMT
Query Response
Pointer (DocumentReference) Returned:
- HTTP 200-Request was successfully executed
- DocumentReference that conforms to the
NRL-DocumentReference-1
profile.
No Record (pointer) Matched:
- HTTP 404-Not Found. No record found.
- OperationOutcome resource that conforms to the ‘Spine-OperationOutcome-1’ profile
Error Response (OperationOutcome) Returned:
- HTTP 400-Bad Request.
- OperationOutcome resource that conforms to the ‘Spine-OperationOutcome-1’ profile if the resource cannot be returned
See the general API guidance for all HTTP Error response codes supported by the NRL.