Skip to content

Commit 8d5e719

Browse files
Remove product code and term from notes
This removes the logic which puts unrecognised product codes and terms in the notes field. This is no longer needed, because they're saved in their own fields now. Jira-Issue: MAV-5901
1 parent f0081a2 commit 8d5e719

2 files changed

Lines changed: 0 additions & 23 deletions

File tree

app/lib/fhir_mapper/vaccination_record.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def self.from_fhir_record(fhir_record, patient:)
180180
)
181181
else
182182
attrs[:disease_types] = attrs[:programme].disease_types
183-
notes << vaccine_batch_notes_from_fhir(fhir_record)
184183
attrs[:full_dose] = true
185184
end
186185

@@ -319,21 +318,6 @@ def fhir_dose_quantity
319318
end
320319
end
321320

322-
private_class_method def self.vaccine_batch_notes_from_fhir(fhir_record)
323-
fhir_vaccine =
324-
fhir_record.vaccineCode&.coding&.find do
325-
it.system == "http://snomed.info/sct"
326-
end
327-
328-
vaccine_snomed_code = fhir_vaccine&.code
329-
vaccine_description = fhir_vaccine&.display.presence
330-
331-
[
332-
("SNOMED product code: #{vaccine_snomed_code}" if vaccine_snomed_code),
333-
("SNOMED description: #{vaccine_description}" if vaccine_description)
334-
].compact.join("\n").presence
335-
end
336-
337321
def fhir_user_performer(reference_id:)
338322
FHIR::Immunization::Performer.new(
339323
actor: FHIR::Reference.new(reference: "##{reference_id}")

spec/lib/fhir_mapper/vaccination_record_spec.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -982,13 +982,6 @@
982982
should eq "Cell-based trivalent influenza vaccine (surface antigen, inactivated) suspension for injection " \
983983
"0.5ml pre-filled syringes (Seqirus UK Ltd)"
984984
end
985-
986-
its(:notes) do
987-
should include(
988-
"SNOMED product code: 43207411000001106",
989-
"SNOMED description: Cell-based trivalent influenza vaccine"
990-
)
991-
end
992985
end
993986

994987
context "with a record from a GP which is very sparse" do

0 commit comments

Comments
 (0)