Skip to content

Move prevalence and incidence rates into figures (#229) - #146

Merged
KrishnaTO merged 1 commit into
mainfrom
claude/migrate-epidemiology-229
Oct 15, 2026
Merged

KrishnaTO merged 1 commit into
mainfrom
claude/migrate-epidemiology-229

Conversation

@KrishnaTO

Copy link
Copy Markdown
Owner

Since KrishnaTO/ARI-metadata-manager#236 (for KrishnaTO/ARI-metadata-manager#229), the editor reads prevalence and incidence as EpidemiologyProfile figures. This ontology still held the twelve flat fields, so the editor showed "No prevalence or incidence figures yet." for every disease. This PR is the data migration that #236 needs.

What changed

  • Ran the app's scripts/migrate_epidemiology.py on ontologies/ari_t1d.owl. Each flat rate became one figure linked by hasEpidemiologyProfile, holding the measure, the region, sex "All", the rate, and the year and sources that sat beside the rate.
  • 371 figures on 211 of the 228 diseases: 136 US prevalence, 165 worldwide prevalence, 26 US incidence, 44 worldwide incidence. That is one figure per flat rate.
  • The twelve flat properties and their declarations are removed. prevalenceValue (estimated US cases) stays on the disease.
  • Each migrated disease gets an ARI_ChangeLog line listing the rates it moved.

Checked

  • Loaded the migrated file with the app's OntologyService. Every disease's get_disease_detail()["epidemiology"] gives the counts above, and Type 1 diabetes shows 299.9 (US) and 150.0 (worldwide) /100k, the same as the old fields.
  • No *Per100k / *Year / *Source property elements are left. The old names appear only as text in earlier change-log entries.
  • python .github/scripts/validate_mappings.py --since origin/main: 0 errors, 0 warnings.

Not in this PR

notebook/master-list-comparison/import_prevalence.py, notebook/research-gaps/build_research_gaps.py and data/4-reports/README.md still use the flat property names. If import_prevalence.py is re-run unchanged, it writes fields the editor no longer reads. They need a follow-up.

🤖 Generated with Claude Code

The editor reads prevalence and incidence as EpidemiologyProfile figures
since KrishnaTO/ARI-metadata-manager#236, so every disease showed no
figures while the ontology still held the twelve flat rate/year/source
fields. Ran the app's scripts/migrate_epidemiology.py: 371 figures on 211
diseases, one per flat rate, with a change-log line on each disease. The
flat properties and their declarations are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KrishnaTO
KrishnaTO merged commit 6142016 into main Oct 15, 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