Skip to content

Add condition_extension: conditions MONDO lacks, each under its MONDO node - #62

Draft
jdkent wants to merge 3 commits into
mainfrom
feat/condition-extension-vocabulary
Draft

jdkent wants to merge 3 commits into
mainfrom
feat/condition-extension-vocabulary

Conversation

@jdkent

@jdkent jdkent commented Nov 27, 2026

Copy link
Copy Markdown
Member

Adds condition_extension to the vocabulary manifest: conditions the corpus names that MONDO has no node for, each under the MONDO node it falls under. Its one term is mild cognitive impairment, under MONDO:0002039 cognitive disorder. The linker change is neurostuff/pondie#37.

Draft until neurostuff/pondie#37 merges. The source is pinned to #37's head (d561931), and moves to its merge commit before this merges. Pin merge commits only.

The entry

  • Source: pondie's pondie/vocabularies/curated/condition-extension.tsv at the pinned commit, with its sha256 (checked against the file GitHub serves at that commit). This is how canonical_task sources ns-pond's inventory.
  • hierarchy: kind field, field mondo_parent, parent vocabulary mondo.
  • values: ["mild_cognitive_impairment"]. id_form: <snake_case condition>.
  • legacy_vocabularies: ["condition_extension"]. A new vocabulary has no pre-rename string, but the model requires at least one, so it lists the string pondie writes.

How it's used

For an MCI head the normalizer writes two entries:

  • a mondo entry naming MONDO:0002039 with rollup: true, so a MONDO search and its descendant expansion find the group;
  • a condition_extension entry naming mild_cognitive_impairment.

Neurostore builds a vocabulary's ancestors within its own release, so a separate release couldn't place MCI under a MONDO node. The MONDO entry carries the rollup, and this vocabulary needs no download. When MONDO adds a term, the term leaves this vocabulary.

Also

  • Normalization.vocabulary's description lists the new name (extraction-evidence.yaml), with the generated models/extraction.py and jsonschema/extraction-record.schema.json regenerated. tools/generate_models.py --check passes.
  • The README's vocabularies paragraph names it.
  • tests/test_vocabularies.py lists it and checks it falls under MONDO.

Checks

In a fresh venv with CI's install (pip install ".[test,generate,layouts,parquet]" jsonschema): pytest gave 322 passed, 1 skipped (building a wheel needs setuptools, already skipped before this change).

After this

  • pondie pins this commit.
  • Neurostore adds condition_extension to MEDICAL_CONDITION_VOCABULARIES in ingest/analysis_features.py and bumps its study_schema pin.
  • ns-pond bumps both pins.

🤖 Generated with Claude Code

jdkent and others added 3 commits November 27, 2026 12:32
… node

The manifest gains `condition_extension`, the conditions the corpus names that MONDO has no node
for, sourced from pondie's `curated/condition-extension.tsv`. Its one term is mild cognitive
impairment, under MONDO:0002039 cognitive disorder (`hierarchy`: the term's `mondo_parent`). The
normalizer writes a `mondo` entry for that parent with `rollup: true` beside it, so a MONDO search
finds the group without this vocabulary.

Pinned to neurostuff/pondie#37's head; to be repinned to its merge commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both vocabulary lists in Normalization.vocabulary's description:
condition_extension from this branch, ConditionRole and RiskBasis from #63.
Generated models regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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