Skip to content

Commit 0dbaa12

Browse files
NRL-1050 Only allow snomed category systems
1 parent 966d2d1 commit 0dbaa12

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
@@ -612,7 +612,7 @@ def test_validate_category_coding_invalid_system():
612612
}
613613
]
614614
},
615-
"diagnostics": "Invalid category system: http://snoooooomed/sctfffffg Category system must be either 'http://snomed.info/sct' or 'https://nicip.nhs.uk'",
615+
"diagnostics": "Invalid category system: http://snoooooomed/sctfffffg Category system must be 'http://snomed.info/sct'",
616616
"expression": ["category[0].coding[0].system"],
617617
}
618618

layer/nrlf/core/validators.py

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

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

0 commit comments

Comments
 (0)