Healthcare pack

Insurance contracts CSV import API

Import payer and insurance contract metadata from CSV into a FHIR Coverage-shaped row.

low riskFHIR · Coverageinsurance_contracts_v1
30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=insurance_contracts_v1" \
  -F "file=@your_data.csv"
→ 4 canonical fields · 0 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.

insurance_contracts_v1FHIR · Coverage
fields
4
required
1
validated
0
hints
6
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
payerstringyesversichererassureurasegurador
contract_typeenumkvgvvglamallcavertragcontratcontrato
valid_fromdatematched on the column name
valid_untildatematched on the column name

Read the same definition as JSON at GET /v1/templates/insurance_contracts_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.

  • 4 canonical fields
  • 1 required
  • 0 validated
  • 6 header hints, 5 languages
  • FHIR Coverage

Why it exists

Written for the file you actually receive.

The Insurance contracts template captures the payer-side metadata for a clinic's contracts: which insurer, what type of cover (KVG, VVG, LaMal, LCA in the Swiss canon), and the validity window. Each row emits a FHIR Coverage resource. It is `low` risk because the row does not name an insured person — that link belongs in a separate enrollment table. Customers import this template when standing up a billing module, when migrating between practice-management systems, or when consolidating after an acquisition. The validity window (valid_from / valid_until) is auto-parsed across DE / FR / IT / EN date formats; the contract_type enum is Swiss-shaped because the original buyer set was Swiss, but it is the easiest field to fork and extend with US / EU / UK payer types.

No identifier validation on `payer` because insurer names are unstable — they merge, rebrand, and acronymise. Customers usually post-process the column against an internal lookup table. The template guarantees the column exists and is non-empty; cleaning it up is downstream work.

Migration scenarios & the foreign headers they ship

Migration scenarios for Insurance contracts: standing up a brand-new billing module that needs the full payer matrix on day one, consolidating after a clinic-group acquisition where two practice-management systems each carry their own contract metadata, migrating from a legacy billing system with a fresh contract list, and annual contract refreshes when payer offerings change in January. Foreign headers we routinely see: "Versicherer / Assureur / Asegurador / Assicuratore / Vertragstyp / Type de contrat / Tipo de contrato / Gültig von / Valable du / Válido desde / Gültig bis / Valable jusqu'au / Válido hasta". The cascade absorbs the variation across the four Swiss official languages without an LLM call — Swiss healthcare ingestion is the original target buyer for this template.

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

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=insurance_contracts_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: "insurance_contracts_v1",
  headers: ["payer", "contract_type", "valid_from", "valid_until"]
})
schema-only · headers and ≤3 rows, 80 chars each
MCP install instructions

Questions

Insurance contracts CSV import — FAQ

Yes — fork the template and add US / EU / UK options (Medicare, Medicaid, HMO, PPO, NHS, etc.). The canonical version stays CH-shaped because that is the original buyer set; extension is the standard pattern.
That linkage belongs in a Coverage.beneficiary or an enrollment table. The contracts template is payer-side metadata only — the per-patient link is a separate import.
Leave valid_until null. The validator only enforces the date format when a value is present.
Product tiers are payer-internal taxonomy and rarely portable across payers. Fork the template and add a `tier` enum if your downstream needs it; the canonical row stays at the contract-shape level.

Ready when you are

Map insurance contracts 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
Insurance contracts CSV import API — AdaptivMapr — AdaptivMapr