Healthcare pack

Claims line items CSV import API

Import healthcare claim line items from CSV with CPT and ICD-10 code validation. FHIR Claim.item-shaped.

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

claims_line_items_v1FHIR · Claim.item
fields
4
required
2
validated
2
hints
12
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
cpt_codestringyescpt_codecptprocedure
icd10_codestringicd10_codeicdicd-10diagnose
amountnumberyesbetragmontantimporteamount
service_datedateleistungsdatumdate du servicefecha del servicio

Read the same definition as JSON at GET /v1/templates/claims_line_items_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
  • 2 required
  • 2 validated
  • 12 header hints, 5 languages
  • FHIR Claim.item

Why it exists

Written for the file you actually receive.

The Claims line items template is the schema for billing claim detail — each row is one procedure performed for one patient on one day, priced and coded. The template is `medium` risk because it indirectly carries PHI (a CPT code tied to a service date and a patient id is identifying), so full-data mode is gated behind the AdaptivMapr subscription. CPT codes are validated against the 5-digit shape; ICD-10-CM codes against the A00 / A00.0 pattern; amounts against locale-aware number parsing. The template emits as FHIR Claim.item, which is the standard cross-border representation for billing detail. Customers use it when porting between practice-management systems, when feeding a clearinghouse, or when building an internal denial-analysis pipeline. The cascade picks up multilingual variants (Leistungsdatum, date du service, fecha del servicio) without an LLM call.

The amount field is currency-agnostic — claims systems usually run single-currency per workspace, so there is no currency column in the canonical shape. Service_date is required and parsed across the same date formats as the rest of the catalogue. CPT codes resolve via the same fallback resolver as LOINC and ATC; a "99213" stays a "99213" but a "office visit established 15min" resolves to "99213" when confidence is high enough.

Migration scenarios & the foreign headers they ship

Migration scenarios for Claims line items: feeding a clearinghouse with a freshly extracted batch, building an internal denial-analysis pipeline that runs on a year of historical line items, porting between practice-management systems where the line-item shape differs subtly, and reconciling payer remittance advices against billed lines. Foreign headers we see in the field: "CPT / Code CPT / Code de procédure / Codigo CPT / ICD / ICD-10 / Diagnose / Diagnostic / Diagnóstico / Betrag / Montant / Importe / Importo / Leistungsdatum / Date du service / Fecha del servicio / Data del servizio". Because billing files are the most regulated CSV input in healthcare, validator coverage matters more here than anywhere else — both CPT and ICD-10 run through canonical-format validators with resolver fallback for free-text descriptions.

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

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=claims_line_items_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: "claims_line_items_v1",
  headers: ["cpt_code", "icd10_code", "amount", "service_date"]
})
schema-only · headers and ≤3 rows, 80 chars each
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" so you can hold the commit in your own workflow — the flag is a signal, not a queue we run. Schema-only mode (headers plus at most three sample rows, each clamped to 80 characters) 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

Claims line items CSV import — FAQ

CPT codes follow the 5-digit pattern; HCPCS Level II is a letter + 4 digits. Add a HCPCS field via a fork — the canonical template is CPT-only because that is the common case.
Modifiers are not in the canonical row. Add them as a separate field if your downstream needs them; the cascade is shape-agnostic.
Place of service is per-encounter, not per-line-item — model it on the parent claim. Add it here via a fork if your downstream expects it.
Both A00 and A00.0 forms validate. The validator does not normalise; round-tripping preserves the source representation.

Ready when you are

Map claims line items 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
Claims line items CSV import API — AdaptivMapr — AdaptivMapr