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?
readonlyoptionalabnormalFlags?:string
OBX-8 abnormal flags (e.g. "H", "HH", "L", "LL").
identifier
readonlyidentifier:CWE
OBX-3 observation identifier. Always present (may be {} if OBX-3 absent).
notes?
readonlyoptionalnotes?: readonlystring[]
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?
readonlyoptionalobservedDateTime?:DtmParts
OBX-14 date/time of observation as the fidelity TS.
referenceRange?
readonlyoptionalreferenceRange?:string
OBX-7 reference range (e.g. "80-110").
setId?
readonlyoptionalsetId?:string
OBX-1 set id (string: typically sequential "1", "2", ...).
status?
readonlyoptionalstatus?:string
OBX-11 observation result status (e.g. "F"=final, "P"=preliminary).
units?
readonlyoptionalunits?:CWE
OBX-6 units.
unitsAreUcum?
readonlyoptionalunitsAreUcum?: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).