Skip to content

Commit f39f214

Browse files
NRL-1050 Only allow snomed category systems
1 parent b8bdf72 commit f39f214

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

layer/nrlf/core/tests/test_validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ def test_validate_category_coding_invalid_system():
613613
}
614614
]
615615
},
616-
"diagnostics": "Invalid category system: http://snoooooomed/sctfffffg Category system must be either 'http://snomed.info/sct' or 'https://nicip.nhs.uk'",
616+
"diagnostics": "Invalid category system: http://snoooooomed/sctfffffg Category system must be 'http://snomed.info/sct'",
617617
"expression": ["category[0].coding[0].system"],
618618
}
619619

layer/nrlf/core/validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,11 @@ def _validate_category(self, model: DocumentReference):
431431
return
432432

433433
coding = model.category[0].coding[0]
434-
if coding.system not in ["http://snomed.info/sct", "https://nicip.nhs.uk"]:
434+
if coding.system != "http://snomed.info/sct":
435435
self.result.add_error(
436436
issue_code="value",
437437
error_code="INVALID_RESOURCE",
438-
diagnostics=f"Invalid category system: {coding.system} Category system must be either 'http://snomed.info/sct' or 'https://nicip.nhs.uk'",
438+
diagnostics=f"Invalid category system: {coding.system} Category system must be 'http://snomed.info/sct'",
439439
field="category[0].coding[0].system",
440440
)
441441
return

0 commit comments

Comments
 (0)