Health New Zealand Te Whatu Ora Shared Care FHIR API
0.4.2 - release New Zealand flag

Health New Zealand Te Whatu Ora Shared Care FHIR API - Local Development build (v0.4.2) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

OperationDefinition: Observation-flat-export

Official URL: https://fhir-ig.digital.health.nz/shared-care/OperationDefinition/Observation-flat-export Version: 0.4.2
Draft as of 2025-09-16 Computable Name: flat-export

The Observation $flat-export operation exports Observation resources in a flat format. See request example.

URL: [base]/Observation/$flat-export

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
INobservationProfile1..1string

The Observation FHIR profile to query.

INsubject1..1string

The Patient NHI that is the target of the query.

INperiod1..1Period

The period for the query, where start and end are mandatory

OUTreturn1..1Binary

A FHIR Binary resource containing the flat file as base64 encoded data. When decoded, it will contain the patient data in a flat format with the following structure. See response example.

[
  {
    "id": "1234",
    "effectiveDateTime": "2025-04-22",
    "values": [
      {
        "valueQuantity": {
          "value": 6.3,
          "unit": "mmol/l",
          "system": "http://unitsofmeasure.org",
          "code": "mmol/L"
        }
      }
    ]
  },
  {
    "id": "5678",
    "effectiveDateTime": "2025-04-23",
    "values": [
      {
        "valueQuantity": {
          "value": 2.3,
          "unit": "mmol/l",
          "system": "http://unitsofmeasure.org",
          "code": "mmol/L"
        }
      },
      {
        "valueString": "Normal"
      }
    ]
  }
]

The response structure will contain an array of Observation resources, each represented in a flat format with the FHIR resource id, effective date, and value information. Note that the values array can contain multiple entries, including any value[x] elements, which can be possible for Observations using components for multiple Observations