D.Roos, J.Kardoeus: ISO7064-standardised Check Digits Applied to Blood Bag Numbers | release 1.1.1i (draft) | |
ISO7064-standardised Check Digits Applied to Blood Bag Numbers
|
Calculation and validation examples |
Step by step example
The string "0823" has to be supplemented by a MOD11,10 check digit. It is calculated recursively (2) as follows:
j | ( | ( | an-j+1 | + | Tj-1 | ) | ||10 | *2 | ) | |11= | Tj | |||||||
1 | 0 | + | 10 | = | 10 | -> | 10 | *2 | = | 20 | -> | 9 | ||||||
carrying over | ||||||||||||||||||
2 | 8 | + | 9 | = | 17 | -> | 7 | *2 | = | 14 | -> | 3 | ||||||
carrying over | ||||||||||||||||||
3 | 2 | + | 3 | = | 5 | -> | 5 | *2 | = | 10 | -> | 10 | ||||||
carrying over | ||||||||||||||||||
4 | 3 | + | 10 | = | 13 | -> | 3 | *2 | = | 6 | -> | 6 | ||||||
From T4=6 using equation (4) the check digit results as (11-T4)|10=5. Concatenation of source string and check digit results in "08235".
If correctness of the string "08235" has to be verified, the same algorithm has to be applied up to the last but one digit ("3"). If the remainder of division from (T4+a1)/10 (from example: (6+5)/10=11/10, remainder =1) equals 1, the string is supposed to be transferred or stored as "correct".
Check digit examples
More examples of valid and invalid strings may be requested as ASCII file.
Disclaimer | Copyright | last revision: 03.06.2000 16:55 |