Skip to content

feat: implement label standards support (GS1, UDI, VDA, GHS) #14

Description

@productdevbook

Summary

Implement industry label standard templates and helpers for GS1, healthcare UDI, automotive VDA/AIAG, food, chemical GHS, and more.

Research Findings

GS1 Standards

  • GS1-128: Code 128 + FNC1 + Application Identifiers. SSCC shipping labels (AI 00)
  • GS1 DataBar: 7 variants for POS/variable-measure items (ISO/IEC 24724)
  • GS1 DataMatrix: DataMatrix ECC 200 + FNC1 prefix (healthcare, pharma)
  • GS1 Digital Link: GS1 IDs as URIs in QR/DataMatrix (`https://id.gs1.org/01/GTIN/10/LOT\`)
  • 160+ Application Identifiers: AI(00)=SSCC, AI(01)=GTIN, AI(10)=Batch, AI(17)=Expiry, AI(21)=Serial, AI(310n)=Weight, AI(410)=Ship-to GLN, AI(420)=Ship-to postal, etc.

Industry Templates

Shipping: GS1 Logistic Label (3-zone, 100x150mm), UPS MaxiCode, FedEx PDF417, carrier labels
Healthcare: UDI (FDA/EU MDR), HIBC, ISBT 128 (blood), EU FMD pharma serialization
Automotive: AIAG B-1 (4"x6"), VDA 4902 (A5, 9 fields), VDA 4992 (KLT A7), Odette
Food: GS1 DataBar for variable-measure, nutrition facts layout helpers
Chemical: GHS labels with pictograms, H/P-codes, signal words, supplier info
Textile: ISO 3758 care symbols, fiber content
Electronics: CE/WEEE/RoHS/energy label combinations

Regulatory Requirements

  • EU FMD: GTIN + Serial + Batch + Expiry in GS1 DataMatrix
  • US DSCSA: NDC/GTIN + Serial + Lot + Expiry
  • US FDA UDI: DI + PI (lot, serial, dates) in GS1 DataMatrix or GS1-128
  • Russia CRPT: DataMatrix with crypto-tail
  • Turkey ITS, India DGFT, Brazil ANVISA, Saudi SFDA: All require GS1 DataMatrix serialization

Check Digits & Validation

  • GS1 check digit (Mod 10 weighted)
  • GTIN-8/12/13/14 validation
  • SSCC generation
  • GLN validation
  • HIBC check character
  • AI format validation (fixed vs variable length, FNC1 separators)

Barcode Quality Standards

  • ISO/IEC 15416 (1D quality grading A-F)
  • ISO/IEC 15415 (2D quality grading)
  • Minimum X-dimensions per application

Tasks

  • Implement GS1 Application Identifier database (160+ AIs with validation)
  • Implement GS1 check digit calculator
  • Implement GTIN/SSCC/GLN validation and generation
  • Implement GS1-128 data formatter (FNC1 + AI encoding)
  • Implement GS1 DataMatrix data formatter
  • Implement GS1 Digital Link URI builder/parser
  • Implement GS1 Logistic Label template (3-zone shipping label)
  • Implement VDA 4902 transport label template (9-field A5)
  • Implement AIAG B-1 shipping label template
  • Implement UDI label helper (FDA/EU MDR format)
  • Implement HIBC encoding
  • Implement EU FMD data formatter
  • Implement GHS label template (pictograms, H/P-codes)
  • Write comprehensive tests with real-world GS1 data examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions