Skip to content

Commit 75d52ed

Browse files
committed
addressed commit errors
1 parent 5f4fb33 commit 75d52ed

File tree

1 file changed

+57
-58
lines changed

1 file changed

+57
-58
lines changed

docs/utility-guides/InvestigationDataset.md

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -20,83 +20,82 @@ To use the Investigation Dataset Utility, import the `InvestigationDatasetComple
2020

2121
The methods in this utility require specific arguments. Below is a summary of the required arguments for key methods:
2222

23-
Required arguments for initialization:
24-
- page (Page): The Playwright Page object used for browser automation.
23+
Required arguments for initialization:
24+
- page (Page): The Playwright Page object used for browser automation.
2525

26-
Required arguments for main method:
27-
- nhs_no (str): The NHS number of the subject.
28-
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP, NORMAL).
26+
Required arguments for main method:
27+
- nhs_no (str): The NHS number of the subject.
28+
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP, NORMAL).
2929

3030
## After Investigation Dataset Complete - Required Arguments
3131

3232
The methods in this utility require specific arguments. Below is a summary of the required arguments for key methods:
3333

34-
Required arguments for initialization:
35-
- page (Page): The Playwright Page object used for browser automation.
36-
37-
Required arguments for main method:
38-
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP, NORMAL).
39-
- younger (bool): True if the subject is younger than 50, False otherwise.
34+
Required arguments for initialization:
35+
- page (Page): The Playwright Page object used for browser automation.
4036

37+
Required arguments for main method:
38+
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP, NORMAL).
39+
- younger (bool): True if the subject is younger than 50, False otherwise.
4140

4241
## Investigation Dataset Specific Functions
4342

4443
The `investigation_dataset` utility is used to complete the investigation dataset forms for a subject.It contains methods to fill out the forms, and progress episodes, based on the age of the subject and the test result. Below are their key functions:
4544

4645
1. **`complete_with_result(self, nhs_no: str, result: str) -> None`**
47-
This method fills out the investigation dataset forms based on the test result and the subject's age.
46+
This method fills out the investigation dataset forms based on the test result and the subject's age.
4847

49-
- **Arguments**:
50-
- nhs_no (str): The NHS number of the subject.
51-
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP, NORMAL).
48+
- **Arguments**:
49+
- nhs_no (str): The NHS number of the subject.
50+
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP NORMAL).
5251

5352
1. **`go_to_investigation_datasets_page(self, nhs_no) -> None`**
54-
This method navigates to the investigation datasets page for a subject.
55-
56-
- **Arguments**:
57-
- nhs_no (str): The NHS number of the subject.
53+
This method navigates to the investigation datasets page for a subject.
54+
55+
- **Arguments**:
56+
- nhs_no (str): The NHS number of the subject.
5857

5958
1. **`default_investigation_dataset_forms(self) -> None`**
60-
This method fills out the first part of the default investigation dataset form.
59+
This method fills out the first part of the default investigation dataset form.
6160

62-
1. **`default_investigation_dataset_forms_continuation(self) -> None`**
63-
This method fills out the second part of the default investigation dataset form.
61+
2. **`default_investigation_dataset_forms_continuation(self) -> None`**
62+
This method fills out the second part of the default investigation dataset form.
6463

65-
1. **`investigation_datasets_failure_reason(self) -> None`**
66-
This method fills out the failure reason section of the investigation dataset form.
64+
3. **`investigation_datasets_failure_reason(self) -> None`**
65+
This method fills out the failure reason section of the investigation dataset form.
6766

68-
1. **`polyps_for_high_risk_result(self) -> None`**
69-
This method fills out the polyp information section of the investigation dataset form to trigger a high risk result.
67+
4. **`polyps_for_high_risk_result(self) -> None`**
68+
This method fills out the polyp information section of the investigation dataset form to trigger a high risk result.
7069

71-
1. **`polyps_for_lnpcp_result(self) -> None`**
72-
This method fills out the polyp information section of the investigation dataset form to trigger a LNPCP result.
70+
5. **`polyps_for_lnpcp_result(self) -> None`**
71+
This method fills out the polyp information section of the investigation dataset form to trigger a LNPCP result.
7372

74-
1. **`polyp1_intervention(self) -> None`**
75-
This method fills out the intervention section of the investigation dataset form for polyp 1.
73+
6. **`polyp1_intervention(self) -> None`**
74+
This method fills out the intervention section of the investigation dataset form for polyp 1.
7675

77-
1. **`save_investigation_dataset(self) -> None`**
78-
This method saves the investigation dataset form.
76+
7. **`save_investigation_dataset(self) -> None`**
77+
This method saves the investigation dataset form.
7978

80-
1. **`progress_episode_based_on_result(self, result: str, younger: bool) -> None`**
81-
This method progresses the episode based on the result of the investigation dataset.
82-
- **Arguments**:
83-
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP, NORMAL).
84-
- younger (bool): True if the subject is younger than 50, False otherwise.
79+
8. **`progress_episode_based_on_result(self, result: str, younger: bool) -> None`**
80+
This method progresses the episode based on the result of the investigation dataset.
81+
- **Arguments**:
82+
- result (str): The result of the investigation dataset. Should be one of InvestigationDatasetResults (HIGH_RISK, LNPCP, NORMAL).
83+
- younger (bool): True if the subject is younger than 50, False otherwise.
8584

86-
1. **`after_high_risk_result(self) -> None`**
87-
This method advances an episode that has a high-risk result.
85+
9. **`after_high_risk_result(self) -> None`**
86+
This method advances an episode that has a high-risk result.
8887

89-
1. **`after_lnpcp_result(self) -> None`**
90-
This method advances an episode that has a LNPCP result.
88+
10. **`after_lnpcp_result(self) -> None`**
89+
This method advances an episode that has a LNPCP result.
9190

92-
1. **`after_normal_result(self) -> None`**
93-
This method advances an episode that has a normal result.
91+
11. **`after_normal_result(self) -> None`**
92+
This method advances an episode that has a normal result.
9493

95-
1. **`handover_subject_to_symptomatic_care(self) -> None`**
96-
This method hands over a subject to symptomatic care.
94+
12. **`handover_subject_to_symptomatic_care(self) -> None`**
95+
This method hands over a subject to symptomatic care.
9796

98-
1. **`record_diagnosis_date(self) -> None`**
99-
This method records the diagnosis date for a subject.
97+
13. **`record_diagnosis_date(self) -> None`**
98+
This method records the diagnosis date for a subject.
10099

101100
## Example Usage
102101

@@ -109,20 +108,20 @@ from utils.investigation_dataset import (
109108
)
110109

111110
def example_investigation_dataset_usage(nhs_no: str, result: str, younger: bool) -> None:
112-
# Start Playwright and open a browser/page (simplified for example)
113-
with sync_playwright() as p:
114-
browser = p.chromium.launch(headless=True)
115-
page = browser.new_page()
111+
# Start Playwright and open a browser/page (simplified for example)
112+
with sync_playwright() as p:
113+
browser = p.chromium.launch(headless=True)
114+
page = browser.new_page()
116115

117-
# Complete the investigation dataset for a subject
118-
investigation = InvestigationDatasetCompletion(page)
119-
investigation.complete_with_result(nhs_no, result)
116+
# Complete the investigation dataset for a subject
117+
investigation = InvestigationDatasetCompletion(page)
118+
investigation.complete_with_result(nhs_no, result)
120119

121-
# Progress the episode based on the result and subject's age
122-
after_investigation = AfterInvestigationDatasetComplete(page)
123-
after_investigation.progress_episode_based_on_result(result, younger)
120+
# Progress the episode based on the result and subject's age
121+
after_investigation = AfterInvestigationDatasetComplete(page)
122+
after_investigation.progress_episode_based_on_result(result, younger)
124123

125-
browser.close()
124+
browser.close()
126125

127126
# Example usage:
128127
example_investigation_dataset_usage(

0 commit comments

Comments
 (0)