ZKELETON//HL7 → FHIR Open converter

HL7 OBX → FHIR Observation

The OBX (observation/result) segment becomes a FHIR R4 Observation. The tricky part is OBX-5: its FHIR value[x] type is chosen from the OBX-2 value type, and the reference range and abnormal flags have dedicated FHIR homes most converters drop.

The short answer

An HL7 OBX segment maps to a FHIR Observation: OBX-3code, OBX-5value[x] (the type is driven by OBX-2 — NM→valueQuantity, ST/TX→valueString, CE/CWE→valueCodeableConcept, DT/TS→valueDateTime), OBX-6→units, OBX-7referenceRange, OBX-8interpretation, OBX-11status.

Field-by-field

HL7 fieldFHIR pathNotes
OBX-2Observation.value[x] typeValue type: NM→valueQuantity, ST/TX/FT→valueString, CE/CWE→valueCodeableConcept, DT/TS→valueDateTime, SN→Quantity/Range/Ratio.
OBX-3Observation.codeThe observation identifier (usually LOINC). Required 1..1.
OBX-5Observation.value[x]The result value, in the type chosen by OBX-2.
OBX-6Observation.valueQuantity.unitUnits of measure for a numeric result.
OBX-7Observation.referenceRangeNormal range (e.g. 4.0-5.6, <120) → low / high SimpleQuantity + text.
OBX-8Observation.interpretationAbnormal flags (H, L, HH, A…) → v3-ObservationInterpretation; unknown codes preserved verbatim.
OBX-11Observation.statusResult status: F→final, P→preliminary, C→corrected, X→cancelled.
OBX-14Observation.effectiveDateTimeObservation date/time (date-only kept when no timezone is given).
NTE (after OBX)Observation.noteA trailing note segment annotates the Observation it follows.

Live example

This is produced by the actual converter — paste your own message and it runs the same way, entirely in your browser.

Live example — run by the actual engine Try this in the converter
HL7 v2 in
MSH|^~\&|LAB|RIVERSIDE|ZK|MERIDIAN|20240101103000||ORU^R01|MSG1|P|2.5.1
PID|1||MRN123^^^HOSP^MR||DOE^JANE||19850312|F
OBR|1||ORD9|24323-8^Comprehensive metabolic panel^LN
OBX|1|NM|2345-7^Glucose^LN||105|mg/dL|70-99|H|||F
NTE|1||Fasting specimen
FHIR R4 out
{
  "resourceType": "Observation",
  "id": "observation-1",
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "laboratory",
          "display": "Laboratory"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "2345-7",
        "display": "Glucose"
      },
      {
        "system": "http://loinc.org",
        "code": "2339-0",
        "display": "Glucose"
      }
    ],
    "text": "Glucose"
  },
  "subject": {
    "reference": "urn:uuid:00000000-0000-4000-8000-000000000001"
  },
  "valueQuantity": {
    "value": 105,
    "unit": "mg/dL",
    "system": "http://unitsofmeasure.org",
    "code": "mg/dL"
  },
  "interpretation": [
    {
      "coding": [
        {
          "code": "H",
          "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
          "display": "High"
        }
      ],
      "text": "High"
    }
  ],
  "referenceRange": [
    {
      "low": {
        "value": 70,
        "unit": "mg/dL",
        "system": "http://unitsofmeasure.org",
        "code": "mg/dL"
      },
      "high": {
        "value": 99,
        "unit": "mg/dL",
        "system": "http://unitsofmeasure.org",
        "code": "mg/dL"
      },
      "text": "70-99"
    }
  ],
  "note": [
    {
      "text": "Fasting specimen"
    }
  ]
}

Nothing needed review for this message

Every populated field above was mapped. When a field can’t be mapped, it appears here instead of being dropped — that’s the guarantee.

Related mappings

Built by Zkeleton

Zkeleton builds conversion and data infrastructure for healthcare. This converter is free, runs entirely in your browser, and never sends a message anywhere — we keep it open because clean data plumbing should be a commodity, not a toll.