1515 PolypInterventionExcisionTechniqueOptions ,
1616 PolypTypeOptions ,
1717 SerratedLesionSubTypeOptions ,
18- PolypExcisionCompleteOptions ,
1918 PolypDysplasiaOptions ,
2019 YesNoUncertainOptions ,
2120 AdenomaSubTypeOptions ,
6867}
6968
7069
70+ polyp_intervention_for_scenarios_o_p = [
71+ [
72+ {
73+ "modality" : PolypInterventionModalityOptions .EMR ,
74+ "device" : PolypInterventionDeviceOptions .HOT_SNARE ,
75+ },
76+ {
77+ "modality" : PolypInterventionModalityOptions .BIOPSY ,
78+ "device" : PolypInterventionDeviceOptions .COLD_SNARE ,
79+ "intervention success" : PolypInterventionSuccessOptions .SUCCESSFUL ,
80+ },
81+ ]
82+ ]
83+
84+ polyp_histology_for_scenarios_o_p = [
85+ {
86+ "date of receipt" : datetime .today (),
87+ "date of reporting" : datetime .today (),
88+ "pathology provider" : - 1 ,
89+ "pathologist" : - 1 ,
90+ "polyp type" : PolypTypeOptions .ADENOMA ,
91+ "adenoma sub type" : AdenomaSubTypeOptions .VILLOUS_ADENOMA ,
92+ "polyp dysplasia" : PolypDysplasiaOptions .HIGH_GRADE_DYSPLASIA ,
93+ "polyp carcinoma" : YesNoUncertainOptions .UNCERTAIN ,
94+ }
95+ ]
96+
97+
98+ polyp_intervention_for_sceanrios_r_s = [
99+ {
100+ "modality" : PolypInterventionModalityOptions .POLYPECTOMY ,
101+ "device" : PolypInterventionDeviceOptions .COLD_SNARE ,
102+ "excised" : YesNoOptions .YES ,
103+ "retrieved" : YesNoOptions .YES ,
104+ "excision technique" : PolypInterventionExcisionTechniqueOptions .PIECE_MEAL ,
105+ }
106+ ]
107+
108+ polyp_histology_for_sceanrios_r_s = [
109+ {
110+ "pathology lost" : YesNoOptions .YES ,
111+ "reason pathology lost" : ReasonPathologyLostOptions .LOST_IN_TRANSIT ,
112+ }
113+ ]
114+
115+
71116@pytest .mark .vpn_required
72117@pytest .mark .regression
73118@pytest .mark .investigation_dataset_tests
@@ -1015,33 +1060,6 @@ def test_identify_polyp_category_no_histology_o(
10151060 }
10161061 ]
10171062
1018- polyp_1_intervention = [
1019- [
1020- {
1021- "modality" : PolypInterventionModalityOptions .EMR ,
1022- "device" : PolypInterventionDeviceOptions .HOT_SNARE ,
1023- },
1024- {
1025- "modality" : PolypInterventionModalityOptions .BIOPSY ,
1026- "device" : PolypInterventionDeviceOptions .COLD_SNARE ,
1027- "intervention success" : PolypInterventionSuccessOptions .SUCCESSFUL ,
1028- },
1029- ]
1030- ]
1031-
1032- polyp_1_histology = [
1033- {
1034- "date of receipt" : datetime .today (),
1035- "date of reporting" : datetime .today (),
1036- "pathology provider" : - 1 ,
1037- "pathologist" : - 1 ,
1038- "polyp type" : PolypTypeOptions .ADENOMA ,
1039- "adenoma sub type" : AdenomaSubTypeOptions .VILLOUS_ADENOMA ,
1040- "polyp dysplasia" : PolypDysplasiaOptions .HIGH_GRADE_DYSPLASIA ,
1041- "polyp carcinoma" : YesNoUncertainOptions .UNCERTAIN ,
1042- }
1043- ]
1044-
10451063 complete_and_assert_investigation (
10461064 page ,
10471065 general_information ,
@@ -1052,8 +1070,8 @@ def test_identify_polyp_category_no_histology_o(
10521070 expected_category = None ,
10531071 expected_size = "17" ,
10541072 polyp_information = polyp_1_information ,
1055- polyp_intervention = polyp_1_intervention ,
1056- polyp_histology = polyp_1_histology ,
1073+ polyp_intervention = polyp_intervention_for_scenarios_o_p ,
1074+ polyp_histology = polyp_histology_for_scenarios_o_p ,
10571075 completion_information = completion_information ,
10581076 )
10591077
@@ -1094,33 +1112,6 @@ def test_identify_polyp_category_no_histology_p(
10941112 }
10951113 ]
10961114
1097- polyp_1_intervention = [
1098- [
1099- {
1100- "modality" : PolypInterventionModalityOptions .EMR ,
1101- "device" : PolypInterventionDeviceOptions .HOT_SNARE ,
1102- },
1103- {
1104- "modality" : PolypInterventionModalityOptions .BIOPSY ,
1105- "device" : PolypInterventionDeviceOptions .COLD_SNARE ,
1106- "intervention success" : PolypInterventionSuccessOptions .SUCCESSFUL ,
1107- },
1108- ]
1109- ]
1110-
1111- polyp_1_histology = [
1112- {
1113- "date of receipt" : datetime .today (),
1114- "date of reporting" : datetime .today (),
1115- "pathology provider" : - 1 ,
1116- "pathologist" : - 1 ,
1117- "polyp type" : PolypTypeOptions .ADENOMA ,
1118- "adenoma sub type" : AdenomaSubTypeOptions .VILLOUS_ADENOMA ,
1119- "polyp dysplasia" : PolypDysplasiaOptions .HIGH_GRADE_DYSPLASIA ,
1120- "polyp carcinoma" : YesNoUncertainOptions .UNCERTAIN ,
1121- }
1122- ]
1123-
11241115 complete_and_assert_investigation (
11251116 page ,
11261117 general_information ,
@@ -1131,8 +1122,8 @@ def test_identify_polyp_category_no_histology_p(
11311122 expected_category = None ,
11321123 expected_size = "12" ,
11331124 polyp_information = polyp_1_information ,
1134- polyp_intervention = polyp_1_intervention ,
1135- polyp_histology = polyp_1_histology ,
1125+ polyp_intervention = polyp_intervention_for_scenarios_o_p ,
1126+ polyp_histology = polyp_histology_for_scenarios_o_p ,
11361127 completion_information = completion_information ,
11371128 )
11381129
@@ -1249,32 +1240,15 @@ def test_identify_polyp_category_no_histology_r(
12491240 }
12501241 ]
12511242
1252- polyp_intervention = [
1253- {
1254- "modality" : PolypInterventionModalityOptions .POLYPECTOMY ,
1255- "device" : PolypInterventionDeviceOptions .COLD_SNARE ,
1256- "excised" : YesNoOptions .YES ,
1257- "retrieved" : YesNoOptions .YES ,
1258- "excision technique" : PolypInterventionExcisionTechniqueOptions .PIECE_MEAL ,
1259- }
1260- ]
1261-
1262- polyp_histology = [
1263- {
1264- "pathology lost" : YesNoOptions .YES ,
1265- "reason pathology lost" : ReasonPathologyLostOptions .LOST_IN_TRANSIT ,
1266- }
1267- ]
1268-
12691243 InvestigationDatasetCompletion (page ).complete_dataset_with_args (
12701244 general_information = general_information ,
12711245 drug_information = drug_information ,
12721246 endoscopy_information = endoscopy_information ,
12731247 failure_information = failure_information ,
12741248 polyp_information = polyp_information ,
12751249 completion_information = completion_information ,
1276- polyp_intervention = polyp_intervention ,
1277- polyp_histology = polyp_histology ,
1250+ polyp_intervention = polyp_intervention_for_sceanrios_r_s ,
1251+ polyp_histology = polyp_histology_for_sceanrios_r_s ,
12781252 )
12791253
12801254 try :
@@ -1296,8 +1270,8 @@ def test_identify_polyp_category_no_histology_r(
12961270 expected_category = other_polyp_string ,
12971271 expected_size = "6" ,
12981272 polyp_information = polyp_information ,
1299- polyp_intervention = polyp_intervention ,
1300- polyp_histology = polyp_histology ,
1273+ polyp_intervention = polyp_intervention_for_sceanrios_r_s ,
1274+ polyp_histology = polyp_histology_for_sceanrios_r_s ,
13011275 completion_information = completion_information ,
13021276 )
13031277
@@ -1336,32 +1310,15 @@ def test_identify_polyp_category_no_histology_s(
13361310 }
13371311 ]
13381312
1339- polyp_intervention = [
1340- {
1341- "modality" : PolypInterventionModalityOptions .POLYPECTOMY ,
1342- "device" : PolypInterventionDeviceOptions .COLD_SNARE ,
1343- "excised" : YesNoOptions .YES ,
1344- "retrieved" : YesNoOptions .YES ,
1345- "excision technique" : PolypInterventionExcisionTechniqueOptions .PIECE_MEAL ,
1346- }
1347- ]
1348-
1349- polyp_histology = [
1350- {
1351- "pathology lost" : YesNoOptions .YES ,
1352- "reason pathology lost" : ReasonPathologyLostOptions .LOST_IN_TRANSIT ,
1353- }
1354- ]
1355-
13561313 InvestigationDatasetCompletion (page ).complete_dataset_with_args (
13571314 general_information = general_information ,
13581315 drug_information = drug_information ,
13591316 endoscopy_information = endoscopy_information ,
13601317 failure_information = failure_information ,
13611318 polyp_information = polyp_information ,
13621319 completion_information = completion_information ,
1363- polyp_intervention = polyp_intervention ,
1364- polyp_histology = polyp_histology ,
1320+ polyp_intervention = polyp_intervention_for_sceanrios_r_s ,
1321+ polyp_histology = polyp_histology_for_sceanrios_r_s ,
13651322 )
13661323
13671324 try :
0 commit comments