Type 5 Validation Methods
The Pack for Healthcare supports two methods of Type 5 Validation: Code Value and Pattern Match. The choice of validation method is generally determined by the requirements of your organization, the nature of the code list, and access to code list contents.
The hipaa_X12_qualifier.json file contains Type 5 rules that can be checked. These rules will have a validation type of T5, with the syntax “ValidationType”: “T5.” Each Type 5 rule also has additional attributes to indicate what method of Type 5 validation to use, which code table to reference, or which pattern to match.
The Code Value method, with "ValidationSubType": "CV", checks that the data content selected for Type 5 validation is in a particular code list. The Code Table ID, or "CodeTableID" is used to specify the Code List collection that contains the list of all acceptable code items. An example is "CodeTableID" : "T5_022". This method also includes the option to define start and/ or end dates for individual code list items. The transaction processing date determines whether the code item falls within the effective date restrictions.
- [0-9A-Z]{2} Exactly two uppercase alphabetic or numeric characters.
- [0-9]{9} Exactly nine numeric characters.
- [A-Z]{3,5} Between three and five uppercase alphabetic characters.
- The first digit of the NPI must be either 1 or 2.
- The check digit(last digit) is correct, based on the assumed prefix of 80840.
The rules of this element include the PatternID of NPI.
- Double the value of alternate digits, start from the rightmost digit.
- Add a constant of 24 to account for the 80840 prefix present on a card issuer identifier, in addition to the individual digits of products of doubling, and the unaffected digits.
- Subtract the result from the next higher number that ends in zero.