Skip to content

Commit b540c85

Browse files
Add London flu service as a separate vaccine type (#412)
As an alternative to #395, this adds the London flu service eligibility options by creating a separate vaccine type instead. This would be technically simpler to develop, but would have the downside of requiring pharmacies to double enter all their flu vaccine batch numbers and expiry dates, as they use the same physical vaccines for both the National and London flu campaigns. ## Screenshots | | Before | After | |--|--------|-------| | Adding batch | <img width="511" height="282" alt="Screenshot 2025-07-21 at 12 06 02" src="https://github.com/user-attachments/assets/3ead6862-7491-48f8-bc2c-e40b6d0aea5f" /> | <img width="604" height="336" alt="Screenshot 2025-07-22 at 11 49 42" src="https://github.com/user-attachments/assets/9d537b8f-0803-4180-bab3-2d65ecb74212" /> | | Selecting vaccine when recording | <img width="707" height="474" alt="Screenshot 2025-07-21 at 12 04 56" src="https://github.com/user-attachments/assets/519747cd-27c3-44cd-9ee6-74587785babf" /> | <img width="634" height="517" alt="Screenshot 2025-07-22 at 12 01 11" src="https://github.com/user-attachments/assets/dac27146-4cc6-4235-aba3-1245b49edbd4" /> | | Eligibility | <img width="755" height="1101" alt="Screenshot 2025-07-21 at 12 06 54" src="https://github.com/user-attachments/assets/32135198-735d-4550-8540-536e318e3766" /> | <img width="620" height="621" alt="Screenshot 2025-07-21 at 12 07 21" src="https://github.com/user-attachments/assets/fbace5c9-28ec-4441-9695-381beead8b08" /> or <img width="633" height="762" alt="Screenshot 2025-07-21 at 12 07 40" src="https://github.com/user-attachments/assets/d8dc87c8-760e-4765-97c2-19e4d9a8784f" /> |
1 parent 00ed4a4 commit b540c85

File tree

5 files changed

+31
-38
lines changed

5 files changed

+31
-38
lines changed

app/data/organisations.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,8 @@ module.exports = [
944944
{name: "RSV", status: "disabled"},
945945
{name: "COVID-19", status: "enabled"},
946946
{name: "pertussis", status: "disabled"},
947-
{name: "flu", status: "enabled"}
947+
{name: "flu", status: "enabled"},
948+
{name: "flu (London service)", status: "enabled"}
948949
],
949950
sites: [
950951
{

app/data/vaccines.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,29 @@ module.exports = [
3939
}
4040
]
4141
},
42+
{
43+
name: "flu (London service)",
44+
products: [
45+
{
46+
name: "Adjuvanted Quadrivalent Influenza Vaccine (aQIV)"
47+
},
48+
{
49+
name: "Cell-based Quadrivalent Influenza Vaccine (QIVc)"
50+
},
51+
{
52+
name: "Fluenz (LAIV)"
53+
},
54+
{
55+
name: "Influenza Tetra MYL (QIVe)"
56+
},
57+
{
58+
name: "Quadrivalent Influenza Vaccine (QIVe)"
59+
},
60+
{
61+
name: "Quadrivalent Influenza Vaccine - High Dose (QIV-HD)"
62+
}
63+
]
64+
},
4265
{
4366
name: "pertussis",
4467
products: [

app/routes/record-vaccinations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ module.exports = router => {
777777
redirectPath = "/record-vaccinations/add-batch"
778778
} else if (!vaccineBatch) {
779779
redirectPath = "/record-vaccinations/batch?showError=yes"
780-
} else if (["COVID-19", "flu", "RSV", "pneumococcal"].includes(data.vaccine)) {
780+
} else if (["COVID-19", "flu", "flu (London service)", "RSV", "pneumococcal"].includes(data.vaccine)) {
781781
redirectPath = "/record-vaccinations/eligibility"
782782
} else if (data.repeatPatient === "yes") {
783783
redirectPath = "/record-vaccinations/patient-estimated-due-date"

app/routes/vaccines.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ module.exports = (router) => {
4949

5050
const organisationVaccines = res.locals.currentOrganisation.vaccines || []
5151

52-
const vaccinesEnabled = organisationVaccines
52+
const vaccinesEnabledNames = organisationVaccines
5353
.filter((vaccine) => vaccine.status === "enabled")
54-
55-
const vaccinesEnabledNames = vaccinesEnabled
5654
.map((vaccine) => vaccine.name)
5755

5856
const allVaccines = data.vaccines
5957

58+
const vaccinesEnabled = allVaccines.filter((vaccine) => vaccinesEnabledNames.includes(vaccine.name))
59+
6060
const vaccinesDisabled = allVaccines.filter((vaccine) => !vaccinesEnabledNames.includes(vaccine.name))
6161

6262
res.render('vaccines/choose-vaccine', {

app/views/record-vaccinations/eligibility.html

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
{% set eligibilityOptions = CovidEligibilityOptions %}
7777
{% elif data.vaccine == "flu" %}
7878
{% set eligibilityOptions = NationalFluEligibilityOptions %}
79+
{% elif data.vaccine == "flu (London service)" %}
80+
{% set eligibilityOptions = londonFluEligibilityOptions %}
7981
{% elif data.vaccine == "RSV" %}
8082
{% set eligibilityOptions = RSVEligibilityOptions %}
8183
{% elif data.vaccine == "pneumococcal" %}
@@ -100,39 +102,6 @@
100102
}
101103
}) %}
102104

103-
{% if data.vaccine == "flu" %}
104-
105-
{% set londonFluItems = [] %}
106-
{% for option in londonFluEligibilityOptions %}
107-
{% set londonFluItems = (londonFluItems.push({
108-
text: option,
109-
value: option
110-
}), londonFluItems) %}
111-
{% endfor %}
112-
113-
{% set londonFluHtml %}
114-
{{ radios({
115-
idPrefix: "eligibility-2",
116-
name: "eligibility",
117-
items: londonFluItems,
118-
value: data.eligibility
119-
}) }}
120-
{% endset %}
121-
122-
{% set items = (items.push({
123-
divider: "or"
124-
}), items) %}
125-
126-
{% set items = (items.push({
127-
text: "London flu service",
128-
value: "london-flu",
129-
conditional: {
130-
html: londonFluHtml
131-
}
132-
}), items) %}
133-
134-
{% endif %}
135-
136105
{% if data.vaccine == "pneumococcal" %}
137106
<h2 class="nhsuk-u-font-size-19 nhsuk-u-margin-bottom-2 nhsuk-u-margin-top-3 nhsuk-u-font-weight-normal">Aged 65 and over</h2>
138107
{% endif %}

0 commit comments

Comments
 (0)