# Medical Device Barcode Decoder — 2D DataMatrix, GS1-128 & Hospital Scanners
> Decode 2D DataMatrix and linear GS1-128 barcodes scanned at hospital bedsides and surgical supply rooms into structured JSON.

- **Canonical URL:** https://stanzaapi.com/tools/udi-decoder/standard/medical-device-barcode-decoder
- **Governing Standard:** FDA 21 CFR 801.20 / EU MDR 2017/745 (FDA AccessGUDID Database & IMDRF)
- **Latency:** <2ms Edge
- **Privacy:** In-memory execution only (zero data stored or logged)

## Technical Overview & Governing Rules
Medical device packaging predominantly employs ISO/IEC 16022 2D DataMatrix with ECC 200 error correction to encode high-density DI and PI data within miniature footprints on surgical implants and instruments.

## Specification Matrix
| Symbology | Standards | Typical Application | Encoding Density |
| --- | --- | --- | --- |
| GS1 DataMatrix (ECC 200) | ISO/IEC 16022 | Implants, vials, orthopedic screws, surgical tools | High (up to 3,116 numeric / 2,335 alphanumeric) |
| GS1-128 (Code 128) | ISO/IEC 15417 | Outer cartons, shipper boxes, sterile pouches | Moderate (linear 1D continuous barcode) |
| HIBCC MicroPDF417 / DataMatrix | ANSI/HIBC 2.6 | Diagnostic reagents, dental equipment, laboratory supplies | High (stacked 2D multi-row matrix) |
| ICCBBA ISBT 128 2D Matrix | ICCBBA Standard 001 | Blood bags, tissue graft containers, cellular therapy cryo-tubes | High (deterministic composite segments) |

## Standard JSON Response Model
```json
{
  "symbologyDetected": "GS1_DATAMATRIX_2D",
  "rawPayload": "]d201008848380123451726083110LOT7788\u001d21SN991823",
  "deviceIdentifier": "00884838012345",
  "productionIdentifiers": {
    "expirationDate": "2026-08-31",
    "lotNumber": "LOT7788",
    "serialNumber": "SN991823"
  },
  "bedsideScanReady": true
}
```

## Frequently Asked Questions & Edge Cases
### Q: What is the Group Separator (FNC1) character in raw 2D DataMatrix scans?
**A:** In raw AIDC scanner output, variable-length GS1 Application Identifiers are delimited by ASCII 29 (GS / \u001d) or the ]d2 symbology identifier prefix. StanzaAPI automatically detects and unescapes GS delimiters.

### Q: Can this API process scans directly from Zebra or Honeywell hospital handhelds?
**A:** Yes. Whether handheld scanners output raw string streams with ASCII control characters or human-readable bracketed strings, StanzaAPI normalizes both transparently.
