The Demo site for our new HL7 Version 2+ (plus) Standard
visit the hl7 website

Draft Website - For Review Purposes Only

CX - extended composite ID with check digit

HL7 Component Table - CX - extended composite ID with check digit
Seq# Description Implement Flags Cardinality Length C.LEN Vocabulary Data Type
CX
1 ID Number = [0..1]  15 ST
2 Identifier Check Digit = [0..1]   4 ST
3 Check Digit Scheme SHALL [0..1] [3..3]     0061 ID
4

Assigning Authority MAY
True:
False:
C
[1..1]
[0..1]
    0363 HD
5 Identifier Type Code SHALL [0..1] [2..5]     0203 ID
6 Assigning Facility [0..1]     HD
7 Effective Date [0..1]     DT
8 Expiration Date [0..1]     DT
9

Assigning Jurisdiction MAY
True:
False:
C
[1..1]
[0..1]
    CWE
10

Assigning Agency or Department MAY
True:
False:
C
[1..1]
[0..1]
    CWE
11 Security Check = [0..1]   4 ST
12 Security Check Scheme SHALL [0..1] [3..3]     0904 ID

Components: <ID Number (ST)> & <Identifier Check Digit (ST)> & <Check Digit Scheme (ID)> & <Assigning Authority (HD)> & <Identifier Type Code (ID)> & <Assigning Facility (HD)> & <Effective Date (DT)> & <Expiration Date (DT)> & <Assigning Jurisdiction (CWE)> & <Assigning Agency or Department (CWE)> & <Security Check (ST)> & <Security Check Scheme (ID)>

Subcomponents for Assigning Authority (HD): <Namespace ID (IS)> ^ <Universal ID (ST)> ^ <Universal ID Type (ID)>

Subcomponents for Assigning Facility (HD): <Namespace ID (IS)> ^ <Universal ID (ST)> ^ <Universal ID Type (ID)>

Subcomponents for Assigning Jurisdiction (CWE): <Identifier (ST)> ^ <Text (ST)> ^ <Name of Coding System (ID)> ^ <Alternate Identifier (ST)> ^ <Alternate Text (ST)> ^ <Name of Alternate Coding System (ID)> ^ <Coding System Version ID (ST)> ^ <Alternate Coding System Version ID (ST)> ^ <Original Text (ST)> ^ <Second Alternate Identifier (ST)> ^ <Second Alternate Text (ST)> ^ <Name of Second Alternate Coding System (ID)> ^ <Second Alternate Coding System Version ID (ST)> ^ <Coding System OID (ST)> ^ <Value Set OID (ST)> ^ <Value Set Version ID (DTM)> ^ <Alternate Coding System OID (ST)> ^ <Alternate Value Set OID (ST)> ^ <Alternate Value Set Version ID (DTM)> ^ <Second Alternate Coding System OID (ST)> ^ <Second Alternate Value Set OID (ST)> ^ <Second Alternate Value Set Version ID (DTM)>

Subcomponents for Assigning Agency or Department (CWE): <Identifier (ST)> ^ <Text (ST)> ^ <Name of Coding System (ID)> ^ <Alternate Identifier (ST)> ^ <Alternate Text (ST)> ^ <Name of Alternate Coding System (ID)> ^ <Coding System Version ID (ST)> ^ <Alternate Coding System Version ID (ST)> ^ <Original Text (ST)> ^ <Second Alternate Identifier (ST)> ^ <Second Alternate Text (ST)> ^ <Name of Second Alternate Coding System (ID)> ^ <Second Alternate Coding System Version ID (ST)> ^ <Coding System OID (ST)> ^ <Value Set OID (ST)> ^ <Value Set Version ID (DTM)> ^ <Alternate Coding System OID (ST)> ^ <Alternate Value Set OID (ST)> ^ <Alternate Value Set Version ID (DTM)> ^ <Second Alternate Coding System OID (ST)> ^ <Second Alternate Value Set OID (ST)> ^ <Second Alternate Value Set Version ID (DTM)>

Definition: This data type is used for specifying an identifier with its associated administrative detail.

Note: The check digit and check digit scheme are null if ID is alphanumeric.


Example:

|1234567^4^M11^ADT01^MR^University Hospital|

CX-1: ID Number (ST)

Definition: The value of the identifier itself.

CX-2: Identifier Check Digit (ST)

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.

CX-3: Check Digit Scheme (ID)

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:

Terms

d

=

digit of number starting from units digit, followed by 10’s position, followed by 100’s position, etc.

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


Calculation

(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

(Step 2) c1

=

m mod 11

(Step 3) if c1

=

0 then reset c1 = 1

(Step 4)

=

(11 - c1) mod 10


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.

Note: The check digit and code identifying check digit scheme are null if ID is alphanumeric.


CX-4: Assigning Authority (HD)

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.

Note: When the HD data type is used in a given segment as a component of a field of another data type, User-defined Table 0300 - Namespace ID (referenced by the first sub-component of the HD component) may be re-defined (given a different user-defined table number and name) by the technical committee responsible for that segment.    

By site agreement, implementers may continue to use User-defined Table 0300 – Namespace ID for the first sub-component.


CX-5: Identifier Type Code (ID)

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.

CX-6: Assigning Facility (HD)

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.

Note: When the HD data type is used in a given segment as a component of a field of another data type, User-defined Table 0300 - Namespace ID (referenced by the first sub-component of the HD component), may be re-defined (given a different user-defined table number and name) by the technical committee responsible for that segment.


CX-7: Effective Date (DT)

Definition: The first date, if known, on which the identifier is valid and active.

CX-8: Expiration Date (DT)

Definition: The last date, if known, on which the identifier is valid and active.

CX-9: Assigning Jurisdiction (CWE)

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.

  • Refer to HL7 Table 0399 – Country Code for valid values if the administrative unit under whose jurisdiction the identifier was issued is a country.

  • Refer to User-Defined Table 0347 – State/Province for suggested values if the administrative unit under whose jurisdiction the identifier was issued is a state or province. This table is country specific. In the US, postal codes may be used.

  • Refer to User-defined Table –0289 County/Parish for suggested values if the administrative unit under whose jurisdiction the identifier was issued is a county or parish.

The reader is referred to the CX.4 if there is a need to transmit this information as an OID.

CX-10: Assigning Agency or Department (CWE)

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: <Identifier> plus <Visa> yields a unique identifier.

Example 2: <identifier> plus <state> plus <DLN> yields a unique driver’s license number.

Example 3: <identifier> plus <country> plus <INS> yields a unique immigration number.

The reader is referred to the CX.4, if there is a need to transmit this information as an OID.

CX-11: Security Check (ST)

Definition: This component is used to communicate a version code that may be assigned to the value given in CX.1 ID.

CX-12: Security Check Scheme (ID)

Definition: This component is used to transmit information intended to validate the veracity of the supplied identifier or the presenter of the identifier. For example, this component may be used to ensure that the presenter of a credit card is an authorized user of that card.

Refer to HL7 Table 0904 - Security Check Scheme for valid values.