-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
deck-scrubbingTech debt or other between-initiative tidy-up workTech debt or other between-initiative tidy-up work
Description
Why are we doing this?
Several areas for possible improvement to the documentation for the nhs refset upload were identified during a session with Katie. This will mean future developers will find updating the refsets easier. We should also tell people about the NHS drug refsets which are now available on OCL.
How will we know when it's done?
The docs are updated, a bug is fixed, and a platform news is created.
What are we doing?
- Add a short section in the
DEVELOPERS.mddoc signposting people to the help text in thecodelists/scripts/update_nhs_refsets.pyfile - Point 5 here should be removed as it is not correct anymore:
opencodelists/codelists/scripts/update_nhs_refsets.py
Lines 11 to 17 in c8dd73b
This script: 1. Fetches available releases from TRUD API 2. Identifies releases the same or newer than the current one 3. Downloads and extracts a particular release 4. Optionally filters to specific Cluster_IDs (refset IDs) if provided 5. Updates the configuration JSON with the new release date (if --live-run is set) 6. Runs the bulk import process with the new files - Put a bit of info early on explaining what the "dry run" is and that it is safe to run that locally, or against opencodelists.org.
- Create a prerequisites section to include:
- You need an account on TRUD
- On TRUD you need to subscribe to: https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/categories/1/items/659/releases
- You then need to get your
TRUD_API_KEYhere - You need to be a member of the "NHSD Primary Care Domain Refsets" org for the PCD refsets and the "NHS Drug Refsets" group for drug refsets (this is already in the help text - but mentioning for completeness)
- You need to have an API_KEY (this is also already in the help text)
- Add guidance that you should pick the most recent version to upload - the most up to date refsets are the most accurate, so if the latest in OCL is v8, and v9 and v10 are available, there's not much point uploading v9 AND v10 - just do v10
- This code assumes the DBs are in a particular location locally, but it should respect the
DATABASE_DIRenv variable that a dev might have set:opencodelists/codelists/scripts/bulk_import_codelists.py
Lines 375 to 380 in c8dd73b
db_path = ( Path(__file__).resolve().parent.parent.parent / "coding_systems" / coding_system_id / f"{release_db_alias}.sqlite3" ) - The methodology for the drug refsets is incorrect. The code below shows the text that should be displayed when a codelist uploaded with DM+D has codes not in the dictionary. For some reason the dmd specific branch was not called here, and the generic text was inserted instead of the dmd specific text:
opencodelists/codelists/actions.py
Lines 411 to 423 in c8dd73b
suggested_reason = ( "This may be because this codelist contains both clinical terms and " "medications. In which case you may need to create another codelist " "for the missing clinical/medication codes." ) if codelist.coding_system_cls.name == "dm+d": suggested_reason = ( "This may be because this codelist contains non-prescribable " "SNOMED codes, such as 108535009 - Product containing felodipine. " "As these are not prescribable, they are not in the dm+d dictionary " "but do sometimes appear in things like the NHS drug refsets." ) - Double check the NHS drug refsets to ensure they are accurate
- Create a platform news to publicise these new refsets. #2878
Metadata
Metadata
Assignees
Labels
deck-scrubbingTech debt or other between-initiative tidy-up workTech debt or other between-initiative tidy-up work