The ISO standard Luhn algorithm, a modulus 10 algorithm, is used to measure the National Provider Identifier (NPI) check digit. The Luhn algorithm was created as a simple way to help prevent unintended keying errors. It’s widely used to validate credit card numbers and IMEI numbers, in addition to NPI numbers.
Let’s take a quick look at the card issuer identifier before we get underway. An individual that issues a health care identification card is identified by a card issuer identifier.
The NPI will be prefixed with the 5-digit identifier “80840” if it is used as part of the card issuer identifier on a standard health care identification card. The first two digits, “80,” denote health-related applications. The United States is represented by the last three digits, “840.”
- The NPI is a 10-position numeric identifier that is free of intelligence. The ISO standard check digit is reserved for the last digit.
- As part of the card issuer identifier, a 15-position numeric NPI is used.
- The card issuer identifier would be 15 positions instead of 10 if the NPI was used to identify the card issuer on a card. Prefix the 10-position NPI with “80840” as the 5-position identifier.
- NPIs will be given with either a 1 or a 2 as the first digit. Some card issuer identifiers will not use these digits as the first digits. This would prevent conflicts with other identifiers, such as the regular health plan identifier.
Here is how it is done
The steps for calculating the check digit for the National Provider Identifier are mentioned below.
- Beginning with the rightmost digit, which is the check digit. Every second digit’s value should be doubled.
- Add all of the digits together to get the total.
- If a doubled value is two digits (e.g., 8 was doubled to 16), you add the two digits together (e.g., 16 will be 1 + 6).
- If the NPI is 10-position, then add the constant 24, to account for the “80840” prefix. Do nothing if the NPI is in the 15th position. Reminder: An NPI is followed by the prefix 80840 when used as a card issuer identifier on a regular health identification card, where 80 indicates health applications and 840 indicates the United States. In this case, the full number will be 80840123456789.
- Take the units digit (i.e. if the number was 67, you would take 7).
- Subtract 10 from the unit’s digit. (Only do this if the unit’s digit isn’t zero.)
- The check digit is the resultant number.
Visit website NPPES https://nppes.cms.hhs.gov for the NPI lookup.