Format
Matches `/^\d{4,7}$/`. Digits only, length 4 through 7 inclusive.
Examples
- 1234
- 7680411180014 (NO — this is GTIN, not pharmacode)
- 5396512
Matches `/^\d{4,7}$/`. Digits only, length 4 through 7 inclusive.
Faithful summary of lib/validators.ts. Validators are pure functions and run identically in the worker, the Workbench, and the MCP server.
function validPharmacode(value) {
return /^\d{4,7}$/.test(value)
? OK
: fail('pharmacode_format', 'expected 4–7 digits')
}Validators attach to a field on a custom template. The cascade runs them after mapping but before commit; failures surface in the per-row validation report.
fields:
- column: pharmacode
type: string
validators:
- type: pharmacodedrug_formulary_v1ATC/GTIN-coded drug catalog. Emits FHIR Medication.
Fields: pharmacode
Pricing
Schema-only mode (headers + ≤3 sample rows) is free and unlimited; full-data commits are metered. See plans →