Add required terminology bindings from full-data binding analysis#2
Open
fhnaumann wants to merge 7 commits into
Open
Add required terminology bindings from full-data binding analysis#2fhnaumann wants to merge 7 commits into
fhnaumann wants to merge 7 commits into
Conversation
…ICD-9-CM/ICD-10-CM Bind Condition.code to a new mimic-diagnosis ValueSet composed of standard http://hl7.org/fhir/sid/icd-9-cm (FY2012) and icd-10-cm (FY2016-FY2019 + FY2024) content, matching the migrated MIMIC-on-FHIR data where all 5.66M Condition codings were rewritten to the standard systems with pinned versions (zero residual custom-system codings). - Add ValueSet mimic-diagnosis and switch SD_MimicCondition binding to it - Retire the superseded mimic-diagnosis-icd ValueSet and the mimic-diagnosis-icd9/icd10 CodeSystems (kept for provenance) - Update Condition examples to standard dotted codes with pinned versions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Plain copy (no history) of the ICD CodeSystem/ValueSet build scripts into scripts/terminology-build/. The macOS-only textutil RTF conversion is replaced with pure-Python striprtf (pinned via uv), verified byte-identical against the previously generated CodeSystem-icd-9-cm-2012.json. Large generated CodeSystems (~36 MB each) are gitignored and will be published as GitHub release assets; only the small ValueSet-mimic-diagnosis.json is committed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nerated files - scripts/icd-migration/: check/migrate scripts, display-map.json (the committed relabel/version-pin decision record), evidence artifacts (migration-report.json moved here from repo root, unmapped/validation CSVs), and verify_migration.py (renamed from tmp_verify_migration.py -- it is the independent row-by-row verifier for the migration, kept as the stage's verification step). - _genonce.sh: CSIRO Ontoserver as -tx terminology server with the velonto truststore; _build.sh + .python-version committed; Windows .bat scripts and generated .index.db / transformed_data/ gitignored. - template-kindlab .index.json churn from the newer publisher committed so rebuilds leave a clean tree; main.py hello-world stub deleted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Scripts read ONTOSERVER_URL / ICD_SOURCE_DIR / MIMIC_WAREHOUSE as defaults (CLI flags still override); .env.example documents the set. - Terminology builds no longer upload by default: upload only runs when a server is configured, and check_icd_codes.py errors out without one. - input-manifest.json pins SHA-256 of the exact ICD source files the committed CodeSystems were generated from (only the files that influence output), plus the MIMIC data fingerprint; verify_inputs.py checks a local copy against it. - Makefile: one target per stage (verify-inputs, terminology, deploy-terminology, ig, check-codes, migrate, verify-migration). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Consolidates NOTES.md and MODIFICATION_PLAN.md (deleted) into one authoritative document: pipeline DAG with the laptop/HPC-node boundary, env-var configuration, toolchain versions, per-stage commands and verification, provenance narrative (binding analysis D1-D4, Condition.code migration incl. false-flag relabels, version history to 1.4.0-csiro), one-time analysis scripts with manual invocations, release/rebuild procedure, and known caveats (velonto truststore recipe, unpinned publisher, ICD-10-CM 2024 sourced outside this repo). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
johngrimes
added a commit
that referenced
this pull request
Jul 17, 2026
Merges #2 (fhnaumann:terminology-bindings) into velonto. # Conflicts: # .gitignore # README.md # input/resources/CodeSystem-mimic-diagnosis-icd10.json # input/resources/CodeSystem-mimic-diagnosis-icd9.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds required terminology bindings derived from a full-data binding analysis of the MIMIC dataset, and migrates Condition.code from the custom MIMIC ICD CodeSystems to standard ICD-9-CM/ICD-10-CM.
Changes
Terminology bindings (commit 1)
ValueSet-mimic-medication-with-unknownand supporting ValueSet/CodeSystem/alias updates.scripts/binding-analysis/— the analysis pipeline and reports (distinct codes, cross-check, findings) used to derive the bindings.Condition code migration (commit 2)
ValueSet-mimic-diagnosiscomposed of standardhttp://hl7.org/fhir/sid/icd-9-cm(FY2012) andhttp://hl7.org/fhir/sid/icd-10-cm(FY2016–FY2019 + FY2024) content;MimicCondition.codenow binds to it instead of the custommimic-diagnosis-icdValueSet.mimic-diagnosis-icdValueSet andmimic-diagnosis-icd9/icd10CodeSystems are markedretired(kept for provenance).Verification
sushi .compiles cleanly: 0 Errors, 0 Warnings (25 profiles, 2 extensions, 9 ValueSets, 29 instances).Supersedes #1, which inadvertently also included unmerged commits from the
_validation_fixesbranch.🤖 Generated with Claude Code