![]() ![]() |
The ISBT 128 barcode symbology is an international standard based on the Code 128 Barcode for the transfer of information associated with blood transfusion, cellular therapy and tissue transplantation. ISBT 128 is not in the public domain; therefore, implementation requires registration with ICCBBA including payment of annual fees. The ICCBBA publishes the ISBT-128 specification, which should be referred to in all ISBT128 projects. The purpose of this Webpage is not to provide information about this standard, but to describe how to use ISBT in IDAutomation's products.
ISBT 128 barcodes begin with an equal '=' or ampersand '&' character, which is referred to as the first of two characters that make up the data identifier. If the second character of the data identifier is a non alpha-numeric character of 1-9, A-N or P-Z, the symbol type is a Donation Identification Number and the second data identifier character is also the first character of the data content. When using IDAutomation barcode products, data identifiers should be static data (or a constant) that is appended to the dynamic data before encoding. Encoding should be done in the Code 128 barcode type with the default "auto" character set enabled, which is the default on all IDAutomation products.
A keyboard entry check character referred to as [K] is sometimes required at the end of ISBT-128 barcodes to verify correct manual entry. This character appears only in the eye-readable text (aka: human readable text) and is not encoded in the barcode itself. K is calculated according to the ISO/IEC 7064 modulo 37-2 checksum method.
Flag characters are required for some ISBT barcode symbols. When used, flag characters are encoded in the barcode and are included in the eye-readable text. However, flag characters are not part of the product identification itself. When required in the symbol and not used, the value of the flags should be 00.
The following tutorial demonstrates the implementation of a donation number of W0000 07 123456 in Crystal Reports with the IDAutomation Universal Barcode Font Advantage, which produces Code 128 and many other barcode types from a single font. This tutorial may also be used as a guide for other types of label and reporting software programs.
Dim DataString As String
DataString = {Table1.DonorNumberField}
'DataString must equal to the data being evaluated for the check digit,
'Example: DataString = "W0000 07 123456"
Dim CorrectData As String
Dim WeightedSum As Number
Dim StringLength As Number
Dim AscValue As Number
Dim CharValue As Number
Dim CheckDigitAscVal As Number
Dim CheckDigitAsc As Number
Dim StringLen As Number
Dim I As Number
StringLen = Len(DataString)
For I = 1 To StringLen
AscValue = Asc(Mid(DataString, I, 1))
If AscValue < 58 And AscValue > 47 Then CorrectData = CorrectData &
Mid(DataString, I, 1) '0-9
If AscValue < 91 And AscValue > 64 Then CorrectData = CorrectData &
Mid(DataString, I, 1) 'A-Z
Next I
DataString = CorrectData
CorrectData = ""
WeightedSum = 0
StringLength = Len(DataString)
For I = 1 To StringLength
AscValue = Asc(Mid(DataString, I, 1))
If AscValue < 58 And AscValue > 47 Then CharValue = AscValue - 48
'0-9 = values
If AscValue < 91 And AscValue > 64 Then CharValue = AscValue - 55
'A-Z = values 10-35
WeightedSum = ((WeightedSum + CharValue) * 2) Mod 37
Next I
CheckDigitAscVal = (38 - WeightedSum) Mod 37
If CheckDigitAscVal < 10 Then CheckDigitAsc = CheckDigitAscVal + 48 '0-9
If CheckDigitAscVal < 36 And CheckDigitAscVal > 9 Then CheckDigitAsc =
CheckDigitAscVal + 55 'A-Z
If CheckDigitAscVal = 36 Then CheckDigitAsc = 42
Formula = Chr(CheckDigitAsc)
The following source code is a ISO7064 MOD 37-2 VB function used to calculate a checksum character with an algorithm that is commonly used in ISBT-128 barcodes as the K check character for manual keyboard entry. The source code may be easily used in Visual Basic applications including VBA, VB6, VB.NET and Microsoft Access to display the check character K. The source code is free to use with a license to any of IDAutomation's products.
If assistance is needed, please contact IDAutomation.
©Copyright 2018
IDAutomation.com, All Rights Reserved.
Legal
Notices. Barcode Fonts | Components | Scanners | Support | Contact Us |
|
![]() ![]() ![]() ![]() ![]() Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses. |