Skip to content

Commit 521492c

Browse files
authored
Clinic booking: fixes around impairments, adjustments, and MMRV (#261)
* Remove redundant and unwanted adjustments for clinics Some of the adjustments offered previously were already covered by other pages in the journey (e.g. first or last appointment), while we have had feedback that others are not wanted to be offered by SAIS teams e.g. a dog or the parent's choice for a home visit * Add 'none of the above' style option for impairments and adjustments * Fixes for MMR(V) messaging in clinic booking
1 parent 0e068f3 commit 521492c

7 files changed

Lines changed: 67 additions & 32 deletions

File tree

app/enums.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export const Adjustment = {
3030
LastAppointment: 'Needs the last appointment',
3131
Privacy: 'Needs a private space',
3232
HomeVisit: 'Needs a home visit',
33-
Other: 'Other reasonable adjustment'
33+
Other: 'Other reasonable adjustment',
34+
None: 'No adjustments required'
3435
}
3536

3637
/**
@@ -225,7 +226,8 @@ export const Impairment = {
225226
Memory: 'Memory',
226227
MentalHealth: 'Mental health',
227228
Communicative: 'Social and/or communication differences',
228-
Other: 'Other'
229+
Other: 'Other',
230+
None: 'None'
229231
}
230232

231233
/**

app/locales/en.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,13 @@ export const en = {
260260
'Book an appointment for the MenACWY and Td/IPV vaccinations',
261261
[SessionPresetName.HPV]: 'Book an appointment for the HPV vaccination',
262262
[SessionPresetName.MMR]:
263-
'Book an appointment for an MMR or MMR(V) catch-up vaccination'
263+
'Book an appointment for an MMR or MMRV catch-up vaccination'
264264
},
265265
primaryProgrammeInSentence: {
266266
[SessionPresetName.Flu]: 'flu',
267267
[SessionPresetName.Doubles]: 'MenACWY and Td/IPV',
268268
[SessionPresetName.HPV]: 'HPV',
269-
[SessionPresetName.MMR]: 'MMR or MMR(V)'
269+
[SessionPresetName.MMR]: 'MMR and MMRV'
270270
},
271271
confirm: {
272272
title: 'Book an appointment',
@@ -650,6 +650,9 @@ export const en = {
650650
},
651651
other: {
652652
label: 'Other'
653+
},
654+
none: {
655+
label: 'No, my child does not need any adjustments'
653656
}
654657
},
655658
adjustmentsOther: {
@@ -676,6 +679,9 @@ export const en = {
676679
},
677680
communicative: {
678681
hint: 'For example, related to autism or ADHD (attention deficit hyperactivity disorder)'
682+
},
683+
none: {
684+
label: 'No, my child has no impairments'
679685
}
680686
},
681687
impairmentsOther: {

app/models/child.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ export class Child {
150150
return `${this.formatted.dob} (aged ${this.age})`
151151
}
152152

153+
/**
154+
* Can the child be offered the MMRV vaccine rather than MMR?
155+
*
156+
* Note: This property makes no assessment of their <b>need</b> for a vaccination
157+
*
158+
* @returns {boolean} - true if can be offered MMRV, or false if they should only receive MMR
159+
*/
160+
get canBeOfferedMmrv() {
161+
return this.dob?.getFullYear() >= 2020
162+
}
163+
153164
/**
154165
* Get formatted ethnicity (ethnic group and background)
155166
*

app/views/book-into-a-clinic/form/adjustments.njk

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,16 @@
1616
}
1717
},
1818
items: [{
19-
text: __("consent.child.adjustments.guideDog.label"),
20-
value: Adjustment.GuideDog
21-
}, {
2219
text: __("consent.child.adjustments.distraction.label"),
23-
value: Adjustment.Distraction
24-
}, {
25-
text: __("consent.child.adjustments.extendedAppointment.label"),
26-
value: Adjustment.ExtendedAppointment
27-
}, {
28-
text: __("consent.child.adjustments.firstAppointment.label"),
29-
value: Adjustment.FirstAppointment
30-
}, {
31-
text: __("consent.child.adjustments.lastAppointment.label"),
32-
value: Adjustment.LastAppointment
20+
value: Adjustment.Distraction,
21+
exclusiveGroup: "adjustments-list"
3322
}, {
3423
text: __("consent.child.adjustments.privacy.label"),
3524
value: Adjustment.Privacy,
3625
hint: {
3726
text: __("consent.child.adjustments.privacy.hint")
38-
}
39-
}, {
40-
text: __("consent.child.adjustments.homeVisit.label"),
41-
value: Adjustment.HomeVisit
27+
},
28+
exclusiveGroup: "adjustments-list"
4229
}, {
4330
text: __("consent.child.adjustments.other.label"),
4431
value: Adjustment.Other,
@@ -47,7 +34,17 @@
4734
label: { text: __("consent.child.adjustmentsOther.title") },
4835
decorate: "consent.child.adjustmentsOther"
4936
})
50-
}
37+
},
38+
exclusiveGroup: "adjustments-list"
39+
},
40+
{
41+
divider: 'or'
42+
},
43+
{
44+
text: __("consent.child.adjustments.none.label"),
45+
value: Adjustment.None,
46+
exclusiveGroup: "adjustments-list",
47+
exclusive: true
5148
}],
5249
decorate: "consent.child.adjustments"
5350
}) }}

app/views/book-into-a-clinic/form/impairments.njk

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,56 @@
1616
text: Impairment.Vision,
1717
hint: {
1818
text: __("consent.child.impairments.vision.hint")
19-
}
19+
},
20+
exclusiveGroup: "impairments-list"
2021
}, {
2122
text: Impairment.Hearing,
2223
hint: {
2324
text: __("consent.child.impairments.hearing.hint")
24-
}
25+
},
26+
exclusiveGroup: "impairments-list"
2527
}, {
2628
text: Impairment.Mobility,
2729
hint: {
2830
text: __("consent.child.impairments.mobility.hint")
29-
}
31+
},
32+
exclusiveGroup: "impairments-list"
3033
}, {
3134
text: Impairment.Memory,
3235
hint: {
3336
text: __("consent.child.impairments.memory.hint")
34-
}
37+
},
38+
exclusiveGroup: "impairments-list"
3539
}, {
3640
text: Impairment.MentalHealth,
3741
hint: {
3842
text: __("consent.child.impairments.mentalHealth.hint")
39-
}
43+
},
44+
exclusiveGroup: "impairments-list"
4045
}, {
4146
text: Impairment.Communicative,
4247
hint: {
4348
text: __("consent.child.impairments.communicative.hint")
44-
}
49+
},
50+
exclusiveGroup: "impairments-list"
4551
}, {
4652
text: Impairment.Other,
4753
conditional: {
4854
html: input({
4955
label: { text: __("consent.child.impairmentsOther.title") },
5056
decorate: "consent.child.impairmentsOther"
5157
})
52-
}
58+
},
59+
exclusiveGroup: "impairments-list"
60+
},
61+
{
62+
divider: 'or'
63+
},
64+
{
65+
text: __("consent.child.impairments.none.label"),
66+
value: Impairment.None,
67+
exclusiveGroup: "impairments-list",
68+
exclusive: true
5369
}],
5470
decorate: "consent.child.impairments"
5571
}) }}

app/views/book-into-a-clinic/form/vaccination-choice.njk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@
3434
value: 'td-ipv',
3535
hint: { text: 'Protects against tetanus, diphtheria and polio' }
3636
},{
37-
text: 'MMR(V)',
37+
text: 'MMRV',
3838
value: 'mmr',
3939
hint: { text: 'Protects against measles, mumps, rubella and varicella (chickenpox)' }
40-
}],
40+
} if appointment.child.canBeOfferedMmrv,{
41+
text: 'MMR',
42+
value: 'mmr',
43+
hint: { text: 'Protects against measles, mumps and rubella' }
44+
} if not appointment.child.canBeOfferedMmrv],
4145
decorate: "appointment.selected_programme_ids"
4246
}) }}
4347
{% endblock %}

app/views/book-into-a-clinic/start.njk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
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.
1515
</p>
1616

17-
{# TODO: change the use of sessionPreset.name here to a more public-facing name. For example, present "MenACWY and Td/IPC" instead of "Doubles" #}
1817
<p>
1918
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
2019
vaccinations during their appointment.

0 commit comments

Comments
 (0)