@@ -16,7 +16,8 @@ def initialize(
1616 consents :,
1717 triages :,
1818 attendance_record :,
19- vaccination_records :
19+ vaccination_records :,
20+ parents :
2021 )
2122 @programme_type = programme_type
2223 @academic_year = academic_year
@@ -25,6 +26,8 @@ def initialize(
2526 @consents = consents
2627 @triages = triages
2728 @attendance_record = attendance_record
29+ @vaccination_records = vaccination_records
30+ @parents = parents
2831
2932 @vaccination_criteria =
3033 VaccinationCriteria . new (
@@ -54,6 +57,8 @@ def status
5457 :cannot_vaccinate_absent
5558 elsif should_be_cannot_vaccinate_do_not_vaccinate?
5659 :cannot_vaccinate_do_not_vaccinate
60+ elsif should_be_needs_consent_no_contact_details?
61+ :needs_consent_no_contact_details
5762 elsif should_be_needs_consent_no_response?
5863 :needs_consent_no_response
5964 elsif should_be_cannot_vaccinate_delay_vaccination?
@@ -166,7 +171,8 @@ def consent_vaccine_methods
166171 :consents ,
167172 :triages ,
168173 :attendance_record ,
169- :vaccination_criteria
174+ :vaccination_criteria ,
175+ :parents
170176
171177 delegate :vaccinated? ,
172178 :vaccinated_vaccination_record ,
@@ -238,6 +244,10 @@ def should_be_needs_consent_request_not_scheduled?
238244 false # TODO: Implement this status.
239245 end
240246
247+ def should_be_needs_consent_no_contact_details?
248+ is_eligible? && consent_status == :no_contact_details
249+ end
250+
241251 def year_group = patient . year_group ( academic_year :)
242252
243253 def is_eligible?
@@ -285,7 +295,8 @@ def consent_generator
285295 academic_year :,
286296 patient :,
287297 consents :,
288- vaccination_records :
298+ vaccination_records :,
299+ parents :
289300 )
290301 end
291302
@@ -297,7 +308,8 @@ def triage_generator
297308 patient :,
298309 consents :,
299310 triages :,
300- vaccination_records :
311+ vaccination_records :,
312+ parents :
301313 )
302314 end
303315end
0 commit comments