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.
Since #469 there's been a bit of an issue with preprocessing. Namely, it wasn't ignoring
UKClinicalRefsetsRF2
as it should have done.I have made the necessary change.
The other small QoL change this PR introduces is the OPCS4 refset ID. Since end of 2023 the refset ID for OCS4 mappings is different. But the default had been the old ID. This PR reversed that logic and has the new refset ID as a default rather than the old one and changes to the old one if/when needed.
And the third thing that was problematic was checking of extension (e.g UK/UK Drug) outside the loop since extensions are now handled automatically and can change while iterating over them in a bundle.
To ensure this all works exactly as it should I ran a test on Snomed UK Clinical Edition and Drug Extension releases with both the old version (i.e one available with medcat 1.12) and this version. And the results were identical in terms of:
Snomed.to_concept_df
Snomed.map_snomed2icd10
Snomed.map_snomed2opcs4
Snomed.relationship2json
with relationship code"116680003"
(ISA relationships)