Setup
CSV Import Guide
Migrate historical controlled-substance records from paper, spreadsheets, or your existing EMR using the VetRx Ledger EMR-agnostic CSV import wizard.
When to use the CSV import
Use the CSV import wizard to:
- Migrate the last 60–90 days of historical draws and wastes at onboarding
- Import vial inventory from a spreadsheet when setting up a new clinic location
- Bulk-load records exported from AVImark, Cornerstone, ezyVet, or any other EMR that can produce a CSV
Important: Imported historical records are marked
source: "csv_import"in the ledger and cannot carry cryptographic witness tokens. They establish a starting baseline but should be disclosed as imported records if questioned during an inspection. Use live VetRx Ledger recording for all prospective events.Required columns
| Column | Required? | Example | Notes |
|---|---|---|---|
drug | ✓ | Ketamine HCl | Free text; must match vial drug name exactly if vial already exists |
lot | ✓ | A123456 | Lot number from vial label |
event_type | ✓ | DRAW | DRAW, WASTE, REVERSAL, BLIND_COUNT, or ADJUSTMENT |
qty | ✓ | 2.5 | Numeric; must be in same unit as vial record |
date | ✓ | 2025-04-15 | ISO-8601 date or MM/DD/YYYY |
dvm_id | ✓ | DVM-001 | Administering DVM identifier |
tech_id | TECH-004 | Optional; recommended | |
notes | Post-op waste | Optional free-text notes |
Optional: Vial columns (auto-creates vials)
If the vial does not already exist in VetRx Ledger, include these columns to auto-create it during import:
| Column | Example |
|---|---|
initial_qty | 10 |
expiry | 2026-12-31 |
ndc | 0143-9682-01 |
Step-by-step import
- Prepare your CSV file using the column names above. Column order does not matter; the wizard maps headers automatically.
- Navigate to Import in the top navigation.
- Drag and drop your CSV file onto the upload zone, or click Browse.
- VetRx Ledger shows a preview table with column mappings. Correct any mis-mapped columns in the dropdown selectors.
- Review the row count and any validation warnings (red rows indicate missing required fields or unrecognised event types).
- Click Import N rows. VetRx Ledger processes each row idempotently — re-uploading the same file will not create duplicates.
- Review the import summary: rows imported, rows skipped, error details.
Exporting from common EMRs
| EMR | Export path | Notes |
|---|---|---|
| AVImark | Reports → Controlled Substances → Export CSV | Map Quantity → qty; Drug → drug |
| Cornerstone | Inventory → CS Log → Save As CSV | Date format is MM/DD/YYYY — accepted by the wizard |
| ezyVet | Reports → Drug Register → Download | Includes lot numbers; map Dispensed to qty |
| Shepherd | Analytics → Controlled Drugs → Export | Use ISO-8601 date format option if available |
| Google Sheets / Excel | File → Download → CSV (.csv) | Ensure headers match column names exactly (case-insensitive) |
Troubleshooting
| Error | Fix |
|---|---|
| Missing required column: drug | Rename your column header to drug (case-insensitive) |
| Invalid event_type: Administer | Map your EMR type to DRAW before importing |
| qty is not a number | Remove units from the cell — use 2.5 not 2.5 mL |
| Vial not found for drug / lot | Add initial_qty and expiry columns so VetRx Ledger auto-creates the vial |
For bulk migrations or complex CSV mappings, email hello@grantshelf.com — we offer assisted onboarding for multi-location groups.