Skip to main content
Version: v0.0.3

Interface: CX

HL7 v2 Extended Composite ID (CX): structured identifier per HL7 Chapter 2. All 10 components are optional. Fields are OMITTED when the underlying component is absent (exactOptionalPropertyTypes). assigningAuthority uses the nested HD shape; assigningFacility is flattened to a plain string in v1.

Component positions (HL7 1-indexed; this interface is 0-indexed by key):

  1. idNumber
  2. checkDigit
  3. checkDigitScheme (ISO 7064, M10, M11, NPI)
  4. assigningAuthority (nested HD: 3 subcomponents form a HD composite)
  5. identifierTypeCode (MR, SSN, DL, MC, ...)
  6. assigningFacility (v1: flattened to string; spec is HD-shaped)
  7. effectiveDate (raw HL7 TS string)
  8. expirationDate (raw HL7 TS string)
  9. assigningJurisdiction (v1: flattened to string)
  10. assigningAgencyOrDepartment (v1: flattened to string)

Example

import type { CX } from "@cosyte/hl7";
const mrn: CX = {
idNumber: "123456",
assigningAuthority: { namespaceId: "EPIC", universalId: "1.2.840.114350", universalIdType: "ISO" },
identifierTypeCode: "MR",
};

Properties

assigningAgencyOrDepartment?

readonly optional assigningAgencyOrDepartment?: string


assigningAuthority?

readonly optional assigningAuthority?: HD


assigningFacility?

readonly optional assigningFacility?: string


assigningJurisdiction?

readonly optional assigningJurisdiction?: string


checkDigit?

readonly optional checkDigit?: string


checkDigitScheme?

readonly optional checkDigitScheme?: string


effectiveDate?

readonly optional effectiveDate?: string


expirationDate?

readonly optional expirationDate?: string


identifierTypeCode?

readonly optional identifierTypeCode?: string


idNumber?

readonly optional idNumber?: string