File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ def set_patients_to_invite
7171 }
7272 )
7373 . where ( school_id : @location . school_id )
74+ . not_archived ( team : current_team )
7475 . includes_statuses
7576 . has_programme_status (
7677 @programme_statuses ,
Original file line number Diff line number Diff line change @@ -172,6 +172,8 @@ def given_a_team_with_no_known_school_children
172172 end
173173
174174 # We create these to ensure these children aren't invited.
175+
176+ # No parent contact details
175177 create (
176178 :patient ,
177179 :consent_no_response ,
@@ -181,6 +183,8 @@ def given_a_team_with_no_known_school_children
181183 location : @generic_clinic ,
182184 academic_year : AcademicYear . pending
183185 )
186+
187+ # Refused consent
184188 create (
185189 :patient ,
186190 :consent_refused ,
@@ -190,6 +194,8 @@ def given_a_team_with_no_known_school_children
190194 location : @generic_clinic ,
191195 academic_year : AcademicYear . pending
192196 )
197+
198+ # Conflicting consent
193199 create (
194200 :patient ,
195201 :consent_conflicting ,
@@ -200,6 +206,19 @@ def given_a_team_with_no_known_school_children
200206 academic_year : AcademicYear . pending
201207 )
202208
209+ # Archived
210+ create (
211+ :patient ,
212+ :consent_no_response ,
213+ :archived ,
214+ school : nil ,
215+ parents : [ build ( :parent ) ] ,
216+ programmes :,
217+ location : @generic_clinic ,
218+ academic_year : AcademicYear . pending ,
219+ team : @team
220+ )
221+
203222 @nurse = create ( :nurse , team : @team )
204223 end
205224
You can’t perform that action at this time.
0 commit comments