Default Composite Code XML format for GS1 and Panacode barcodes

PanatrackerGP has a unique and powerful feature that enables the reading and parsing of GS1 barcodes. This type of barcode can contain multiple pieces of data in a single barcode (e.g., item code, lot code, production date, etc.). With proper configuration, PanatrackerGP can parse these codes and capture the data with a single barcode scan.

An overview of GS1 can be found here. Furthermore, this article goes into greater depth with the GS1-128 format and explains the critical concept of application identifiers. Contact Panatrack’s Professional Services team to learn how to apply these concepts to your supply chain.

PanatrackerGP accomplishes this parsing through the use of the CompositeCodeXml setting. This setting captures the rules to parse and identify the GS1 application identifier components in a GS1 barcode. This feature is based upon the power of Regex expressions. Regex is a powerful, yet complicated language that enables the definition of patterns in data. A default CompositeCodeXml setting is already set in your PanatrackerGP system, but Panatrack’s Professional Services team can work with you to tune this feature to your environment. 

Below is the default setting that should address most needs for GS1 barcodes. 

If you are running a PanatrackerGP version prior to 7.4.8.9, your CompositeCodeXml setting should look like this:

<ArrayOfCompositePattern>
    <CompositePattern PatternName=”GS1″ RecognitionPattern=”^(01|02)\d{14}”>
        <Segments>^(01|02)(?’item’\d{1,14})(\|)?</Segments>
        <Segments>^11(?’proddate’\d{6})(\|)?</Segments>
        <Segments>^17(?’expirationdate’\d{6})(\|)?</Segments>
        <Segments>^15(?’bestbydate’\d{6})(\|)?</Segments>
        <Segments>^10(?’lot’\w*)(\|)?</Segments>
        <Segments>^240(?’LotAttribute1’\w{7})(?’LotAttribute2’\w*)(\|)?</Segments>
        <Segments>^21(?’serial’\w{1,20})(\|)?</Segments>
        <Segments>^(?:30|37)(?’quantity’\d*)(\|)?</Segments>
    </CompositePattern>
    <CompositePattern PatternName=”GS1 with identifier” RecognitionPattern=”^(?:]d2|]C1|]e0|]Q3)”>
        <Segments>^(?’symbology’.{3})</Segments>
        <Segments>^01(?’item’\w{1,14})(\|)?</Segments>
        <Segments>^11(?’proddate’\d{6})(\|)?</Segments>
        <Segments>^17(?’expdate’\d{6})(\|)?</Segments>
        <Segments>^15(?’bestbydate’\d{6})(\|)?</Segments>
        <Segments>^10(?’lot’\w*)(\|)?</Segments>
        <Segments>^240(?’altitem’\w*)(\|)?</Segments>
        <Segments>^21(?’serial’\w{1,20})(\|)?</Segments>
        <Segments>^(?:30|37)(?’quantity’\d*)(\|)?</Segments>
    </CompositePattern>
    <CompositePattern PatternName=”Panacode Bulk” RecognitionPattern=”^\[PB\]”>
        <Segments>.*&lt;I&gt;(?’item'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;U&gt;(?’unitofmeasure'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;Q&gt;(?’quantity'[\w\s\/\.-]*)</Segments>
    </CompositePattern>
    <CompositePattern PatternName=”Panacode Lot” RecognitionPattern=”^\[PL\]”>
        <Segments>.*&lt;I&gt;(?’item'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;L&gt;(?’lot'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;U&gt;(?’unitofmeasure'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;Q&gt;(?’quantity'[\w\s\/\.-]*)</Segments>
    </CompositePattern>
    <CompositePattern PatternName=”Panacode Serial” RecognitionPattern=”^\[PS\]”>
        <Segments>.*&lt;I&gt;(?’item'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;S&gt;(?’serial'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;U&gt;(?’unitofmeasure'[\w\s\.-]*)</Segments>
    </CompositePattern>
    <CompositePattern PatternName=”Panacode Credentials” RecognitionPattern=”^\[PU\]”>
        <Segments>.*&lt;U&gt;(?’user'[\w\s\/\.-]*)</Segments>
        <Segments>.*&lt;P&gt;(?’password'[\w\s\/\.-]*)</Segments>
   </CompositePattern>
</ArrayOfCompositePattern>

Even more flexibility and power was recently added to our composite code parsing engine. So, if you are running version 7.4.8.9 or later, your CompositeCodeXml should look like this:

<CompositeCode xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
    <CompositePatterns>
        <Pattern PatternName=”GS1″ RecognitionPattern=”^(01|02)\d{14}”>
        <Segment Regex=”^(01|02)(?’item’\d{1,14})(\|)?” />
        <Segment Regex=”^11(?’proddate’\d{6})(\|)?” />
        <Segment Regex=”^17(?’expirationdate’\d{6})(\|)?” />
        <Segment Regex=”^15(?’bestbydate’\d{6})(\|)?” />
        <Segment Regex=”^10(?’lot’\w*)(\|)?” />
        <Segment Regex=”^240(?’LotAttribute1’\w{7})(?’LotAttribute2’\w*)(\|)?” />
        <Segment Regex=”^21(?’serial’\w{1,20})(\|)?” />
        <Segment Regex=”^3202(?’quantity’\d{6})(\|)?” Decimal=”2″ />
        <Segment Regex=”^3201(?’quantity’\d{6})(\|)?” Decimal=”1″ />
        <Segment Regex=”^3200(?’quantity’\d{6})(\|)?” Decimal=”0″ />
        <Segment Regex=”^(?:30|37)(?’altquantity’\d*)(\|)?” />
        </Pattern>
        <Pattern PatternName=”GS1 with identifier” RecognitionPattern=”^(?:]d2|]C1|]e0|]Q3)”>
        <Segment Regex=”^(?’symbology’.{3})”/>
        <Segment Regex=”^(01|02)(?’item’\d{1,14})(\|)?” />
        <Segment Regex=”^11(?’proddate’\d{6})(\|)?” />
        <Segment Regex=”^17(?’expirationdate’\d{6})(\|)?” />
        <Segment Regex=”^15(?’bestbydate’\d{6})(\|)?” />
        <Segment Regex=”^10(?’lot’\w*)(\|)?” />
        <Segment Regex=”^240(?’LotAttribute1’\w{7})(?’LotAttribute2’\w*)(\|)?” />
        <Segment Regex=”^21(?’serial’\w{1,20})(\|)?” />
        <Segment Regex=”^3202(?’quantity’\d{6})(\|)?” Decimal=”2″ />
        <Segment Regex=”^3201(?’quantity’\d{6})(\|)?” Decimal=”1″ />
        <Segment Regex=”^3200(?’quantity’\d{6})(\|)?” Decimal=”0″ />
        <Segment Regex=”^(?:30|37)(?’altquantity’\d*)(\|)?” />
        </Pattern>
        <Pattern PatternName=”Panacode Bulk” RecognitionPattern=”^\[PB\]”>
        <Segment Regex=”.*&lt;I&gt;(?’item'[\w\s\/\.-]*)” />
        <Segment Regex=”.*&lt;U&gt;(?’unitofmeasure'[\w\s\/\.-]*)” />
        <Segment Regex=”.*&lt;Q&gt;(?’quantity'[\w\s\/\.-]*)” />
        </Pattern>
        <Pattern PatternName=”Panacode Lot” RecognitionPattern=”^\[PL\]”>
        <Segment Regex=”.*&lt;I&gt;(?’item'[\w\s\/\.-]*)” />
        <Segment Regex=”.*&lt;L&gt;(?’lot'[\w\s\/\.-]*)” />
        <Segment Regex=”.*&lt;U&gt;(?’unitofmeasure'[\w\s\/\.-]*)” />
        <Segment Regex=”.*&lt;Q&gt;(?’quantity'[\w\s\/\.-]*)” />
        </Pattern>
        <Pattern PatternName=”Panacode Serial” RecognitionPattern=”^\[PS\]”>
        <Segment Regex=”.*&lt;I&gt;(?’item'[\w\s\/\.-]*)” />
        <Segment Regex=”.*&lt;S&gt;(?’serial'[\w\s\/\.-]*)” />
        <Segment Regex=”.*&lt;U&gt;(?’unitofmeasure'[\w\s\.-]*)” />
        </Pattern>
        <Pattern PatternName=’Panacode Credentials’ RecognitionPattern=’^\[PC\]’>
        <Segment Regex=”.*&lt;U&gt;(?’user'[\w\s\/\.-]*)”/>
        <Segment Regex=”.*&lt;P&gt;(?’password'[\w\s\/\.-]*)”/>
        </Pattern>
    </CompositePatterns>
</CompositeCode>

The above CompositeCodeXml is a way for PanatrackerGP to be field-configured to handle multiple pieces of data in a single barcode, without requiring custom programming. The XML is a little tricky to understand and configure, so we don’t expect our end-users to try and digest the above. We’re here to help.

Was this helpful?