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/SubjectSelectionQueryBuilder.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,8 +64,8 @@ This approach ensures injection-safe execution (defending against SQL injection
64
64
65
65
```python
66
66
criteria = {
67
-
"nhs_number": "1234567890",
68
-
"screening_status": "invited"
67
+
"nhs number": "1234567890",
68
+
"screening status": "invited"
69
69
}
70
70
71
71
user = User(user_id=42, organisation=None) # Optional; used for 'unchanged' logic
@@ -122,9 +122,9 @@ Example:
122
122
123
123
```python
124
124
{
125
-
"subject_has_event_status": "ES01",
126
-
"subject_age": "> 60",
127
-
"date_of_death": "null"
125
+
"subject has event status": "ES01",
126
+
"subject age": "> 60",
127
+
"date of death": "null"
128
128
}
129
129
```
130
130
@@ -134,12 +134,12 @@ Each of those triggers a different clause in the generated SQL.
134
134
135
135
This gives the builder context about who’s requesting the query, including their organisation and permissions.
136
136
137
-
Some criteria (like "USER_HUB" or "USER_ORGANISATION") don’t refer to a fixed hub code, but instead dynamically map to the hub or screening centre of the user running the search. That’s where this comes into play.
137
+
Some criteria (like "USER HUB" or "USER ORGANISATION") don’t refer to a fixed hub code, but instead dynamically map to the hub or screening centre of the user running the search. That’s where this comes into play.
138
138
139
139
Example:
140
140
141
141
```python
142
-
"SUBJECT_HUB_CODE": "USER_HUB"
142
+
"SUBJECT HUB CODE": "USER HUB"
143
143
```
144
144
145
145
This means “filter by the hub assigned to this user’s organisation,” not a fixed hub like ABC.
0 commit comments