Skip to content

Commit 031b3b0

Browse files
committed
Add a parental responsibility block in the clinic booking journey
This isn't the best solution, but is only intended as a quick way to address the need for parental responsibility. See the comment in parental-responsibility.njk for a better proposed solution.
1 parent 546f6b7 commit 031b3b0

3 files changed

Lines changed: 43 additions & 16 deletions

File tree

app/controllers/book-into-a-clinic.js

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const bookIntoClinicController = {
7777
*/
7878
readForm(request, response, next) {
7979
const { session_preset_slug, booking_uuid } = request.params
80-
let appointment_uuid = request.params.appointment_uuid
80+
const appointment_uuid = request.params.appointment_uuid
8181
const { data, referrer } = request.session
8282

8383
/** NOTE:
@@ -128,21 +128,10 @@ export const bookIntoClinicController = {
128128
response.locals.childCount = booking.appointments_ids.length
129129
response.locals.firstName =
130130
appointment.unmatchedFirstName || 'your child'
131-
response.locals.fullName = appointment.fullName || undefined
131+
response.locals.fullName = appointment.fullName || 'your child'
132132
}
133133
}
134134

135-
// If we've already been through the appointment journey (possibly multiple times), get the UUID of the first
136-
// appointment should we need to go through each child again for the health questions.
137-
// TEMPORARY: just pull the appointment UUID from the first appointment held in wizard data, as I've not got
138-
// round to adding the appointment to the booking yet.
139-
if (!appointment_uuid && data?.wizard?.clinicAppointments?.[0]) {
140-
appointment_uuid = data.wizard.clinicAppointments[0].uuid
141-
}
142-
if (!appointment_uuid && booking?.appointments_ids?.length > 0) {
143-
appointment_uuid = booking.appointments_ids[0]
144-
}
145-
146135
// Make sure the views have access to information about flow control e.g. for narrowing down a clinic search
147136
let transaction
148137
if (data.wizard?.transaction) {
@@ -151,7 +140,7 @@ export const bookIntoClinicController = {
151140
}
152141

153142
const journey = {
154-
[`/${session_preset_slug}`]: {}, // is this ever actually used? Suspect not...unless when going back from child-count.
143+
[`/${session_preset_slug}`]: {},
155144
[`/${session_preset_slug}/${booking_uuid}/new/child-count`]: {},
156145

157146
// Child journey
@@ -169,8 +158,8 @@ export const bookIntoClinicController = {
169158
value: 'true'
170159
}
171160
},
172-
[`/${session_preset_slug}/${booking_uuid}/new/${appointment_uuid}/parental-relationship`]:
173-
{}, // TODO: allow the *booking* to continue, but stress that someone with responsibility must *attend*
161+
[`/${session_preset_slug}/${booking_uuid}/new/${appointment_uuid}/parental-responsibility`]:
162+
{},
174163
[`/${session_preset_slug}/${booking_uuid}/new/${appointment_uuid}/vaccination-choice`]:
175164
{},
176165
[`/${session_preset_slug}/${booking_uuid}/new/${appointment_uuid}/extra-time`]:

app/locales/en.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ export const en = {
332332
label: 'Relationship to child'
333333
}
334334
},
335+
parentalResponsibility: {
336+
title: 'You will be unable to give consent',
337+
description:
338+
'To give or refuse consent for a child’s vaccination, you need to have parental responsibility.\n\nIf you have any questions, please contact the local health organisation by calling {{team.tel}}, or email {{team.email}}.'
339+
},
335340
vaccinationChoice: {
336341
title: 'Do you agree to %s having the following vaccinations?',
337342
vaccinations: {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% extends "_layouts/default.njk" %}
2+
3+
{% set title = __("clinicBooking.parentalResponsibility.title") %}
4+
5+
{% block content %}
6+
<div class="nhsuk-grid-row">
7+
<div class="nhsuk-grid-column-two-thirds">
8+
{{ appHeading({
9+
title: title,
10+
caption: __("clinicBooking.appointment.caption", fullName) if transaction.childCount > 1
11+
}) }}
12+
13+
{#
14+
TODO: offer the choice of saying that someone with parental responsibility will
15+
attend the clinic, or that they're happy for the child to self-consent. If they
16+
say No to both of those, then abandon this appointment, removing it from the
17+
booking and moving to the next child (if there will be one), or possibly abandoning
18+
the booking as a whole if this was the only child.
19+
20+
As it stands, you might have gone through and entered 1 child's details successfully
21+
(your biological son/daughter) and then got to a foster child that's blocking you
22+
from even completing the booking of the first child's appointment. It's likely rare,
23+
but it would be annoying.
24+
25+
For now, however, it's simpler for us to ask the parent to talk to an admin and book
26+
in that way.
27+
#}
28+
{{ __("clinicBooking.parentalResponsibility.description", {
29+
team: data.team
30+
}) | nhsukMarkdown }}
31+
</div>
32+
</div>
33+
{% endblock %}

0 commit comments

Comments
 (0)