Skip to content

Commit 163a083

Browse files
authored
Merge pull request #3882 from nhsuk/default-flu-dose
Set default dose sequence for flu to 1
2 parents 11b1987 + f7bc93c commit 163a083

6 files changed

Lines changed: 7 additions & 8 deletions

File tree

app/components/app_vaccination_record_summary_component.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,6 @@ def dose_number_value
329329
end
330330

331331
def dose_number
332-
return nil if @programme.seasonal?
333-
334332
dose_sequence = @vaccination_record.dose_sequence
335333

336334
if dose_sequence.nil?

app/models/programme.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def vaccinated_dose_sequence
103103
end
104104

105105
def default_dose_sequence
106-
hpv? ? vaccinated_dose_sequence : nil
106+
hpv? || flu? ? vaccinated_dose_sequence : nil
107107
end
108108

109109
def maximum_dose_sequence

spec/components/app_vaccination_record_summary_component_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@
151151
let(:programme) { create(:programme, :flu) }
152152

153153
it do
154-
expect(rendered).not_to have_css(
154+
expect(rendered).to have_css(
155155
".nhsuk-summary-list__row",
156-
text: "Dose number"
156+
text: "Dose number\nFirst"
157157
)
158158
end
159159
end

spec/lib/reports/offline_session_exporter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ def validation_formula(worksheet:, column_name:, row: 1)
955955
context "Flu programme" do
956956
let(:programme) { create(:programme, :flu) }
957957
let(:expected_programme) { "Flu" }
958-
let(:expected_dose_sequence) { nil }
958+
let(:expected_dose_sequence) { 1 }
959959

960960
include_examples "generates a report"
961961
end

spec/models/immunisation_import_row_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,8 @@
11791179
"DATE_OF_VACCINATION" => session.dates.first.strftime("%Y%m%d"),
11801180
"SESSION_ID" => session.id.to_s,
11811181
"ORGANISATION_CODE" => organisation.ods_code,
1182-
"PERFORMING_PROFESSIONAL_EMAIL" => create(:user).email
1182+
"PERFORMING_PROFESSIONAL_EMAIL" => create(:user).email,
1183+
"DOSE_SEQUENCE" => "1"
11831184
)
11841185
end
11851186

spec/models/programme_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
context "with a Flu programme" do
161161
let(:programme) { build(:programme, :flu) }
162162

163-
it { should be_nil }
163+
it { should eq(1) }
164164
end
165165

166166
context "with an HPV programme" do

0 commit comments

Comments
 (0)