3232 ReopenFOBTScreeningEpisodePage ,
3333)
3434from utils .oracle .oracle import OracleDB
35- import pandas as pd
3635
3736
38- @pytest .mark .wip
3937@pytest .mark .usefixtures ("setup_org_and_appointments" )
4038@pytest .mark .vpn_required
4139@pytest .mark .regression
@@ -392,7 +390,7 @@ def test_scenario_6(page: Page) -> None:
392390 # When I switch users to BCSS "England" as user role "Screening Centre Manager"
393391 LogoutPage (page ).log_out (close_page = False )
394392 BasePage (page ).go_to_log_in_page ()
395- UserTools .user_login (page , "Screening Centre Manager at BCS001" )
393+ user_role = UserTools .user_login (page , "Screening Centre Manager at BCS001" , True )
396394
397395 # And I view the subject
398396 screening_subject_page_searcher .navigate_to_subject_summary_page (page , nhs_no )
@@ -516,6 +514,9 @@ def test_scenario_6(page: Page) -> None:
516514 },
517515 )
518516
517+ # When I view the subject
518+ screening_subject_page_searcher .navigate_to_subject_summary_page (page , nhs_no )
519+
519520 # When I advance the subject's episode for "Waiting Decision to Proceed with Diagnostic Test"
520521 SubjectScreeningSummaryPage (page ).click_advance_fobt_screening_episode_button ()
521522 advance_fobt_episode .click_waiting_decision_to_proceed_with_diagnostic_test ()
@@ -529,7 +530,7 @@ def test_scenario_6(page: Page) -> None:
529530 )
530531
531532 # When I run Timed Events for my subject
532- OracleDB ().exec_bcss_timed_events (pd . DataFrame ({ "subject_nhs_number" : [ nhs_no ]}) )
533+ OracleDB ().exec_bcss_timed_events (nhs_number = nhs_no )
533534
534535 # Then there is a "A165" letter batch for my subject with the exact title "Patient Discharge (No Agreement To Proceed With Diagnostic Tests) - Patient Letter"
535536 # When I process the open "A165" letter batch for my subject
@@ -540,36 +541,33 @@ def test_scenario_6(page: Page) -> None:
540541 "Patient Discharge (No Agreement To Proceed With Diagnostic Tests) - Patient Letter" ,
541542 "A168 - GP Discharge Sent (No Agreement to Proceed with Diagnostic Tests)" ,
542543 )
544+ criteria = {
545+ "calculated fobt due date" : "2 years from episode end" ,
546+ "calculated surveillance due date" : "Unchanged" ,
547+ "ceased confirmation date" : "Today" ,
548+ "ceased confirmation details" : "Outside screening population at recall." ,
549+ "ceased confirmation user id" : "User's ID" ,
550+ "clinical reason for cease" : "Null" ,
551+ "latest episode accumulated result" : "Definitive abnormal FOBT outcome" ,
552+ "latest episode recall calculation method" : "Episode end date" ,
553+ "latest episode recall episode type" : "FOBT Screening" ,
554+ "latest episode recall surveillance type" : "Null" ,
555+ "latest episode status" : "Closed" ,
556+ "latest episode status reason" : "Informed Dissent" ,
557+ "lynch due date" : "Null" ,
558+ "lynch due date date of change" : "Unchanged" ,
559+ "lynch due date reason" : "Unchanged" ,
560+ "screening due date" : "Null" ,
561+ "screening due date date of change" : "Today" ,
562+ "screening due date reason" : "Ceased" ,
563+ "screening status" : "Ceased" ,
564+ "screening status date of change" : "Today" ,
565+ "screening status reason" : "Outside screening population" ,
566+ "surveillance due date" : "Null" ,
567+ "surveillance due date date of change" : "Unchanged" ,
568+ "surveillance due date reason" : "Unchanged" ,
569+ }
570+ subject_assertion (nhs_no , criteria , user_role )
543571
544- subject_assertion (
545- nhs_no ,
546- {
547- "calculated FOBT due date" : "2 years from episode end" ,
548- "calculated lynch due date" : "Unchanged" ,
549- "calculated surveillance due date" : "Unchanged" ,
550- "ceased confirmation date" : "Today" ,
551- "ceased confirmation details" : "Outside screening population at recall." ,
552- "ceased confirmation user ID" : "User's ID" ,
553- "clinical reason for cease" : "Null" ,
554- "latest episode accumulated result" : "Definitive abnormal FOBT outcome" ,
555- "latest episode recall calculation method" : "Episode end date" ,
556- "latest episode recall episode type" : "FOBT Screening" ,
557- "latest episode recall surveillance type" : "Null" ,
558- "latest episode status" : "Closed" ,
559- "latest episode status reason" : "Informed Dissent" ,
560- "lynch due date" : "Null" ,
561- "lynch due date date of change" : "Unchanged" ,
562- "lynch due date reason" : "Unchanged" ,
563- "screening due date" : "Null" ,
564- "screening due date date of change" : "Today" ,
565- "screening due date reason" : "Ceased" ,
566- "screening status" : "Ceased" ,
567- "screening status date of change" : "Today" ,
568- "screening status reason" : "Outside screening population" ,
569- "surveillance due date" : "Null" ,
570- "surveillance due date date of change" : "Unchanged" ,
571- "surveillance due date reason" : "Unchanged" ,
572- },
573- )
574572 logging .info ("[TEST COMPLETE] Scenario 6 passed all assertions" )
575573 LogoutPage (page ).log_out ()
0 commit comments