The unit falls off the lab result
A lab sends an HL7 v2 ORU message. The interface engine maps OBX-5 (the value) into a FHIR Observation but ignores OBX-6 (the unit). The app then shows 5.3 in its usual unit, mg/dL, when the lab meant mmol/L. A normal glucose reads as a critical low.
also: OBX-14 time sent without a UTC offset, corrected results (OBX-11 = C) ignoredfor (const msg of fixtures.oru.withUnits) { const obs = toFhir(parseHl7(msg)) expect(obs.valueQuantity.unit).toBe(unitOf(msg, 'OBX-6')) expect(obs.valueQuantity.code).toBeDefined() // UCUM expect(obs.effectiveDateTime).toHaveOffset() // tz kept }