Add the ICD-10 warning banners - #3151
Merged
rw251 merged 12 commits intoJul 21, 2026
Merged
Conversation
Codes that move were found from this report (https://github.com/bennettoxford/icd-browser-scraper/blob/main/claml/2016-vs-2019.md).
rw251
force-pushed
the
rw/icd-10-warning-banners
branch
from
July 17, 2026 07:54
83c3b78 to
66eecd0
Compare
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.
rw251
force-pushed
the
rw/icd-10-warning-banners
branch
from
July 17, 2026 08:34
66eecd0 to
8e2a599
Compare
Jongmassey
approved these changes
Jul 21, 2026
Jongmassey
left a comment
Contributor
There was a problem hiding this comment.
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
- Make clear that it's the WHO 2016 rubrics that are the base - change "resolved_use" to resolved_rubrics
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.
Fixes #3123. Fixes #3124