1313from fhir .resources .R4B .immunization import Immunization
1414from fhir_repository import ImmunizationRepository
1515from fhir_service import FhirService , UpdateOutcome , get_service_url
16- from mappings import VaccineTypes
1716from models .errors import InvalidPatientId , CustomValidationError
1817from models .fhir_immunization import ImmunizationValidator
1918from pds_service import PdsService
@@ -594,7 +593,7 @@ def setUp(self):
594593 def test_vaccine_type_search (self ):
595594 """It should search for the correct vaccine type"""
596595 nhs_number = VALID_NHS_NUMBER
597- vaccine_type = VaccineTypes . covid_19
596+ vaccine_type = "COVID19"
598597 params = f"{ self .nhs_search_param } ={ nhs_number } &{ self .vaccine_type_search_param } ={ vaccine_type } "
599598
600599 # When
@@ -613,7 +612,7 @@ def test_make_fhir_bundle_from_search_result(self):
613612 "meta" : {"security" : [{"code" : "U" }]},
614613 }
615614 nhs_number = NHS_NUMBER_USED_IN_SAMPLE_DATA
616- vaccine_types = [VaccineTypes . covid_19 ]
615+ vaccine_types = ["COVID19" ]
617616 params = f"{ self .nhs_search_param } ={ nhs_number } &{ self .vaccine_type_search_param } ={ vaccine_types } "
618617 # When
619618 result = self .fhir_service .search_immunizations (nhs_number , vaccine_types , params )
@@ -645,7 +644,7 @@ def test_date_from_is_used_to_filter(self):
645644 "meta" : {"security" : [{"code" : "U" }]},
646645 }
647646 nhs_number = NHS_NUMBER_USED_IN_SAMPLE_DATA
648- vaccine_types = [VaccineTypes . covid_19 ]
647+ vaccine_types = ["COVID19" ]
649648
650649 # CASE: Day before.
651650 self .imms_repo .find_immunizations .return_value = deepcopy (imms_list )
@@ -708,7 +707,7 @@ def test_date_from_is_optional(self):
708707 "meta" : {"security" : [{"code" : "U" }]},
709708 }
710709 nhs_number = NHS_NUMBER_USED_IN_SAMPLE_DATA
711- vaccine_types = [VaccineTypes . covid_19 ]
710+ vaccine_types = ["COVID19" ]
712711
713712 # CASE: Without date_from
714713 self .imms_repo .find_immunizations .return_value = deepcopy (imms_list )
@@ -748,7 +747,7 @@ def test_date_to_is_used_to_filter(self):
748747 "meta" : {"security" : [{"code" : "U" }]},
749748 }
750749 nhs_number = NHS_NUMBER_USED_IN_SAMPLE_DATA
751- vaccine_types = [VaccineTypes . covid_19 ]
750+ vaccine_types = ["COVID19" ]
752751
753752 # CASE: Day after.
754753 self .imms_repo .find_immunizations .return_value = deepcopy (imms_list )
@@ -813,7 +812,7 @@ def test_date_to_is_optional(self):
813812 "meta" : {"security" : [{"code" : "U" }]},
814813 }
815814 nhs_number = NHS_NUMBER_USED_IN_SAMPLE_DATA
816- vaccine_types = [VaccineTypes . covid_19 ]
815+ vaccine_types = ["COVID19" ]
817816
818817 # CASE 1: Without date_to argument
819818 self .imms_repo .find_immunizations .return_value = deepcopy (imms_list )
@@ -851,7 +850,7 @@ def test_immunization_resources_are_filtered_for_search(self):
851850 for imms_id in imms_ids
852851 ]
853852
854- vaccine_types = [VaccineTypes . covid_19 ]
853+ vaccine_types = ["COVID19" ]
855854 self .imms_repo .find_immunizations .return_value = deepcopy (imms_list )
856855
857856 # When
@@ -896,7 +895,7 @@ def test_matches_contain_fullUrl(self):
896895 "meta" : {"security" : [{"code" : "U" }]},
897896 }
898897 nhs_number = NHS_NUMBER_USED_IN_SAMPLE_DATA
899- vaccine_types = [VaccineTypes . covid_19 ]
898+ vaccine_types = ["COVID19" ]
900899
901900 # When
902901 result = self .fhir_service .search_immunizations (nhs_number , vaccine_types , "" )
@@ -922,7 +921,7 @@ def test_patient_contains_fullUrl(self):
922921 "meta" : {"security" : [{"code" : "U" }]},
923922 }
924923 nhs_number = NHS_NUMBER_USED_IN_SAMPLE_DATA
925- vaccine_types = [VaccineTypes . covid_19 ]
924+ vaccine_types = ["COVID19" ]
926925
927926 # When
928927 result = self .fhir_service .search_immunizations (nhs_number , vaccine_types , "" )
@@ -948,7 +947,7 @@ def test_patient_included(self):
948947 "meta" : {"security" : [{"code" : "U" }]},
949948 }
950949 nhs_number = VALID_NHS_NUMBER
951- vaccine_types = [VaccineTypes . covid_19 ]
950+ vaccine_types = ["COVID19" ]
952951
953952 # When
954953 result = self .fhir_service .search_immunizations (nhs_number , vaccine_types , "" )
@@ -969,7 +968,7 @@ def test_patient_is_stripped(self):
969968 "meta" : {"security" : [{"code" : "U" }]},
970969 }
971970 nhs_number = VALID_NHS_NUMBER
972- vaccine_types = [VaccineTypes . covid_19 ]
971+ vaccine_types = ["COVID19" ]
973972
974973 # When
975974 result = self .fhir_service .search_immunizations (nhs_number , vaccine_types , "" )
0 commit comments