@@ -243,6 +243,9 @@ def test_scenario_10(page: Page, general_properties: dict) -> None:
243243 "Investigation Datasets"
244244 )
245245
246+ # And I open all minimized sections on the dataset
247+ InvestigationDatasetsPage (page ).open_all_minimized_sections ()
248+
246249 # Then I confirm the "Investigation Dataset" section of the dataset contains the field "Actual Type of Test" with the value of "Flexible Sigmoidoscopy"
247250 DatasetFieldUtil (page ).assert_cell_to_right_has_expected_text (
248251 "Actual Type of Test" , "Flexible Sigmoidoscopy"
@@ -256,7 +259,6 @@ def test_scenario_10(page: Page, general_properties: dict) -> None:
256259 )
257260
258261 # When I set the following fields and values within the Investigation Dataset for this subject:
259- InvestigationDatasetsPage (page ).click_show_endoscopy_information ()
260262 DatasetFieldUtil (page ).populate_select_locator_for_field (
261263 "Endoscopist defined extent" , EndoscopyLocationOptions .APPENDIX
262264 )
@@ -267,10 +269,12 @@ def test_scenario_10(page: Page, general_properties: dict) -> None:
267269 )
268270
269271 # When I add the following bowel preparation drugs and values within the Investigation Dataset for this subject:
270- drug_information = {
271- "drug_dose1" : "3" ,
272- "drug_type1" : DrugTypeOptions .MANNITOL ,
273- }
272+ InvestigationDatasetCompletion (page ).fill_out_drug_information (
273+ {
274+ "drug_dose1" : "3" ,
275+ "drug_type1" : DrugTypeOptions .MANNITOL ,
276+ }
277+ )
274278
275279 # And there is a clinician who meets the following criteria:
276280 user = User .from_user_role_type (user_role )
@@ -288,92 +292,104 @@ def test_scenario_10(page: Page, general_properties: dict) -> None:
288292 )
289293
290294 # And I set the following fields and values within the Investigation Dataset for this subject:
291- general_information = {
292- "practitioner" : 1 ,
293- "site" : 1 ,
294- "testing clinician" : person_name ,
295- "aspirant endoscopist" : None ,
296- }
295+ InvestigationDatasetCompletion (page ).fill_out_general_information (
296+ {
297+ "practitioner" : 1 ,
298+ "site" : 1 ,
299+ "testing clinician" : person_name ,
300+ "aspirant endoscopist" : None ,
301+ }
302+ )
297303
298- endoscopy_information = {
299- "endoscope inserted" : "yes" ,
300- "procedure type" : "therapeutic" ,
301- "bowel preparation quality" : BowelPreparationQualityOptions .GOOD ,
302- "comfort during recovery" : ComfortOptions .NO_DISCOMFORT ,
303- "comfort during examination" : ComfortOptions .NO_DISCOMFORT ,
304- "scope imager used" : YesNoOptions .YES ,
305- "retroverted view" : YesNoOptions .NO ,
306- "start of intubation time" : "09:00" ,
307- "start of extubation time" : "09:30" ,
308- "end time of procedure" : "10:00" ,
309- "scope id" : "Autotest" ,
310- "insufflation" : InsufflationOptions .AIR ,
311- "outcome at time of procedure" : OutcomeAtTimeOfProcedureOptions .LEAVE_DEPARTMENT ,
312- "late outcome" : LateOutcomeOptions .NO_COMPLICATIONS ,
313- }
304+ InvestigationDatasetCompletion (page ).fill_endoscopy_information (
305+ {
306+ "endoscope inserted" : "yes" ,
307+ "procedure type" : "therapeutic" ,
308+ "bowel preparation quality" : BowelPreparationQualityOptions .GOOD ,
309+ "comfort during recovery" : ComfortOptions .NO_DISCOMFORT ,
310+ "comfort during examination" : ComfortOptions .NO_DISCOMFORT ,
311+ "scope imager used" : YesNoOptions .YES ,
312+ "retroverted view" : YesNoOptions .NO ,
313+ "start of intubation time" : "09:00" ,
314+ "start of extubation time" : "09:30" ,
315+ "end time of procedure" : "10:00" ,
316+ "scope id" : "Autotest" ,
317+ "insufflation" : InsufflationOptions .AIR ,
318+ "outcome at time of procedure" : OutcomeAtTimeOfProcedureOptions .LEAVE_DEPARTMENT ,
319+ "late outcome" : LateOutcomeOptions .NO_COMPLICATIONS ,
320+ }
321+ )
314322
315323 # And I set the following completion proof values within the Investigation Dataset for this subject:
316- completion_information = {"completion proof" : CompletionProofOptions .VIDEO_APPENDIX }
324+ InvestigationDatasetCompletion (page ).fill_out_completion_information (
325+ {"completion proof" : CompletionProofOptions .VIDEO_APPENDIX }
326+ )
317327
318328 # And I set the following failure reasons within the Investigation Dataset for this subject:
319- failure_information = {"failure reasons" : FailureReasonsOptions .NO_FAILURE_REASONS }
329+ InvestigationDatasetCompletion (page ).fill_out_failure_information (
330+ {"failure reasons" : FailureReasonsOptions .NO_FAILURE_REASONS }
331+ )
320332
321- # And I add new polyps 1-2 with the following fields and values within the Investigation Dataset for this subject:
322- polyp_information = [
333+ # And I add new polyp 1 with the following fields and values within the Investigation Dataset for this subject:
334+ InvestigationDatasetCompletion ( page ). fill_polyp_x_information (
323335 {
324336 "location" : EndoscopyLocationOptions .CAECUM ,
325337 "classification" : PolypClassificationOptions .LST_NG ,
326338 "estimate of whole polyp size" : "10" ,
327339 "polyp access" : PolypAccessOptions .EASY ,
328340 "left in situ" : YesNoOptions .NO ,
329341 },
342+ 1 ,
343+ )
344+
345+ # And I add intervention 1 for polyp 1 with the following fields and values within the Investigation Dataset for this subject:
346+ InvestigationDatasetCompletion (page ).fill_polyp_x_intervention (
347+ {
348+ "modality" : PolypInterventionModalityOptions .EMR ,
349+ "device" : PolypInterventionDeviceOptions .HOT_SNARE ,
350+ "excised" : YesNoOptions .YES ,
351+ "retrieved" : PolypInterventionRetrievedOptions .NO ,
352+ "excision technique" : PolypInterventionExcisionTechniqueOptions .EN_BLOC ,
353+ },
354+ 1 ,
355+ )
356+
357+ # And I add new polyp 2 with the following fields and values within the Investigation Dataset for this subject:
358+ InvestigationDatasetCompletion (page ).fill_polyp_x_information (
330359 {
331360 "location" : EndoscopyLocationOptions .ASCENDING_COLON ,
332361 "classification" : PolypClassificationOptions .IIA ,
333362 "estimate of whole polyp size" : "12" ,
334363 "polyp access" : PolypAccessOptions .EASY ,
335364 "left in situ" : YesNoOptions .NO ,
336365 },
337- ]
366+ 2 ,
367+ )
338368
339- # And I add intervention 1 for polyps 1-2 with the following fields and values within the Investigation Dataset for this subject:
340- polyp_intervention = [
341- [
342- {
343- "modality" : PolypInterventionModalityOptions .EMR ,
344- "device" : PolypInterventionDeviceOptions .HOT_SNARE ,
345- "excised" : YesNoOptions .YES ,
346- "retrieved" : PolypInterventionRetrievedOptions .NO ,
347- "excision technique" : PolypInterventionExcisionTechniqueOptions .EN_BLOC ,
348- }
349- ],
350- [
351- {
352- "modality" : PolypInterventionModalityOptions .POLYPECTOMY ,
353- "device" : PolypInterventionDeviceOptions .HOT_SNARE ,
354- "excised" : YesNoOptions .YES ,
355- "retrieved" : PolypInterventionRetrievedOptions .NO ,
356- "excision technique" : PolypInterventionExcisionTechniqueOptions .PIECE_MEAL ,
357- "polyp appears fully resected endoscopically" : YesNoUncertainOptions .UNCERTAIN ,
358- }
359- ],
360- ]
369+ # And I add intervention 1 for polyp 2 with the following fields and values within the Investigation Dataset for this subject:
370+ InvestigationDatasetCompletion (page ).fill_polyp_x_intervention (
371+ {
372+ "modality" : PolypInterventionModalityOptions .POLYPECTOMY ,
373+ "device" : PolypInterventionDeviceOptions .HOT_SNARE ,
374+ "excised" : YesNoOptions .YES ,
375+ "retrieved" : PolypInterventionRetrievedOptions .NO ,
376+ "excision technique" : PolypInterventionExcisionTechniqueOptions .PIECE_MEAL ,
377+ "polyp appears fully resected endoscopically" : YesNoUncertainOptions .UNCERTAIN ,
378+ },
379+ 2 ,
380+ )
361381
362382 # And I mark the Investigation Dataset as completed
383+ InvestigationDatasetsPage (page ).check_dataset_complete_checkbox ()
384+
385+ # When I press the save Investigation Dataset button
386+ # Then the Investigation Dataset result message, which I will cancel, is "High-risk findings"
387+ InvestigationDatasetsPage (page ).click_save_dataset_button_assert_dialog (
388+ "High-risk findings"
389+ )
390+
363391 # When I press the save Investigation Dataset button
364- InvestigationDatasetsPage (page ).click_show_endoscopy_information ()
365- InvestigationDatasetCompletion (page ).complete_dataset_with_args (
366- endoscopy_information = endoscopy_information ,
367- drug_information = drug_information ,
368- general_information = general_information ,
369- failure_information = failure_information ,
370- completion_information = completion_information ,
371- polyp_information = polyp_information ,
372- polyp_intervention = polyp_intervention ,
373- )
374-
375- # Then the Investigation Dataset result message is "High-risk findings"
376- InvestigationDatasetsPage (page ).assert_test_result ("High-risk findings" )
392+ InvestigationDatasetsPage (page ).click_save_dataset_button ()
377393
378394 # Then I confirm the Polyp Algorithm Size for Polyp 1 is 10
379395 InvestigationDatasetsPage (page ).assert_polyp_algorithm_size (1 , "10" )
0 commit comments