Pharmacy compounding log prints wrong batch ID — mapping & label template fixes
Joe B.
Reviewed for technical accuracy
Specialities: Pharmacy systems (PioneerRx, QS/1, Rx30, PK), Thermal printers (Zebra/Datamax/TSC), Label templates, GS1 barcodes
Compounding log prints wrong batch ID — fix label template mapping, data source, barcode & BUD fields
Quick answer: the accepted fix
Accepted fix when the compounding log prints the wrong batch ID: remap label fields to the live Compounding Batch table, disable cached/reprint data, rebuild GS1-128 with correct AIs for NDC, Lot, Expiry (BUD), and match the label template to the thermal printer’s DPI with no scaling.
Root causes — wrong batch ID, missing lot, or BUD on pharmacy labels
Most issues trace to merge field mapping (pulling LabelHistory instead of Compounding.Batches), an outdated SQL view/API cache, or thermal label formatting (wrong DPI, scaling, or field length). If your GS1-128 barcode lacks FNC1 or uses the wrong AI order, scanners read only the NDC but ignore lot/expiry.
How to verify your fix
Print a sample from the current compounding record and a reprint. Confirm the human-readable lines show the same BatchID and Lot. Scan the barcode to validate NDC, lot number, and BUD. If scans fail, recheck DPI, GS1 string, and that scaling is disabled in the driver.
Compounding labels — quick troubleshooting tips
Most printing errors are template, dataset, or DPI/scaling problems.
Quick path: remap fields → refresh data on print → enforce GS1-128 string → set Zebra stock/DPI correctly → add length validation for Batch ID and Lot. This resolves the majority of pharmacy compounding label mismatches.
Disclaimer: This information is AI-generated and intended for general guidance only. For advice specific to your environment, please consult a verified expert on Whizz-Tech before making decisions.
Getting Started Is Easy
Ask for help, 24/7
Members enjoy round-the-clock access to 12,000+ verified Experts, including tech support, mechanics, vets, and more.
Expert will respond in minutes
We match you with an Expert who specializes in your situation. Talk, text, or chat — whichever you prefer.
Save time & money
No scheduling hassles or expensive consults. Membership can save you significant time and money each month.
FAQ
Why does my compounding log print the wrong batch ID?
Reprint workflows and cached datasets often pull LabelHistory instead of the live Compounding.Batches table. Fix the template mapping and enable Refresh data on print.
Lot/BUD missing on the label — system or printer?
Usually template mapping or GS1 string. Confirm [[LotNumber]] and [[BUD]] bind to the correct fields and your GS1-128 includes AIs (10) and (17) with FNC1 separators.
Barcode scans NDC but not lot/expiry — what to change?
Use printer-rendered GS1-128 (ZPL ^BC/^BX), correct AI order, and match label DPI. Disable driver scaling and ensure stock size matches the physical label.
How do we prevent future mismatches?
Version-control templates, restrict edits, schedule a weekly QA test batch, and lock Zebra driver stock/DPI with admin rights or GPO.
| Symptom | Likely cause | Quick fix |
|---|---|---|
| Wrong Batch ID prints | Cached dataset / wrong table (LabelHistory) | Remap to live Compounding.Batches; refresh data on print |
| Lot or BUD missing | Field not bound; GS1 string incomplete | Bind [[LotNumber]], [[BUD]]; rebuild GS1-128 with AIs (10), (17) |
| Barcode fails QA | Wrong DPI / scaling / raster barcode | Use ZPL barcode fields; correct DPI; disable “fit to page” |
| Text truncated | Field length too small; wrapping | Auto-shrink; fixed blocks; add validation for long lots |
Step-by-step (fast diagnosis)
- Open the label template → verify bindings: [[BatchID]], [[LotNumber]], [[BUD]], [[NDC]] map to current compounding tables.
- Disable cached datasets; set template to Refresh data on print and reprint from the current record.
- Rebuild the GS1 string (AIs 01/10/17) and switch to ZPL barcode objects.
- Match DPI and stock size in the Zebra driver; turn off scaling and confirm media type.
Sources
- GS1 — Application Identifiers & barcode guidelines
- Zebra — ZPL programming basics
- USP <795> — Nonsterile Compounding (labeling & BUD concepts)
Filed under: Printers
Related articles
- My PDF prints sideways — why is the orientation wrong when I print?
- Printer says “Offline” and won’t print — what should I check first?
- My printer “forgot” my Wi-Fi — the saved network is gone
- Printer Wi-Fi settings reset by itself — why did it forget my network?
- My printer keeps popping up “Set up Wi-Fi” again — why won’t it stay connected?
- Why does my printer need Wi-Fi setup again? It was working yesterday.
- My printer Wi-Fi setup keeps failing — what am I doing wrong?
- Printer Wi-Fi setup is confusing — why won’t it connect to my network?