Healthcare pack

Employee roster CSV import API

Import an employee roster CSV with AHV/GLN/IBAN validation and multilingual header support — healthcare-tested.

low riskemployee_roster_v1
30-second curl
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"
→ 7 canonical fields · 3 validated · low 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.

employee_roster_v1
fields
7
required
2
validated
3
hints
27
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
first_namestringyesvornameprenomprénomgiven namenombre
last_namestringyesnachnamenomcognomefamily nameapellidosurname
ahv_numberstringregexahvavssozialversicherungsocial security
glnstringglnglnglobal location number
ibanstringibanibancomptekontobank account
contract_typeenumpermanentfixed_termapprenticefreelancevertragsarttype de contrattipo de contrato
start_datedateeintrittsdatumdate 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.

  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/employee_roster_v1.

bash
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"
→ 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 up to three clamped sample rows.

mcp
// 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"]
})
schema-only · headers and ≤3 rows, 80 chars each
MCP install instructions

Questions

Employee roster CSV import — FAQ

No — it contains employment metadata, not health information. The template is marked `low` risk and runs in schema-only mode. Schema-only mode minimizes data exposure (only headers + 3 truncated sample rows are processed); a DPA/BAA may still be required depending on the data, and mapr provides one on request.
Yes. Fork the template and either drop the AHV field, replace it with a country-specific equivalent (German Steuer-ID, French NIR), or make it optional. The cascade and validators inherit cleanly.
Add an optional `end_date` field by forking. The canonical version is roster-shaped (people who currently work here); historical headcount belongs in an audit table.
The default allow-list is CH / LI / DE / FR / IT — the cluster Swiss healthcare hires across. Cross-border employers should fork and broaden the array; the validator otherwise rejects out-of-list IBANs at import.

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.

No free tier · $10 prepaid wallet to start · every map draws a small flat fee, deterministic ones included