Skip to content

Commit 418d002

Browse files
Fix flow around eligibility question (#169)
Eligibility question should be asked after the batch question for COVID-19, flu and RSV only. For COVID-19 and flu it should be followed by the location, question, but for RSV the next step is to find the the patient.
1 parent 0afa7c4 commit 418d002

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

app/routes/vaccinate.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,9 @@ module.exports = router => {
355355
redirectPath = "/vaccinate/add-batch"
356356
} else if (vaccine === "Pertussis") {
357357
redirectPath = "/vaccinate/patient"
358-
} else if (vaccine === "RSV") {
359-
redirectPath = "/vaccinate/eligibility"
360358
} else {
361-
redirectPath = "/vaccinate/location"
359+
// RSV, Covid or Flu
360+
redirectPath = "/vaccinate/eligibility"
362361
}
363362
res.redirect(redirectPath)
364363
})

app/views/vaccinate/add-batch.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ <h1 class="nhsuks-heading-l">Add batch</h1>
2121

2222
{% if data.vaccine == "Pertussis" %}
2323
{% set nextPage = "/vaccinate/patient" %}
24-
{% elseif data.vaccine == "RSV" %}
25-
{% set nextPage = "/vaccinate/eligibility" %}
2624
{% else %}
27-
{% set nextPage = "/vaccinate/location" %}
25+
{% set nextPage = "/vaccinate/eligibility" %}
2826
{% endif %}
2927

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

app/views/vaccinate/eligibility.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
{% if data.patientName and data.repeatPatient == "yes" %}
1818
{% set nextAction = "/vaccinate/injection-site" %}
19+
{% elseif data.vaccine == "COVID-19" or data.vaccine == "Flu" %}
20+
{% set nextAction = "/vaccinate/location" %}
1921
{% else %}
2022
{% set nextAction = "/vaccinate/patient" %}
2123
{% endif %}

app/views/vaccinate/location.html

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

99
{% block beforeContent %}
10-
{{ backLink({ href: "/vaccinate/batch" }) }}
10+
{{ backLink({ href: "/vaccinate/eligibility" }) }}
1111
{% endblock %}
1212

1313
{% block content %}
@@ -33,7 +33,7 @@
3333
{
3434
text: "Hospital hub for staff and patients",
3535
value: "Hospital hub for staff and patients",
36-
checked: (data.locationType === "Hospital Hub for staff and patients")
36+
checked: (data.locationType === "Hospital hub for staff and patients")
3737
},
3838
{
3939
text: "Vaccination centre open to the public",

0 commit comments

Comments
 (0)