Skip to main content
Version: v0.0.4

Interface: CWE

HL7 v2 Coded with Exceptions (CWE): coded element per HL7 Chapter 2. All 9 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, "SCT" for SNOMED CT)
  4. alternateIdentifier
  5. alternateText
  6. nameOfAlternateCodingSystem
  7. codingSystemVersionId
  8. alternateCodingSystemVersionId
  9. originalText

Components 10+ (present only on v2.7+ senders) are surfaced verbatim, in order, on extraComponents: never silently truncated.

Example

import type { CWE } from "@cosyte/hl7";
const code: CWE = { identifier: "GLU", text: "Glucose", nameOfCodingSystem: "LN" };

Properties

alternateCodingSystemVersionId?

readonly optional alternateCodingSystemVersionId?: string


alternateIdentifier?

readonly optional alternateIdentifier?: string


alternateText?

readonly optional alternateText?: string


codingSystemVersionId?

readonly optional codingSystemVersionId?: string


extraComponents?

readonly optional extraComponents?: readonly string[]

Components beyond the modeled 9 (HL7 component 10 onward), preserved verbatim and in order for forward-compatibility with v2.7+ senders that carry the second-alternate triplet or coding-system / value-set OIDs. OMITTED when the element has no components past the 9th. An absent interior component is preserved as "" so extraComponents[i] maps to HL7 component 10 + i.


identifier?

readonly optional identifier?: string


nameOfAlternateCodingSystem?

readonly optional nameOfAlternateCodingSystem?: string


nameOfCodingSystem?

readonly optional nameOfCodingSystem?: string


originalText?

readonly optional originalText?: string


text?

readonly optional text?: string