Skip to main content
Version: v0.0.4

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):

  1. identifier (e.g. "GLU")
  2. text (human-readable, e.g. "Glucose")
  3. nameOfCodingSystem (e.g. "LN" for LOINC)
  4. alternateIdentifier
  5. alternateText
  6. 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?

readonly optional alternateIdentifier?: string


alternateText?

readonly optional alternateText?: string


extraComponents?

readonly optional extraComponents?: readonly string[]

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?

readonly optional identifier?: string


nameOfAlternateCodingSystem?

readonly optional nameOfAlternateCodingSystem?: string


nameOfCodingSystem?

readonly optional nameOfCodingSystem?: string


text?

readonly optional text?: string