Health NZ | Te Whatu Ora FHIR Screening Implementation Guide
1.0.2 - normative+trial-use New Zealand flag

Health NZ | Te Whatu Ora FHIR Screening Implementation Guide - Local Development build (v1.0.2) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

API consumption sequence diagrams

FHIR screening summary API typical operation

Cervical screening summary API - typical sequenceHNZ digital services hub /connector planeHNZ FHIR APIshealth practitioner (screening)health practitioner (screening)NZ health app/PMSNZ health app/PMSAPI authn. serverAPI authn. serverAPI gatewayAPI gatewayScreening FHIR APIScreening FHIR APIHNZ FHIR APIHNZ FHIR APINational Health Index /Health Provider IndexNational Health Index /Health Provider IndexAPI consumer OAUTH authentication at PMS initialisation[01]OAUTH2.0 Client Credentials Flow(client creds, scopes, audiences)[02]OAUTH token"scope": [   "system/DocumentReference.rs",  "system/Patient.r" ]"aud": "https://fhir-ig.digital.health.nz/screening/StructureDefinition/nz-screening-summary"normal API usage[03]enter patient name, NHI[04]NHI search[05]present NHI matches[06]request screening summaries for selected NHI and programme typeApp/PMS sets the following user metadata inRequest-Context  "hpiPractitioner" - practitioner's Common Person Number (CPN) from Health Provider Index  "hpiFacility | hpiOrganisation" - HPI facility OR organisation identifier from Health Provider Index[07]GET/DocumentReference?{search-params}[08]validate OAUTH token(issuer,sig)[09]GET /DocumentReference?<params>breakalt[Bad/missing access OAUTH token (issuer, scope, audience, expiry)][10]HTTP 401 error: Unauthorizedalt[Bad/missingRequest-Contextcustom header][11]HTTP 400 error: Bad Request[12]Search for Prior Terms Acceptance Form Search for FHIR QuestionnaireResponsesGET /v1/QuestionnaireResponseQueries based on available params: Org/facilityacceptance search byfacility:      ?questionnaire=https://fhir-ig.digital.health.nz/screening/Questionnaire/TermsOfUseOrgFacility      &subject=https://standards.digital.health.nz/ns/hpi-facility-id|FZZ958-K Org/facilityacceptance search byorg:      ?questionnaire=https://fhir-ig.digital.health.nz/screening/Questionnaire/TermsOfUseOrgFacilityr      &subject=https://standards.digital.health.nz/ns/hpi-organisation-id|GZZ956-B Practitioneracceptance search byfacility:    ?questionnaire=https://fhir-ig.digital.health.nz/screening/Questionnaire/TermsOfUsePractitioner    &author=https://standards.digital.health.nz/ns/hpi-person-id|91ZABY    &subject=https://standards.digital.health.nz/ns/hpi-facility-id|FZZ958-K Practitioneracceptance search byorg:    author=https://standards.digital.health.nz/ns/hpi-person-id|91ZABY    &subject=https://standards.digital.health.nz/ns/hpi-organisation-id|GZZ956-B[13]MATCHES[14]Confirm matching Practitioner and Org/FacilityTerms of Use acceptancealt[normal report generation][15]get data from backend APIs[16]generate screening summary content as HTMLand PDF[17]include participant data as Patient instance[18]200 OK, FHIR searchset BundleIn normal search response is a FHIR searchset Bundle. EachBundle entry comprises aDocumentReference (mode:#match)containingthe formatted screening summary, AND aPatient (mode:#include) instance for the patient demographic detail[No screening summary is available][19]200 OK, Bundle of mode: #outcomeWhen screening history not available for specified subject, the Bundle contains oneor moreOperationOutcomes (mode: #outcome) describing the reason(s).[technical error][20]HTTP 4xx|5xx error codeIn technical error scenarios, the responseis just a FHIROperationOutcome[21]process results and display to user[22]present screening summary / search result


User/practitioner special data access terms acceptance sequence

Cervical screening API data access - Practitioner terms acceptance form flowHNZ FHIR APIshealth practitioner (screening)health practitioner (screening)NZ health app/PMSNZ health app/PMSScreening FHIR APIScreening FHIR APIHealth Provider IndexHealth Provider IndexHNZ FHIR APIHNZ FHIR APIHNZ Application Form APIHNZ Application Form APIAPI first time use by new practitioner/user[01]request screening summary for a patientApp/PMS sets the following user metadata inRequest-Context  "hpiPractitioner" - practitioner's Common Person Number (CPN) from Health Provider Index  "hpiFacility | hpiOrganisation" - HPI facility OR organisation identifier from Health Provider Index[02]Get screening summaries by NHI  GET /DocumentReference?<params>[03]Search for completed Terms AcceptanceForm by Practitioner at current Org | Facility   GET /v1/QuestionnaireResponse      ?questionnaire=https://fhir-ig.digital.health.nz/screening/Questionnaire/TermsOfUsePractitioner      &author=https://standards.digital.health.nz/ns/hpi-person-id|91ZABY      &subject=https://standards.digital.health.nz/ns/hpi-organisation-id|GZZ956-B Or where facility identified rather than org      &subject=https://standards.digital.health.nz/ns/hpi-facility-id|FZZ958-K[04]Empty Bundlealt[The practitioner user has not previously accepted the Terms of Access]Validate HPI identifiers[05]Validate Practitioner, Org / Facility identifiers[06]HPI match Bundlebreak[Practitioner | Organisation | Facility Id not valid][07]HTTP 400 Bad RequestPrepare Terms Acceptance Form[08]Generate Terms Acceptance Form  POST /v1/auth/{formName}/generate-questionnaire-linkThe facade prepares a Terms Acceptance form by sending informationabout the practitioner, organisation | facility in magic linkclaims.[09]Prepare Form[10]Prepopulated Form Url (aka 'magic link')[11]Prepare OperationOutcome 403 responsecontaining 'magic link'[12]HTTP 403 Forbidden error + 'magic link'On receipt of a 403 response, the App/PMS must check for magic linkin the FHIROperationOutcome.diagnosticsproperty.[13]Display form in browser using magic link[14]Read special terms of access; complete form;submit to accept[15]Record practitioner's acceptance of terms[16]Practitioner terms acceptance completeAPI request processing can now proceed - see Typical Operation diagram Now that terms acceptance has been recored, the practitioner/user can retry their request for screening summaries in the PMS.