A set of examples of retrieving the contents of a fully contained NEMS message from a pointer passed in a lightweight NEMS message. These examples all use search functionality as described in the base HL7 FHIR spec:
https://www.hl7.org/fhir/STU3/search.html
To setup these examples, the transactional bundle found here:
https://gist.github.com/elementechemlyn/1f3cf7b81f9636aa5e01c67805de29d6
can be posted to the base url of a FHIR server that supports transactions. The bundle sets up the resources that match the "New Given (inc Imms)" example here:
https://nems-nhsx-draft.netlify.app/vaccinations_2.html
At the time of writing, this set of resources exists at http://hapi.fhir.org/baseDstu3. If you post the resources again (perhaps because the public server has been purged) you'll need to adjust the resource identifiers used below.
The pointer to an individual focus resource would look like this:
http://hapi.fhir.org/baseDstu3/Immunization/2800446
This is the simplest option for a publisher but requires the subscriber to make multiple calls to resolve references to other "context" resources that would have been recieve in the contained NEMS message.
- The server must support the Care Connect immunization resource as detailed here https://nhsconnect.github.io/CareConnectAPI/api_medication_immunization.html
- The focus resource must be stored with references to each element expected in the contained NEMS message
- The Subscriber must make seperate calls to retrieve each reference in the resource
The HL7 Specification details search functionality to have the server automatically resolve references in a resource and return them in the search bundle. This style puts most requirements on the publisher of the pointer but allows a subscriber to retrieve all resources in a single call.
http://hapi.fhir.org/baseDstu3/Immunization?_id=2800446&_include:recurse=*
- The focus resource must be stored with references to each element expected in the contained NEMS message
- The server must support the Care Connect immunization resource as detailed here https://nhsconnect.github.io/CareConnectAPI/api_medication_immunization.html
- The server must support each contained element as a SearchInclude parameter
- The server must support the :recurse modifier on _include to also include references to references (e.g the organisation for an Encounter)
- The Subscriber must make seperate calls to retrieve each reference in the resource that the publishing server does not support as a SearchInclude parameter
The HL7 FHIR Search spec details the use of chaining search parameters to retrive all the resources that reference another specific resource. This allows a client to catch-up on all the resources a publisher holds related to a patient with a specific NHS Number 9912003888 without having to search for the patient in a seperate call.
- The focus resource must be stored with references to each element expected in the contained NEMS message
- The server must support the Care Connect immunization resource as detailed here https://nhsconnect.github.io/CareConnectAPI/api_medication_immunization.html
- The server must support chained searches with the patient.identifier parameter
- The Subscriber must make seperate calls to retrieve each reference in the resources
The chanined search parameter can be combined with the include parameter to allow a client to retrieve all of the resources they would get in a fully contained messages for a patient with a specific NHS Number (i.e. They can catch-up on all events from a single pointer/call to the API)
- The focus resource must be stored with references to each element expected in the contained NEMS message
- The server must support the Care Connect immunization resource as detailed here https://nhsconnect.github.io/CareConnectAPI/api_medication_immunization.html
- The server must support each contained element as a SearchInclude parameter
- The server must support the :recurse modifier on _include to also include references to references (e.g the organisation for an Encounter)
- The server must support chained searches with the patient.identifier parameter
- The Subscriber must make seperate calls to retrieve each reference in the resources that the publishing server does not support as a SearchInclude parameter