You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/utility-guides/BatchProcessing.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The Batch Processing utility allows for the processing of batches on the active
20
20
21
21
## Functions Overview
22
22
23
-
For this utility we have the following functions/methods:
23
+
For this utility we have the following functions:
24
24
25
25
-`batch_processing`
26
26
-`prepare_and_print_batch`
@@ -34,25 +34,25 @@ This will call the other two functions in order to successfully process a batch.
34
34
#### Required Arguments
35
35
36
36
-`page`:
37
-
- Type: **Page**
37
+
- Type: `Page`
38
38
- This is the playwright page object which is used to tell playwright what page the test is currently on.
39
39
-`batch_type`:
40
-
- Type: **str**
40
+
- Type: `str`
41
41
- This is the event code for the batch. For example: **S1** or **A323**
42
42
-`batch_description`:
43
-
- Type: **str**
43
+
- Type: `str`
44
44
- This is the description of the batch. For example: **Pre-invitation (FIT)** or **Post-investigation Appointment NOT Required**
45
45
-`latest_event_status`:
46
-
- Type: **str**
46
+
- Type: `str`
47
47
- This is the status the subject will get updated to after the batch has been processed. It is used to check that the subject has been updated to the correct status after a batch has been printed
48
48
49
49
#### Optional Arguments
50
50
51
51
-`run_timed_events`:
52
-
- Type: **bool**
52
+
- Type: `bool`
53
53
- If this is set to **True**, then bcss_timed_events will be executed against all the subjects found in the batch
54
54
-`get_subjects_from_pdf`:
55
-
- Type: **bool**
55
+
- Type: `bool`
56
56
- If this is set to **True**, then the subjects will be retrieved from the downloaded PDF file instead of from the DB
57
57
58
58
#### How This Function Works
@@ -66,6 +66,7 @@ This will call the other two functions in order to successfully process a batch.
66
66
6. After the ID is stored, it clicks on the ID to get to the Manage Active Batch page
67
67
7. From Here it calls the `prepare_and_print_batch` function.
68
68
1. If `get_subjects_from_pdf` was set to False it calls `get_nhs_no_from_batch_id`, which is imported from *utils.oracle.oracle_specific_functions*, to get the subjects from the batch and stores them as a pandas DataFrame - **nhs_no_df**
69
+
2. For more Info on `get_nhs_no_from_batch_id` please look at: [PDFReader](PDFReader.md)
69
70
8. Once this is complete it calls the `check_batch_in_archived_batch_list` function
70
71
9. Finally, once that function is complete it calls `verify_subject_event_status_by_nhs_no` which is imported from *utils/screening_subject_page_searcher*
71
72
@@ -77,13 +78,13 @@ It is in charge of pressing on the following button: **Prepare Batch**, **Retrie
77
78
#### Arguments
78
79
79
80
-`page`:
80
-
- Type: **Page**
81
+
- Type: `Page`
81
82
- This is the playwright page object which is used to tell playwright what page the test is currently on.
82
83
-`link_text`:
83
-
- Type: **str**
84
+
- Type: `str`
84
85
- This is the batch ID of the batch currently being processed
85
86
-`get_subjects_from_pdf`:
86
-
- Type: **bool**
87
+
- Type: `bool`
87
88
- This is an optional argument and if this is set to **True**, then the subjects will be retrieved from the downloaded PDF file instead of from the DB
88
89
89
90
#### How This Function Works
@@ -103,10 +104,10 @@ This function checks that the batch that was just prepared and printed is now vi
103
104
#### Arguments
104
105
105
106
-`page`:
106
-
- Type: **Page**
107
+
- Type: `Page`
107
108
- This is the playwright page object which is used to tell playwright what page the test is currently on.
108
109
-`link_text`:
109
-
- Type: **str**
110
+
- Type: `str`
110
111
- This is the batch ID of the batch currently being processed
This method prepares the batch, retreives the files and confirms them as printed
91
+
This prepares the batch, retreives the files and confirms them as printed
90
92
Once those buttons have been pressed it waits for the message 'Batch Successfully Archived'
93
+
94
+
Args:
95
+
page (Page): This is the playwright page object
96
+
link_text (str): The batch ID
97
+
get_subjects_from_pdf (bool): An optial input to change the method of retrieving subjects from the batch from the DB to the PDF file.
98
+
99
+
Returns:
100
+
nhs_no_df (pd.DataFrame | None): if get_subjects_from_pdf is True, this is a DataFrame with the column 'subject_nhs_number' and each NHS number being a record, otherwise it is None
0 commit comments