Interface: BuildCcdaResult
One member observation of a Results panel, a Result Observation. test is the
LOINC test code. Exactly one value form is required: a UCUM quantity
(xsi:type="PQ"), a codedValue (xsi:type="CD"), or a stringValue
(xsi:type="ST"), the builder throws if none (or more than one) is set, so a
result value is never silently dropped or invented. referenceRange (when
given) is emitted as a structured IVL_PQ so it round-trips numerically.
Example
import type { BuildCcdaResult } from "@cosyte/ccda";
const glucose: BuildCcdaResult = {
test: { code: "2345-7", displayName: "Glucose" },
quantity: { value: 95, unit: "mg/dL" },
referenceRange: { low: { value: 70, unit: "mg/dL" }, high: { value: 100, unit: "mg/dL" } },
interpretation: { code: "N", displayName: "Normal" },
};
Properties
codedValue?
readonlyoptionalcodedValue?:BuildCode
A CD value. Exactly one of quantity/codedValue/stringValue.
effectiveTime?
readonlyoptionaleffectiveTime?:string
The observation time as an HL7 date string, optional.
interpretation?
readonlyoptionalinterpretation?:BuildCode
The H/L/N interpretation (HL7 ObservationInterpretation by default), optional.
quantity?
readonlyoptionalquantity?:BuildQuantity
A PQ value (UCUM). Exactly one of quantity/codedValue/stringValue.
referenceRange?
readonlyoptionalreferenceRange?:object
The normal interval, emitted as a structured IVL_PQ; either bound optional.
high?
readonlyoptionalhigh?:BuildQuantity
low?
readonlyoptionallow?:BuildQuantity
stringValue?
readonlyoptionalstringValue?:string
A free-text (ST) value. Exactly one of quantity/codedValue/stringValue.
test
readonlytest:BuildCode
The LOINC test code.