Skip to content

Commit 15eb7bc

Browse files
committed
Update SNOMED codes/terms for second dose of MMR/MMRV
1 parent 4e2effe commit 15eb7bc

2 files changed

Lines changed: 90 additions & 28 deletions

File tree

app/models/vaccine.rb

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,40 @@ def self.delivery_method_to_vaccine_method(delivery_method)
154154
}
155155
},
156156
"mmr" => {
157-
"injection" => {
158-
code: "38598009",
159-
term:
160-
"Administration of vaccine product containing only Measles " \
161-
"morbillivirus and Mumps orthorubulavirus and Rubella virus " \
162-
"antigens"
163-
}
157+
"injection" => [
158+
{
159+
code: "38598009",
160+
term:
161+
"Administration of vaccine product containing only Measles " \
162+
"morbillivirus and Mumps orthorubulavirus and Rubella virus " \
163+
"antigens"
164+
},
165+
{
166+
code: "170433008",
167+
term:
168+
"Administration of second dose of vaccine product containing only " \
169+
"Measles morbillivirus and Mumps orthorubulavirus and Rubella virus " \
170+
"antigens"
171+
}
172+
]
164173
},
165174
"mmrv" => {
166-
"injection" => {
167-
code: "432636005",
168-
term:
169-
"Administration of vaccine product containing only Human " \
170-
"alphaherpesvirus 3 and Measles morbillivirus and Mumps " \
171-
"orthorubulavirus and Rubella virus antigens"
172-
}
175+
"injection" => [
176+
{
177+
code: "432636005",
178+
term:
179+
"Administration of vaccine product containing only Human " \
180+
"alphaherpesvirus 3 and Measles morbillivirus and Mumps " \
181+
"orthorubulavirus and Rubella virus antigens"
182+
},
183+
{
184+
code: "433733003",
185+
term:
186+
"Administration of second dose of vaccine product containing " \
187+
"only Human alphaherpesvirus 3 and Measles morbillivirus and " \
188+
"Mumps orthorubulavirus and Rubella virus antigens"
189+
}
190+
]
173191
},
174192
"td_ipv" => {
175193
"injection" => {

spec/models/vaccine_spec.rb

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,33 @@
9191
context "with an MMR vaccine" do
9292
let(:vaccine) { build(:vaccine, :mmr) }
9393

94-
it { should eq("38598009") }
94+
context "and first dose" do
95+
let(:dose_sequence) { 1 }
96+
97+
it { should eq("38598009") }
98+
end
99+
100+
context "and second dose" do
101+
let(:dose_sequence) { 2 }
102+
103+
it { should eq("170433008") }
104+
end
95105
end
96106

97107
context "with an MMRV vaccine" do
98108
let(:vaccine) { build(:vaccine, :mmrv) }
99109

100-
it { should eq("432636005") }
110+
context "and first dose" do
111+
let(:dose_sequence) { 1 }
112+
113+
it { should eq("432636005") }
114+
end
115+
116+
context "and second dose" do
117+
let(:dose_sequence) { 2 }
118+
119+
it { should eq("433733003") }
120+
end
101121
end
102122
end
103123

@@ -145,24 +165,48 @@
145165
context "with an MMR vaccine" do
146166
let(:vaccine) { build(:vaccine, :mmr) }
147167

148-
it do
149-
expect(vaccine.snomed_procedure_term).to eq(
150-
"Administration of vaccine product containing only Measles " \
151-
"morbillivirus and Mumps orthorubulavirus and Rubella virus " \
152-
"antigens"
153-
)
168+
context "with dose sequence 1" do
169+
it do
170+
expect(vaccine.snomed_procedure_term(dose_sequence: 1)).to eq(
171+
"Administration of vaccine product containing only Measles " \
172+
"morbillivirus and Mumps orthorubulavirus and Rubella virus " \
173+
"antigens"
174+
)
175+
end
176+
end
177+
178+
context "with dose sequence 2" do
179+
it do
180+
expect(vaccine.snomed_procedure_term(dose_sequence: 2)).to eq(
181+
"Administration of second dose of vaccine product containing only " \
182+
"Measles morbillivirus and Mumps orthorubulavirus and Rubella virus " \
183+
"antigens"
184+
)
185+
end
154186
end
155187
end
156188

157189
context "with an MMRV vaccine" do
158190
let(:vaccine) { build(:vaccine, :mmrv) }
159191

160-
it do
161-
expect(vaccine.snomed_procedure_term).to eq(
162-
"Administration of vaccine product containing only Human " \
163-
"alphaherpesvirus 3 and Measles morbillivirus and Mumps " \
164-
"orthorubulavirus and Rubella virus antigens"
165-
)
192+
context "with dose sequence 1" do
193+
it do
194+
expect(vaccine.snomed_procedure_term(dose_sequence: 1)).to eq(
195+
"Administration of vaccine product containing only Human " \
196+
"alphaherpesvirus 3 and Measles morbillivirus and Mumps " \
197+
"orthorubulavirus and Rubella virus antigens"
198+
)
199+
end
200+
end
201+
202+
context "with dose sequence 2" do
203+
it do
204+
expect(vaccine.snomed_procedure_term(dose_sequence: 2)).to eq(
205+
"Administration of second dose of vaccine product containing " \
206+
"only Human alphaherpesvirus 3 and Measles morbillivirus and " \
207+
"Mumps orthorubulavirus and Rubella virus antigens"
208+
)
209+
end
166210
end
167211
end
168212
end

0 commit comments

Comments
 (0)