Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,14 @@ export const ReplyMethod = {
* @enum {string}
*/
export const ReplyRefusal = {
Gelatine: 'Vaccine contains gelatine',
Gelatine: 'Nasal vaccine contains gelatine',
GelatineMMR:
'Do not want my child to have the MMR vaccine that contains gelatine',
AlreadyVaccinated: 'Vaccine already received',
AlreadyVaccinatedMMR: 'Already had both doses of the MMR vaccination',
GettingElsewhere: 'Vaccine will be given elsewhere',
Medical: 'Medical reasons',
OutsideSchool: 'Don’t want vaccination in school',
OutsideSchool: 'Do not want vaccination in school',
Personal: 'Personal choice',
Other: 'Other'
}
Expand Down
5 changes: 5 additions & 0 deletions app/utils/reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ export const getRefusalReason = (type, decision) => {
type !== ProgrammeType.Flu ? value !== ReplyRefusal.Gelatine : value
)

// Gelatine content only a valid refusal reason for MMR vaccine
refusalReasons = Object.values(ReplyRefusal).filter((value) =>
type !== ProgrammeType.MMR ? value !== ReplyRefusal.GelatineMMR : value
)

// You cannot decline on the basis of already having had the vaccine
if (decision === ReplyDecision.Declined) {
refusalReasons = refusalReasons.filter((value) =>
Expand Down
5 changes: 4 additions & 1 deletion app/views/parent/form/refusal-reason.njk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
},
{
text: ReplyRefusal.Gelatine
} if vaccineIncludesGelatine,
} if vaccineIncludesGelatine and "Flu" in session.presetNames,
{
text: ReplyRefusal.GelatineMMR
} if vaccineIncludesGelatine and "MMR" in session.presetNames,
{
text: ReplyRefusal.Medical
},
Expand Down
4 changes: 4 additions & 0 deletions app/views/programme/show.njk
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
{ text: ReplyRefusal.Gelatine },
{ text: "11.1%", format: "numeric" }
] if programme.type == ProgrammeType.Flu,
[
{ text: ReplyRefusal.GelatineMMR },
{ text: "11.1%", format: "numeric" }
] if programme.type == ProgrammeType.MMR,
[
{ text: ReplyRefusal.AlreadyVaccinated },
{ text: "2.0%", format: "numeric" }
Expand Down
1 change: 1 addition & 0 deletions app/views/reply/form/refusal-reason.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
items: [
{ text: ReplyRefusal.Gelatine } if programme.type == ProgrammeType.Flu,
{ text: ReplyRefusal.GelatineMMR } if programme.type == ProgrammeType.MMR,
{ text: ReplyRefusal.AlreadyVaccinated },
{ text: ReplyRefusal.GettingElsewhere },
{ text: ReplyRefusal.Medical },
Expand Down
1 change: 1 addition & 0 deletions app/views/reply/form/withdraw.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
items: [
{ text: ReplyRefusal.Gelatine } if programme.type == ProgrammeType.Flu,
{ text: ReplyRefusal.GelatineMMR } if programme.type == ProgrammeType.MMR,
{ text: ReplyRefusal.AlreadyVaccinated },
{ text: ReplyRefusal.GettingElsewhere },
{ text: ReplyRefusal.Medical },
Expand Down