Skip to content

Commit 9598d7b

Browse files
johnrimmer2Anna-Suttonfrankieroberto
authored
Add flu nasal spray half dose question (#426)
This adds a new question which is only asked for the Fluent flu nasal spray. The nasal spray is designed to be given in both nostrils. However as it is given to children, if the child responds in a way that makes it difficult or too traumatic to do the spray in the second nostril, then a single dose can be given and should remain effective. We’ve been asked by UKSHA to record whether a full or half dose was given, for vaccine effectiveness monitoring. ## Screenshots ### New question <img width="800" height="412" alt="Screenshot 2025-08-28 at 11 54 22" src="https://github.com/user-attachments/assets/472981dd-90b1-48b2-990c-76faade229f4" /> ### Showing error message (if neither option selected) <img width="821" height="640" alt="Screenshot 2025-08-28 at 11 45 17" src="https://github.com/user-attachments/assets/fd982038-a4e2-4f27-8c2a-0e65f2d94592" /> ## Shown on the Check answers page <img width="702" height="577" alt="Screenshot 2025-08-28 at 13 10 47" src="https://github.com/user-attachments/assets/e342e750-f238-404a-acf8-f7b212170622" /> --------- Co-authored-by: Anna-Sutton <[email protected]> Co-authored-by: Frankie Roberto <[email protected]> Co-authored-by: Frankie Roberto <[email protected]>
1 parent 224d059 commit 9598d7b

File tree

3 files changed

+124
-2
lines changed

3 files changed

+124
-2
lines changed

app/routes/record-vaccinations.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ module.exports = router => {
658658
data.consentAdvocateName = ""
659659
data.consentDeputyName = ""
660660
data.healthcareWorker = ""
661+
data.doseAmount = ""
661662
}
662663

663664
if (answer === 'same-vaccination-another-patient') {
@@ -689,6 +690,7 @@ module.exports = router => {
689690
req.session.data.vaccineProduct = ""
690691
req.session.data.vaccineBatch = ""
691692
req.session.data.eligibility = ""
693+
req.session.data.nhsNumber = ""
692694

693695
res.redirect('/record-vaccinations/vaccine')
694696
} else {
@@ -1001,11 +1003,55 @@ router.get('/record-vaccinations/check', (req, res) => {
10011003
const otherInjectionSite = data.otherInjectionSite
10021004
let redirectPath = "/record-vaccinations/check"
10031005

1006+
10041007
if (!injectionSite || (injectionSite === "other" && !otherInjectionSite)) {
10051008
redirectPath = "/record-vaccinations/injection-site?showErrors=yes"
1009+
} else if (data.vaccineProduct == "Fluenz (LAIV)") {
1010+
1011+
// Fluenz is a nasal spray which gets an extra question
1012+
redirectPath = "/record-vaccinations/dose-amount"
10061013
}
10071014

10081015
res.redirect(redirectPath)
10091016
})
10101017

1018+
router.get('/record-vaccinations/dose-amount', (req, res) => {
1019+
const data = req.session.data
1020+
const doseAmount = data.doseAmount
1021+
1022+
let errors = []
1023+
let doseAmountError
1024+
1025+
if (req.query.showErrors === "yes") {
1026+
1027+
if (!doseAmount || doseAmount === "") {
1028+
doseAmountError = {
1029+
text: "Select yes if you gave a full dose",
1030+
href: "#dose-amount"
1031+
}
1032+
errors.push(doseAmountError)
1033+
}
1034+
}
1035+
1036+
res.render('record-vaccinations/dose-amount', {
1037+
errors,
1038+
doseAmountError
1039+
})
1040+
})
1041+
1042+
router.post('/record-vaccinations/answer-dose-amount', (req, res) => {
1043+
const data = req.session.data
1044+
const doseAmount = data.doseAmount
1045+
let redirectPath
1046+
1047+
1048+
if (doseAmount && doseAmount != "") {
1049+
res.redirect("/record-vaccinations/check")
1050+
} else {
1051+
1052+
// Redirect back to the question and show an error
1053+
res.redirect("/record-vaccinations/dose-amount?showErrors=yes")
1054+
}
1055+
})
1056+
10111057
}

app/views/record-vaccinations/check.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ <h2 class="nhsuk-heading-m">Vaccination</h2>
232232
]
233233
}
234234
},
235-
{
235+
{
236236
key: {
237237
text: "Vaccinator"
238238
},
@@ -350,7 +350,24 @@ <h2 class="nhsuk-heading-m">Vaccination</h2>
350350
}
351351
]
352352
}
353-
}
353+
},
354+
{
355+
key: {
356+
text: "Dose"
357+
},
358+
value: {
359+
text: data.doseAmount
360+
},
361+
actions: {
362+
items: [
363+
{
364+
href: "/record-vaccinations/dose-amount",
365+
text: "Change",
366+
visuallyHiddenText: "dose amount"
367+
}
368+
]
369+
}
370+
} if data.doseAmount
354371
]
355372
}) }}
356373

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{% extends 'layout.html' %}
2+
3+
{% set pageName = "Did you give a full dose of the vaccine?" %}
4+
5+
{% set currentSection = "vaccinate" %}
6+
7+
{% block beforeContent %}
8+
{{ backLink({ href: "/record-vaccinations/injection-site" }) }}
9+
{% endblock %}
10+
11+
{% block content %}
12+
<div class="nhsuk-grid-row">
13+
<div class="nhsuk-grid-column-two-thirds">
14+
15+
{% if (errors | length) > 0 %}
16+
{{ errorSummary({
17+
titleText: "There is a problem",
18+
errorList: errors
19+
}) }}
20+
{% endif %}
21+
22+
<form action="/record-vaccinations/answer-dose-amount" method="post" novalidate>
23+
24+
{{ radios({
25+
idPrefix: "dose-amount",
26+
name: "doseAmount",
27+
fieldset: {
28+
legend: {
29+
text: ("Did you give a full dose of the vaccine?" if data.vaccinationToday == 'yes' else "Was a full dose of the vaccine given?"),
30+
classes: "nhsuk-fieldset__legend--l",
31+
isPageHeading: true
32+
}
33+
},
34+
value: data.doseAmount,
35+
errorMessage: {
36+
text: doseAmountError.text
37+
} if doseAmountError,
38+
items: [
39+
{
40+
value: "Both nostrils (full dose)",
41+
text: "Yes, both nostrils"
42+
},
43+
{
44+
value: "1 nostril only (half dose)",
45+
text: "No, 1 nostril only"
46+
}
47+
]
48+
}) }}
49+
50+
{{ button({
51+
text: "Continue"
52+
})}}
53+
</form>
54+
55+
</div>
56+
</div>
57+
58+
{% endblock %}
59+

0 commit comments

Comments
 (0)