Skip to content

Add the ICD-10 warning banners - #3151

Merged
rw251 merged 12 commits into
icd-10-multi-edition-ui-changesfrom
rw/icd-10-warning-banners
Jul 21, 2026
Merged

rw251 merged 12 commits into
icd-10-multi-edition-ui-changesfrom
rw/icd-10-warning-banners

Conversation

@rw251

@rw251 rw251 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #3123. Fixes #3124

@rw251
rw251 force-pushed the rw/icd-10-warning-banners branch from 83c3b78 to 66eecd0 Compare July 17, 2026 07:54
rw251 added 8 commits July 17, 2026 09:30
There are some rubrics that differ between the 2016 WHO claml and the 2016 NHS. When merging we want to use the NHS one. This adds a lookup containing the original WHO rubrics, and the changes that need to be applied.

Also added a `_check_rubrics()` method to confirm that the rubrics found for WHO 2016 match what we have in the lookup to give assurance that the rubrics we're replacing are the ones we think they are.
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.
Add the style for the warning banner (base.css so it works in builder and viewer), and for the inline row warning (_builder.css as only needed in the builder)
@rw251
rw251 force-pushed the rw/icd-10-warning-banners branch from 66eecd0 to 8e2a599 Compare July 17, 2026 08:34
Base automatically changed from icd-10-multi-editions to main July 17, 2026 11:05

@Jongmassey Jongmassey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT it works fine, I can't review the minutiae of the typescript very well but I've got some nits and some architectural thoughts

Comment thread coding_systems/icd10/known_diffs.py
Comment thread coding_systems/icd10/known_diffs.py Outdated
Comment thread coding_systems/icd10/tests/test_known_diffs.py
Comment thread coding_systems/icd10/known_diffs.py Outdated
Comment thread coding_systems/icd10/known_diffs.py Outdated
Comment thread coding_systems/icd10/known_diffs.py Outdated
Comment thread coding_systems/icd10/known_diffs.py
Comment thread builder/tests/test_views.py
@rw251
rw251 changed the base branch from main to icd-10-multi-edition-ui-changes July 21, 2026 11:45
rw251 added 3 commits July 21, 2026 12:49
- Make clear that it's the WHO 2016 rubrics that are the base
- change "resolved_use" to resolved_rubrics
@rw251
rw251 merged commit 8c7d7e1 into icd-10-multi-edition-ui-changes Jul 21, 2026
6 checks passed
@rw251
rw251 deleted the rw/icd-10-warning-banners branch July 21, 2026 13:57
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.

2 participants