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):
- idNumber
- checkDigit
- checkDigitScheme (ISO 7064, M10, M11, NPI)
- assigningAuthority (nested HD: 3 subcomponents form a HD composite)
- identifierTypeCode (MR, SSN, DL, MC, ...)
- assigningFacility (v1: flattened to string; spec is HD-shaped)
- effectiveDate (raw HL7 TS string)
- expirationDate (raw HL7 TS string)
- assigningJurisdiction (v1: flattened to string)
- 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?
readonlyoptionalassigningAgencyOrDepartment?:string
assigningAuthority?
readonlyoptionalassigningAuthority?:HD
assigningFacility?
readonlyoptionalassigningFacility?:string
assigningJurisdiction?
readonlyoptionalassigningJurisdiction?:string
checkDigit?
readonlyoptionalcheckDigit?:string
checkDigitScheme?
readonlyoptionalcheckDigitScheme?:string
effectiveDate?
readonlyoptionaleffectiveDate?:string
expirationDate?
readonlyoptionalexpirationDate?:string
identifierTypeCode?
readonlyoptionalidentifierTypeCode?:string
idNumber?
readonlyoptionalidNumber?:string