Healthcare pack
Vaccinations CSV import API
Map vaccination registers to FHIR R4 Immunization: vaccine code and name, date given, lot, site, completed or not-done. Multilingual headers.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=immunizations_v1" \
-F "file=@your_data.csv"Canonical columns
The whole schema, printed as it ships.
Every canonical column, the type each row carries, whether it is required, the field-level validators that fire on commit, and the multilingual header hints the cascade resolves against. This is the shipped definition, not a summary of it.
immunizations_v1FHIR · Immunization- fields
- 8
- required
- 3
- validated
- 0
- hints
- 46
| Canonical column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
immunization_id | string | — | — | impf-idvaccination idid vaccinationid vaccinazioneid vacunación |
patient_id | string | yes | — | patientpatient_idpidpatienten-idid patient |
vaccine_code | string | — | — | impfstoffcodecode vaccincodice vaccinocvxvaccine codecódigo de vacuna |
vaccine_name | string | yes | — | impfstoffimpfungvaccinvaccinovaccinevacuna |
occurrence_date | date | yes | — | impfdatumverabreicht amdate de vaccinationdata di vaccinazionevaccination dateadministeredfecha de vacunación |
status | enumcompletednot-doneentered-in-error | — | — | statusstatutstatoestado |
lot_number | string | — | — | chargechargennummerlotnuméro de lotlottobatchlote |
site | string | — | — | injektionsstellekörperstellesite d'injectionsedebody sitesitio |
Read the same definition as JSON at GET /v1/templates/immunizations_v1. A hint match resolves on layer 2 — no LLM call, no token spend, just the flat per-map fee. Hover a validator id to see what it checks.
- 8 canonical fields
- 3 required
- 0 validated
- 46 header hints, 5 languages
- FHIR Immunization
Why it exists
Written for the file you actually receive.
The Vaccinations template is built for immunisation registers: what was given, to whom, when, from which lot and where on the body. patient_id, vaccine_name and occurrence_date are required; the vaccine code, status, lot number, injection site and a row id are optional. Each row emits an R4 Immunization — vaccine_code and vaccine_name form the vaccineCode coding, occurrence_date fills occurrenceDateTime, the patient becomes a Patient/ reference, lot_number goes to lotNumber and site to site.text. A declined or missed dose is still a record worth keeping, which is why status accepts not-done next to completed and entered-in-error. Vaccination history is health information about an identifiable person, so the template sits at `medium` risk and a production commit waits for a workspace member to approve the mapping in the dashboard.
Leave status blank and the emitter writes completed: R4 has only the three values the template allows, and a blank status in a register almost always means the dose was given. The vaccineCode system defaults to CVX, the CDC vaccine-administered code set, so a file whose code column holds ATC codes or a national product number would be labelled with the wrong system — leave such a column unmapped and rely on vaccine_name until you know which vocabulary your destination expects. Expiry dates are not part of the canonical row.
Migration scenarios & the foreign headers they ship
Vaccination files arrive from occupational-health services tracking staff hepatitis B and influenza coverage, from pharmacies that vaccinate and report back to the patient's practice, from travel and school clinics, and from practices moving to a new EMR that has to inherit every patient's immunisation history. Headers we see: "Impfdatum / Verabreicht am / Date de vaccination / Data di vaccinazione / Vaccination date / Impfstoff / Impfung / Vaccin / Vaccino / Vacuna / Charge / Chargennummer / Numéro de lot / Lotto / Batch / Injektionsstelle / Site d'injection / Sede / Body site / CVX". The German "Charge" — a lot number, not a fee — is the classic trap for a mapper that reads headers as English; here it is a registered hint on lot_number.
The cascade
Six layers, and the cheapest one wins.
Layers run in order and stop the moment a column resolves. That is the single biggest cost lever in the system: a column caught on layer 2 never reaches the metered layer 5.
- L1Statisticsno LLM
Auto-accepts a header that past confirmations already resolved the same way, at {minN:100, minRatio:0.95} or {minN:20, minRatio:1.00}.
- L2Heuristicno LLM
Normalises accents, punctuation and whitespace, then compares against the column name, the label, and every registered hint (DE / FR / IT / EN / ES).
- L3Fuzzyno LLM
Token-set ratio plus Levenshtein over the normalised strings. Auto-accepts at 0.80 — it absorbs typos and reordered words.
- L4Semanticcheap, cached
Embedding cosine between the header and the field’s label + hints. Catches the long tail of paraphrases.
- L5LLMmetered
Everything still unresolved goes up in ONE batched, collision-aware call, constrained to this template’s column set so it cannot invent a field.
Try it
One template id, two ways in.
REST for your import pipeline, MCP for your editor. Both run the same cascade and both honour the same schema-only clamp.
REST · POST /v1/uploads
Name the template; the cascade picks up the rest. The canonical definition is read-only at GET /v1/templates/immunizations_v1.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=immunizations_v1" \
-F "file=@your_data.csv"MCP · Cursor / Claude Desktop
Drop AdaptivMapr into your editor and call the same cascade as a tool. Schema-only calls leave only column names and a few example values.
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
template_id: "immunizations_v1",
headers: ["immunization_id", "patient_id", "vaccine_code", "vaccine_name"]
})The mappings response comes back flagged. PATCH /uploads/:id/mappings returns requires_hitl: true and hitl_status: "pending_review" and on the hosted API a commit waits until a workspace member records an approval. Schema-only mode (column names and a few example values, never the full file) is a data-minimization mode enforced at the HTTP edge. Full-data mode routes the metered layer-5 call to phi-cloud in-region under a BAA, costs 20% more on the whole map charge, and stays locked until the workspace accepts the BAA/NDA in Settings → Security & Data.
Questions








