Healthcare pack
Care facilities CSV import API
Map site, ward and unit lists to FHIR R4 Location with status and managing organization. GLN check-digit validated, multilingual headers.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=care_facilities_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.
care_facilities_v1FHIR · Location- fields
- 6
- required
- 2
- validated
- 1
- hints
- 29
| Canonical column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
location_id | string | yes | — | standort-idstandortnummerid siteid sedesite idid ubicación |
name | string | yes | — | standortbezeichnungnom du sitenome sedesite namefacilitynombre del centro |
status | enumactivesuspendedinactive | — | — | statusstatutstatoestado |
description | string | — | — | beschreibungdescriptiondescrizionedescripciónnotes |
organization_id | string | — | — | trägerträgerorganisationorganisationorganizzazioneorganizationorganización |
gln | string | — | gln | gln |
Read the same definition as JSON at GET /v1/templates/care_facilities_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.
- 6 canonical fields
- 2 required
- 1 validated
- 29 header hints, 5 languages
- FHIR Location
Why it exists
Written for the file you actually receive.
The Care facilities template describes the places where care is delivered — a hospital campus, a ward, an outpatient unit, a room — as a flat list a scheduling, bed-management or reporting system can load. location_id and name are required; status, description, the managing organization and a GLN are optional. Each row emits an R4 Location: location_id becomes the identifier, name and description carry over directly, status is written in the location-status vocabulary (active, suspended, inactive), and organization_id becomes a managingOrganization reference to Organization/<id>. The template is `low` risk because nothing in it describes a patient — it is reference data — so a commit goes straight through without the dashboard approval the clinical templates wait for. It is also the natural companion to Encounters, whose location_id column points at the ids you load here.
The GLN column runs the GS1 mod-10 check, which catches the transposed digit typical of hand-maintained site lists. It is validated before commit and carried into Location.identifier under the GS1 system (urn:oid:2.51.1.3), next to location_id, so a FHIR server that identifies sites by GLN can match on it directly. status is optional, and a row without one emits no Location.status at all rather than assuming the place is open — a deliberate choice for lists where "no status" usually means "nobody checked". Address, telecom and geographic position are not part of the canonical row.
Migration scenarios & the foreign headers they ship
Facility lists come from the people who keep reference data: a hospital group's master-data team publishing its sites and wards to a new scheduling tool, a regional health authority collecting a provider network's locations, a home-care organisation listing its bases, and a research network registering the units taking part in a multi-site study. Headers we see: "Standort / Standort-ID / Standortnummer / Bezeichnung / Nom du site / Nome sede / Site name / Facility / Status / Statut / Stato / Beschreibung / Description / Descrizione / Träger / Trägerorganisation / Organisation / GLN". "Träger" — the German word for the body that runs a facility — is a registered hint on organization_id; it is the column a Swiss list most often carries and not a word a generic mapper knows.
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/care_facilities_v1.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=care_facilities_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: "care_facilities_v1",
headers: ["location_id", "name", "status", "description"]
})Questions








