Skip to main content
Version: v0.0.3

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?

readonly optional codedValue?: BuildCode

A CD value. Exactly one of quantity/codedValue/stringValue.


effectiveTime?

readonly optional effectiveTime?: string

The observation time as an HL7 date string, optional.


interpretation?

readonly optional interpretation?: BuildCode

The H/L/N interpretation (HL7 ObservationInterpretation by default), optional.


quantity?

readonly optional quantity?: BuildQuantity

A PQ value (UCUM). Exactly one of quantity/codedValue/stringValue.


referenceRange?

readonly optional referenceRange?: object

The normal interval, emitted as a structured IVL_PQ; either bound optional.

high?

readonly optional high?: BuildQuantity

low?

readonly optional low?: BuildQuantity


stringValue?

readonly optional stringValue?: string

A free-text (ST) value. Exactly one of quantity/codedValue/stringValue.


test

readonly test: BuildCode

The LOINC test code.