HIBCPASCodetext class

Class for encoding and decoding the text embedded in the HIBC PAS code.

public class HIBCPASCodetext : IComplexCodetext


Name Description
HIBCPASCodetext() The default constructor.


Name Description
BarcodeType { get; set; } Gets or sets barcode type. HIBC PAS codetext can be encoded using HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS and HIBCQRPAS encode types. Default value: HIBCCode39PAS.
DataLocation { get; set; } Identifies data location.


Name Description
AddRecord(HIBCPASRecord) Adds new record
AddRecord(HIBCPASDataType, string) Adds new record
Clear() Clears records list
override Equals(object) Returns a value indicating whether this instance is equal to a specified HIBCPASCodetext value.
GetBarcodeType() Gets barcode type.
GetConstructedCodetext() Constructs codetext
override GetHashCode() Returns the hash code for this instance.
GetRecords() Gets records list
InitFromString(string) Initializes instance from constructed codetext.


This sample shows how to encode and decode HIBC PAS using HIBCPASCodetext.

HIBCPASComplexCodetext complexCodetext = new HIBCPASComplexCodetext();
complexCodetext.DataLocation = HIBCPASDataLocation.Patient;
complexCodetext.AddRecord(HIBCPASDataType.LabelerIdentificationCode, "A123");
complexCodetext.AddRecord(HIBCPASDataType.ManufacturerSerialNumber, "SERIAL123");
complexCodetext.BarcodeType = EncodeTypes.HIBCDataMatrixPAS;
using (ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext))
    using (BarCodeReader reader = new BarCodeReader(generator.GenerateBarCodeImage(), DecodeType.HIBCDataMatrixPAS))
        string codetext = reader.FoundBarCodes[0].CodeText; 
		HIBCPASComplexCodetext readCodetext = ComplexCodetextReader.TryDecodeHIBCPAS(codetext);
		Console.WriteLine("Data location: {0}", readCodetext.DataLocation);
        Console.Write("Data type: {0}. ", readCodetext.GetRecords()[0].DataType);
        Console.WriteLine("Data: {0}", readCodetext.GetRecords()[0].Data);
        Console.Write("Data type: {0}. ", readCodetext.GetRecords()[1].DataType);
        Console.WriteLine("Data: {0}", readCodetext.GetRecords()[1].Data);


See Also