Skip to content

Commit 88699d1

Browse files
Edit the Td/IPV SNOMED code via a data migration
This must be edited directly, rather than using `rake vaccines:seed`, because the rake task uses the SNOMED code as the identifier for the vaccine. This means that it tries to create a new `Vaccine` instead of editing the existing one. Jira-Issue: MAV-7480
1 parent 46a943b commit 88699d1

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
class EditTdipvSnomedCode < ActiveRecord::Migration[8.1]
4+
def change
5+
vaccine = Vaccine.find_by(upload_name: "Revaxis")
6+
Rails.logger.debug "Editing vaccine #{vaccine.id}..."
7+
8+
vaccine.update!(
9+
snomed_product_code: "7374311000001101",
10+
snomed_product_term: "Revaxis vaccine suspension for injection 0.5ml pre-filled syringes (Sanofi)"
11+
)
12+
13+
Rails.logger.debug "Vaccine #{vaccine.id} updated."
14+
end
15+
end

db/data_schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
DataMigrate::Data.define(version: 2026_04_22_155320)
1+
DataMigrate::Data.define(version: 2026_05_01_085904)

0 commit comments

Comments
 (0)