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):
- idNumber: e.g. employee ID, NPI digits, DEA number (CX-1 analogue)
- familyName (XPN-1)
- givenName (XPN-2)
- secondName: second and further given names (XPN-3)
- suffix: Jr., III, etc. (XPN-4)
- prefix: Dr., Mrs., etc. (XPN-5)
- degree: MD, PhD, etc. (XPN-6)
- sourceTable
- assigningAuthority: nested HD (CX-4 analogue)
- nameTypeCode: L=Legal, M=Maiden, N=Nickname, ... (XPN-7)
- identifierCheckDigit
- checkDigitScheme: ISO 7064, M10, M11, NPI
- 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?
readonlyoptionalassigningAuthority?:HD
checkDigitScheme?
readonlyoptionalcheckDigitScheme?:string
degree?
readonlyoptionaldegree?:string
familyName?
readonlyoptionalfamilyName?:string
givenName?
readonlyoptionalgivenName?:string
identifierCheckDigit?
readonlyoptionalidentifierCheckDigit?:string
identifierTypeCode?
readonlyoptionalidentifierTypeCode?:string
idNumber?
readonlyoptionalidNumber?:string
nameTypeCode?
readonlyoptionalnameTypeCode?:string
prefix?
readonlyoptionalprefix?:string
secondName?
readonlyoptionalsecondName?:string
sourceTable?
readonlyoptionalsourceTable?:string
suffix?
readonlyoptionalsuffix?:string