NZ Shared Digital Health Record API
1.0.0 - release

NZ Shared Digital Health Record API - Local Development build (v1.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Data Models

FHIR Data Models

This section provides an overview of the design of the FHIR data representations that authorised applications can use to record and interchange shared digital health record information.

Shared Digital Health Record ID

Every resource in the Shared Digital Health Record is assigned an id. This id is guaranteed to be unique and is issued by the system when the resource is loaded. It is expected that SDHR providers and consumers honour this id and use it as a unique reference whenever interracting with resources in the SDHR. See below for the technical specification for this property

Property Specification: id (UUID v4)
Name Type Format Description
id string uuid (RFC 4122, v4) Server-assigned, globally unique identifier. Immutable. Must be a valid UUID v4 in the canonical 8-4-4-4-12 form (lowercase hex). Example: 31d3b19e-760e-42df-aea6-9bddf81b4565.

Details:

  • Is a valid RFC 4122 UUID v4.
  • Contains 32 hexadecimal digits displayed in 5 groups separated by hyphens, in the format:

8-4-4-4-12

Must conform to the following canonical example pattern:

xxxxxxxx-xxxx-4xxx-[8|9|a|b]xxx-xxxxxxxxxxxx

  • Is unique across all resources of this type.
  • Will not change over the lifetime of the resource.
  • Is case-sensitive.

Example

31d3b19e-760e-42df-aea6-9bddf81b4565

Regex

^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Note that the id is distinct from any other identifier in the resource. In FHIR an identifier is described as a property that holds external business identifiers for a resource unlike the id which, in the case of SDHR is a server assigned guaranteed uniqie id.

Example truncated resource

{
    "subject": {
        "reference": "https://api.hip.digital.health.nz/fhir/nhi/v1/Patient/ZMW6001",
        "type": "Patient"
    },
    "identifier": [
        {
            "value": "a49865c3-bba7-40e5-a476-2fd92abf3591",
            "system": "https://some.local.system/ehr-key"
        }
    ],
    "id": "31d3b19e-760e-42df-aea6-9bddf81b4565"}

Overview

Shared Digital Health Record - FHIR data modelShared Digital Health Record - FHIR data model Core Data Services Te Whatu Ora NHI/HPI Notes «Condition»SDHR:ConditionRepresents a SDHR conditionhttps://fhir-ig.digital.health.nz/sdhr/StructureDefinition-SDHRCondition.htmlInherits FHIRConditionmeta.source:1..1"https://api.hip.digital.health.nz/fhir/hpi/v1/Location/{hpi-facilityid}}"meta.profile:1..1"https://fhir-ig.digital.health.nz/sdhr/StructureDefinition/SDHRCondition"extension:1..*extentension[*].url: "http://hl7.org.nz/fhir/StructureDefinition/long-term-condition"extension[*].valueBoolean: boolean true|falseextension[+].url: "https://standards.digital.health.nz/ns/sdhr-client-last-updated"extension[+].valueDateTime: "2023-11-26T10:02:45+13:00"code:1..1Binding: Condition/Problem/DiagnosisCodes (preferred)subject:1..1Reference NHI PatientonsetDateTime:0..1PreferredrecordedDateTime:0..1Preferredrecorder:0..1Reference Practitioner (preferred)asserter:1..1Reference Practitioner «AllergyIntolerance»SDHR:AllergyIntoleranceRepresents a SDHR allergy intolerancehttps://fhir-ig.digital.health.nz/sdhr/StructureDefinition-SDHRAllergyIntolerance.htmlInherits FHIRAllergyIntolerancemeta.source:1..1"https://api.hip.digital.health.nz/fhir/hpi/v1/Location/{hpi-facilityid}}"meta.profile:1..1"https://fhir-ig.digital.health.nz/sdhr/StructureDefinition/SDHRAllergyIntolerance"clinicalStatus:1..1Binding: AllergyIntoleranceClinicalStatus (required)code:1..1Binding: Multiple bindings e.g. SNOMED CT, ReadCodes, MIMSpatient:1..1Reference NHI Patientcategory:0..*Binding: AllergyIntoleranceCategory (preferred)recordedDateTime: 0..1 (preferred)recorder: 0..1 Reference Practitioner (preferred) «Observation»SDHR:ObservationRepresents a SDHR observationhttps://fhir-ig.digital.health.nz/sdhr/StructureDefinition-SDHRObservation.htmlInherits FHIRObservationmeta.source:1..1"https://api.hip.digital.health.nz/fhir/hpi/v1/Location/{hpi-facilityid}}"meta.profile:1..1"https://fhir-ig.digital.health.nz/sdhr/StructureDefinition/SDHRObservation"code: Binding: LOINCCodes (preferred)subject:1..1Reference NHI PatienteffectiveDateTime: Preferredvalue[x]: Binding: Multiple bindings e.g. SNOMED CT, ReadCodes, MIMSinterpretation: Binding: ObservationInterpretation (extensible)status: Binding: ObservationStatus (required) «Reference»Patient (NHI)logical id: NHI «Reference»HPIorg identifier formatGXXNNN-CHPI Org Id  NotesThe following resources are sourced from primary care systems:- AllergyIntolerance- Condition- ObservationThe following resources are existing national data services:- Immunization (AIR)- Patient (NHI)- Practitioner/Organizaion/Location (HPI)- MedicationRequest/MedicationDispense (MDR)  Coding/Terminology:In some cases an attempt may be made to map a sourcecode to a standard code such as read code --> SNOMEDCT.In these scenarios the "source" code will always be preservedand marked as "user selected".e.g.{"code" : {"coding" : [{"system" : "http://snomed.info/sct","code" : "373784005","display" : "Penicillin allergy","userSelected" : false},{"system" : "http://mims.co.nz","code" : "m00286","display" : "Penicillins","userSelected" : true}]}} subject recorder | asserter subject recorder subject performer Notes- (preferred) indicates that whilst not mandatory it highly desirable. Key to datatype colourscolourstereotype ghost white Standard FHIR resource in TWO IG salmon Profiled FHIR resource orange red Canonical shared resource defined by TWO sky blue Logical identifier reference to records in national systemsHealth NZ/Te Whatu Ora. Generated from PlantUML source on 27/11/2025