Skip to main content
Version: v0.0.3

Interface: ObservationBase

Fields shared by every Observation variant, regardless of the OBX-2 value type. Split from the discriminated union to keep the union declaration readable (D-15 locked field list).

Example

import type { ObservationBase } from "@cosyte/hl7";
const base: ObservationBase = {
setId: "1",
identifier: { identifier: "GLU", text: "Glucose" },
};

Properties

abnormalFlags?

readonly optional abnormalFlags?: string

OBX-8 abnormal flags (e.g. "H", "HH", "L", "LL").


identifier

readonly identifier: CWE

OBX-3 observation identifier. Always present (may be {} if OBX-3 absent).


notes?

readonly optional notes?: readonly string[]

NTE note lines positionally attached to this OBX: each non-empty NTE-3 (Comment, FT) repetition of every NTE immediately following this observation, HL7-unescaped, in document order. OMITTED when the observation carries no notes. High-PHI-risk clinical narrative.


observedDateTime?

readonly optional observedDateTime?: DtmParts

OBX-14 date/time of observation as the fidelity TS.


referenceRange?

readonly optional referenceRange?: string

OBX-7 reference range (e.g. "80-110").


setId?

readonly optional setId?: string

OBX-1 set id (string: typically sequential "1", "2", ...).


status?

readonly optional status?: string

OBX-11 observation result status (e.g. "F"=final, "P"=preliminary).


units?

readonly optional units?: CWE

OBX-6 units.


unitsAreUcum?

readonly optional unitsAreUcum?: boolean

true iff OBX-6's coding system (CWE.3, "name of coding system") is exactly UCUM (HL7 Table 0396): i.e. the unit is declared UCUM and is safe to interpret as a computable unit. false means a unit IS present but is NOT declared UCUM (e.g. a local code or free text) and is surfaced as-is, never coerced. OMITTED when OBX-6 is absent. This is a claim check only: the library does not validate UCUM grammar or check the alternate coding system (CWE.6).