Skip to content

Commit 5d976a5

Browse files
NRL-1050 Only allow snomed category systems
1 parent 36abc2c commit 5d976a5

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
@@ -419,11 +419,11 @@ def _validate_category(self, model: DocumentReference):
419419
return
420420

421421
coding = model.category[0].coding[0]
422-
if coding.system not in ["http://snomed.info/sct", "https://nicip.nhs.uk"]:
422+
if coding.system != "http://snomed.info/sct":
423423
self.result.add_error(
424424
issue_code="value",
425425
error_code="INVALID_RESOURCE",
426-
diagnostics=f"Invalid category system: {coding.system} Category system must be either 'http://snomed.info/sct' or 'https://nicip.nhs.uk'",
426+
diagnostics=f"Invalid category system: {coding.system} Category system must be 'http://snomed.info/sct'",
427427
field="category[0].coding[0].system",
428428
)
429429
return

0 commit comments

Comments
 (0)