Skip to content

UI changes for ICD-10 multi-edition releases - #3194

Draft
rw251 wants to merge 30 commits into
mainfrom
icd-10-multi-edition-ui-changes-rebased
Draft

UI changes for ICD-10 multi-edition releases#3194
rw251 wants to merge 30 commits into
mainfrom
icd-10-multi-edition-ui-changes-rebased

Conversation

@rw251

@rw251 rw251 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The feature branch for all the UI changes required to support the new ICD-10 multi-edition release.

This includes:

  • Warning banners for the two situations where we want people to fix their codelists:
    • A codelist that contains a code from one edition, but not the equivalent code in the other edition
    • A codelist that contains a code whose definition has changed meaningfully between editions
  • Extra ICD-10 information in the "more info" pop up including:
    • Extra "rubrics" that give more information about the code
    • Dagger/asterisk information (a specific ICD-10 relationship)
    • Definition differences i.e. for codes with a changed description, we explain why and display both
  • Extending the search so that we make use of "inclusion rubrics" as synonyms

This branch should be merged at the same time that the new ICD-10 coding release is minted.

Comment thread userdocs/icd10-editions.md Outdated
Comment thread userdocs/icd10-editions.md
Comment thread userdocs/icd10-editions.md
rw251 and others added 20 commits September 2, 2026 10:03
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.
rw251 and others added 8 commits September 2, 2026 10:03
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.
- 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
Jongmassey force-pushed the icd-10-multi-edition-ui-changes-rebased branch from ae106a6 to 075bffd Compare September 2, 2026 10:04
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.

3 participants