Healthcare pack
Employee roster CSV import API
Import an employee roster CSV with AHV/GLN/IBAN validation and multilingual header support — healthcare-tested.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=employee_roster_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.
employee_roster_v1- fields
- 7
- required
- 2
- validated
- 3
- hints
- 27
| Canonical column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
first_name | string | yes | — | vornameprenomprénomgiven namenombre |
last_name | string | yes | — | nachnamenomcognomefamily nameapellidosurname |
ahv_number | string | — | regex | ahvavssozialversicherungsocial security |
gln | string | — | gln | glnglobal location number |
iban | string | — | iban | ibancomptekontobank account |
contract_type | enumpermanentfixed_termapprenticefreelance | — | — | vertragsarttype de contrattipo de contrato |
start_date | date | — | — | eintrittsdatumdate d'entréestart |
Read the same definition as JSON at GET /v1/templates/employee_roster_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.
- 7 canonical fields
- 2 required
- 3 validated
- 27 header hints, 5 languages
Why it exists
Written for the file you actually receive.
The Employee roster template is the lowest-risk template in the healthcare pack — and the most-imported overall. It is the schema you use when a clinic onboards, when a payroll system rolls over, or when an HR director hands you a Christmas-Eve XLSX. Seven fields cover the working population: first_name, last_name (both required), an AHV number checked against the Swiss social-security regex (^756.NNNN.NNNN.NN$), a GLN that runs through the GS1 mod-10 checksum, an IBAN with country-restricted mod-97 validation, a contract_type enum (permanent / fixed_term / apprentice / freelance), and a start_date parsed across DE / FR / IT date conventions. It is `low` risk because it carries no PHI — names plus pay metadata, not diagnoses. The roster is usually the first template a customer imports because it stress-tests the cascade without any compliance overhead.
AHV is the single highest-value validator in the field — most files arrive with at least one transposed digit, and the regex catches it before downstream payroll rejects the batch. The IBAN validator runs mod-97 in chunks so it works inside a Cloudflare Worker without BigInt. The contract_type enum is deliberately Swiss-shaped (apprenticeships are a first-class contract type, not a footnote).
Migration scenarios & the foreign headers they ship
Migration scenarios for the Employee roster: clinic onboarding where an HR director hands you an XLSX, payroll system rollover at year-end, group-practice acquisitions where two rosters must be reconciled into one, and quarterly contractor refreshes for staffing agencies. Foreign headers we see weekly: "Vorname / Prénom / Nombre / Nachname / Nom / Cognome / Apellido / AHV-Nr / AVS / Sozialversicherungsnummer / GLN / Globale Standortnummer / IBAN / Compte bancaire / Konto / Vertragsart / Type de contrat / Tipo de contrato / Eintrittsdatum / Date d'entrée / Fecha de inicio". The cascade picks up every one of these via the registered hints — and because employee rosters are the highest-volume import in healthcare, the statistics layer takes over within weeks.
The cascade
Five 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/employee_roster_v1.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=employee_roster_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 up to three clamped sample rows.
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
template_id: "employee_roster_v1",
headers: ["first_name", "last_name", "ahv_number", "gln"]
})Questions
Employee roster CSV import — FAQ
Ready when you are
Map employee roster in production — without shipping raw records.
Schema-only mode leaves only headers and a handful of clamped samples. Add full-data when you need row-level AI, routed in-region under a BAA.