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

Health New Zealand Te Whatu Ora Shared Care FHIR API - Local Development build (v0.4.5) 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.5
Draft as of 2026-03-03 | 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

Use | Name | Scope | Cardinality | Type | Binding | Documentation
IN | observationProfile |  | 1..1 | string |  | The Observation FHIR profile to query.
IN | subject |  | 1..1 | string |  | The Patient NHI that is the target of the query.
IN | period |  | 1..1 | Period |  | The period for the query, where start and end are mandatory
OUT | return |  | 1..1 | Binary |  | 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