Te Whatu Ora, Central Region Integration Hub
1.0.12-rc1 - ci-build New Zealand flag

Te Whatu Ora, Central Region Integration Hub, published by Te Whatu Ora, Te Pae Hauora o Ruahine o Tararua, MidCentral. This guide is not an authorized publication; it is the continuous build for version 1.0.12-rc1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/tewhatuora/centralRegion-integrationHub-ig/ and changes regularly. See the Directory of published versions

Use Case: Update Patient Details

2. Update PatientClinicianWebPasPatient AdminHL7 v2Hub & SpokeFHIR APIIntegration HubAPI Client(ConnectedCare, Scope, etc)PreConditions1. Have valid API AccessToken2. Subscribed to Patient Resource UpdatesCache HL7 Message[1]Patient Data Update[2]HL7 ADT A31[3]HL7 ADT A31[4]mapToFHIRandValidate()[5]saveResources()[6]ack/nak Callback Payload Options1. PUT - callback/Patient/{id} - single resource payload2. POST - callback - multi-resource bundleNotify Resource Update[7]PUT or POST /fhir/callback[8]processCallback()[9]ack/nak[10]Act on Patent Data Update

Subscriptions

Full discussion of Subscription payload options is in the Developer's Guide. The second pre-requisite of this use-case requires a subscription on the Patient resource be put in place prior to receiving patient data updates.

For this subscription the client needs to decide if they want to receive a single resource notification, or a bundle resource notification.

Single Resource Notification Subscription

A sample subscription, returning the updated Patient resource would look like this:

{
    "resourceType": "Subscription",
    "id": "325",
    "status": "active",
    "criteria": "Patient?identifier=ZKG3868",
    "channel": {
        "type": "rest-hook",
        "endpoint": "http://localhost:3000/fhir/callback/Patient",
        "payload": "application/json"
    }
}

Bundle Resource Notification Subscription (Patient)

If you require the patient's Flag, AllergyIntolerance and ClinicalImpression resources to be included along with the triggering Patient resource then you will want to place another bundle resource notification subscription, like this:

{
    "resourceType": "Subscription",
    "id": "325",
    "status": "active",
    "criteria": "Patient?identifier=ZKG3868",
    "channel": {
        "type": "rest-hook",
        "endpoint": "http://localhost:3000/fhir/callback",
        "payload": "application/json"
    },
    "extension": [ {
        "url": "http://hapifhir.io/fhir/StructureDefinition/subscription-payload-search-criteria",
        "valueString": "Patient?_id=${matched_resource_id}&_include=*&_revinclude=Flag:*&_revinclude=AllergyIntolerance:*&_revinclude=ClinicalImpression:*&_revinclude=ServiceRequest:*"
      } ]
}