4848 AdvanceFOBTScreeningEpisodePage ,
4949)
5050from utils .dataset_field_util import DatasetFieldUtil
51+ from utils .oracle .oracle_specific_functions import get_subjects_for_investigations
52+ from utils .subject_demographics import SubjectDemographicUtil
5153
5254
5355# This should go into a util. Adding it here to avoid SonarQube duplication errors:
@@ -311,9 +313,12 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
311313
312314 # This needs to be repeated for two subjects, one old and one not - High Risk Result
313315 # Older patient
314- nhs_no = "9765492782"
316+ subjects_df = get_subjects_for_investigations (smokescreen_properties ["c6_eng_number_of_subjects_to_record" ], smokescreen_properties ["c6_eng_org_id" ])
317+ nhs_no = subjects_df ["subject_nhs_number" ].iloc [0 ]
318+ SubjectDemographicUtil (page ).update_subject_dob (nhs_no , False )
315319 go_to_investigation_datasets_page (page , nhs_no )
316320
321+
317322 # The following code is on the investigation datasets page
318323 default_investigation_dataset_forms (page )
319324 InvestigationDatasetsPage (page ).select_theraputic_procedure_type ()
@@ -326,7 +331,8 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
326331 handover_subject_to_symptomatic_care (page )
327332
328333 # Younger patient
329- nhs_no = "9801085703"
334+ nhs_no = subjects_df ["subject_nhs_number" ].iloc [1 ]
335+ SubjectDemographicUtil (page ).update_subject_dob (nhs_no , True )
330336 go_to_investigation_datasets_page (page , nhs_no )
331337
332338 # The following code is on the investigation datasets page
@@ -356,7 +362,9 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
356362
357363 # This needs to be repeated for two subjects, one old and one not - LNPCP Result
358364 # Older patient
359- nhs_no = "9840970194"
365+ # nhs_no = "9840970194"
366+ nhs_no = subjects_df ["subject_nhs_number" ].iloc [2 ]
367+ SubjectDemographicUtil (page ).update_subject_dob (nhs_no , False )
360368 go_to_investigation_datasets_page (page , nhs_no )
361369
362370 # The following code is on the investigation datasets page
@@ -371,7 +379,9 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
371379 handover_subject_to_symptomatic_care (page )
372380
373381 # Younger patient
374- nhs_no = "9717136637"
382+ # nhs_no = "9717136637"
383+ nhs_no = subjects_df ["subject_nhs_number" ].iloc [3 ]
384+ SubjectDemographicUtil (page ).update_subject_dob (nhs_no , True )
375385 go_to_investigation_datasets_page (page , nhs_no )
376386
377387 # The following code is on the investigation datasets page
@@ -399,7 +409,8 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
399409 )
400410
401411 # This needs to be repeated for 1 subject, age does not matter - Normal Result
402- nhs_no_normal = "9673858853"
412+ # nhs_no_normal = "9673858853"
413+ nhs_no_normal = subjects_df ["subject_nhs_number" ].iloc [4 ]
403414 go_to_investigation_datasets_page (page , nhs_no_normal )
404415
405416 # The following code is on the investigation datasets page
0 commit comments