UI changes for ICD-10 multi-edition releases - #3194
Draft
rw251 wants to merge 30 commits into
Draft
Conversation
This was referenced Aug 11, 2026
jspickering
reviewed
Aug 25, 2026
jspickering
reviewed
Aug 25, 2026
jspickering
reviewed
Aug 25, 2026
Codes that move were found from this report (https://github.com/bennettoxford/icd-browser-scraper/blob/main/claml/2016-vs-2019.md).
Pass icd10_term_differences and icd10_moved_codes to the front end for use in the warning banners. We do this in the builder (views.py->draft.html) and in the codelist viewer django templates (version.py->version.html).
ICD10TermDifferences and ICD10MovedCodes describe the data being injected into the django templates (for the viewer and the builder). Various other types and helpers added to icd10-warning-indicators.ts. These are required for the CodelistWarning React component that we will build (in the next commit!)
Contains both possible ICD-10 warnings in a single React component.
We load the relevant data from the page, pass it to the CodelistBuilder, and render the CodelistWarning above the tabs in the builder component
We pass the relevant data down the React tree: CodelistBuilder > CodelistTab > Container > Section > Tree > Row. Displays an inline warning in any code rows in the tree view that are triggering the main warning banners. We'll style in a later commit. This came from user feedback that in a large tree you may not realise a warning banner has appeared at the top.
We load the same react component in the codelist viewer template (version.py/version.html). This avoids creating a duplicate component in this non-react part of the app.
E.g. "Causalgia" now returns G906 as the term only appears in its inclusion rubric and not in the main term "Complex regional pain syndrome type II"
We need to pick a single definition to display to users. Prefer the NHS 2016 edition because most codelists are likely to be used with hospital admissions data, falling back to another available edition when a code has no 2016 definition. Use row_number ordered by edition ID. The current import contains the 2016 and 2019 editions, so this selects 2016 where present and 2019 otherwise.
The synonym and reference lookups are only called by the more info modal and are often specific to individual coding systems. Consolidate them behind a single lookup_more_info method that each coding system can implement as needed.
Use a custom QuerySet and Manager for ConceptRubric to encapsulate the logic of prioritising the 2016 (NHS) ICD-10 edition for rubrics. This uses a row_number window function in the db and relies on the fact that 2016 sorts higher than 2019. Where there exist rubrics in the 2016 edition, take all rubrics from that edition. Sets of rubrics in a given edition should be considered a consistent set of instructions and we should not mix instructions from editions. This change does this by using dense ranking rather than row numbering, such that all rubrics of the same edition get the same ranking.
Wrap ICD-10 rubric information in a box explaining that it is primarily intended for clinical coders. Display definition, note, and text rubrics in italics, concept rubrics in a Concept card, and modifier rubrics in a separate Modifier card.
Display clinically equivalent descriptions in a green information box and clinically different descriptions in a red warning box.
This ADR details the decision to add a management command to apply database migrations to all coding system release databases. This is deemed necessary to enable changes to coding system models to be made effectively and reliably. This currently applies only to the ICD-10 coding system.
Changes to * model * coding system interface * load process * builder and CodelistVersion views Documents
Add guidance and screenshots explaining edition differences and warning states. Update the test fixture so functional tests can generate screenshots showing real problematic codes.
Also update the screenshots
- fix a typo in the nhs link to X59 - standardise all references to "deaths data" to "ONS deaths" - add a short bit about when the change happened and what OCL supported previously
Jongmassey
force-pushed
the
icd-10-multi-edition-ui-changes-rebased
branch
from
September 2, 2026 10:04
ae106a6 to
075bffd
Compare
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.
The feature branch for all the UI changes required to support the new ICD-10 multi-edition release.
This includes:
This branch should be merged at the same time that the new ICD-10 coding release is minted.