From fd6dfefa8b550cfadf590103dc25f381478827fd Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Mon, 27 Apr 2026 14:32:57 +0100 Subject: [PATCH 1/5] Move styles from v3/cya to main.scss --- app/assets/sass/main.scss | 9 +++++++++ app/views/prototype_v3/check-your-answers.html | 14 +------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/assets/sass/main.scss b/app/assets/sass/main.scss index 697b813..44aacac 100755 --- a/app/assets/sass/main.scss +++ b/app/assets/sass/main.scss @@ -2,3 +2,12 @@ @import "nhsuk-frontend/dist/nhsuk"; // Add your custom CSS/Sass styles below. +.nhsuk-summary-list__row { + border-bottom: 1px solid #d8dde0; +} + +.nhsuk-summary-list__key, +.nhsuk-summary-list__value, +.nhsuk-summary-list__actions { + border-bottom: none; +} diff --git a/app/views/prototype_v3/check-your-answers.html b/app/views/prototype_v3/check-your-answers.html index e37de46..12ec860 100644 --- a/app/views/prototype_v3/check-your-answers.html +++ b/app/views/prototype_v3/check-your-answers.html @@ -12,18 +12,6 @@ {% block content %} - -

{{pageHeading}}

@@ -1067,4 +1055,4 @@

Smoking habits

-{% endblock %} \ No newline at end of file +{% endblock %} From 40df5f3572941c249b6b52cf1d8ac61386aac065 Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Mon, 27 Apr 2026 14:34:11 +0100 Subject: [PATCH 2/5] Update README --- README.md | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d872444..1026b95 100755 --- a/README.md +++ b/README.md @@ -8,22 +8,6 @@ This prototype tests a digital alternative to phone-based lung health check ques Currently, lung health check assessments are conducted over the phone, often taking over 30 minutes and involving personal questions. This prototype explores whether users would prefer to complete these assessments digitally, in their own time and privacy. -## Current status - -**Version:** 1.0 -**Status:** Research prototype for user testing - -### Key features at a glance -- Complete end-to-end user journey -- Age validation (55-74 years eligible) -- NHS design system patterns and components -- Responsive design following NHS accessibility standards - -### Known limitations -- **Scoring system not implemented** - The prototype doesn't calculate weighted scores from answers in the background -- **Fixed outcome** - Currently shows high-risk result by default (with option to view low-risk alternative) -- **Research prototype only** - Not intended for clinical use - ## User journey The prototype guides users through: @@ -80,7 +64,7 @@ Built with the latest NHS prototype kit. No additional setup required beyond sta ```bash npm install -npm run watch +npm start ``` The prototype will be available at `http://localhost:3000` @@ -99,4 +83,4 @@ This is a research prototype. For questions or contributions, please contact the ## Licence -This prototype is built using the NHS prototype kit and follows the same licensing terms. \ No newline at end of file +This prototype is built using the NHS prototype kit and follows the same licensing terms. From 964a791bbc6b098c14e0545031d27027725d2e96 Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Mon, 27 Apr 2026 14:35:11 +0100 Subject: [PATCH 3/5] Run npm start if using npm watch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a3a762..3e69f46 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "main": "app.js", "scripts": { "start": "node .", - "watch": "echo 'run this instead: npm start'" + "watch": "npm start" }, "author": "https://github.com/nhsuk/", "license": "MIT", From 6ae99d3bd7fdff77b14a4fbf2bff0859278712c4 Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Mon, 27 Apr 2026 14:36:54 +0100 Subject: [PATCH 4/5] Tidy up filters.js --- app/filters.js | 83 +++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/app/filters.js b/app/filters.js index 28ad897..7819b9d 100644 --- a/app/filters.js +++ b/app/filters.js @@ -1,55 +1,54 @@ module.exports = function (env) { /* eslint-disable-line func-names,no-unused-vars */ - const filters = {}; + const filters = {} -filters.nhsDate = function(dateInput) { - // Handle empty input - if (!dateInput) { - return '' - } + filters.nhsDate = function(dateInput) { + // Handle empty input + if (!dateInput) { + return '' + } - let day, month, year + let day, month, year + + // Handle both array and object formats + if (Array.isArray(dateInput)) { + // Array format: [day, month, year] + if (dateInput.length !== 3) { + return '' + } + [day, month, year] = dateInput + } else if (typeof dateInput === 'object') { + // Object format: {day: x, month: y, year: z} + day = dateInput.day + month = dateInput.month + year = dateInput.year + } else { + return '' + } - // Handle both array and object formats - if (Array.isArray(dateInput)) { - // Array format: [day, month, year] - if (dateInput.length !== 3) { + // Handle empty values + if (!day || !month || !year) { return '' } - [day, month, year] = dateInput - } else if (typeof dateInput === 'object') { - // Object format: {day: x, month: y, year: z} - day = dateInput.day - month = dateInput.month - year = dateInput.year - } else { - return '' - } - // Handle empty values - if (!day || !month || !year) { - return '' - } + // Month names array (index 0 = January) + const monthNames = [ + 'January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December' + ] - // Month names array (index 0 = January) - const monthNames = [ - 'January', 'February', 'March', 'April', 'May', 'June', - 'July', 'August', 'September', 'October', 'November', 'December' - ] + // Convert strings to numbers and validate + const dayNum = parseInt(day, 10) + const monthNum = parseInt(month, 10) + const yearNum = parseInt(year, 10) - // Convert strings to numbers and validate - const dayNum = parseInt(day, 10) - const monthNum = parseInt(month, 10) - const yearNum = parseInt(year, 10) + // Validate ranges + if (dayNum < 1 || dayNum > 31 || monthNum < 1 || monthNum > 12 || yearNum < 1000) { + return '' + } - // Validate ranges - if (dayNum < 1 || dayNum > 31 || monthNum < 1 || monthNum > 12 || yearNum < 1000) { - return '' + // Format: "1 January 2020" + return `${dayNum} ${monthNames[monthNum - 1]} ${yearNum}` } - // Format: "1 January 2020" - return `${dayNum} ${monthNames[monthNum - 1]} ${yearNum}` + return filters } - - - return filters; -}; From c495028411b8056ce6f396a62cc339dcbcea2ada Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Mon, 27 Apr 2026 14:37:42 +0100 Subject: [PATCH 5/5] Reject invalid dates --- app/filters.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/filters.js b/app/filters.js index 7819b9d..06d2b52 100644 --- a/app/filters.js +++ b/app/filters.js @@ -46,6 +46,12 @@ module.exports = function (env) { /* eslint-disable-line func-names,no-unused-va return '' } + const date = new Date(yearNum, monthNum - 1, dayNum) + + if (date.getFullYear() !== yearNum || date.getMonth() !== monthNum - 1 || date.getDate() !== dayNum) { + return '' + } + // Format: "1 January 2020" return `${dayNum} ${monthNames[monthNum - 1]} ${yearNum}` }