HL7 Component Table - CX - Extended Composite ID with Check Digit
Core Framework | Base Standard Profile | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Seq# | Description | Interpretation | Flags | Cardinality | Length | C.LEN | Vocabulary | Data Type | Implement | Cardinality | Vocabulary |
CX | |||||||||||
1 | ID Number | [1..1] | ST | SHALL | |||||||
2 | Identifier Check Digit | [0..1] | ST | ||||||||
3 | Check Digit Scheme | [0..1] | checkDigitScheme (CD VS) | ID | (CS) | ||||||
4 |
Assigning Authority | C Condition defined for this element [1..1] [0..0] |
noObject (CD VS) | HD | MAY | (CS) | |||||
5 | Identifier Type Code | [1..1] | identifierType (CD VS) | ID | SHALL | (CS) | |||||
6 | Assigning Facility | [0..1] | HD | ||||||||
7 | Effective Date | [0..1] | DT | ||||||||
8 | Expiration Date | [0..1] | DT | ||||||||
9 |
Assigning Jurisdiction | C Condition defined for this element [1..1] [0..0] |
CWE | MAY | |||||||
10 |
Assigning Agency or Department | C Condition defined for this element [1..1] [0..0] |
CWE | MAY | |||||||
11 | Security Check | [0..1] | ST | ||||||||
12 | Security Check Scheme | [0..1] | securityCheckScheme (CD VS) | ID | (CS) |
Definition: This data type is used for specifying an identifier with its associated administrative detail.
Example:
|1234567^4^M11^ADT01^MR^University Hospital|
Definition: The value of the identifier itself.
Definition: A digit, or digits, exclusive of the identifier in CX.1, calculated by applying an algorithm to all or some of the digits in the number, which may be used to test validity of the non-check-digit identifier.
Definition: Contains the code identifying the check digit scheme employed.
Refer to HL7 Table 0061 - Check Digit Scheme for valid values.
The algorithm for calculating a Mod10 check digit is as follows:
Assume you have an identifier - 12345. Take the odd digit positions, counting from the right, i.e., 531, multiply this number by 2 to get 1062. Take the even digit positions, starting from the right (i.e., 42), prepend these to the 1062 to get 421062. Add all of these six digits together to get 15. Subtract this number from the next highest multiple of 10, i.e., 20 - 15 to get 5. The Mod10 check digit is 5. The Mod10 check digit for 401 is 0; for 9999, it’s 4; for 99999999, it’s 8.
The algorithm for calculating a Mod11 check digit is as follows:
d |
||
w |
weight of digit position starting with the units position, followed by 10’s position, followed by 100’s position etc. Values for w = 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, etc. (repeats for each group of 6 digits) |
|
c |
= |
check digit |
(Step 1) m |
sum of (d * w) for positions 1, 2, etc. starting with units digit for d = digit value starting with units position to highest order for w = weight value from 2 to 7 for every six positions starting with units digit |
|
= |
m mod 11 |
|
(Step 3) if c1 |
= |
0 then reset c1 = 1 |
(Step 4) |
Example:
If the number is 1234567, then the mod 11 check digit = 4
The calculations are:
M = (7*2)+(6*3)+(5*4)+(4*5)+(3*6)+(2*7)+(1*2)
= 14 + 18 + 20 + 20 + 18 + 14 + 2
= 106
c1 = 106 mod 11
= 7
c = (11-c1) mod 10
= 4 mod 10
= 4
Other variants of these check digit algorithms exist and may be used by local bilateral site agreement.
The assigning authority is a unique name of the system (or organization or agency or department) that creates the data. As of v2.7, CX.4 Assigning Authority is required if neither CX.9 nor CX.10 are populated. Best practice is to always send an OID in the Assigning Authority component
Refer to User-defined Table 0363 - Assigning Authority for suggested values.
The reader is referred to the CX.9 and the CX.10 if there is a need to transmit values with semantic meaning for an assigning jurisdiction or assigning department or agency in addition to, or instead of, an assigning authority. However, all 3 components may be valued. If, in so doing, it is discovered that the values in CX.9 and/or CX.10 conflict with CX.4, the user would look to the Message Profile or other implementation agreement for a statement as to which takes precedence.
A code corresponding to the type of identifier. As of v2.7, CX.5 Identifier Type Code is required. Refer to HL7 Table 0203 - Identifier Type for suggested values.
Definition: The place or location identifier where the identifier was first assigned to the patient. This component is not an inherent part of the identifier but rather part of the history of the identifier: as part of this data type, its existence is a convenience for certain intercommunicating systems.
Definition: The first date, if known, on which the identifier is valid and active.
Definition: The last date, if known, on which the identifier is valid and active.
Definition: The geo-political body that assigned the identifier in component 1. As of v2.7, Assigning Jurisdiction is required if neither CX.4 nor CX.10 are populated.
The reader is referred to the CX.4 if there is a need to transmit this information as an OID.
Definition: The agency or department that assigned the identifier in component 1. As of v2.7, Assigning Agency or Department is required if neither CX.4 nor CX.9 are populated.
Refer to User-defined Table 0530 - Organizations, agency, department for suggested values if the administrative unit under whose jurisdiction the identifier was issued is an organization, agency or department. This is populated with site-specific assigning authorities. It also should contain national or international codes when CX.5 Identifier Type Code may be assigned by more than one authority within a governmental or organizational unit. For example, a federal government may have 2 departments that assign a military identifier, its Veterans Affairs department and its Department of Defense. It is not recommended to include values for entities such as Social Security Administration (SSA), Immigration and Naturalization Service (INS), Center for Medicare and Medicaid Services (CMS) because they are included in the identifier type table. In these cases the name of the country plus the identifier type yields the correct interpretation of the identifier in component 1. Likewise, entries like department of motor vehicles (DMV) and licensing boards are not recommended for inclusion because the combination of state and identifier type yields the correct interpretation of the identifier in component 1. This approach is not to be confused with the detailed information provided in the Chapter 15 segments that have provision for specifying the precise granting body and issuing body information needed in personnel management messages.
Example 1:
Example 2:
Example 3:
The reader is referred to the CX.4, if there is a need to transmit this information as an OID.