HIBC in QR Code

HIBC data structure in a QR Code in PHP: input rules, code example and SVG output

The health industry data structure carried by a QR Code. Same payload rules as the linear HIBC types, same modulo 43 check character; what changes is the symbol around it and the amount of secondary data that will fit.

Type Token

ItemValue
Type tokenHIBCQR
Enum caseBarcodeType::HIBCQR
Family2D
StandardANSI/HIBC 2.6, ANSI/HIBC 1.3
Class\Com\Tecnick\Barcode\Type\Square\HibcQrCode

Input

ItemValue
Character setthe HIBC character set
Lengtha primary structure of 6 to 23 characters, with an optional secondary structure
Checkmodulo 43, appended by the library, plus the QR Code error correction
Extra parametersnone

Examples

A primary data structure

<?php

require_once __DIR__ . '/vendor/autoload.php';

$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
    type: 'HIBCQR',
    code: '+A123BJC5D6E71',
    width: -4,
    height: -4,
    color: 'black',
    padding: [0, 0, 0, 0],
)->setBackgroundColor('white');

echo $bobj->getInlineSvgCode();

HIBC in QR Code barcode encoding +A123BJC5D6E71

Errors

These payloads raise \Com\Tecnick\Barcode\Exception:

PayloadMessage
A123A HIBC data structure starts with the flag character “+”: A123

See Also