Interface: CE
HL7 v2 Coded Element (CE): coded element per HL7 Chapter 2. All 6 components are optional. Fields are OMITTED when the underlying component is absent (exactOptionalPropertyTypes).
Component positions (HL7 1-indexed; this interface is 0-indexed by key):
- identifier (e.g. "GLU")
- text (human-readable, e.g. "Glucose")
- nameOfCodingSystem (e.g. "LN" for LOINC)
- alternateIdentifier
- alternateText
- nameOfAlternateCodingSystem
Components 7+ (present when a CWE-shaped value is read through the CE
accessor: e.g. version ids, originalText) are surfaced verbatim on
extraComponents rather than dropped.
Example
import type { CE } from "@cosyte/hl7";
const code: CE = { identifier: "GLU", text: "Glucose", nameOfCodingSystem: "LN" };
Properties
alternateIdentifier?
readonlyoptionalalternateIdentifier?:string
alternateText?
readonlyoptionalalternateText?:string
extraComponents?
readonlyoptionalextraComponents?: readonlystring[]
Components beyond the modeled 6 (HL7 component 7 onward), preserved
verbatim and in order. Non-empty only when a CWE-shaped value is read
through the CE accessor; OMITTED otherwise. An absent interior component
is preserved as "" so extraComponents[i] maps to HL7 component
7 + i.
identifier?
readonlyoptionalidentifier?:string
nameOfAlternateCodingSystem?
readonlyoptionalnameOfAlternateCodingSystem?:string
nameOfCodingSystem?
readonlyoptionalnameOfCodingSystem?:string
text?
readonlyoptionaltext?:string