Skip to content

Commit fdea09a

Browse files
Adding org codes to all relevant users
1 parent 5e617b9 commit fdea09a

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

classes/repositories/user_repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def get_role_id_for_role(self, role: "UserRoleType") -> int:
9595
df = self.general_query(role)
9696
return int(df["role_id"].iloc[0])
9797

98-
def get_org_codefor_role(self, role: "UserRoleType") -> int:
98+
def get_org_code_for_role(self, role: "UserRoleType") -> int:
9999
"""
100100
Get the ORG CODE for the role.
101101

users.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,31 @@
1212
"Hub Manager at BCS01": {
1313
"username": "BCSS402",
1414
"role_id": 309007,
15+
"org_code": "BCS01",
1516
"roles": [
1617
"Hub Manager, Midlands and North West"
1718
]
1819
},
1920
"Screening Centre Manager at BCS001": {
2021
"username": "BCSS118",
2122
"role_id": 5039,
23+
"org_code": "BCS001",
2224
"roles": [
2325
"Screening Centre Manager for Wolverhampton, Midlands and North West"
2426
]
2527
},
2628
"ScreeningAssistant at BCS02": {
2729
"username": "BCSS412",
2830
"role_id": 309003,
31+
"org_code": "BCS02",
2932
"roles": [
3033
"Screening Assistant"
3134
]
3235
},
3336
"Team Leader at BCS01": {
3437
"username": "BCSS403",
3538
"role_id": 309005,
39+
"org_code": "BCS01",
3640
"roles": [
3741
"Team Leader"
3842
]
@@ -47,13 +51,15 @@
4751
"username": "BCSS409",
4852
"hub_code": "BCS02",
4953
"role_id": 309007,
54+
"org_code": "BCS02",
5055
"roles": [
5156
"Hub Manager, Southern Bowel Cancer Screening Programme Hub"
5257
]
5358
},
5459
"Specialist Screening Practitioner at BCS009 & BCS001": {
5560
"username": "BCSS120",
5661
"role_id": 5041,
62+
"org_code": "BCS001",
5763
"roles": [
5864
"Coventry and Warwickshire Bowel Cancer Screening Centre, MultiOrgUser",
5965
"Wolverhampton Bowel Cancer Screening Centre, MultiOrgUser"
@@ -62,76 +68,87 @@
6268
"Hub Director State Registered at BCS03": {
6369
"username": "BCSS414",
6470
"role_id": 309009,
71+
"org_code": "BCS03",
6572
"roles": [
6673
"Hub Director State Registered, England"
6774
]
6875
},
6976
"Senior Screening Assistant at BCS01": {
7077
"username": "BCSS404",
7178
"role_id": 309004,
79+
"org_code": "BCS01",
7280
"roles": [
7381
"Senior Screening Assistant, England"
7482
]
7583
},
7684
"Screening Assistant at BCS02": {
7785
"username": "BCSS412",
7886
"role_id": 309003,
87+
"org_code": "BCS02",
7988
"roles": [
8089
"Senior Screening Assistant, England"
8190
]
8291
},
8392
"Assistant Screening Practitioner at BCS001": {
8493
"username": "BCSS324",
8594
"role_id": 202254,
95+
"org_code": "BCS001",
8696
"roles": [
8797
"Assistant Screening Practitioner, England"
8898
]
8999
},
90100
"Screening Coordinator at BCS001": {
91101
"username": "BCSS121",
92102
"role_id": 5073,
103+
"org_code": "BCS001",
93104
"roles": [
94105
"Screening Coordinator at BCS001, England"
95106
]
96107
},
97108
"Screening Practitioner at BCS001": {
98109
"username": "BCSS121",
99110
"role_id": 5073,
111+
"org_code": "BCS001",
100112
"roles": [
101113
"Screening Practioner at BCS001, England"
102114
]
103115
},
104116
"Screening Centre Clerk at BCS001": {
105117
"username": "BCSS119",
106118
"role_id": 5040,
119+
"org_code": "BCS001",
107120
"roles": [
108121
"Screening Centre Clerk, England"
109122
]
110123
},
111124
"National Data Analyst at BCS0": {
112125
"username": "BCSS212",
113126
"role_id": 5064,
127+
"org_code": "BCS0",
114128
"roles": [
115129
"National Data Analyst, England"
116130
]
117131
},
118132
"National QA User at BCS0": {
119133
"username": "BCSS263",
120134
"role_id": 202193,
135+
"org_code": "BCS0",
121136
"roles": [
122137
"National QA User, England"
123138
]
124139
},
125140
"BCSS Support - SC at BCS001": {
126141
"username": "BCSS307",
127142
"role_id": 202246,
143+
"org_code": "BCS001",
128144
"roles": [
129145
"Wolverhampton SC"
130146
]
131147
},
132148
"BCSS Bureau Staff at X26": {
133149
"username": "BCSS33",
134150
"role_id": 5042,
151+
"org_code": "X26",
135152
"roles": [
136153
"BCSS Bureau Staff at X26"
137154
]

utils/fit_kit.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@
1818
from classes.repositories.kit_service_management_repository import (
1919
KitServiceManagementRepository,
2020
)
21-
from classes.kit_service_management_record import KitServiceManagementRecord
2221
from classes.kit_status import KitStatus
2322
from oracle.oracle_specific_functions import execute_fit_kit_stored_procedures
2423

2524

2625
class FitKitGeneration:
2726
"""
2827
This class is responsible for generating FIT Device IDs from test kit data.
29-
It is also used to retreive a kit belonging to a subject
28+
It is also used to retrieve a kit belonging to a subject
3029
"""
3130

3231
def create_fit_id_df(
@@ -114,7 +113,7 @@ def get_fit_kit_for_subject_sql(self, nhs_no: str, logged: bool, read: bool) ->
114113
"""
115114
Constructs SQL for requesting the kit ID of the latest FIT kit for a subject.
116115
This then gets the subject's subject id from the DB and runs the query to return their FIT kit
117-
It then calculates the checkdigit and extra info to append at the end of the FIT Kit
116+
It then calculates the check digit and extra info to append at the end of the FIT Kit
118117
119118
Args:
120119
nhs_no (str): The subject's NHS number.
@@ -302,7 +301,7 @@ def read_latest_logged_kit(
302301

303302
def log_fit_kits(self, page, fit_kit: str, sample_date: datetime) -> None:
304303
"""
305-
Navigates to the log devicves page and logs FIT kits
304+
Navigates to the log devices page and logs FIT kits
306305
Args:
307306
fit_kit (str): The device id of the FIT kit
308307
sample_date (datetime): The date you want to select for the sameple date field

0 commit comments

Comments
 (0)