Skip to content

Commit a8c12b6

Browse files
committed
Updated docstrings
1 parent b7f341b commit a8c12b6

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

pages/subject/subject_lynch_page.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ class SubjectPage(BasePage):
77
"""Page object for interacting with subject-related actions."""
88

99
class StatusCodes:
10+
"""Status codes used in the screening status dropdown."""
11+
1012
LYNCH_SELF_REFERRAL = "4005"
1113
SEEKING_FURTHER_DATA = "4007"
1214

1315
class ReasonCodes:
16+
"""Reason codes used in the reason dropdown."""
17+
1418
SELF_REFERRAL = "11316"
1519
UNCERTIFIED_DEATH = "11314"
1620
RESET_TO_SELF_REFERRAL = "11529"

utils/oracle/subject_selector.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ def get_subject_for_manual_cease(criteria: dict) -> str:
2020
2121
Args:
2222
criteria (dict): Dictionary of filtering conditions to select a subject.
23+
Example criteria:
24+
{
25+
"subject age": "75",
26+
"screening status": "Inactive",
27+
"subject hub code": "BCS02",
28+
}
2329
2430
Returns:
2531
str: The NHS number of the selected subject.
@@ -63,6 +69,12 @@ def get_subject_for_pre_invitation(criteria: dict) -> str:
6369
6470
Args:
6571
criteria (dict): Dictionary of filtering conditions to select a subject.
72+
Example criteria:
73+
{
74+
"subject age": "75",
75+
"screening status": "Pre-invitation",
76+
"subject hub code": "BCS02",
77+
}
6678
6779
Returns:
6880
str: The NHS number of the selected subject.
@@ -106,6 +118,14 @@ def get_or_create_subject_for_lynch_self_referral(
106118
Retrieves a subject NHS number suitable for Lynch self-referral scenarios.
107119
If no subject is found, creates one and returns its NHS number.
108120
121+
Internally uses the following selection criteria:
122+
{
123+
"subject age": "75",
124+
"subject has lynch diagnosis": "Yes",
125+
"screening status": "Lynch Self-referral",
126+
"subject hub code": "BCS01"
127+
}
128+
109129
Args:
110130
screening_centre (str): Screening centre code for subject association.
111131
base_age (int): Minimum age to filter subject candidates.

0 commit comments

Comments
 (0)