Large Language Model–Based Classification of ICD-10-CM to SNOMED Mappings
for Improved Semantic Fidelity in OHDSI
Dmytro Dymshyts · Anna Ostropolets · Martijn Schuemie
Concept mapping in OHDSI can lose or corrupt clinical meaning when source and target terminologies don't align perfectly. LLMs are proposed as a solution to define the type of semantic equivalence of mappings.
ICD-10-CM was designed for administrative billing, while SNOMED CT is a clinical ontology. The same condition can be described at different levels of specificity in each vocabulary.
Cohort definitions over- or under-include patients when mappings are not semantically equivalent.
Phenotyping algorithms inherit vocabulary biases, affecting reproducibility across data sources.
Federated analyses require consistent semantics — non-equal mappings introduce silent confounding.
Use LLMs to automatically classify existing mappings by semantic equivalence type. Non-equal mappings can then be replaced with better-fitting SNOMED CT targets.
SNOMED CT targets and synonyms fetched from a Databricks-hosted OMOP vocabulary database. Canonical names prioritised over synonyms via if_concept_name flag. No LLM calls in this step.
In ICD-10 "and" is replaced by "or" (with some exceptions) — in ICD-10 a coordinating "and" usually means "and/or", so treating it as "or" preserves the intended broader concept rather than falsely narrowing it.
Gate regexp — names sent to LLM only if they contain:
GPT-4o normalisation prompt (single-turn):
Source–target pairs compared as bag-of-words (sorted word multisets). A match assigns equal / high confidence without any LLM call.
Each name yields up to 6 normalised variants. A match in any source–target combination resolves the pair without an LLM call.
Examples:
"Iodine-deficiency" ↔ "Iodine deficiency"
"Non-toxic" ↔ "Nontoxic"
| Label | Definition |
|---|---|
| equal | Same clinical condition, or one is the only available subtype. e.g. "Clonic hemifacial spasm" = "Hemifacial spasm" |
| uphill | Target more general — source has features absent in target. |
| downhill | Target more specific — target adds features absent in source. |
| up&downhill | Both: source drops AND target adds clinically meaningful features. |
| incorrect | Different conditions — different disorder family or no semantic overlap. |
① Adjectives hypertensive, diabetic ≡ "due to" / "caused by"
② ~itis = inflammation of; ~osis = disorder of
③ Synonyms: kidney = renal; word order doesn't change meaning
④ Preserve: body site, laterality, severity, stage, acuity, etiology
⑤ Use incorrect ONLY for clinically different diseases
Results cached by (source, target) pair — identical pairs classified once.
Once any target is labelled equal, all remaining candidates are skipped.
Pairs with low or moderate confidence undergo up to two additional LLM calls.
GPT-o3 assigns label + high/moderate/low confidence. High → done. Low/moderate → Call 2.
Original prompt reissued. Majority vote across 3 calls decides final label.
All non-incorrect targets agree, or ≥1 target labelled equal. Ready to use in OHDSI.
Concepts with conflicting target labels. Require manual review before use.
Distribution of classification labels across 715 ICD-10-CM F chapter 1:1 mappings
Expert review: 17 labels corrected — model confused harmful use vs abuse vs disorder related to use of psychoactive substance.
① Re-running the model several times on the same subset — expecting consistent results.
② Review by a medical professional across all classified pairs.
| Code | Original source name | Normalised name | SNOMED target | Step 1 | Conf 1 | Step 2 | Conf 2 | Step 3 | Conf 3 | Final label | Conf | Method |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G02 | Meningitis in other infectious and parasitic diseases classified elsewhere | Meningitis in infectious or parasitic diseases | Infective meningitis | equal | mod | equal | high | — | — | equal | high | LLM (validated) |
| G04.00 | Acute disseminated encephalitis and encephalomyelitis, unspecified | Acute disseminated encephalitis or encephalomyelitis | Acute disseminated encephalomyelitis | — | — | — | — | — | — | equal | high | LLM |
| G04.01 | Postinfectious acute disseminated encephalitis and encephalomyelitis (postinfectious ADEM) | Postinfectious acute disseminated encephalitis or encephalomyelitis (postinfectious ADEM) | Acute disseminated encephalomyelitis following infectious disease | downhill | mod | downhill | mod | — | — | downhill | mod | LLM (validated) |
| G05.3 | Encephalitis and encephalomyelitis in diseases classified elsewhere | Encephalitis or encephalomyelitis | Encephalitis, myelitis and encephalomyelitis | — | — | — | — | — | — | uphill | high | LLM |
| G12.1 | Other inherited spinal muscular atrophy | Inherited spinal muscular atrophy | Spinal muscular atrophy | uphill | mod | equal | mod | uphill | high | equal | high | LLM (tiebreak) |
| G31.09 | Other frontotemporal neurocognitive disorder | Frontotemporal neurocognitive disorder | Frontotemporal dementia | — | — | — | — | — | — | equal | high | LLM |
| G31.83 | Neurocognitive disorder with Lewy bodies | Neurocognitive disorder with Lewy bodies | Senile dementia of the Lewy body type | downhill | mod | equal | mod | equal | high | equal | high | LLM (tiebreak) |
| G31.84 | Mild cognitive impairment of uncertain or unknown etiology | Mild cognitive impairment of uncertain or unknown etiology | Minimal cognitive impairment | equal | mod | equal | mod | — | — | equal | mod | LLM (validated) |
| G40.219 | Localization-related (focal) symptomatic epilepsy with complex partial seizures, intractable, without status epilepticus | Localization-related epilepsy or epileptic syndromes with complex partial seizures, intractable | Focal epilepsy | — | — | — | — | — | — | uphill | high | LLM |
| G40.5 | Epileptic seizures related to external causes | Epileptic seizures related to external causes | Epileptic seizure | — | — | — | — | — | — | uphill | high | LLM |
| G40.8 | Other epilepsy and recurrent seizures | Epilepsy or recurrent seizures | Epilepsy | downhill | mod | equal | mod | equal | mod | equal | mod | LLM (tiebreak) |
| G40.824 | Epileptic spasms, intractable, without status epilepticus | Epileptic spasms, intractable | Refractory infantile spasms | — | — | — | — | — | — | downhill | high | LLM |
| G04.3 | Acute necrotizing hemorrhagic encephalopathy | Acute necrotizing hemorrhagic encephalopathy | Acute hemorrhagic leukoencephalitis | — | — | — | — | — | — | incorrect | high | LLM |
| G40.11 | Localization-related (focal) symptomatic epilepsy with simple partial seizures, intractable | Localization-related epilepsy or epileptic syndromes with simple partial seizures, intractable | Focal onset aware epileptic seizure | — | — | — | — | — | — | incorrect | high | LLM |
| G40.A0 | Absence epileptic syndrome, not intractable | Absence epileptic syndrome, not intractable | Absence seizure | uphill | mod | incorrect | high | incorrect | mod | incorrect | high | LLM (tiebreak) |
| G43.B0 | Ophthalmoplegic migraine, not intractable | Ophthalmoplegic migraine, not intractable | Recurrent painful ophthalmoplegic neuropathy | uphill | mod | uphill | high | — | — | uphill | high | LLM (validated) |
Automation is feasible. 97.6% of the F chapter classified automatically — only 6 mappings required manual review.
Most mappings are equal. 71.3% (510/715) of ICD-10-CM F chapter 1:1 mappings are semantically equivalent to SNOMED CT targets.
Substance use is hard. Model confused harmful use vs abuse vs disorder related to psychoactive substance — 17 labels corrected after expert review.
Reproducibility confirmed. Re-running the model on the same subset produced consistent results.