From 61f4ab0a9d67228ded9ce96c5831458b8dec5f7c Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Mon, 8 Sep 2025 17:22:33 +0100 Subject: [PATCH] Make flu SystmOne codes based on dose sequence In 1a2f96876702a4da675b5045ff2fd4904bc1ba34 I added the SystmOne codes for flu under the assumption that the dose sequence would be `nil`, but actually the dose sequence will instead be `1`. This fixes an issue where the codes weren't coming through correctly. Jira-Issue: MAV-1678 --- app/lib/reports/systm_one_exporter.rb | 8 ++++---- spec/lib/reports/systm_one_exporter_spec.rb | 12 +----------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/app/lib/reports/systm_one_exporter.rb b/app/lib/reports/systm_one_exporter.rb index f2edba3562..330737a369 100644 --- a/app/lib/reports/systm_one_exporter.rb +++ b/app/lib/reports/systm_one_exporter.rb @@ -10,7 +10,7 @@ class Reports::SystmOneExporter VACCINE_DOSE_MAPPINGS = { "Cell-based Trivalent Influenza Vaccine Seqirus" => { - nil => "YcjYj" + 1 => "YcjYj" }, "Gardasil 9" => { 1 => "Y19a4", @@ -18,13 +18,13 @@ class Reports::SystmOneExporter 3 => "Y19a6" }, "Fluenz" => { - nil => "YcjAC" + 1 => "YcjAC" }, "Vaxigrip" => { - nil => "YcjYf" + 1 => "YcjYf" }, "Viatris" => { - nil => "YcjYh" + 1 => "YcjYh" } }.freeze diff --git a/spec/lib/reports/systm_one_exporter_spec.rb b/spec/lib/reports/systm_one_exporter_spec.rb index bc6ab828ef..10bb40d575 100644 --- a/spec/lib/reports/systm_one_exporter_spec.rb +++ b/spec/lib/reports/systm_one_exporter_spec.rb @@ -224,7 +224,7 @@ context "flu" do let(:programme) { create(:programme, :flu_all_vaccines) } - let(:dose_sequence) { nil } + let(:dose_sequence) { 1 } context "Cell-based Trivalent Influenza Vaccine Seqirus" do let(:vaccine) do @@ -368,10 +368,6 @@ let(:delivery_method) { :nasal_spray } let(:delivery_site) { :nose } - it "uses the generic SystmOne code" do - expect(csv_row["Vaccination"]).to eq "Fluenz Part 1" - end - it "uses 'Nasal' as the method" do expect(csv_row["Method"]).to eq "Nasal" end @@ -389,12 +385,6 @@ let(:delivery_method) { :intramuscular } let(:delivery_site) { :right_arm_upper_position } - it "uses the generic SystmOne code" do - expect( - csv_row["Vaccination"] - ).to eq "Cell-based Trivalent Influenza Vaccine Seqirus Part 1" - end - it "uses 'Intramuscular' as the method" do expect(csv_row["Method"]).to eq "Intramuscular" end