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 @@ -30,7 +30,8 @@ export const Adjustment = {
LastAppointment: 'Needs the last appointment',
Privacy: 'Needs a private space',
HomeVisit: 'Needs a home visit',
Other: 'Other reasonable adjustment'
Other: 'Other reasonable adjustment',
None: 'No adjustments required'
}

/**
Expand Down Expand Up @@ -225,7 +226,8 @@ export const Impairment = {
Memory: 'Memory',
MentalHealth: 'Mental health',
Communicative: 'Social and/or communication differences',
Other: 'Other'
Other: 'Other',
None: 'None'
}

/**
Expand Down
10 changes: 8 additions & 2 deletions app/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ export const en = {
'Book an appointment for the MenACWY and Td/IPV vaccinations',
[SessionPresetName.HPV]: 'Book an appointment for the HPV vaccination',
[SessionPresetName.MMR]:
'Book an appointment for an MMR or MMR(V) catch-up vaccination'
'Book an appointment for an MMR or MMRV catch-up vaccination'
},
primaryProgrammeInSentence: {
[SessionPresetName.Flu]: 'flu',
[SessionPresetName.Doubles]: 'MenACWY and Td/IPV',
[SessionPresetName.HPV]: 'HPV',
[SessionPresetName.MMR]: 'MMR or MMR(V)'
[SessionPresetName.MMR]: 'MMR and MMRV'
},
confirm: {
title: 'Book an appointment',
Expand Down Expand Up @@ -650,6 +650,9 @@ export const en = {
},
other: {
label: 'Other'
},
none: {
label: 'No, my child does not need any adjustments'
}
},
adjustmentsOther: {
Expand All @@ -676,6 +679,9 @@ export const en = {
},
communicative: {
hint: 'For example, related to autism or ADHD (attention deficit hyperactivity disorder)'
},
none: {
label: 'No, my child has no impairments'
}
},
impairmentsOther: {
Expand Down
11 changes: 11 additions & 0 deletions app/models/child.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,17 @@ export class Child {
return `${this.formatted.dob} (aged ${this.age})`
}

/**
* Can the child be offered the MMRV vaccine rather than MMR?
*
* Note: This property makes no assessment of their <b>need</b> for a vaccination
*
* @returns {boolean} - true if can be offered MMRV, or false if they should only receive MMR
*/
get canBeOfferedMmrv() {
return this.dob?.getFullYear() >= 2020
}

/**
* Get formatted ethnicity (ethnic group and background)
*
Expand Down
33 changes: 15 additions & 18 deletions app/views/book-into-a-clinic/form/adjustments.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,16 @@
}
},
items: [{
text: __("consent.child.adjustments.guideDog.label"),
value: Adjustment.GuideDog
}, {
text: __("consent.child.adjustments.distraction.label"),
value: Adjustment.Distraction
}, {
text: __("consent.child.adjustments.extendedAppointment.label"),
value: Adjustment.ExtendedAppointment
}, {
text: __("consent.child.adjustments.firstAppointment.label"),
value: Adjustment.FirstAppointment
}, {
text: __("consent.child.adjustments.lastAppointment.label"),
value: Adjustment.LastAppointment
value: Adjustment.Distraction,
exclusiveGroup: "adjustments-list"
}, {
text: __("consent.child.adjustments.privacy.label"),
value: Adjustment.Privacy,
hint: {
text: __("consent.child.adjustments.privacy.hint")
}
}, {
text: __("consent.child.adjustments.homeVisit.label"),
value: Adjustment.HomeVisit
},
exclusiveGroup: "adjustments-list"
}, {
text: __("consent.child.adjustments.other.label"),
value: Adjustment.Other,
Expand All @@ -47,7 +34,17 @@
label: { text: __("consent.child.adjustmentsOther.title") },
decorate: "consent.child.adjustmentsOther"
})
}
},
exclusiveGroup: "adjustments-list"
},
{
divider: 'or'
},
{
text: __("consent.child.adjustments.none.label"),
value: Adjustment.None,
exclusiveGroup: "adjustments-list",
exclusive: true
}],
decorate: "consent.child.adjustments"
}) }}
Expand Down
30 changes: 23 additions & 7 deletions app/views/book-into-a-clinic/form/impairments.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,56 @@
text: Impairment.Vision,
hint: {
text: __("consent.child.impairments.vision.hint")
}
},
exclusiveGroup: "impairments-list"
}, {
text: Impairment.Hearing,
hint: {
text: __("consent.child.impairments.hearing.hint")
}
},
exclusiveGroup: "impairments-list"
}, {
text: Impairment.Mobility,
hint: {
text: __("consent.child.impairments.mobility.hint")
}
},
exclusiveGroup: "impairments-list"
}, {
text: Impairment.Memory,
hint: {
text: __("consent.child.impairments.memory.hint")
}
},
exclusiveGroup: "impairments-list"
}, {
text: Impairment.MentalHealth,
hint: {
text: __("consent.child.impairments.mentalHealth.hint")
}
},
exclusiveGroup: "impairments-list"
}, {
text: Impairment.Communicative,
hint: {
text: __("consent.child.impairments.communicative.hint")
}
},
exclusiveGroup: "impairments-list"
}, {
text: Impairment.Other,
conditional: {
html: input({
label: { text: __("consent.child.impairmentsOther.title") },
decorate: "consent.child.impairmentsOther"
})
}
},
exclusiveGroup: "impairments-list"
},
{
divider: 'or'
},
{
text: __("consent.child.impairments.none.label"),
value: Impairment.None,
exclusiveGroup: "impairments-list",
exclusive: true
}],
decorate: "consent.child.impairments"
}) }}
Expand Down
8 changes: 6 additions & 2 deletions app/views/book-into-a-clinic/form/vaccination-choice.njk
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@
value: 'td-ipv',
hint: { text: 'Protects against tetanus, diphtheria and polio' }
},{
text: 'MMR(V)',
text: 'MMRV',
value: 'mmr',
hint: { text: 'Protects against measles, mumps, rubella and varicella (chickenpox)' }
}],
} if appointment.child.canBeOfferedMmrv,{
text: 'MMR',
value: 'mmr',
hint: { text: 'Protects against measles, mumps and rubella' }
} if not appointment.child.canBeOfferedMmrv],
decorate: "appointment.selected_programme_ids"
}) }}
{% endblock %}
1 change: 0 additions & 1 deletion app/views/book-into-a-clinic/start.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
If your child has not been vaccinated at school, or is not up to date with their vaccinations for any other reason, you can book into a clinic.
</p>

{# TODO: change the use of sessionPreset.name here to a more public-facing name. For example, present "MenACWY and Td/IPC" instead of "Doubles" #}
<p>
Clinics have recently been set up to offer {{ __("clinicBooking.start.primaryProgrammeInSentence." + sessionPreset.name) }} vaccinations, but your child may be able to catch up on any outstanding
vaccinations during their appointment.
Expand Down