Skip to content

Commit 3670d39

Browse files
committed
S5332
1 parent 0b0f532 commit 3670d39

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

backend/src/models/fhir_immunization_pre_validators.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def pre_validate_vaccination_procedure_code(self, values: dict) -> dict:
591591
(legacy CSV field name: VACCINATION_PROCEDURE_CODE) exists, then it is a non-empty string
592592
"""
593593
url = "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-" + "VaccinationProcedure"
594-
system = "http://snomed.info/sct"
594+
system = Urls.snomed
595595
field_type = "code"
596596
field_location = generate_field_location_for_extension(url, system, field_type)
597597
try:
@@ -608,7 +608,7 @@ def pre_validate_vaccination_procedure_display(self, values: dict) -> dict:
608608
(legacy CSV field name: VACCINATION_PROCEDURE_TERM) exists, then it is a non-empty string
609609
"""
610610
url = "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-" + "VaccinationProcedure"
611-
system = "http://snomed.info/sct"
611+
system = Urls.snomed
612612
field_type = "display"
613613
field_location = generate_field_location_for_extension(url, system, field_type)
614614
try:
@@ -624,7 +624,7 @@ def pre_validate_vaccination_situation_code(self, values: dict) -> dict:
624624
(legacy CSV field name: VACCINATION_SITUATION_CODE) exists, then it is a non-empty string
625625
"""
626626
url = "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-VaccinationSituation"
627-
system = "http://snomed.info/sct"
627+
system = Urls.snomed
628628
field_type = "code"
629629
field_location = generate_field_location_for_extension(url, system, field_type)
630630
try:
@@ -640,7 +640,7 @@ def pre_validate_vaccination_situation_display(self, values: dict) -> dict:
640640
(legacy CSV field name: VACCINATION_SITUATION_TERM) exists, then it is a non-empty string
641641
"""
642642
url = "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-VaccinationSituation"
643-
system = "http://snomed.info/sct"
643+
system = Urls.snomed
644644
field_type = "display"
645645
field_location = generate_field_location_for_extension(url, system, field_type)
646646
try:
@@ -719,7 +719,7 @@ def pre_validate_disease_type_coding_codes(self, values: dict) -> dict:
719719
Pre-validate that, if protocolApplied[0].targetDisease[{i}].coding[?(@.system=='http://snomed.info/sct')].code
720720
exists, then it is a non-empty string
721721
"""
722-
url = "http://snomed.info/sct"
722+
url = Urls.snomed
723723
try:
724724
for i in range(len(values["protocolApplied"][0]["targetDisease"])):
725725
field_location = f"protocolApplied[0].targetDisease[{i}].coding[?(@.system=='{url}')].code"
@@ -778,7 +778,7 @@ def pre_validate_site_coding_code(self, values: dict) -> dict:
778778
Pre-validate that, if site.coding[?(@.system=='http://snomed.info/sct')].code
779779
(legacy CSV field name: SITE_OF_VACCINATION_CODE) exists, then it is a non-empty string
780780
"""
781-
url = "http://snomed.info/sct"
781+
url = Urls.snomed
782782
field_location = f"site.coding[?(@.system=='{url}')].code"
783783
try:
784784
site_coding_code = [x for x in values["site"]["coding"] if x.get("system") == url][0]["code"]
@@ -791,7 +791,7 @@ def pre_validate_site_coding_display(self, values: dict) -> dict:
791791
Pre-validate that, if site.coding[?(@.system=='http://snomed.info/sct')].display
792792
(legacy CSV field name: SITE_OF_VACCINATION_TERM) exists, then it is a non-empty string
793793
"""
794-
url = "http://snomed.info/sct"
794+
url = Urls.snomed
795795
field_location = f"site.coding[?(@.system=='{url}')].display"
796796
try:
797797
field_value = [x for x in values["site"]["coding"] if x.get("system") == url][0]["display"]
@@ -812,7 +812,7 @@ def pre_validate_route_coding_code(self, values: dict) -> dict:
812812
Pre-validate that, if route.coding[?(@.system=='http://snomed.info/sct')].code
813813
(legacy CSV field name: ROUTE_OF_VACCINATION_CODE) exists, then it is a non-empty string
814814
"""
815-
url = "http://snomed.info/sct"
815+
url = Urls.snomed
816816
field_location = f"route.coding[?(@.system=='{url}')].code"
817817
try:
818818
field_value = [x for x in values["route"]["coding"] if x.get("system") == url][0]["code"]
@@ -825,7 +825,7 @@ def pre_validate_route_coding_display(self, values: dict) -> dict:
825825
Pre-validate that, if route.coding[?(@.system=='http://snomed.info/sct')].display
826826
(legacy CSV field name: ROUTE_OF_VACCINATION_TERM) exists, then it is a non-empty string
827827
"""
828-
url = "http://snomed.info/sct"
828+
url = Urls.snomed
829829
field_location = f"route.coding[?(@.system=='{url}')].display"
830830
try:
831831
field_value = [x for x in values["route"]["coding"] if x.get("system") == url][0]["display"]
@@ -968,7 +968,7 @@ def pre_validate_vaccine_code(self, values: dict) -> dict:
968968
NOTE: vaccineCode is a mandatory FHIR field. A value of None will be rejected by the
969969
FHIR model before pre-validators are run.
970970
"""
971-
url = "http://snomed.info/sct"
971+
url = Urls.snomed
972972
field_location = f"vaccineCode.coding[?(@.system=='{url}')].code"
973973
try:
974974
field_value = [x for x in values["vaccineCode"]["coding"] if x.get("system") == url][0]["code"]

0 commit comments

Comments
 (0)