Skip to content

Correct the Multiple sclerosis OMOP concept, restore six lost IPEX judgments - #81

Merged
KrishnaTO merged 1 commit into
mainfrom
fix/ms-omop-and-lost-judgments
Sep 1, 2026
Merged

Correct the Multiple sclerosis OMOP concept, restore six lost IPEX judgments#81
KrishnaTO merged 1 commit into
mainfrom
fix/ms-omop-and-lost-judgments

Conversation

@KrishnaTO

Copy link
Copy Markdown
Owner

Answers the question "were any curated mappings removed?" — yes, six were, on one disease. It also corrects an error #78 introduced, which is the more urgent half.

1. Multiple sclerosis has the wrong OMOP concept on main, and that is my fault

OMOP Concept SNOMED code
374919 Multiple sclerosis 24700007
4027727 Systemic sclerosis, diffuse 128460000

The SSSOM rows for ARI:0001135 had these two verdicts swapped. ari.equivalencies.tsv had them the right way round. #78 found the two exports disagreeing, resolved it in favour of the SSSOM side, and did not check either concept's label — so main now stores the systemic sclerosis concept on Multiple sclerosis and has dropped the correct one.

The curator's own SNOMED verdicts settle it beyond doubt: they confirmed SNOMED 24700007 and flagged SNOMED 128460000. Those are exactly 374919 and 4027727. Their SNOMED judgments were right; only the OMOP pair was inverted, and #78 propagated the inversion instead of catching it.

Both exports and ARI_OMOP now say 374919.

The generalisable bit

A mapping row is not self-validating. I re-checked every stored OMOP concept against the SNOMED code it carries and the SNOMED codes its disease stores. Five more diseases hold an OMOP concept broader or narrower than their SNOMED one:

Disease Stored OMOP Concept
ARI:0001057 Bullous pemphigoid 139899 Pemphigoid
ARI:0001117 Juvenile Rheumatoid Arthritis 4259507 Juvenile idiopathic arthritis
ARI:0001138 Myocarditis due to autoimmune disease 321578 Acute rheumatic myocarditis
ARI:0001144 Neuromyotonia 46272949 Autosomal recessive axonal neuropathy…
ARI:0001196 Systemic lupus erythematosus 255891 Lupus erythematosus

These are pre-existing curation questions, not errors introduced here. Left for a curator — narrowing them is a judgment call, not a repair.

2. Six confirmations were lost on ARI:0001106 (IPEX)

AnjaliRH recorded nine judgments on 2026-08-03. 02938dd (4 Aug) wiped every row for the disease, and her next publish on the 7th restored four. These six never came back:

MONDO:0010580 · OMIM:304790 · ORPHA:37042 · mesh:C580192 · ncit:C131009 · umls:C0342288

Every one of those ids is still stored on the disease, and her changelog entry still names her confirming them — so the review page has been showing six cells as never reviewed when they had been. Restored with her original authorship and date.

This is the first confirmed loss of mapping rows rather than ontology records. #78 concluded the mapping set was additive, but only checked back to PR #69 (16 Aug); this loss predates that window.

3. umls:C0398650 on ARI:0001107

Stored, and named confirmed by AnjaliRH in a changelog entry from 2026-08-10, but no row was ever written. This creates the record that entry implies rather than restoring a deleted one — flagging the distinction because it is a different act.

What remains unjudged is deliberate

I audited every disease for the same shape — an id stored, or a changelog entry naming it, with no judgment in the mapping set. What is left is intentional: 11 ICD-9 codes whose rows the ICD-9 retirement removed on purpose, and one ARI:0003 entry whose row exists under the repaired MONDO:0014523 spelling.

One thing for a curator, not a fix

ARI:0001143 (Neuromyelitis optica) carries a changelog entry from 2026-08-27 confirming OMOP 4027727 — systemic sclerosis again, on a third disease. The mapping set holds the correct omop:380995, so the data is right and only the note is wrong. But the same wrong concept reaching two diseases in one session looks like a mis-click worth knowing about.

Verification

python .github/scripts/validate_mappings.py                     # 0 errors, 5 warnings
python .github/scripts/validate_mappings.py --since main        # 0 errors, 0 warnings

check_deletions passes: removing 4027727 from MS is justified by the Not row this PR flips it to.

Advances #23.

🤖 Generated with Claude Code

…dgments

OMOP 4027727 is "Systemic sclerosis, diffuse" (SNOMED 128460000). OMOP 374919
is "Multiple sclerosis" (SNOMED 24700007). The SSSOM rows for ARI:0001135 had
the two verdicts swapped, ari.equivalencies.tsv had them the right way round,
and #78 resolved that disagreement in favour of the SSSOM side without checking
either concept's label -- so main stored the systemic sclerosis concept on
Multiple sclerosis and had dropped the correct one. That was my error.

The curator's own SNOMED verdicts settle it: they confirmed 24700007 and
flagged 128460000, which are exactly 374919 and 4027727. Both exports and
ARI_OMOP now say 374919.

Re-checked every stored OMOP concept against the SNOMED code it carries. Five
diseases hold an OMOP concept broader or narrower than their SNOMED one; those
are pre-existing curation questions and are left alone.

Restored six confirmations on ARI:0001106 (IPEX). AnjaliRH recorded nine
judgments on 2026-08-03; 02938dd wiped every row for the disease on the 4th and
her next publish restored four. MONDO:0010580, OMIM:304790, ORPHA:37042,
mesh:C580192, ncit:C131009 and umls:C0342288 never came back, though every id is
still stored on the disease and her changelog entry still names them. This is
the first confirmed loss of mapping rows rather than ontology records -- #78
checked only back to PR #69, and the loss predates that window.

Added umls:C0398650 on ARI:0001107, which is stored and named confirmed in a
changelog entry but never had a row.

What remains unjudged is deliberate: 11 ICD-9 rows the retirement removed on
purpose, and one ARI:0003 entry whose row exists under the repaired spelling.

Audit: 0 errors, 5 warnings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@KrishnaTO
KrishnaTO merged commit 410e134 into main Sep 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant