From 861405417e363e190460e34b3dde0427c3d40456 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 23 Jun 2026 14:33:55 +0100 Subject: [PATCH 01/21] Add a page to show we creating the report to the Reports section --- app/views/reports/creating-report.html | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 app/views/reports/creating-report.html diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html new file mode 100644 index 00000000..e1ba6139 --- /dev/null +++ b/app/views/reports/creating-report.html @@ -0,0 +1,60 @@ +{% extends 'layout.html' %} + +{% set pageName = "Add a list of NHS numbers" %} + +{% set currentSection = "lists" %} + + +{% block content %} +
+
+ + {% if (errors | length) > 0 %} + {{ errorSummary({ + titleText: "There is a problem", + errorList: errors + }) }} + {% endif %} + +
+ +

We are creating your report

+ +

This can take up to 2 minutes.

+ + +
+ + +
+ + +

Looking up NHS numbers
Found 16 out of 104

+ + + + + +{% endblock %} From cd64eb1b3d7a141ea27683489b8f9a447de981fd Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 23 Jun 2026 16:01:00 +0100 Subject: [PATCH 02/21] Update creating report page --- app/views/reports/creating-report.html | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index e1ba6139..7dd8e67a 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -1,26 +1,17 @@ {% extends 'layout.html' %} -{% set pageName = "Add a list of NHS numbers" %} - -{% set currentSection = "lists" %} +{% set pageName = "Creating report" %} {% block content %}
- {% if (errors | length) > 0 %} - {{ errorSummary({ - titleText: "There is a problem", - errorList: errors - }) }} - {% endif %} - - +

We are creating your report

-

This can take up to 2 minutes.

+

This can take a few minutes.

@@ -48,12 +39,6 @@

We are creating your report

} -
- - -

Looking up NHS numbers
Found 16 out of 104

- - From 1835671feb02fa89bec9a19d7219b63ef4acce25 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 23 Jun 2026 16:21:30 +0100 Subject: [PATCH 03/21] Create alt-index.html for Reports section This is an alternative landing page for the Reports section - it would appear if a user select 'Reports' in the navigation while another report is being created for their organisation. --- app/views/reports/alt-index.html | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 app/views/reports/alt-index.html diff --git a/app/views/reports/alt-index.html b/app/views/reports/alt-index.html new file mode 100644 index 00000000..351626e4 --- /dev/null +++ b/app/views/reports/alt-index.html @@ -0,0 +1,37 @@ +{% extends 'layout.html' %} + +{% set pageName = "Reports" %} + +{% set currentSection = "reports" %} + +{% block content %} + +
+
+ + {% include "includes/notification.html" %} + +
+
+ +
+
+ +

Reports

+

Create and download reports.

+ + {% if vaccinationsRecordedCount > 0 %} + + {{ insetText({ + html: "

You need to wait for 3 minutes before you can start creating a report. This is because another report is currently being created for your organisation.

" + })}} + + + {% else %} +

You have not yet recorded any vaccinations.

+ {% endif %} + +
+
+ +{% endblock %} From d21897afc5c5ab5eefcf336b7caaf71adb7c5cb5 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 23 Jun 2026 16:24:57 +0100 Subject: [PATCH 04/21] Update report download message Change msg on last page to make it generic. Previous message, which referenced the vaccines and sites included in the report, would have got very long if an org was creating a report across multiple sites and for multiple vaccines. --- app/views/reports/download.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/reports/download.html b/app/views/reports/download.html index ff31a7b5..111ec869 100644 --- a/app/views/reports/download.html +++ b/app/views/reports/download.html @@ -11,7 +11,7 @@

Your report is ready

-

You have created a report from 16 July to 30 July 2024 for COVID-19 and flu at Verrington (RH635)

+

You can now download your report.

{{ button({ "text": "Download report", From bc271164ea21f3209314cbdb92a9a8b01bac8721 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 23 Jun 2026 16:53:45 +0100 Subject: [PATCH 05/21] Replaced inset html with nunjucks --- app/views/reports/alt-index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/reports/alt-index.html b/app/views/reports/alt-index.html index 351626e4..0309b656 100644 --- a/app/views/reports/alt-index.html +++ b/app/views/reports/alt-index.html @@ -20,16 +20,16 @@

Reports

Create and download reports.

- {% if vaccinationsRecordedCount > 0 %} + {% from "inset-text/macro.njk" import insetText %} - {{ insetText({ - html: "

You need to wait for 3 minutes before you can start creating a report. This is because another report is currently being created for your organisation.

" - })}} +{% set insetTextHtml %} +

You need to wait for 3 minutes before you can start creating a report. This is because another report is currently being created for your organisation.

+{% endset %} +{{ insetText({ + html: insetTextHtml +}) }} - {% else %} -

You have not yet recorded any vaccinations.

- {% endif %}
From 62da774b6ac962c855dff795ecae6e6e47ad88d7 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 23 Jun 2026 16:58:08 +0100 Subject: [PATCH 06/21] Amended inset text --- app/views/reports/alt-index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/reports/alt-index.html b/app/views/reports/alt-index.html index 0309b656..7136f79a 100644 --- a/app/views/reports/alt-index.html +++ b/app/views/reports/alt-index.html @@ -23,7 +23,8 @@

Reports

{% from "inset-text/macro.njk" import insetText %} {% set insetTextHtml %} -

You need to wait for 3 minutes before you can start creating a report. This is because another report is currently being created for your organisation.

+

You need to wait 3 minutes before you can start creating a report.

+

This is because another report is in progress for your organisation.

{% endset %} {{ insetText({ From b87e58a71ff4255095930c6ac972aea81c249976 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 23 Jun 2026 17:05:28 +0100 Subject: [PATCH 07/21] Updated inset text --- app/views/reports/alt-index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/reports/alt-index.html b/app/views/reports/alt-index.html index 7136f79a..3815cb52 100644 --- a/app/views/reports/alt-index.html +++ b/app/views/reports/alt-index.html @@ -23,8 +23,7 @@

Reports

{% from "inset-text/macro.njk" import insetText %} {% set insetTextHtml %} -

You need to wait 3 minutes before you can start creating a report.

-

This is because another report is in progress for your organisation.

+

You need to wait 3 minutes before you can start creating a report. This is because another report is already in progress for your organisation.

{% endset %} {{ insetText({ From 8ac9397d0a68629833dbbd82233605e28943260f Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Wed, 24 Jun 2026 09:17:37 +0100 Subject: [PATCH 08/21] Change redirect URL in creating-report.html --- app/views/reports/creating-report.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index 7dd8e67a..b7f42734 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -39,7 +39,7 @@

We are creating your report

} - + {% endblock %} From 84e7d7b86befec0ac82692a24e9eec87406ff7a2 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Wed, 24 Jun 2026 09:23:30 +0100 Subject: [PATCH 09/21] Changed url for redirect --- app/views/reports/creating-report.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index b7f42734..989620a7 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -39,7 +39,8 @@

We are creating your report

} - + + {% endblock %} From c15cac8aff96d9d00758336717af65ae4cbbdb9f Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Thu, 2 Jul 2026 11:21:40 +0100 Subject: [PATCH 10/21] Remove specific wait time from report message --- app/views/reports/alt-index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/reports/alt-index.html b/app/views/reports/alt-index.html index 3815cb52..061cea89 100644 --- a/app/views/reports/alt-index.html +++ b/app/views/reports/alt-index.html @@ -23,7 +23,7 @@

Reports

{% from "inset-text/macro.njk" import insetText %} {% set insetTextHtml %} -

You need to wait 3 minutes before you can start creating a report. This is because another report is already in progress for your organisation.

+

You need to wait before you can start creating a report. This is because another report is already in progress for your organisation.

{% endset %} {{ insetText({ From 7ccffe7acd409ef4ecdc220aeae52d61e99e79e9 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Thu, 2 Jul 2026 11:29:13 +0100 Subject: [PATCH 11/21] Modify report creation message and remove loader Updated loading message and removed loader styles. --- app/views/reports/creating-report.html | 31 +------------------------- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index 989620a7..39693af8 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -11,36 +11,7 @@

We are creating your report

-

This can take a few minutes.

- - -
- - - - +

This can take up to a few minutes.

{% endblock %} From ce0536a309114e109f7574ea4020029d2b6baddf Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Thu, 2 Jul 2026 14:04:14 +0100 Subject: [PATCH 12/21] Update report creation message for user guidance Added a note about navigating away from the page. --- app/views/reports/creating-report.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index 39693af8..d46535b3 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -11,7 +11,7 @@

We are creating your report

-

This can take up to a few minutes.

+

This can take up to a few minutes. You can navigate away from this page but do not close this tab or window.

{% endblock %} From 99d863d4538eb33c33086e982cb189620d323940 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Thu, 2 Jul 2026 16:58:47 +0100 Subject: [PATCH 13/21] Split report creation message into two paragraphs --- app/views/reports/creating-report.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index d46535b3..80b987f9 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -11,7 +11,9 @@

We are creating your report

-

This can take up to a few minutes. You can navigate away from this page but do not close this tab or window.

+

This can take up to a few minutes.

+ +

You can navigate away from this page but do not close this tab or window.

{% endblock %} From 3cdca389d2860495f8e560b32ddb213e6c883247 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Thu, 2 Jul 2026 17:10:33 +0100 Subject: [PATCH 14/21] Update report creation page title and content --- app/views/reports/creating-report.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index 80b987f9..6955e1d3 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -1,19 +1,20 @@ {% extends 'layout.html' %} -{% set pageName = "Creating report" %} +{% set pageName = "We are creating your report" %} + +{% set currentSection = "reports" %} {% block content %}
- - -

We are creating your report

+

We are creating your report

-

This can take up to a few minutes.

+

This can take up to a few minutes.

-

You can navigate away from this page but do not close this tab or window.

+

You can navigate away from this page but do not close this tab or window.

-{% endblock %} +
+
From 07dea423e08cb9697bb43e776220c0506a01edcb Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Thu, 2 Jul 2026 17:15:04 +0100 Subject: [PATCH 15/21] Add endblock tag to creating-report.html --- app/views/reports/creating-report.html | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index 6955e1d3..14bfe994 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -18,3 +18,4 @@

We are creating your report

+{% endblock %} From 159727c666757a19b041f3e3d3b47fe586a79a1f Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Sun, 5 Jul 2026 22:10:11 +0100 Subject: [PATCH 16/21] Remove bottom margin from Reports heading --- app/views/reports/alt-index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/reports/alt-index.html b/app/views/reports/alt-index.html index 061cea89..5fc83543 100644 --- a/app/views/reports/alt-index.html +++ b/app/views/reports/alt-index.html @@ -17,7 +17,7 @@
-

Reports

+

Reports

Create and download reports.

{% from "inset-text/macro.njk" import insetText %} From c1a83c221df91c34677fa26212a1bd97b715f6c2 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Sun, 5 Jul 2026 22:15:43 +0100 Subject: [PATCH 17/21] Add margin bottom to Reports heading --- app/views/reports/alt-index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/reports/alt-index.html b/app/views/reports/alt-index.html index 5fc83543..061cea89 100644 --- a/app/views/reports/alt-index.html +++ b/app/views/reports/alt-index.html @@ -17,7 +17,7 @@
-

Reports

+

Reports

Create and download reports.

{% from "inset-text/macro.njk" import insetText %} From 19884730357008567a1cdb97e899b0e91742c9ac Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Mon, 6 Jul 2026 11:58:33 +0100 Subject: [PATCH 18/21] Updates to reporting data selection screens - Remove 14 days and add last calendar month - fix last 90 days not showing up in check screen - remove "all" from all vaccines in check screen - update so if only one site, skip site screen and autmoatically select single site - change GP option to "GP (ODS code only)" --- app/data/session-data-defaults.js | 2 +- app/routes/reports.js | 49 +++++++++++++++++++++++++++-- app/views/reports/check.html | 10 ++---- app/views/reports/choose-data.html | 10 +++++- app/views/reports/choose-dates.html | 8 ++--- 5 files changed, 64 insertions(+), 15 deletions(-) diff --git a/app/data/session-data-defaults.js b/app/data/session-data-defaults.js index 6a081ab9..98e0d4ec 100644 --- a/app/data/session-data-defaults.js +++ b/app/data/session-data-defaults.js @@ -22,7 +22,7 @@ module.exports = { vaccinationsRecorded: vaccinationsRecorded, // These are the options for extracting CSV reports - patientDataOptions: ["Name", "NHS number", "Gender", "Date of birth", "Address", "Postcode", "ODS code of their GP"], + patientDataOptions: ["Name", "NHS number", "Gender", "Date of birth", "Address", "Postcode", "GP (ODS code only)"], staffDataOptions: ["Recorder", "Vaccinator"], locationDataOptions: ["Site name", "Site ODS code", "Location type"], consentAndEligibilityDataOptions: ["Consent", "Eligibility", "Estimated due date"], diff --git a/app/routes/reports.js b/app/routes/reports.js index 230ac52a..b06041ae 100644 --- a/app/routes/reports.js +++ b/app/routes/reports.js @@ -46,9 +46,15 @@ module.exports = (router) => { }) router.post('/reports/choose-vaccines-answer', (req, res) => { + const data = req.session.data + const currentOrganisation = res.locals.currentOrganisation + const sites = currentOrganisation.sites || [] - if (res.locals.currentOrganisation.type === "Pharmacy HQ") { + if (currentOrganisation.type === "Pharmacy HQ") { res.redirect('/reports/choose-pharmacies') + } else if (sites.length === 1) { + data.siteIdsToReport = [sites[0].id] + res.redirect('/reports/choose-data') } else { res.redirect('/reports/choose-site') } @@ -106,9 +112,17 @@ module.exports = (router) => { }) router.get('/reports/choose-site', (req, res) => { + const data = req.session.data const currentOrganisation = res.locals.currentOrganisation const sites = currentOrganisation.sites || [] + + if (sites.length === 1) { + data.siteIdsToReport = [sites[0].id] + res.redirect('/reports/choose-data') + return + } + res.render('reports/choose-site', { sites }) @@ -186,6 +200,7 @@ module.exports = (router) => { const data = req.session.data const currentOrganisation = res.locals.currentOrganisation const siteIds = data.siteIdsToReport || [] + const selectedVaccines = data.vaccinesToReport || [] const today = new Date() const days = 86400000 // number of milliseconds in a day @@ -203,6 +218,22 @@ module.exports = (router) => { const dateOption = data.date let from, to + let vaccinesToReportDisplay = selectedVaccines.filter((vaccineName) => vaccineName !== 'all') + + if (selectedVaccines.includes('all')) { + const organisationVaccines = currentOrganisation.vaccines || [] + let enabledVaccines = organisationVaccines.filter((vaccine) => vaccine.status === "enabled") + + // Temporary: show all vaccines if none have batches added + if (enabledVaccines.length === 0) { + enabledVaccines = data.vaccines + } + + vaccinesToReportDisplay = enabledVaccines.map((vaccine) => vaccine.name) + } + + vaccinesToReportDisplay = [...new Set(vaccinesToReportDisplay)] + .sort((a, b) => a.localeCompare(b)) switch (dateOption) { case 'custom_date_range': @@ -229,6 +260,19 @@ module.exports = (router) => { from = new Date(today.getTime() - (31 * days)).toISOString().substring(0,10) to = today.toISOString().substring(0,10) break + case 'Last90days': + from = new Date(today.getTime() - (90 * days)).toISOString().substring(0,10) + to = today.toISOString().substring(0,10) + break + case 'LastCalendarMonth': { + const firstDayOfThisMonth = new Date(today.getFullYear(), today.getMonth(), 1) + const firstDayOfLastMonth = new Date(today.getFullYear(), today.getMonth() - 1, 1) + const lastDayOfLastMonth = new Date(firstDayOfThisMonth.getTime() - days) + + from = firstDayOfLastMonth.toISOString().substring(0,10) + to = lastDayOfLastMonth.toISOString().substring(0,10) + break + } } @@ -237,7 +281,8 @@ module.exports = (router) => { sites, pharmacies, from, - to + to, + vaccinesToReportDisplay }) }) diff --git a/app/views/reports/check.html b/app/views/reports/check.html index 6d3a936a..0d3d9b82 100644 --- a/app/views/reports/check.html +++ b/app/views/reports/check.html @@ -61,11 +61,7 @@

{{ pageName }}

{% endset %} {% set vaccinesToReportText = "" %} - {% if data.vaccinesToReport %} - {% set vaccinesToReportDisplay = [] %} - {% for vaccine in (data.vaccinesToReport | sort(false, false, "name")) %} - {% set vaccinesToReportDisplay = (vaccinesToReportDisplay.push(vaccine ), vaccinesToReportDisplay) %} - {% endfor %} + {% if vaccinesToReportDisplay %} {% set vaccinesToReportText = vaccinesToReportDisplay | join(", ") %} {% endif %} @@ -110,10 +106,10 @@

{{ pageName }}

}, { key: { - text: ("Vaccines" if (data.vaccinesToReport | length) > 1 else "Vaccine") + text: ("Vaccines" if (vaccinesToReportDisplay | length) > 1 else "Vaccine") }, value: { - text: vaccinesToReportText if data.vaccines + text: vaccinesToReportText }, actions: { items: [ diff --git a/app/views/reports/choose-data.html b/app/views/reports/choose-data.html index 5076d211..073b0bb0 100644 --- a/app/views/reports/choose-data.html +++ b/app/views/reports/choose-data.html @@ -6,8 +6,16 @@ {% block beforeContent %} + {% if currentOrganisation.type == "Pharmacy HQ" %} + {% set backLinkHref = "/reports/choose-pharmacies" %} + {% elif (currentOrganisation.sites | length) == 1 %} + {% set backLinkHref = "/reports/choose-vaccines" %} + {% else %} + {% set backLinkHref = "/reports/choose-site" %} + {% endif %} + {{ backLink({ - href: "/reports/choose-site", + href: backLinkHref, text: "Back" }) }} {% endblock %} diff --git a/app/views/reports/choose-dates.html b/app/views/reports/choose-dates.html index 367579bc..fbee8642 100644 --- a/app/views/reports/choose-dates.html +++ b/app/views/reports/choose-dates.html @@ -143,10 +143,6 @@ "value": "Last7days", "text": "Last 7 days (includes today)" }, - { - "value": "Last14days", - "text": "Last 14 days (includes today)" - }, { "value": "Last31days", "text": "Last 31 days (includes today)" @@ -155,6 +151,10 @@ "value": "Last90days", "text": "Last 90 days (includes today)" }, + { + "value": "LastCalendarMonth", + "text": "Last calendar month" + }, { divider: "or" }, From e51018133ecd84b7359b7ae70e9144de43ef17f8 Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Mon, 6 Jul 2026 13:20:20 +0100 Subject: [PATCH 19/21] Updates to how data is shown and linking up new pages --- app/routes/reports.js | 2 +- app/views/reports/check.html | 58 ++++++++++++++++---------- app/views/reports/creating-report.html | 4 ++ app/views/reports/download.html | 2 - app/views/reports/index.html | 4 ++ 5 files changed, 45 insertions(+), 25 deletions(-) diff --git a/app/routes/reports.js b/app/routes/reports.js index b06041ae..f3d8f5be 100644 --- a/app/routes/reports.js +++ b/app/routes/reports.js @@ -297,7 +297,7 @@ module.exports = (router) => { data.vaccinesToReport = null - res.redirect('/reports/download') + res.redirect('/reports/creating-report') }) } diff --git a/app/views/reports/check.html b/app/views/reports/check.html index 0d3d9b82..2aa31fb9 100644 --- a/app/views/reports/check.html +++ b/app/views/reports/check.html @@ -19,29 +19,43 @@

{{ pageName }}

- {% set dataFields = [] %} - - {% for field in data.patientDataToReport %} - {% set dataFields = (dataFields.push(field), dataFields) %} - {% endfor %} - {% for field in data.staffDataToReport %} - {% set dataFields = (dataFields.push(field), dataFields) %} - {% endfor %} - {% for field in data.siteDataToReport %} - {% set dataFields = (dataFields.push(field), dataFields) %} - {% endfor %} - {% for field in data.consentAndEligibilityDataToReport %} - {% set dataFields = (dataFields.push(field), dataFields) %} - {% endfor %} - {% for field in data.vaccinationDataToReport %} - {% set dataFields = (dataFields.push(field), dataFields) %} - {% endfor %} - {% for field in data.paymentDataToReport %} - {% set dataFields = (dataFields.push(field), dataFields) %} - {% endfor %} + {% set patientData = data.patientDataToReport or [] %} + {% set staffData = data.staffDataToReport or [] %} + {% set siteData = data.siteDataToReport or [] %} + {% set consentAndEligibilityData = data.consentAndEligibilityDataToReport or [] %} + {% set vaccinationData = data.vaccinationDataToReport or [] %} + {% set paymentData = data.paymentDataToReport or [] %} {% set dataValue %} - {{ dataFields | join(", ") }} + {% if (patientData | length) > 0 %} +

Patient data

+

{{ patientData | join(", ") }}

+ {% endif %} + + {% if (staffData | length) > 0 %} +

Staff data

+

{{ staffData | join(", ") }}

+ {% endif %} + + {% if (siteData | length) > 0 %} +

Site data

+

{{ siteData | join(", ") }}

+ {% endif %} + + {% if (consentAndEligibilityData | length) > 0 %} +

Consent and eligibility data

+

{{ consentAndEligibilityData | join(", ") }}

+ {% endif %} + + {% if (vaccinationData | length) > 0 %} +

Vaccination data

+

{{ vaccinationData | join(", ") }}

+ {% endif %} + + {% if (paymentData | length) > 0 %} +

Payment information

+

{{ paymentData | join(", ") }}

+ {% endif %} {% endset %} {% set sitesHtml %} @@ -177,7 +191,7 @@

{{ pageName }}

text: "Data" }, value: { - text: dataValue + html: dataValue }, actions: { items: [ diff --git a/app/views/reports/creating-report.html b/app/views/reports/creating-report.html index 14bfe994..cfb9ca86 100644 --- a/app/views/reports/creating-report.html +++ b/app/views/reports/creating-report.html @@ -15,6 +15,10 @@

We are creating your report

You can navigate away from this page but do not close this tab or window.

+

+ Prototype only: Simulate report complete +

+
diff --git a/app/views/reports/download.html b/app/views/reports/download.html index 111ec869..40b1d9b8 100644 --- a/app/views/reports/download.html +++ b/app/views/reports/download.html @@ -11,8 +11,6 @@

Your report is ready

-

You can now download your report.

- {{ button({ "text": "Download report", "href": "/reports" diff --git a/app/views/reports/index.html b/app/views/reports/index.html index 635655c5..c88de817 100644 --- a/app/views/reports/index.html +++ b/app/views/reports/index.html @@ -31,6 +31,10 @@

Reports

"href": "/reports/choose-dates" }) }} +

+ Prototype only: Simulate when someone else is creating a report +

+ {% else %}

You have not yet recorded any vaccinations.

{% endif %} From 3621b88023eb6defa6aefb6c0b38ea6ecbc048c5 Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Mon, 6 Jul 2026 15:13:53 +0100 Subject: [PATCH 20/21] Fix typo in site name --- app/data/organisations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/data/organisations.js b/app/data/organisations.js index bfe3b7bd..c24b2585 100644 --- a/app/data/organisations.js +++ b/app/data/organisations.js @@ -1074,7 +1074,7 @@ module.exports = [ }, { id: "RW382", - name: "Ear nose and throad RMCH" + name: "Ear nose and throat RMCH" }, { id: "RW391", From 2a14635f7b2491c265470b5c1f18b03e4c78b74f Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Mon, 6 Jul 2026 15:19:28 +0100 Subject: [PATCH 21/21] Updates to sites and vaccines on check and confirm - Vaccines now show as one per line, first letter capitalised - If more than 2 sites are selected, show number of sites selected instead of site names --- app/views/reports/check.html | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/app/views/reports/check.html b/app/views/reports/check.html index 2aa31fb9..22f5b776 100644 --- a/app/views/reports/check.html +++ b/app/views/reports/check.html @@ -59,11 +59,15 @@

Payment information

{% endset %} {% set sitesHtml %} -
    - {% for site in sites | sort(false, false, "name") %} -
  • {{ site.name }} ({{ site.id }})
  • - {% endfor %} -
+ {% if (sites | length) > 2 %} + {{ sites | length }} sites selected + {% else %} +
    + {% for site in sites | sort(false, false, "name") %} +
  • {{ site.name }} ({{ site.id }})
  • + {% endfor %} +
+ {% endif %} {% endset %} {% set pharmaciesHtml %} @@ -74,10 +78,13 @@

Payment information

{% endset %} - {% set vaccinesToReportText = "" %} - {% if vaccinesToReportDisplay %} - {% set vaccinesToReportText = vaccinesToReportDisplay | join(", ") %} - {% endif %} + {% set vaccinesToReportHtml %} +
    + {% for vaccine in vaccinesToReportDisplay or [] %} +
  • {{ vaccine | capitaliseFirstLetter }}
  • + {% endfor %} +
+ {% endset %} {{ summaryList({ rows: [ @@ -123,7 +130,7 @@

Payment information

text: ("Vaccines" if (vaccinesToReportDisplay | length) > 1 else "Vaccine") }, value: { - text: vaccinesToReportText + html: vaccinesToReportHtml }, actions: { items: [