JPAC Joint United Kingdom (UK) Blood Transfusion and Tissue Transplantation Services Professional Advisory Committee

Annexe 2:

ISBT 128 check character calculation

ISBT 128 donation numbers utilise check characters based on the ISO 7064 modulus 37,2 algorithm. This Annex shows how to calculate the check character for a given number. The calculation is based on the donation number string excluding the leading ‘=‘ symbol and the flag characters.

The steps in the process are as follows:

  1. For each character in the string determine its check value as required by ISO 7064 (see Table A2.1).
     
  2. For each character determine its weighted check value by multiplying the check value from (1) by the nth power of 2 where n is the position of the character from the right-hand end of the string.
     
  3. Sum the weighted check values from (2).
     
  4. Find the modulus 37 value of the sum from (3).
     
  5. Subtract the value obtained in (4) from 38.
     
  6. Find the modulus 37 value of the result of (5). This is the 37,2 checksum.
     

The calculated checksum is used to generate both the barcode check characters used in the flag positions of the ISBT 128 barcode and the eye-readable check character. The barcode check characters are determined by adding 60 to the checksum. The eye-readable check character is determined by cross-referencing the checksum to Table A2.1.


Table A2.1 Mapping from characters to ISO 7064 check values

Char 0 1 2 3 4 5 6 7 8 9 A B C D
Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13
 
Char E F G H I J K L M N O P Q R
Value 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 
Char S T U V W X Y Z *  
Value 28 29 30 31 32 33 34 35 36  

 

Table A2.2 Example of displayed numbers

Donation number G123 498 654 321
 
Character ISO7064 value (step 1) Position from right (n) 2n Weighted value (step 2)
G 16 13 8192 131072
1 1 12 4096 4096
2 2 11 2048 4096
3 3 10 1024 3072
4 4 9 512 2048
9 9 8 256 2304
8 8 7 128 1024
6 6 6 64 384
5 5 5 32 160
4 4 4 16 64
3 3 3 8 24
2 2 2 4 8
1 1 1 2 2
 
Sum of weighted values (step 3) 148354
Modulus 37 of sum of weighted values (step 4) 21
Subtract from 38 (step 5) 17
Modulus 37 of result (step 6) 17
 
ISO 37,2 checksum 17
ISBT128 barcode check character 77
ISBT128 eye-readable check H

 

Last updated 15/04/2025