Skip to main content
Version: v0.0.3

Interface: XCN

HL7 v2 Extended Composite ID Number and Name for Persons (XCN): per HL7 Chapter 2.A.88. All 13 v1 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. idNumber: e.g. employee ID, NPI digits, DEA number (CX-1 analogue)
  2. familyName (XPN-1)
  3. givenName (XPN-2)
  4. secondName: second and further given names (XPN-3)
  5. suffix: Jr., III, etc. (XPN-4)
  6. prefix: Dr., Mrs., etc. (XPN-5)
  7. degree: MD, PhD, etc. (XPN-6)
  8. sourceTable
  9. assigningAuthority: nested HD (CX-4 analogue)
  10. nameTypeCode: L=Legal, M=Maiden, N=Nickname, ... (XPN-7)
  11. identifierCheckDigit
  12. checkDigitScheme: ISO 7064, M10, M11, NPI
  13. identifierTypeCode: "NPI", "DN" (DEA number), ... (CX-5 analogue)

Example

import type { XCN } from "@cosyte/hl7";
const orderingProvider: XCN = {
idNumber: "1234567890",
familyName: "Smith",
givenName: "Jane",
identifierTypeCode: "NPI",
};

Properties

assigningAuthority?

readonly optional assigningAuthority?: HD


checkDigitScheme?

readonly optional checkDigitScheme?: string


degree?

readonly optional degree?: string


familyName?

readonly optional familyName?: string


givenName?

readonly optional givenName?: string


identifierCheckDigit?

readonly optional identifierCheckDigit?: string


identifierTypeCode?

readonly optional identifierTypeCode?: string


idNumber?

readonly optional idNumber?: string


nameTypeCode?

readonly optional nameTypeCode?: string


prefix?

readonly optional prefix?: string


secondName?

readonly optional secondName?: string


sourceTable?

readonly optional sourceTable?: string


suffix?

readonly optional suffix?: string