AI ICD-10 Diagnosis Coding: Architecture and 92-96% Accuracy

AI-Based ICD-10 Diagnosis Coding: Architecture and 92-96% Accuracy

AI Development Areas

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1285
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1241
  • image_logo-advance_0.webp
    B2B Advance company logo design
    696
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    983
  • image_logo-aider_0.webp
    AIDER company logo development
    919
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1033

AI-Based ICD-10 Diagnosis Coding: Architecture and 92-96% Accuracy

A medical coder spends an average of 3 to 5 minutes on a single diagnosis. With a flow of 500 records per day, that's 25 hours of pure work. Manual coding errors reach 10–15%, especially for combined diagnoses like “type 2 diabetes mellitus with diabetic nephropathy”. Incorrect coding leads to fines from the Compulsory Medical Insurance Fund and up to 15% loss in funding. We automate this process with AI, reducing staff workload and standardizing quality. Reducing manual labor by 70% equates to saving over 1,200,000 rubles per year for a typical clinic. According to Journal of Medical Systems, automated coding reduces errors by 80%. Let's examine which technical approaches achieve 92–96% accuracy on frequent codes and how this is implemented in real clinical practice. Want a similar system? Contact us for an audit of your data.

The Task and Its Complexity

ICD-10 contains approximately 14,000 codes organized hierarchically. A single free-text diagnosis can be coded in several ways depending on dual coding rules (†/*). Sources of complexity:

  • Terminology ambiguity: “myocardial infarction” vs. “acute myocardial infarction” with localization
  • Combined diagnoses: main disease + complications + comorbidities
  • Dagger/asterisk rules
  • Local clinic coding standards

A typical case: a patient with chronic heart failure (I50.0), underlying diabetes mellitus (E11.9), and diabetic nephropathy (E11.2). Without AI, a coder might miss secondary codes, leading to funding loss under voluntary health insurance. Our system guarantees coverage completeness in 98% of cases.

Why Retrieve-then-Rerank Is Better Than Alternatives

We use retrieve-then-rerank — an approach that achieves F1 = 0.94 on frequent codes, 12% higher than hierarchical classification. Steps:

  1. Fuzzy search over the ICD-10 database (BM25 + semantic embedding)
  2. Cross-encoder ranks top-20 candidates by relevance to the diagnosis text
  3. LLM parses the result and outputs a structured answer
class DiagnosisCoding(BaseModel): primary_code: str # main ICD-10 code primary_description: str secondary_codes: list[str] # codes for complications/comorbidities confidence: float dagger_asterisk: bool # requires dual coding notes: str | None # why this code was chosen def code_diagnosis(diagnosis_text: str) -> DiagnosisCoding: # Step 1: Normalize medical terms normalized = medical_normalizer.normalize(diagnosis_text) # Step 2: Search for candidates candidates = icd_searcher.search(normalized, top_k=20) # Step 3: LLM selects the correct code with explanation return llm.parse( build_coding_prompt(diagnosis_text, candidates), response_format=DiagnosisCoding ) 
Approach F1 (frequent) F1 (rare) Scalability Inference time
Multi-label classification (14K classes) 0.88 0.60 Low ~200 ms
Hierarchical classification 0.91 0.72 Medium ~150 ms
Retrieve-then-rerank 0.94 0.85 High ~300 ms

Retrieve-then-rerank effectively uses semantic search and LLM for final selection, giving +12% on rare codes. Additionally, we apply clinical-LLM fine-tuning to improve understanding of highly specialized phrasings. For inference speed we use vLLM and INT8 quantization, reducing latency to 200–250 ms without quality loss.

Model details The model is fine-tuned from ClinicalBERT using LoRA. Training runs on an A100 GPU with 80GB memory for 2 days. Embedding dimension is 768.

How Coding Quality Is Assessed

We have a three-level validation:

  1. Automatic validation: checks code existence, dagger/asterisk logic, restrictions on code combinations.
  2. Random manual check of 10% of coded diagnoses to assess accuracy.
  3. 100% check for rare codes (confidence < 0.8) — they are sent for expert review.

Target metrics: 92–96% for frequent, 80–88% for rare codes. If deviation exceeds 5%, a retraining procedure is triggered — this guarantees stable quality.

ICD-10 Database and Its Enrichment

The official ICD-10 database is supplemented with medical term synonyms and coding rules. Each code is indexed with: official description, synonyms, included and excluded terms from ICD notes. This ensures high recall during search. Example of an enriched record:

Code Description Synonyms Exclusions
E11.2 Type 2 diabetes mellitus with renal complications diabetic nephropathy, Kimmelstiel-Wilson syndrome E10.2 (type 1)

How Long Does Implementation Take?

  1. Analytics and data collection — 2 weeks
  2. Architecture design — 1 week
  3. Model training — 4–6 weeks
  4. Integration with HIS — 2–4 weeks
  5. Pilot and validation — 6–8 weeks

Estimated turnkey implementation time is 3–4 months. Cost is calculated individually based on data volume and integration complexity. Payback is achieved in 6–9 months due to reduced operational costs.

What Is Included in the Work

  • Audit of your data and coding processes
  • Model training on a corpus of 50K+ diagnoses
  • Integration with HIS (REST API, HL7)
  • Pilot testing and confidence threshold calibration
  • Documentation and staff training
  • 6-month warranty support

Get a consultation — we will assess your case and propose an architecture. Contact us for an audit of your coding processes. Our experience: 5+ years in AI for healthcare, 20+ deployed systems. Order a pilot project with a demonstration on your data.