{
  "id": "med-lab",
  "name": "Lab Specimen Label",
  "description": "Lab Specimen Label layout with mapped Patient Name, DOB, Collection Date, Sample ID fields, XLSX sample data, and print-ready sizing.",
  "category": "Healthcare",
  "thumbnail": "/templates/thumbnails/med-lab.svg",
  "settings": {
    "width": 76,
    "height": 50,
    "unit": "mm",
    "dpi": 203,
    "name": "Lab Specimen Label",
    "type": "lab_specimen_label"
  },
  "elements": [
    {
      "id": "border",
      "type": "RECTANGLE",
      "x": 1,
      "y": 1,
      "width": 74,
      "height": 48,
      "fill": "#ffffff",
      "stroke": "#111827",
      "strokeWidth": 0.4,
      "borderRadius": 1
    },
    {
      "id": "title",
      "type": "TEXT",
      "x": 3,
      "y": 3,
      "width": 70,
      "height": 8,
      "content": "Lab Specimen Label",
      "fontSize": 8,
      "fontWeight": "bold",
      "textAlign": "center",
      "textFitMode": "shrink",
      "color": "#111827"
    },
    {
      "id": "main",
      "type": "TEXT",
      "x": 4,
      "y": 12,
      "width": 68,
      "height": 8,
      "content": "{{Patient Name}}",
      "fontSize": 8.5,
      "fontWeight": "bold",
      "textFitMode": "shrink",
      "color": "#111827"
    },
    {
      "id": "secondary",
      "type": "TEXT",
      "x": 4,
      "y": 22,
      "width": 68,
      "height": 6,
      "content": "{{DOB}} | {{Collection Date}}",
      "fontSize": 6,
      "textFitMode": "shrink",
      "color": "#111827"
    },
    {
      "id": "barcode",
      "type": "BARCODE",
      "x": 4,
      "y": 33,
      "width": 68,
      "height": 12.5,
      "content": "{{Barcode}}",
      "barcodeFormat": "CODE128",
      "barcodeShowText": true
    },
    {
      "id": "mapped-details",
      "type": "TEXT",
      "x": 3,
      "y": 44,
      "width": 70,
      "height": 4,
      "content": "Sample ID: {{Sample ID}}",
      "fontSize": 4,
      "textFitMode": "shrink",
      "textAlign": "center",
      "color": "#374151"
    }
  ],
  "columns": [
    {
      "key": "patient_name",
      "label": "Patient Name",
      "required": true
    },
    {
      "key": "dob",
      "label": "DOB",
      "required": true
    },
    {
      "key": "collection_date",
      "label": "Collection Date",
      "required": true
    },
    {
      "key": "sample_id",
      "label": "Sample ID",
      "required": false
    },
    {
      "key": "barcode",
      "label": "Barcode",
      "required": false
    }
  ],
  "files": {
    "xlsx": "/label-templates/med-lab.xlsx",
    "json": "/templates/med-lab.json",
    "svg": "/templates/thumbnails/med-lab.svg"
  }
}