fix: update ICD10CM prefix expansion to icd10data.com#1264
Conversation
purl.bioontology.org redirects are unreliable; switch to icd10data.com search URL for better user experience when following ICD10CM links. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for monarch-app canceled.
|
Code ReviewThis is a small, well-scoped fix. The change is correct and addresses a real problem. A few observations: What's good
Missing test coveragetest_curie_service.py has no test case for ICD10CM expansion. This prefix has now been overridden twice (icd.codes -> purl.bioontology.org -> icd10data.com), which suggests it is worth locking in with a regression test. The existing parameterized test structure makes this easy to add: Stale fixture databackend/tests/fixtures/object_formatted.py (lines 487, 501) and YAML snippets in that same file (lines 1078, 1550) still reference https://icd.codes/icd10cm/G71.0 -- the original upstream default from prefixmaps, which predates both URL overrides. If any test compares dynamically-generated ICD10CM URLs against these fixture values they would fail. Worth verifying whether those fixtures are used in URL-asserting tests or are purely structural snapshots. Minor: search page vs. direct linkThe resulting URL lands users on a search results page rather than directly on the code definition page. That is an acceptable tradeoff given that prefix expansion only concatenates a base URI with the local ID (you cannot embed the full hierarchical path like /ICD10CM/Codes/G00-G99/G70-G73/G71-/G71.0). The search approach is a practical workaround. Overall this is a reasonable fix for a broken URL. Adding a test case to test_curie_service.py before merging would guard against future drift, but it is not a blocker. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1264 +/- ##
=======================================
Coverage 73.52% 73.52%
=======================================
Files 95 95
Lines 3418 3418
=======================================
Hits 2513 2513
Misses 905 905 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
purl.bioontology.orgtohttps://www.icd10data.com/search?s=for more reliable and user-friendly ICD10CM code lookupsTest plan
🤖 Generated with Claude Code