|
| 1 | +# Utility Guide: Screening Subject Page Searcher |
| 2 | + |
| 3 | +The Screening Subject Search utility allows for |
| 4 | +- searching for relevant subjects using their NHS Number, forename, last name, DOB, post code, episode closed date, status or latest event status |
| 5 | +- verifying the subject's event status using their nhs number |
| 6 | + |
| 7 | +## Table of Contents |
| 8 | + |
| 9 | +- [Utility Guide: Screening Subject Page Searcher](#utility-guide-screening-subject-page-searcher) |
| 10 | + - [Table of Contents](#table-of-contents) |
| 11 | + - [Functions Overview](#functions-overview) |
| 12 | + - [Verify subject event status by nhs no](#verify-subject-event-status-by-nhs-no) |
| 13 | + - [Arguments](#arguments) |
| 14 | + - [How This Function Works](#how-this-function-works) |
| 15 | + - [Search subject by nhs number](#search-subject-by-nhs-number) |
| 16 | + - [Arguments](#arguments-1) |
| 17 | + - [How This Function Works](#how-this-function-works-1) |
| 18 | + - [Search subject by surname](#search-subject-by-surname) |
| 19 | + - [Arguments](#arguments-2) |
| 20 | + - [How This Function Works](#how-this-function-works-2) |
| 21 | + - [Search subject by forename](#search-subject-by-forename) |
| 22 | + - [Arguments](#arguments-3) |
| 23 | + - [How This Function Works](#how-this-function-works-3) |
| 24 | + - [Search subject by date of birth](#search-subject-by-date-of-birth) |
| 25 | + - [Arguments](#arguments-4) |
| 26 | + - [How This Function Works](#how-this-function-works-4) |
| 27 | + - [Search subject by post code](#search-subject-by-post-code) |
| 28 | + - [Arguments](#arguments-5) |
| 29 | + - [How This Function Works](#how-this-function-works-5) |
| 30 | + - [Search subject by episode closed date](#search-subject-by-episode-closed-date) |
| 31 | + - [Arguments](#arguments-6) |
| 32 | + - [How This Function Works](#how-this-function-works-6) |
| 33 | + - [Search subject by status](#search-subject-by-status) |
| 34 | + - [Arguments](#arguments-7) |
| 35 | + - [How This Function Works](#how-this-function-works-7) |
| 36 | + - [Search subject by latest event status](#search-subject-by-latest-event-status) |
| 37 | + - [Arguments](#arguments-8) |
| 38 | + - [How This Function Works](#how-this-function-works-8) |
| 39 | + - [Search subject by search area](#search-subject-by-search-area) |
| 40 | + - [Required Arguments](#required-arguments) |
| 41 | + - [Optional Arguments](#optional-arguments) |
| 42 | + - [How This Function Works](#how-this-function-works-9) |
| 43 | + - [Check clear filters button works](#check-clear-filters-button-works) |
| 44 | + - [Arguments](#arguments-9) |
| 45 | + - [How This Function Works](#how-this-function-works-10) |
| 46 | + |
| 47 | +## Functions Overview |
| 48 | + |
| 49 | +For this utility we have the following functions: |
| 50 | + |
| 51 | +- `verify_subject_event_status_by_nhs_no` |
| 52 | +- `search_subject_by_nhs_number` |
| 53 | +- `search_subject_by_surname` |
| 54 | +- `search_subject_by_forename` |
| 55 | +- `search_subject_by_dob` |
| 56 | +- `search_subject_by_postcode` |
| 57 | +- `search_subject_by_episode_closed_date` |
| 58 | +- `search_subject_by_status` |
| 59 | +- `search_subject_by_latest_event_status` |
| 60 | +- `search_subject_by_search_area` |
| 61 | +- `check_clear_filters_button_works` |
| 62 | + |
| 63 | +### Verify subject event status by nhs no |
| 64 | + |
| 65 | +This is used to check that the latest event status of a subject has been updated to what is expected. |
| 66 | +The provided nhs no is used to search the whole database and then verifies the latest event status is as expected. |
| 67 | + |
| 68 | +#### Arguments |
| 69 | + |
| 70 | +- `page`: |
| 71 | + - Type: `Page` |
| 72 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 73 | +- `nhs_no`: |
| 74 | + - Type: `str` |
| 75 | + - This is the subject's nhs number. For example: 123 456 7890 |
| 76 | +- `latest_event_status`: |
| 77 | + - Type: `str` |
| 78 | + - This is the expected status of the subject that is being verified |
| 79 | + |
| 80 | +#### How This Function Works |
| 81 | + |
| 82 | +1. It starts off by navigating to the main menu if not already on this page. This is done to ensure that this can be called from any page |
| 83 | +2. Once on the main menu it navigates to the screening subject search page |
| 84 | +3. From here it fills in the nhs number filter field with the supplied nhs number and chooses the whole area database as the search area option |
| 85 | +4. It then clicks the search button |
| 86 | +5. Once the subject is returned, it then verifies that the latest event status matches the supplied event status |
| 87 | + |
| 88 | +### Search subject by nhs number |
| 89 | + |
| 90 | +This searches for a subject by their NHS Number |
| 91 | + |
| 92 | +#### Arguments |
| 93 | + |
| 94 | +- `page`: |
| 95 | + - Type: `Page` |
| 96 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 97 | +- `nhs_no`: |
| 98 | + - Type: `str` |
| 99 | + - This is the subject's nhs number. For example: 123 456 7890 |
| 100 | + |
| 101 | +#### How This Function Works |
| 102 | + |
| 103 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 104 | +2. It then fills in the nhs number filter field with the supplied nhs number and clicks the search button |
| 105 | + |
| 106 | +### Search subject by surname |
| 107 | + |
| 108 | +This searches for a subject by their surname |
| 109 | + |
| 110 | +#### Arguments |
| 111 | + |
| 112 | +- `page`: |
| 113 | + - Type: `Page` |
| 114 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 115 | +- `surname`: |
| 116 | + - Type: `str` |
| 117 | + - This is the subject's surname |
| 118 | + |
| 119 | +#### How This Function Works |
| 120 | + |
| 121 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 122 | +2. It then fills in the surname filter field with the supplied surname and clicks the search button |
| 123 | + |
| 124 | +### Search subject by forename |
| 125 | + |
| 126 | +This searches for a subject by their forename |
| 127 | + |
| 128 | +#### Arguments |
| 129 | + |
| 130 | +- `page`: |
| 131 | + - Type: `Page` |
| 132 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 133 | +- `forename`: |
| 134 | + - Type: `str` |
| 135 | + - This is the subject's forename |
| 136 | + |
| 137 | +#### How This Function Works |
| 138 | + |
| 139 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 140 | +2. It then fills in the forename filter field with the supplied forename and clicks the search button |
| 141 | + |
| 142 | +### Search subject by date of birth |
| 143 | + |
| 144 | +This searches for a subject by their date of birth |
| 145 | + |
| 146 | +#### Arguments |
| 147 | + |
| 148 | +- `page`: |
| 149 | + - Type: `Page` |
| 150 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 151 | +- `dob`: |
| 152 | + - Type: `str` |
| 153 | + - This is the subject's date of birth |
| 154 | + |
| 155 | +#### How This Function Works |
| 156 | + |
| 157 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 158 | +2. It then fills in the date of birth filter field with the supplied DOB and clicks the search button |
| 159 | + |
| 160 | +### Search subject by post code |
| 161 | + |
| 162 | +This searches for a subject by their post code |
| 163 | + |
| 164 | +#### Arguments |
| 165 | + |
| 166 | +- `page`: |
| 167 | + - Type: `Page` |
| 168 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 169 | +- `postcode`: |
| 170 | + - Type: `str` |
| 171 | + - This is the subject's post code |
| 172 | + |
| 173 | +#### How This Function Works |
| 174 | + |
| 175 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 176 | +2. It then fills in the post code filter field with the supplied post code and clicks the search button |
| 177 | + |
| 178 | +### Search subject by episode closed date |
| 179 | + |
| 180 | +This searches for a subject by their episode closed date |
| 181 | + |
| 182 | +#### Arguments |
| 183 | + |
| 184 | +- `page`: |
| 185 | + - Type: `Page` |
| 186 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 187 | +- `episode_closed_date`: |
| 188 | + - Type: `str` |
| 189 | + - This is the subject's episode closed date |
| 190 | + |
| 191 | +#### How This Function Works |
| 192 | + |
| 193 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 194 | +2. It then fills in the episode closed date filter field with the supplied date and clicks the search button |
| 195 | + |
| 196 | +### Search subject by status |
| 197 | + |
| 198 | +This searches for a subject by their screening status |
| 199 | + |
| 200 | +#### Arguments |
| 201 | + |
| 202 | +- `page`: |
| 203 | + - Type: `Page` |
| 204 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 205 | +- `status`: |
| 206 | + - Type: `str` |
| 207 | + - This is the subject's screening status |
| 208 | + |
| 209 | +#### How This Function Works |
| 210 | + |
| 211 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 212 | +2. It then selects the screening status option that matches the supplied status and clicks the search button |
| 213 | + |
| 214 | +### Search subject by latest event status |
| 215 | + |
| 216 | +This searches for a subject by their latest event status |
| 217 | + |
| 218 | +#### Arguments |
| 219 | + |
| 220 | +- `page`: |
| 221 | + - Type: `Page` |
| 222 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 223 | +- `status`: |
| 224 | + - Type: `str` |
| 225 | + - This is the subject's latest event status |
| 226 | + |
| 227 | +#### How This Function Works |
| 228 | + |
| 229 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 230 | +2. It then selects the episode status option that matches the supplied status and clicks the search button |
| 231 | + |
| 232 | +### Search subject by search area |
| 233 | + |
| 234 | +This searches for a subject by search area |
| 235 | + |
| 236 | +#### Required Arguments |
| 237 | + |
| 238 | +- `page`: |
| 239 | + - Type: `Page` |
| 240 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 241 | +- `status`: |
| 242 | + - Type: `str` |
| 243 | + - This is the subject's screening status |
| 244 | +- `search_area`: |
| 245 | + - Type: `str` |
| 246 | + - This is the search area option to use |
| 247 | + |
| 248 | +#### Optional Arguments |
| 249 | + |
| 250 | +- `code`: |
| 251 | + - Type: `str` |
| 252 | +- `gp_practice_code`: |
| 253 | + - Type: `str` |
| 254 | + |
| 255 | +#### How This Function Works |
| 256 | + |
| 257 | +1. It starts off by clicking on the **Clear filters** button to remove any persisting filters |
| 258 | +2. It then selects the screening status option that matches the supplied status |
| 259 | +3. If provided, the code paremeter is used to fill the appropriate code filter field |
| 260 | +4. If provided, the gp practice code paremeter is used to fill the gp practice in ccg filter field |
| 261 | +5. It then clicks the search button |
| 262 | + |
| 263 | +### Check clear filters button works |
| 264 | + |
| 265 | +This checks that the "clear filter" button works as intended |
| 266 | + |
| 267 | +#### Arguments |
| 268 | + |
| 269 | +- `page`: |
| 270 | + - Type: `Page` |
| 271 | + - This is the playwright page object which is used to tell playwright what page the test is currently on |
| 272 | +- `nhs_no`: |
| 273 | + - Type: `str` |
| 274 | + - This is the subject's nhs number. For example: 123 456 7890 |
| 275 | + |
| 276 | +#### How This Function Works |
| 277 | + |
| 278 | +1. It fills in the nhs number filter field with the supplied nhs number and verifies that the nhs number filter field contains the entered value |
| 279 | +2. It then clicks the clear filters button and verifies that the nhs number filter field is now empty |
0 commit comments