Skip to content

Commit 5037052

Browse files
committed
Don't allow vaccination directly after delaying
This is necessary to support the flu programme where you are required to choose whether the patient should be vaccinated with nasal spray or injection.
1 parent b963d9e commit 5037052

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

app/models/patient.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@ def consent_given_and_safe_to_vaccinate?(programme:, vaccine_method: nil)
333333
return false unless consent_status(programme:).given?
334334

335335
unless triage_status(programme:).safe_to_vaccinate? ||
336-
triage_status(programme:).delay_vaccination? ||
337336
triage_status(programme:).not_required?
338337
return false
339338
end

spec/features/triage_delay_vaccination_spec.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
when_i_view_the_child_record
2121
then_they_should_have_the_status_banner_delay_vaccination
22-
and_i_am_able_to_record_a_vaccination
22+
and_i_am_not_able_to_record_a_vaccination
23+
and_i_am_able_to_update_the_triage
2324
end
2425

2526
def given_a_programme_with_a_running_session
@@ -99,7 +100,11 @@ def then_they_should_have_the_status_banner_delay_vaccination
99100
expect(page).to have_content("Delay vaccination")
100101
end
101102

102-
def and_i_am_able_to_record_a_vaccination
103-
expect(page).to have_content("ready for their HPV vaccination?")
103+
def and_i_am_not_able_to_record_a_vaccination
104+
expect(page).not_to have_content("ready for their HPV vaccination?")
105+
end
106+
107+
def and_i_am_able_to_update_the_triage
108+
expect(page).to have_content("Update triage outcome")
104109
end
105110
end

0 commit comments

Comments
 (0)