Skip to content

Commit 3dcea2a

Browse files
Add vaccination location (#159)
This is needed for covid and flu only at the moment, for payment and reporting purposes. ![Screenshot 2025-01-10 at 15 37 38](https://github.com/user-attachments/assets/e0019130-3011-4112-8f8d-1e86194c7741) ![Screenshot 2025-01-10 at 15 37 58](https://github.com/user-attachments/assets/f9c16c3b-de0a-4a7f-9658-1e747e8e57d6)
1 parent b84d9cc commit 3dcea2a

File tree

4 files changed

+136
-3
lines changed

4 files changed

+136
-3
lines changed

app/views/vaccinate/batch.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
{% if data.vaccine == "Pertussis" %}
1818
{% set nextPage = "/vaccinate/patient" %}
19-
{% else %}
19+
{% elseif data.vaccine == "RSV" %}
2020
{% set nextPage = "/vaccinate/eligibility" %}
21+
{% else %}
22+
{% set nextPage = "/vaccinate/location" %}
2123
{% endif %}
2224

2325
<form action="{{ nextPage }}" method="post" novalidate>

app/views/vaccinate/check.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,23 @@ <h2 class="nhsuk-heading-m">Vaccination</h2>
178178
]
179179
}
180180
},
181+
{
182+
key: {
183+
text: "Location"
184+
},
185+
value: {
186+
html: data.locationType
187+
},
188+
actions: {
189+
items: [
190+
{
191+
href: "/vaccinate/location",
192+
text: "Change",
193+
visuallyHiddenText: "contact information"
194+
}
195+
]
196+
}
197+
} if (data.vaccine === "Flu" or data.vaccine == "COVID-19"),
181198
{
182199
key: {
183200
text: "Eligibility"

app/views/vaccinate/location.html

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{% extends 'layout.html' %}
2+
3+
{% block pageTitle %}
4+
Vaccines
5+
{% endblock %}
6+
7+
{% set currentSection = "vaccinate" %}
8+
9+
{% block beforeContent %}
10+
{{ backLink({ href: "/vaccinate/batch" }) }}
11+
{% endblock %}
12+
13+
{% block content %}
14+
<div class="nhsuk-grid-row">
15+
<div class="nhsuk-grid-column-two-thirds">
16+
17+
<form action="/vaccinate/patient" method="post" novalidate>
18+
19+
{{ radios({
20+
idPrefix: "locationType",
21+
name: "locationType",
22+
fieldset: {
23+
legend: {
24+
text: ("Where is the vaccination taking place?" if data.vaccinationToday == 'yes' else "Where did the vaccination take place?"),
25+
classes: "nhsuk-fieldset__legend--l",
26+
isPageHeading: true
27+
}
28+
},
29+
hint: {
30+
text: "This is needed for payment and reporting."
31+
},
32+
items: [
33+
{
34+
text: "Hospital hub for staff and patients",
35+
value: "Hospital hub for staff and patients",
36+
checked: (data.locationType === "Hospital Hub for staff and patients")
37+
},
38+
{
39+
text: "Vaccination centre open to the public",
40+
value: "Vaccination centre open to the public",
41+
checked: (data.locationType === "Vaccination centre open to the public")
42+
},
43+
{
44+
text: "Community pharmacy",
45+
value: "Community pharmacy",
46+
checked: (data.locationType === "Community pharmacy")
47+
},
48+
{
49+
text: "Care home",
50+
value: "Care home",
51+
checked: (data.locationType === "Care home")
52+
},
53+
{
54+
text: "Housebound patient’s home",
55+
value: "Housebound patient’s home",
56+
checked: (data.locationType === "Housebound patient’s home")
57+
},
58+
{
59+
text: "Off-site outreach event",
60+
value: "Off-site outreach event",
61+
checked: (data.locationType === "Off-site outreach event")
62+
}
63+
]
64+
}) }}
65+
66+
{{ button({
67+
text: "Continue"
68+
})}}
69+
</form>
70+
71+
</div>
72+
</div>
73+
74+
{% endblock %}
75+

app/views/vaccinate/patient.html

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
{% set currentSection = "vaccinate" %}
88

99
{% block beforeContent %}
10-
{{ backLink({ href: "/vaccinate/eligibility" }) }}
10+
{% if (data.vaccine === "Flu" or data.vaccine == "COVID-19") %}
11+
{% set backLinkHref = "/vaccinate/location" %}
12+
{% else %}
13+
{% set backLinkHref = "/vaccinate/eligibility" %}
14+
{% endif %}
15+
{{ backLink({ href: backLinkHref }) }}
1116
{% endblock %}
1217

1318
{% block content %}
@@ -105,7 +110,41 @@ <h1 class="nhsuk-heading-l">Give a {{ data.vaccine }} vaccine to another patient
105110
}
106111
]
107112
}
108-
}
113+
},
114+
{
115+
key: {
116+
text: "Location"
117+
},
118+
value: {
119+
html: data.locationType
120+
},
121+
actions: {
122+
items: [
123+
{
124+
href: "/vaccinate/location",
125+
text: "Change",
126+
visuallyHiddenText: "contact information"
127+
}
128+
]
129+
}
130+
} if (data.vaccine === "Flu" or data.vaccine == "COVID-19"),
131+
{
132+
key: {
133+
text: "Eligibility"
134+
},
135+
value: {
136+
html: ((data.eligibility | join("<br>")) if (data.eligibility | isArray) else data.eligibility)
137+
},
138+
actions: {
139+
items: [
140+
{
141+
href: "/vaccinate/eligibility",
142+
text: "Change",
143+
visuallyHiddenText: "eligibility"
144+
}
145+
]
146+
}
147+
} if (data.vaccine != "Pertussis")
109148
]
110149
}) }}
111150

0 commit comments

Comments
 (0)