Skip to content

Commit f133faf

Browse files
Update eligibility screens for flu and covid (#395)
This updates the eligibility screens for COVID-19 and Flu ready for the upcoming Autumn/Winter 2025-2026 period. The eligibility options for the COVID-19 vaccine have been reduced, see [guidance letter from NHS England](https://www.england.nhs.uk/long-read/flu-and-covid-19-seasonal-vaccination-programme-autumn-winter-2025-26/). For flu, we no longer need to based our eligibility options on the Extended Attributes specification, as this will no longer be used, so we have taken the opportunity to rationalise the options slightly, with "In a critical risk group" covering "Immunosuppressed" and "Has had CAR-T therapy". This also adds in the additional flu eligibility criteria which would only be shown to London pharmacies participating in the London flu vaccination programme, which adds some additional eligibility groups. ## Screenshots | | Before | After | |--|--------|-------| | Flu | <img width="1706" height="1739" alt="flu-before" src="https://github.com/user-attachments/assets/160481fb-f605-4fca-b9b5-a3c0bb29adad" /> | <img width="1625" height="2443" alt="flu-after" src="https://github.com/user-attachments/assets/c2a7c9d5-410a-4e70-bf58-84e1447779c3" /> | | COVID-19 | <img width="880" height="918" alt="covid-before" src="https://github.com/user-attachments/assets/982a059c-96ed-4724-9722-cceaedc4a76f" /> | <img width="656" height="422" alt="covid-after" src="https://github.com/user-attachments/assets/c19d033f-0971-4594-9835-391c32a927f5" /> |
1 parent f0d1236 commit f133faf

File tree

2 files changed

+101
-76
lines changed

2 files changed

+101
-76
lines changed

app/views/record-vaccinations/eligibility.html

Lines changed: 98 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,42 @@
88
{{ backLink({ href: "/record-vaccinations/batch" }) }}
99
{% endblock %}
1010

11+
{% set CovidEligibilityOptions = [
12+
"Resident in a care home",
13+
"Aged 75 and over, and not in a care home",
14+
"Immunosuppressed"
15+
] %}
16+
17+
{% set RSVEligibilityOptions = [
18+
"Aged 75 to 80",
19+
"Pregnant"
20+
] %}
21+
22+
{% set NationalFluEligibilityOptions = [
23+
"Based on age",
24+
"Healthcare worker",
25+
"Pregnant",
26+
"In a clinical risk group",
27+
"Resident in a care home",
28+
"Carer",
29+
"Social care worker",
30+
"Household contact of someone immunosuppressed"
31+
] %}
32+
33+
{% set londonFluEligibilityOptions = [
34+
"Homeless",
35+
"Gypsy, Roma and Traveller communities",
36+
"Sex worker",
37+
"Learning disability",
38+
"Mental health condition",
39+
"In a detained estate or in contact with justice system",
40+
"Migrant or asylum seeker",
41+
"Victim of modern slavery",
42+
"Drug or alcohol dependency",
43+
"Another health exclusion group based on local need",
44+
"Healthcare worker not covered by national criteria"
45+
] %}
46+
1147
{% block content %}
1248
<div class="nhsuk-grid-row">
1349
<div class="nhsuk-grid-column-two-thirds">
@@ -21,86 +57,73 @@
2157

2258
<form action="/record-vaccinations/answer-eligibility" method="post" novalidate>
2359

24-
{% if data.vaccine == "COVID-19" %}
25-
{% set eligibilityOptions = [
26-
"Resident in a care home",
27-
"Staff in a care home",
28-
"Healthcare worker",
29-
"Social care worker",
30-
"Based on age",
31-
"Pregnant",
32-
"Immunosuppressed",
33-
"In a clinical risk group",
34-
"Homeless or living in a closed setting",
35-
"Household contact of someone immunosuppressed",
36-
"Carer",
37-
"Has had CAR-T therapy or a stem cell transplant since their last vaccination"
38-
] %}
39-
{% elif data.vaccine == "flu" %}
40-
{% set eligibilityOptions = [
41-
"Resident in a care home",
42-
"Staff in a care home",
43-
"Healthcare worker",
44-
"Social worker",
45-
"Based on age",
46-
"Pregnant",
47-
"Immunosuppressed",
48-
"In a clinical risk group",
49-
"Household contact of someone immunosuppressed",
50-
"Carer",
51-
"Has had CAR-T therapy or a stem cell transplant since their last vaccination"
52-
] %}
53-
{% elif data.vaccine == "RSV" %}
54-
{% set eligibilityOptions = [
55-
"Aged 75 to 80",
56-
"Pregnant"
57-
] %}
58-
{% else %}
59-
{% set eligibilityOptions = [] %}
60-
{% endif %}
60+
{% if data.vaccine == "COVID-19" %}
61+
{% set eligibilityOptions = CovidEligibilityOptions %}
62+
{% elif data.vaccine == "flu" %}
63+
{% set eligibilityOptions = NationalFluEligibilityOptions %}
64+
{% elif data.vaccine == "RSV" %}
65+
{% set eligibilityOptions = RSVEligibilityOptions %}
66+
{% else %}
67+
{% set eligibilityOptions = [] %}
68+
{% endif %}
6169

62-
{% set items = [] %}
63-
{% for option in eligibilityOptions %}
64-
{% set items = (items.push({
65-
text: option,
66-
value: option,
67-
checked: (data.eligibility | arrayOrStringIncludes(option))
68-
}), items) %}
69-
{% endfor %}
70-
71-
{% if data.vaccine == "RSV" %}
72-
{{ radios({
73-
idPrefix: "eligibility",
74-
name: "eligibility",
75-
fieldset: {
76-
legend: {
77-
text: "Why are you giving them the vaccine?",
78-
classes: "nhsuk-fieldset__legend--l",
79-
isPageHeading: true
80-
}
81-
},
82-
items: items
83-
}) }}
84-
{% else %}
85-
{{ checkboxes({
70+
{% set items = [] %}
71+
{% for option in eligibilityOptions %}
72+
{% set items = (items.push({
73+
text: option,
74+
value: option,
75+
checked: (data.eligibility | arrayOrStringIncludes(option))
76+
}), items) %}
77+
{% endfor %}
78+
79+
{% call fieldset({
80+
legend: {
81+
text: "Why are you giving them the vaccine?",
82+
classes: "nhsuk-fieldset__legend--l",
83+
isPageHeading: true
84+
}
85+
}) %}
86+
87+
{% if data.vaccine == "flu" %}
88+
89+
{% set londonFluItems = [] %}
90+
{% for option in londonFluEligibilityOptions %}
91+
{% set londonFluItems = (londonFluItems.push({
92+
text: option,
93+
value: option,
94+
checked: (data.eligibility | arrayOrStringIncludes(option))
95+
}), londonFluItems) %}
96+
{% endfor %}
97+
98+
{% set londonFluHtml %}
99+
{{ radios({
100+
idPrefix: "eligibility-2",
101+
name: "eligibility",
102+
items: londonFluItems
103+
}) }}
104+
{% endset %}
105+
106+
{% set items = (items.push({
107+
divider: "or"
108+
}), items) %}
109+
110+
{% set items = (items.push({
111+
text: "London flu service",
112+
value: "london-flu",
113+
conditional: {
114+
html: londonFluHtml
115+
}
116+
}), items) %}
117+
118+
{% endif %}
119+
120+
{{ radios({
86121
idPrefix: "eligibility",
87122
name: "eligibility",
88-
errorMessage: {
89-
text: (errors | first).text
90-
} if (errors | length) > 0,
91-
fieldset: {
92-
legend: {
93-
text: "Why are you giving them the vaccine?",
94-
classes: "nhsuk-fieldset__legend--l",
95-
isPageHeading: true
96-
}
97-
},
98-
hint: {
99-
text: "You can select more than 1 option. But only the first option selected is sent to NHS England."
100-
},
101123
items: items
102124
}) }}
103-
{% endif %}
125+
126+
{% endcall %}
104127

105128
{{ button({
106129
text: "Continue"

app/views/record-vaccinations/vaccine.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
"text": "Vaccine product"
7171
}
7272
},
73-
"items": productItems
73+
"items": productItems,
74+
value: data.vaccineProduct
7475
}) }}
7576
{% endset %}
7677
{% endif %}
@@ -94,6 +95,7 @@
9495
"isPageHeading": true
9596
}
9697
},
98+
value: data.vaccine,
9799
errorMessage: {
98100
text: vaccineError
99101
} if vaccineError,

0 commit comments

Comments
 (0)