From 8b8890143ec8f1435e072315dacd0a5b583c139a Mon Sep 17 00:00:00 2001 From: mattdean3-nhs Date: Tue, 5 May 2026 16:52:05 +0100 Subject: [PATCH 1/2] Merge pull request #1215 from NHSDigital/bugfix/made14-NRL-2209-remove-nrlf-converter-dep NRL-2209 Remove nrlf-converter dependency --- layer/poetry.lock | 7 +++++++ poetry.lock | 17 +---------------- pyproject.toml | 1 - 3 files changed, 8 insertions(+), 17 deletions(-) create mode 100644 layer/poetry.lock diff --git a/layer/poetry.lock b/layer/poetry.lock new file mode 100644 index 000000000..44d9133c3 --- /dev/null +++ b/layer/poetry.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. +package = [] + +[metadata] +lock-version = "2.1" +python-versions = "^3.12" +content-hash = "34e39677d8527182346093002688d17a5d2fc204b9eb3e094b2e6ac519028228" diff --git a/poetry.lock b/poetry.lock index a4d2aa37c..4baff5618 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1916,21 +1916,6 @@ files = [ [package.dependencies] setuptools = "*" -[[package]] -name = "nrlf-converter" -version = "0.0.9" -description = "NHS Clinicals Record Locator Document Pointer to HL7 FHIR R4 DocumentReference conversion" -optional = false -python-versions = ">=3.8,<4.0" -groups = ["dev"] -files = [ - {file = "nrlf_converter-0.0.9-py3-none-any.whl", hash = "sha256:3d525df8507cd517ee5638d880973f650e960afd22be4f33b97ba2f17c5c3a56"}, -] - -[package.source] -type = "url" -url = "https://github.com/NHSDigital/nrlf-converter/releases/download/0.0.9/nrlf_converter-0.0.9-py3-none-any.whl" - [[package]] name = "numpy" version = "1.26.4" @@ -2866,4 +2851,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.12" -content-hash = "5dae7ea7c661330bf546c80bfcd25a766c3c60616c30bddbef1375452165f389" +content-hash = "e11a61eff18b35eeb87cbad1d214904c0ed543dd74ba2abfbc64bc38107921c0" diff --git a/pyproject.toml b/pyproject.toml index 3b207d4ab..64b7e7f1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,6 @@ pydantic-settings = "^2.5.2" [tool.poetry.group.dev.dependencies] layers = {path = "layer", develop = true} -nrlf-converter = {url = "https://github.com/NHSDigital/nrlf-converter/releases/download/0.0.9/nrlf_converter-0.0.9-py3-none-any.whl"} pytest = "^8.4.1" pytest-mock = "^3.12.0" pytest-cov = "^5.0.0" From 9858a9ed1d2a041e9e60415a065bb4785d5b0859 Mon Sep 17 00:00:00 2001 From: Matt Dean Date: Tue, 5 May 2026 18:52:05 +0100 Subject: [PATCH 2/2] NRL-2209 Fix SONAR warning about snomed URLs --- layer/nrlf/core/constants.py | 5 ++++- layer/nrlf/core/validators.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/layer/nrlf/core/constants.py b/layer/nrlf/core/constants.py index a54d962c5..dc602a152 100644 --- a/layer/nrlf/core/constants.py +++ b/layer/nrlf/core/constants.py @@ -711,7 +711,10 @@ def coding_value(self): } -SYSTEM_SHORT_IDS = {"http://snomed.info/sct": "SCT", "https://nicip.nhs.uk": "NICIP"} +SYSTEM_SHORT_IDS = { + "http://snomed.info/sct": "SCT", # NOSONAR (S5332) Not a URL + "https://nicip.nhs.uk": "NICIP", +} CONTENT_STABILITY_EXTENSION_URL = ( "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability" ) diff --git a/layer/nrlf/core/validators.py b/layer/nrlf/core/validators.py index e213c5bfe..eb00977a2 100644 --- a/layer/nrlf/core/validators.py +++ b/layer/nrlf/core/validators.py @@ -351,7 +351,10 @@ def _validate_type(self, model: DocumentReference): return coding = model.type.coding[0] - if coding.system not in ["http://snomed.info/sct", "https://nicip.nhs.uk"]: + if coding.system not in [ + "http://snomed.info/sct", + "https://nicip.nhs.uk", # NOSONAR (S5332) Not a URL + ]: self.result.add_error( issue_code="business-rule", error_code="UNPROCESSABLE_ENTITY",