ATC ICD-10 code extraction is the process of identifying medication classifications and clinical diagnosis codes from structured or unstructured healthcare data, then linking them in a controlled, reviewable workflow. It is useful for claims, pharmacovigilance, outcomes research, hospital analytics, formulary management and healthcare AI—but it is not a simple lookup exercise.
ATC and ICD-10 describe different things. ATC codes classify medicines, while ICD-10 codes classify diseases, symptoms and health conditions. A prescription for metformin may map to an ATC code, while the documented diagnosis of type 2 diabetes maps to an ICD-10 code. The relationship between the two is clinically meaningful, but it is not always one-to-one and should not be inferred without evidence.
ATC and ICD-10: what each system represents
The WHO Anatomical Therapeutic Chemical system places medicines into five hierarchical levels, moving from anatomical group to therapeutic or pharmacological subgroup and finally to the chemical substance. The level selected depends on the use case. Drug utilisation studies may need a broad therapeutic group, while a medication reconciliation workflow may require the active ingredient and product details.
ICD-10 codes represent conditions and diagnoses. Local implementations can differ: the WHO classification, ICD-10-CM used in the United States, and national adaptations should not be treated as interchangeable. In India, teams may encounter ICD-10 in hospital systems, insurance workflows, research datasets and international reporting, alongside local coding conventions and clinical terminology.
Before extraction begins, define:
- The exact ATC release and ICD-10 edition being used.
- Whether codes are required at category, subgroup or leaf level.
- Whether the output is for analytics, billing, research, decision support or model training.
- Which country-specific rules, payer requirements and privacy controls apply.
For work involving language models, the related guide on ICD-10 codes for LLM training is useful for separating coding labels from training data design.
A dependable extraction workflow
1. Collect the source evidence
Start with the original clinical or administrative record: prescription, discharge summary, diagnosis field, laboratory-linked encounter, claim, pharmacy transaction or medication list. Preserve the source text, document identifier, encounter date and authoring context. Do not discard negations, temporality or uncertainty markers.
For example, “history of hypertension,” “rule out hypertension” and “hypertension controlled on amlodipine” should not be treated as equivalent. Likewise, a medicine mentioned in a past medical history is not necessarily an active prescription.
2. Normalise medicines and diagnoses
Medication names may appear as brand names, generic names, abbreviations, misspellings, salt forms or combinations. Normalisation should capture at least:
- Mentioned name and normalised name.
- Active ingredient or ingredients.
- Strength, dose, route and frequency when available.
- Brand, manufacturer and product identifiers where relevant.
- Start, stop and administration status.
Diagnosis text needs similar treatment. Expand abbreviations carefully, retain body site and acuity, and distinguish confirmed diagnoses from symptoms, suspected conditions and family history. A terminology service or curated dictionary is preferable to uncontrolled string matching.
3. Map entities to candidate codes
Use authoritative ATC and ICD-10 terminology sources or licensed reference data. Generate candidate codes using exact matches, synonym tables, terminology embeddings or rules, but keep the candidate list and matching rationale. An automated result without provenance is difficult to audit and unsafe to use in high-impact workflows.
A useful output record includes:
- Source phrase and document location.
- Entity type: medication, diagnosis, symptom or procedure.
- Candidate code and terminology version.
- Match method and confidence score.
- Negation, temporality and certainty status.
- Human reviewer decision and timestamp.
4. Link medicines to conditions cautiously
A medicine can have several indications, and a diagnosis can be treated by multiple medicines. Link an ATC code to an ICD-10 code only when the record supplies supporting context, such as an assessment-and-plan statement, prescription indication or validated clinical rule. Otherwise, store the entities separately rather than presenting an unsupported causal relationship.
5. Validate and review
Validation should combine automated checks with qualified human review. Sample records across hospitals, specialties, languages, document types and code families. Route low-confidence, ambiguous and clinically consequential cases to reviewers. Keep corrected examples for future evaluation, but do not silently overwrite the original extraction.
Automation options for Indian healthcare teams
Manual coding remains appropriate for small datasets, complex cases and gold-standard annotation. Automation becomes valuable when processing large volumes of discharge summaries, claims or pharmacy records. A hybrid workflow is usually the strongest starting point: machines propose structured candidates, while trained coders or clinicians resolve uncertainty.
Teams can use NLP pipelines, terminology APIs, rules engines or AI agents. If an agent is used to orchestrate extraction across documents and systems, apply the controls described in how to automate data extraction using AI agents. For internal review dashboards, a no-code AI internal tool builder for Indian enterprises may support faster prototyping, but production systems still need access controls, audit logs and formal validation.
A practical architecture has five layers:
1. Ingestion: capture documents and structured records with identifiers.
2. Pre-processing: OCR, language detection, de-identification and section detection.
3. Extraction: identify medicines, diagnoses, attributes and context.
4. Terminology mapping: resolve candidates against versioned code sets.
5. Review and export: apply thresholds, route exceptions and publish approved data.
For analysis, store data in a versioned warehouse rather than only in spreadsheets. No-code data analytics platforms in India can help teams explore results, but sensitive health data requires careful vendor, hosting and access review.
Quality metrics that matter
Accuracy alone is not enough. Track precision, recall and F1 score separately for medications, diagnoses and context attributes. Also measure:
- Top-k candidate recall: whether the correct code appears among suggestions.
- Abstention quality: whether the system declines ambiguous cases appropriately.
- Negation and temporality accuracy: whether inactive or historical conditions are excluded correctly.
- Version consistency: whether results remain reproducible after terminology updates.
- Reviewer agreement and correction rate: indicators of workflow reliability.
- Latency and cost per record: important for claims and near-real-time use.
Set stricter thresholds for clinical decision support and payer submissions than for exploratory research. Never use a confidence score as a substitute for clinical validation.
Common failure modes
The most frequent errors are caused by context, not spelling. Brand-to-generic confusion, combination products, dosage forms, copied-forward diagnoses, negation, multilingual notes and code-set version drift can all produce plausible but incorrect results. ICD-10 specificity also matters: a broad code may be technically valid but unsuitable when the documentation supports a more precise code.
Protect patient data throughout the pipeline. Apply purpose limitation, least-privilege access, encryption, retention controls and audit trails. For Indian deployments, align the workflow with applicable health-sector requirements and the Digital Personal Data Protection framework, while confirming obligations with legal and compliance teams.
Implementation checklist
Before launch, confirm that you have:
- A documented coding purpose and target granularity.
- Versioned ATC and ICD-10 reference data.
- A terminology normalisation strategy for Indian brands and spelling variants.
- Rules for negation, temporality, uncertainty and active medication status.
- Human review for low-confidence and high-risk records.
- Evaluation sets representative of real documents and languages.
- Provenance, audit logs and rollback capability.
- Monitoring for terminology updates, drift and subgroup performance.
ATC ICD-10 code extraction works best as a governed data product, not a one-off AI experiment. Start with a narrow, measurable use case, establish a reviewed reference set, then expand coverage only when performance and clinical safety are demonstrated.