Catalog / Healthcare & Clinical / HLTH-005

Medical coding & billing automation

Suggest ICD-10/OPS/CPT codes and DRG groupings from clinical documents and prepare plausibility-checked claims for hospital coders, billing offices and practices.

Hospitals and practices must translate every case into standardised diagnosis and procedure codes that drive reimbursement (DRG, EBM, GOÄ, CPT/DRG in the US). Coders read long records by hand, and incomplete documentation leads to lost revenue and payer disputes. AI reads the record, proposes codes with highlighted evidence, asks physicians for missing detail and checks the claim before submission. Today the realistic goal is computer-assisted coding with a human coder in control, not blind autonomous coding.

Problem & value

  • Today: trained coders (in Germany: Kodierfachkräfte, Medizincontrolling) read discharge letters and notes, assign ICD-10-GM diagnoses and OPS procedure codes, run the G-DRG grouper and answer payer queries (MD reviews). Shortages of coders, yearly catalogue changes and documentation gaps create backlogs and delayed billing.
  • AI value: faster first-pass coding, more complete capture of secondary diagnoses and procedures, earlier documentation queries (while the patient is still in house), fewer denials, consistent audit trail.
  • Evidence is mixed: peer-reviewed work shows that plain LLMs are poor at exact code assignment, but that LLMs combined with retrieval over the code catalogue ("tools") perform much better [1]. A 2026 preprint on MIMIC-IV discharge summaries (secondary summary, unverified) likewise reports hybrid classifier-plus-LLM-audit designs outperforming LLM-only generation. Vendor claims of "autonomous" rates should be validated on your own records.

Variants

  • Inpatient hospital (DRG): full-case coding, grouper simulation, MD-review defence.
  • Outpatient / MVZ / practice: EBM or GOÄ billing suggestions from consultation notes, often paired with ambient documentation (HLTH-003).
  • Emergency & day surgery: high-volume, shorter notes, procedure-heavy.
  • Payer side (Krankenkassen, insurers): claim plausibility and audit triage (AGENT-014, ANOM-009).
  • Non-EU: CPT/ICD-10-CM/HCC risk-adjustment coding (US) — largest vendor market.
  • Research coding / registries: cancer registry (ICD-O) and quality registry abstraction.

How it works

  1. EHR documents (notes, letters, reports) + structured data
  2. de-identification check / access control
  3. document parsing + section segmentation (OCR if scanned)
  4. clinical NER + negation/temporality (confirmed vs. ruled-out vs. history)
  5. candidate retrieval from code catalogue (embeddings + rerank, ICD-10-GM/OPS)
  6. LLM/classifier selects codes, cites evidence spans, applies coding rules
  7. grouper (G-DRG) + plausibility/compliance rules (laterality, age/sex, exclusions)
  8. documentation query to physician if specificity is missing
  9. coder review (accept / edit / reject)
  10. claim generation
  11. payer feedback loop
  • Retrieval over the catalogue is essential: models should choose from valid codes of the current year's version, never free-generate code strings.
  • Rule engines stay deterministic: the DRG grouper and plausibility checks are certified software; AI only proposes the inputs.
  • Human-in-the-loop: a qualified coder approves every code set; physicians answer queries; low-confidence or high-value cases (long stays, ventilation, complex procedures) go to review. Feedback (accepted/edited codes, MD outcomes) is the training signal.

Data preparation

Coding needs the full clinical record: discharge letters, operative and radiology reports, progress notes, structured EHR data (diagnoses, procedures, ventilation hours) plus code catalogues (ICD-10-GM, OPS), grouper rules and past payer queries. In a hospital this lives in the HIS/EHR, a document archive and the billing system; in a practice in the practice management software, often mixed with PDFs, faxes and scans.

Typical gaps: scanned or faxed letters without text layer, free-text notes with abbreviations and local jargon, duplicate or conflicting documents per case, missing links between reports and cases, outdated code catalogue versions, and strict access rights per department.

Preparation steps: 1. Inventory the sources and map them to the use case (PREP-002, GUIDE-003). 2. Run OCR on scans and fax inboxes (DOC-014, PREP-006). 3. Build an abbreviation and terminology list with coders (PREP-015). 4. Assemble a test set of about 200 coded cases with final codes as ground truth (PREP-018, PREP-020). 5. Pseudonymise exports for development and testing (PREP-022). 6. Pull data through HIS interfaces rather than manual exports (PREP-005).

Expect roughly 30 to 40 percent of the project effort in data work, most of it in interfaces and test-set building. Tools: OCR engines, the HIS export interface, Paperless-ngx for document intake in small settings.

Implementation paths

Which path for whom

  • smb (practices, small billing offices): Path A, because certified billing and coding tools integrated with the practice software exist at SMB prices and the coding rules (EBM/GOÄ) are standard.
  • enterprise (hospital groups): Path B, because coding is core to revenue, must integrate with the HIS/EHR and the DRG grouper, and volume makes seat-based pricing expensive; a shared internal AI platform is often available.
  • developer: Path C, because open-weight models on own hardware avoid sending patient records to third parties and allow tuning on local code catalogues.
  • public (municipal and university hospitals): Path B on a sovereign EU or German cloud, because of procurement rules and the sensitivity of health data.
  • Hospital-information-system and grouper vendors: CGM, Dedalus, Nexus, Meierhofer (DE), and DRG grouper/medical-controlling tools with AI modules (e.g. Mediqon, Medicontrolling add-ons); check availability for the current ICD-10-GM/OPS/G-DRG version.
  • Dedicated coding AI: 3M/Solventum 360 Encompass, Nuance/Microsoft Dragon Copilot-related coding workflows, Optum, Fathom, CodaMetrix, Nym (mostly US); in Europe Averbis (DE, text mining for ICD/OPS), Cerner/Oracle and Epic coding modules, Dedalus, Cambio (SE).
  • Choose A when: coders need an integrated tool inside the HIS/KIS; validate on your own cases and check EU hosting, DPA, and update cadence for annual catalogues.

Path B — Build on cloud APIs

  • Models: frontier LLMs (Claude, Gemini, GPT, Mistral) in EU regions, with structured outputs; embeddings + reranker for catalogue retrieval; Azure AI Language / Amazon Comprehend Medical (US-centric ICD-10-CM/RxNorm linking) are English-focused and weaker for German ICD-10-GM.
  • Data: official machine-readable catalogues (BfArM ClaML for ICD-10-GM/OPS) [2]; FHIR integration to the hospital system (see HLTH-028).
  • Workflow: coder review UI, audit log, queue for physician queries.
  • Choose B when: you have a data/engineering team and an approved cloud with a health-data DPA.

Path C — Self-host (open source)

  • Models: open-weight LLMs (Llama, Qwen, Mistral families, Gemma; medical variants such as MedGemma) served with vLLM; German clinical BERT-class models for NER/classification; embedding models (e.g. BGE-M3, multilingual-e5) with a vector DB.
  • Tools: Docling/PaddleOCR for scanned letters, spaCy/medspaCy for negation, Spark NLP (open core, John Snow Labs) for clinical NER.
  • Hardware: HW3 for 30–120B models; HW2 for a retrieval-plus-classifier setup. Keeps patient data in the hospital network.

Path D — Custom training

Worth it for large hospital groups or payers with years of coded cases: fine-tune a multilabel classifier (PLM-ICD-style) on your own records and use an LLM only as auditor. Needs tens of thousands of coded, final-billed cases per language; public benchmarks (MIMIC-IV, English) [3] do not transfer to ICD-10-GM/OPS without local data.

State of the art (2026)

  • Hybrid beats generative: classifiers or retrieval produce candidates, LLMs verify and explain. Full-code-space coding (15k+ ICD codes) remains far from solved; rare codes, laterality, sequencing and procedure bundling are the main errors.
  • Agentic coding assistants read the full chart, ask clarifying questions and draft physician queries, and draft appeals against payer denials.
  • Ambient documentation (HLTH-003) improves source quality, which lifts coding accuracy.
  • Limits: hallucinated or outdated codes, upcoding pressure (financial incentive to over-capture), copy-paste notes, negation errors, and low performance on German-language benchmarks owing to scarce public data. Coding is a legal declaration to payers — errors have fraud-law exposure.

Shared resources & combinations

  • Shared stack: ocr-docparse and text-classifier with HLTH-011 (discharge letters) and HLTH-018 (chart summarisation); terminology services with HLTH-028; retrieval stack with DOC-014.
  • Natural combinations: HLTH-003 (scribe → better notes), HLTH-004 (clinical documentation prompts), AGENT-014 (insurer-side claims), ANOM-009 (billing anomaly and fraud detection).
  • One on-prem GPU server (HW3) can serve coding, summarisation and letter generation.

Effort, cost & KPIs

  • Path A: 3–9 months including HIS integration, validation and coder training; licence per bed/case.
  • Path B/C: 6–12 months for a validated pipeline, mainly data access, evaluation and change management.
  • Cost drivers: integration with KIS, annual catalogue updates, validation effort, GPU/hosting.
  • KPIs: coder time per case, precision/recall per code vs. final coded set, DRG agreement rate, documentation-query response time, days to billing, MD-review/denial rate, overturned appeals, unintended case-weight shift (monitor for upcoding).

People & change

Involve management and the head of medical controlling or billing from the start (budget, goals); coders and billing staff as the daily users in the discovery and pilot; IT for the HIS interface; the data owners of the archive and billing system early, because access decides feasibility. The data protection officer must be involved before the pilot: health data is a special category, so a DPIA (Art. 35 GDPR) is likely, and every vendor needs an AVV (Art. 28 GDPR).

Works council: depends. If the tool only suggests codes for cases, co-determination may not apply, but suggestion acceptance rates and coding speed per person are performance data, so §87(1) no. 6 BetrVG is usually triggered. Inform the council in good time under §90(1) no. 3 and consider an expert under §80(3). In public hospitals the staff council (Personalrat) applies.

Measures to support AI literacy (Art. 4 AI Act): short training on how suggestions are produced, where they fail and that coders remain responsible for the final code. Start with a pilot group of experienced coders on one department, show evidence spans, and report only aggregated figures, not per-person rankings. The typical fear is job loss or surveillance; address it by assigning freed time to documentation queries and denial handling. Keep the human in control: no claim leaves without coder release.

See GUIDE-004, GUIDE-005 and GUIDE-008.

Risks, regulation & compliance

  • EU AI Act: a coding assistant is typically minimal risk (not Annex III, no medical purpose), though AI-literacy duties apply (Art. 4) [4]. It can become high-risk if it is part of a medical device or is used to evaluate eligibility for essential public benefits/health services (Annex III 5(a)); check this for payer-side use. Decision-support features that influence treatment (HLTH-004) fall under MDR instead.
  • GDPR: health data is special-category (Art. 9); needs a legal basis (treatment/billing under national law, e.g. §301 SGB V, §17c KHG), DPIA, DPA with vendors, data minimisation, no training on patient data by providers. Europe: EHDS Regulation (EU) 2025/327 shapes record interoperability [5].
  • Billing law and fraud: upcoding risks false-claims or fraud liability; keep human sign-off, rules-based checks and audit trails. Payer audits (MD) require traceable evidence per code.
  • Bias/drift: annual catalogue and grouper changes; re-validate each year.
  • Mitigations: closed code lists, evidence-span citation, coder approval, shadow-mode pilot, stratified error audits, monitoring of case-mix index shifts.

Getting started

  1. Sample 300–500 finalised cases with coder-assigned codes as ground truth (de-identified where possible, per DPIA).
  2. Measure baseline: coder minutes per case, backlog, denial rate and MD-review outcomes.
  3. Run a shadow-mode pilot (suggestions hidden from billing) comparing 2–3 products or a retrieval + LLM prototype; evaluate per-code precision/recall, not just overall accuracy.
  4. Add physician-query workflow and plausibility rules; keep the certified grouper authoritative.
  5. Go live with coder review on a service line, then expand; re-validate on each catalogue update.

Sources

  1. Soroush et al. — Large language models are good medical coders, if provided with tools — https://arxiv.org/abs/2407.12849
  2. BfArM — Classifications: ICD-10-GM, OPS (ClaML downloads) — https://www.bfarm.de/EN/Code-systems/Classifications/_node.html
  3. Johnson et al. — MIMIC-IV (PhysioNet) — https://physionet.org/content/mimiciv/
  4. Regulation (EU) 2024/1689 (AI Act) — https://eur-lex.europa.eu/eli/reg/2024/1689/oj
  5. Regulation (EU) 2025/327 — European Health Data Space — https://eur-lex.europa.eu/eli/reg/2025/327/oj
  6. InEK — G-DRG system and grouper information — https://www.g-drg.de/
  7. Spark NLP for Healthcare (John Snow Labs) — https://www.johnsnowlabs.com/healthcare-nlp/
  8. Google — MedGemma open models — https://developers.google.com/health-ai-developer-foundations/medgemma