Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary and secodary data.
combinedCodetext = HIBCLICCombinedCodetext()
combinedCodetext.setBarcodeType(EncodeTypes.HIBCQRLIC)
combinedCodetext.setPrimaryData(PrimaryData())
combinedCodetext.getPrimaryData().setProductOrCatalogNumber("12345")
combinedCodetext.getPrimaryData().setLabelerIdentificationCode("A999")
combinedCodetext.getPrimaryData().setUnitOfMeasureID(1)
combinedCodetext.setSecondaryAndAdditionalData(SecondaryAndAdditionalData())
combinedCodetext.getSecondaryAndAdditionalData().setExpiryDate(datetime.now())
combinedCodetext.getSecondaryAndAdditionalData().setExpiryDateFormat(HIBCLICDateFormat.MMDDYY)
combinedCodetext.getSecondaryAndAdditionalData().setQuantity(30)
combinedCodetext.getSecondaryAndAdditionalData().setLotNumber("LOT123")
combinedCodetext.getSecondaryAndAdditionalData().setSerialNumber("SERIAL123")
combinedCodetext.getSecondaryAndAdditionalData().setDateOfManufacture(datetime.now())
generator = ComplexBarcode.ComplexBarcodeGenerator(combinedCodetext)
image = generator.generateBarCodeImage()
reader = Recognition.BarCodeReader(image, None, DecodeType.HIBCQRLIC)
reader.readBarCodes()
codetext = reader.getFoundBarCodes()[0].getCodeText()
result = ComplexCodetextReader.tryDecodeHIBCLIC(codetext)
if result is not None:
print("Product or catalog number: " + result.getPrimaryData().getProductOrCatalogNumber())
print("Labeler identification code: " + result.getPrimaryData().getLabelerIdentificationCode())
print("Unit of measure ID: " + result.getPrimaryData().getUnitOfMeasureID())
print("Expiry date: " + result.getSecondaryAndAdditionalData().getExpiryDate())
print("Quantity: " + result.getSecondaryAndAdditionalData().getQuantity())
print("Lot number: " + result.getSecondaryAndAdditionalData().getLotNumber())
print("Serial number: " + result.getSecondaryAndAdditionalData().getSerialNumber())
print("Date of manufacture: " + result.getSecondaryAndAdditionalData().getDateOfManufacture())