Lab Results Structure

Health Gorilla represents lab results in Patient360 using a normalized hierarchy based on HL7 ORU messages and aligned with FHIR standards. The structure ensures consistent parsing and display of laboratory data across both Patient360 record retrieval and Lab Ordering workflows.

Lab results are modeled in three layers.

  • DiagnosticReport anchors the report, contains metadata, and lists panels in DiagnosticReport.result[].
  • Panel Observations act as containers that group related test results.
  • Test Observations represent individual lab results.

Relationships between these layers are enforced through the FHIR event-partOf extension.

  • Each panel Observation includes an event-partOf referencing its parent DiagnosticReport.
  • Each test Observation includes an event-partOf referencing its parent panel.

This hierarchy maintains a reliable chain of provenance from the report level down to each result.

HL7 Mapping

The hierarchy aligns with HL7 lab result messages.

  • ORU message (report container) → DiagnosticReport
  • OBR segment (panel object) → Panel Observation
  • OBX segment (individual result) → Test Observation

By normalizing results into this hierarchy, applications can render results in a clinically familiar structure (report → panel → tests) while preserving context. The same model is applied when parsing C-CDA documents, ensuring consistency between HL7 v2 and document-based sources.

Panel Observation Layer

The panel Observation layer is not part of core FHIR. Health Gorilla added it as a normalization pattern to represent grouped panels. Panel observations are identified by the custom profile: https://healthgorilla.com/fhir/StructureDefinition/hg-observation-group.

While event-partOf is a standard FHIR extension, Health Gorilla’s required use of it together with the non-standard panel layer is unique to this implementation. Other FHIR servers may not follow the same structure.

Applications can reliably identify and link resources using profiles and extensions.

  • Each panel Observation includes meta.profile with hg-observation-group.
  • Each panel Observation references its parent DiagnosticReport through event-partOf.
  • Every test Observation references its parent panel Observation through event-partOf.

Parsing Steps

  1. Read the DiagnosticReport for context such as status, effective[x], and issued.
  2. Check each Observation in DiagnosticReport.result[].
  • If meta.profile includes hg-observation-group, treat it as a panel.
  • Otherwise, treat it as an individual test.
  1. Confirm every panel Observation includes event-partOf pointing to the DiagnosticReport.
  2. Query Observation resources with event-partOf referencing a panel to collect child tests.
  3. Display results hierarchically:
  • Show the DiagnosticReport as the report header.
  • Display each panel Observation under the report, using Observation.code.text or LOINC display.
  • Nest test Observations under their panel, showing name (code), value (value[x]), unit, reference range, and interpretation when available.

Example Lab Result Bundle

  {
  "resourceType": "Bundle",
  "type": "collection",
  "entry": [
    {
      "resource": {
        "resourceType": "DiagnosticReport",
        "id": "dr-1",
        "status": "final",
        "result": [
          { "reference": "Observation/group-1" }
        ]
      }
    },
    {
      "resource": {
        "resourceType": "Observation",
        "id": "group-1",
        "meta": {
          "profile": [
            "https://healthgorilla.com/fhir/StructureDefinition/hg-observation-group"
          ]
        },
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/event-partOf",
            "valueReference": { "reference": "DiagnosticReport/dr-1" }
          }
        ],
        "code": { "text": "Comprehensive Metabolic Panel" }
      }
    },
    {
      "resource": {
        "resourceType": "Observation",
        "id": "obs-1",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/event-partOf",
            "valueReference": { "reference": "Observation/group-1" }
          }
        ],
        "code": { "text": "Glucose" },
        "valueQuantity": { "value": 105, "unit": "mg/dL" }
      }
    }
  ]
}

Common Pitfalls

  • Ignoring the meta.profile may cause panel Observations to flatten incorrectly.
  • Dropping the event-partOf extension breaks the link between the DiagnosticReport, panel, and test Observations.
  • Expecting each test Observation to reference the DiagnosticReport directly will result in missing hierarchical relationships.
  • Rendering a panel as a single test hides its child results.