Hibc

Hibc data structure class HIBC (Health Industry Bar Code) data structures Validates a data structure of the Supplier Labeling Standard (ANSI/HIBC 2.6) or of the Provider Applications Standard (ANSI/HI

Namespace: Com\Tecnick\Barcode\Type

class Hibc

Source: src/Type/Hibc.php:46

Hibc data structure class HIBC (Health Industry Bar Code) data structures

Validates a data structure of the Supplier Labeling Standard (ANSI/HIBC 2.6) or of the Provider Applications Standard (ANSI/HIBC 1.3) and appends the modulo 43 check character. The data structure is independent of the symbology that carries it, so the same string is handed unchanged to CODE 39, CODE 128, Data Matrix, QR Code or Aztec Code.

HIBC and HIBCC are trademarks of the Health Industry Business Communications Council.

Constants

CHARSET

Encodable characters, in the order of the numerical values used by the modulo 43 check character. The value of a character is its position here.

public const CHARSET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%'

Source: src/Type/Hibc.php:54

Methods

checkCharacter()

Calculate the modulo 43 check character of a data structure.

It is the character whose value is the remainder of the division by 43 of the sum of the values of all the characters of the message.

public checkCharacter(string $code): string

Parameters:

  • $code (string): Data structure without the check character.

Returns: string

Source: src/Type/Hibc.php:169

format()

Validate a HIBC data structure and append its modulo 43 check character.

public format(string $code): string

Parameters:

  • $code (string): Data structure, including the leading flag character and without the check character.

Returns: string

Throws:

  • Exception: if the data structure is malformed

Source: src/Type/Hibc.php:156