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.

30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=immunizations_v1" \
  -F "file=@your_data.csv"
→ 8 canonical fields · 0 validated · medium risk

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 columnTypeRequiredValidatorsHeader hints the cascade matches
immunization_idstring——impf-idvaccination idid vaccinationid vaccinazioneid vacunación
patient_idstringyes—patientpatient_idpidpatienten-idid patient
vaccine_codestring——impfstoffcodecode vaccincodice vaccinocvxvaccine codecódigo de vacuna
vaccine_namestringyes—impfstoffimpfungvaccinvaccinovaccinevacuna
occurrence_datedateyes—impfdatumverabreicht amdate de vaccinationdata di vaccinazionevaccination dateadministeredfecha de vacunación
statusenumcompletednot-doneentered-in-error——statusstatutstatoestado
lot_numberstring——chargechargennummerlotnuméro de lotlottobatchlote
sitestring——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.

  1. 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}.

  2. L2Heuristicno LLM

    Normalises accents, punctuation and whitespace, then compares against the column name, the label, and every registered hint (DE / FR / IT / EN / ES).

  3. L3Fuzzyno LLM

    Token-set ratio plus Levenshtein over the normalised strings. Auto-accepts at 0.80 — it absorbs typos and reordered words.

  4. L4Semanticcheap, cached

    Embedding cosine between the header and the field’s label + hints. Catches the long tail of paraphrases.

  5. 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.

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=immunizations_v1" \
  -F "file=@your_data.csv"
→ upload created · mappings ready · confirm before commit

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.

mcp
// 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"]
})
schema-only · column names and a few examples only
MCP install instructions
medium-risk template

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.

How the wallet is charged

Questions

Vaccinations CSV import — FAQ

Which code system does vaccine_code use?
The emitter labels it CVX (http://hl7.org/fhir/sid/cvx). The value is passed through as written and is not checked against the CVX list, so a code from another vocabulary is mislabelled rather than rejected — map that column only when it really holds CVX codes.
How do I record a declined vaccination?
Set status to not-done. The row still needs a patient, a vaccine name and a date — typically the date the dose was due or declined — because those three columns are required.
Is the injection site coded?
No. site is free text and lands in Immunization.site.text, so "left deltoid", "Oberarm links" and "deltoïde gauche" all survive exactly as written.
Does the template work out which vaccines are due?
No. It maps and validates records that already exist. Schedules and recommendations belong to clinical systems and the people who run them.

Map vaccinations in production — without shipping raw records.

Minimal data mode sends only column names and a few example values — never the full file. Add full-data when you need row-level AI, routed in-region under a BAA.