Skip to content

Commit 7bf81e8

Browse files
authored
Don't record a dose sequence for Td/IPV (#3148)
Td/IPV (or other multi-dose vaccines) shouldn't have a dose sequence number recorded on them by default as we can't be sure which dose sequence will be being administered on the day.
2 parents 560e887 + cf4cea0 commit 7bf81e8

9 files changed

+8
-13
lines changed

app/components/app_import_format_details_component.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,7 @@ def dose_sequence
272272
[
273273
{
274274
name: "DOSE_SEQUENCE",
275-
notes:
276-
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}, " \
277-
"must be a number or #{special_values_sentence}"
275+
notes: "Optional, must be a number or #{special_values_sentence}"
278276
}
279277
]
280278
end

app/components/app_vaccinate_form_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def delivery_method
3737
end
3838

3939
def dose_sequence
40-
1
40+
programme.vaccinated_dose_sequence == 1 ? 1 : nil
4141
end
4242

4343
def common_delivery_sites_options

app/components/app_vaccination_record_summary_component.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ def dose_number_value
318318
end
319319

320320
def dose_number
321-
return nil if @vaccine&.seasonal? || @vaccination_record.dose_sequence.nil?
321+
return nil if @vaccine&.seasonal?
322+
323+
return "Unknown" if @vaccination_record.dose_sequence.nil?
322324

323325
numbers_to_words = {
324326
1 => "First",

app/controllers/draft_vaccination_records_controller.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ def handle_date_and_time
8383
def handle_outcome
8484
# If not administered we can skip the remaining steps as they're not relevant.
8585
jump_to("confirm") unless @draft_vaccination_record.administered?
86-
87-
# TODO: Require the nurse to specify the dose sequence.
88-
@draft_vaccination_record.dose_sequence ||=
89-
1 if @draft_vaccination_record.administered?
9086
end
9187

9288
def handle_batch

app/forms/vaccinate_form.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class VaccinateForm
2525
validates :no_allergies, inclusion: { in: [true, false] }
2626

2727
validate :valid_administered_values
28-
validates :dose_sequence, presence: true
2928
validates :programme_id, presence: true
3029

3130
with_options if: :administered do

app/lib/reports/offline_session_exporter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def add_new_row_cells(row, patient_session:, programme:)
316316
row[:anatomical_site] = Cell.new(
317317
allowed_values: ImmunisationImportRow::DELIVERY_SITES.keys
318318
)
319-
row[:dose_sequence] = programme.vaccinated_dose_sequence
319+
row[:dose_sequence] = 1 if programme.vaccinated_dose_sequence == 1
320320
row[:reason_not_vaccinated] = Cell.new(
321321
allowed_values: ImmunisationImportRow::REASONS.keys
322322
)

app/models/draft_vaccination_record.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def wizard_steps
9393
validates :batch_id,
9494
:delivery_method,
9595
:delivery_site,
96-
:dose_sequence,
9796
:performed_at,
9897
:vaccine_id,
9998
presence: true

spec/features/hpv_vaccination_administered_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def then_i_see_that_the_status_is_vaccinated
205205

206206
def and_i_see_the_vaccination_details
207207
expect(page).to have_content("Vaccination details").once
208+
expect(page).to have_content("Dose numberFirst")
208209
end
209210

210211
def when_i_go_to_the_register_tab

spec/features/td_ipv_vaccination_administered_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ def then_i_see_that_the_status_is_vaccinated
200200
end
201201

202202
def and_i_see_the_vaccination_details
203-
# TODO: Check dose sequence is fifth.
204203
expect(page).to have_content("Vaccination details").once
204+
expect(page).to have_content("Dose numberUnknown")
205205
end
206206

207207
def when_vaccination_confirmations_are_sent

0 commit comments

Comments
 (0)