From 716a1c9683658b2e3fd3783353920590223736e4 Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Wed, 8 Jul 2026 18:41:33 +0100 Subject: [PATCH 1/4] First parts of walkthrough. Session holds participants and routes control staging --- app/data/participants.js | 50 ++++++++++++++++ app/data/session-data-defaults.js | 6 +- app/routes.js | 10 +++- app/views/index.html | 3 + .../clickthru/01-upload.html | 21 +++++++ .../clickthru/02-batch-detail.html | 36 +++++++++++ .../clickthru/03-select-clinic.html | 49 +++++++++++++++ .../clickthru/04-choose-participants.html | 35 +++++++++++ .../macros/batch-detail.html | 36 +++++++++++ .../macros/batch-upload.html | 19 ++++++ .../macros/clinic-listing.html | 57 ++++++++++++++++++ .../macros/participant-listing.html | 59 +++++++++++++++++++ .../macros/search-component.html | 25 ++++++++ 13 files changed, 403 insertions(+), 3 deletions(-) create mode 100644 app/data/participants.js create mode 100644 app/views/september-iteration-2/clickthru/01-upload.html create mode 100644 app/views/september-iteration-2/clickthru/02-batch-detail.html create mode 100644 app/views/september-iteration-2/clickthru/03-select-clinic.html create mode 100644 app/views/september-iteration-2/clickthru/04-choose-participants.html create mode 100644 app/views/september-iteration-2/macros/batch-detail.html create mode 100644 app/views/september-iteration-2/macros/batch-upload.html create mode 100644 app/views/september-iteration-2/macros/clinic-listing.html create mode 100644 app/views/september-iteration-2/macros/participant-listing.html create mode 100644 app/views/september-iteration-2/macros/search-component.html diff --git a/app/data/participants.js b/app/data/participants.js new file mode 100644 index 0000000..9497cea --- /dev/null +++ b/app/data/participants.js @@ -0,0 +1,50 @@ +export default [ + { nhs_number: "999 054 3666", full_name: "Billie Joanne Marquardt", date_of_birth: "15 March 1960", status: "unstaged" }, + { nhs_number: "943 582 7164", full_name: "Alice Marie Gregory", date_of_birth: "8 November 1964", status: "unstaged" }, + { nhs_number: "821 374 0952", full_name: "Daphne Hart", date_of_birth: "22 July 1958", status: "unstaged" }, + { nhs_number: "702 195 4836", full_name: "Marta O'Neill", date_of_birth: "3 May 1971", status: "unstaged" }, + { nhs_number: "614 287 9305", full_name: "Susan Carter", date_of_birth: "19 September 1967", status: "unstaged" }, + { nhs_number: "505 463 1129", full_name: "Olivia Barnes", date_of_birth: "12 January 1975", status: "unstaged" }, + { nhs_number: "336 774 2201", full_name: "Rachel Price", date_of_birth: "27 April 1962", status: "unstaged" }, + { nhs_number: "223 546 8870", full_name: "Hannah Wallace", date_of_birth: "6 October 1959", status: "unstaged" }, + { nhs_number: "410 559 3322", full_name: "Fiona Lambert", date_of_birth: "14 December 1973", status: "unstaged" }, + { nhs_number: "196 804 7753", full_name: "Georgia Mills", date_of_birth: "30 June 1968", status: "unstaged" }, + { nhs_number: "378 290 4601", full_name: "Elaine Fox", date_of_birth: "11 February 1976", status: "unstaged" }, + { nhs_number: "957 613 2084", full_name: "Tessa King", date_of_birth: "25 August 1963", status: "unstaged" }, + { nhs_number: "604 118 9756", full_name: "Nadia Singh", date_of_birth: "7 April 1957", status: "unstaged" }, + { nhs_number: "842 039 6617", full_name: "Jane Reed", date_of_birth: "18 November 1970", status: "unstaged" }, + { nhs_number: "731 259 1148", full_name: "Laura White", date_of_birth: "29 May 1965", status: "unstaged" }, + { nhs_number: "665 880 3320", full_name: "Marissa Young", date_of_birth: "9 March 1961", status: "unstaged" }, + { nhs_number: "548 901 7732", full_name: "Naomi Bell", date_of_birth: "21 September 1974", status: "unstaged" }, + { nhs_number: "439 216 5087", full_name: "Paige Long", date_of_birth: "4 July 1969", status: "unstaged" }, + { nhs_number: "329 487 9901", full_name: "Catherine Wood", date_of_birth: "16 January 1956", status: "unstaged" }, + { nhs_number: "214 603 1774", full_name: "Victoria Hale", date_of_birth: "13 October 1966", status: "unstaged" }, + { nhs_number: "188 905 6423", full_name: "Imogen Frost", date_of_birth: "31 December 1972", status: "unstaged" }, + { nhs_number: "977 332 1108", full_name: "Dara Moss", date_of_birth: "24 June 1960", status: "unstaged" }, + { nhs_number: "861 427 5930", full_name: "Sophie Hartley", date_of_birth: "2 August 1962", status: "unstaged" }, + { nhs_number: "750 218 3446", full_name: "Emma Cole", date_of_birth: "17 April 1975", status: "unstaged" }, + { nhs_number: "642 109 8875", full_name: "Megan Price", date_of_birth: "5 February 1961", status: "unstaged" }, + { nhs_number: "531 678 2209", full_name: "Mia Ford", date_of_birth: "19 May 1972", status: "unstaged" }, + { nhs_number: "419 502 6683", full_name: "Zoe Grant", date_of_birth: "11 March 1965", status: "unstaged" }, + { nhs_number: "308 244 1196", full_name: "Ariana Miles", date_of_birth: "28 November 1959", status: "unstaged" }, + { nhs_number: "297 883 4455", full_name: "Bethany Cross", date_of_birth: "7 July 1975", status: "unstaged" }, + { nhs_number: "186 771 9002", full_name: "Callie Morris", date_of_birth: "14 September 1968", status: "unstaged" }, + { nhs_number: "075 439 3321", full_name: "Helena Rowe", date_of_birth: "2 April 1963", status: "unstaged" }, + { nhs_number: "964 210 5587", full_name: "Danielle Nash", date_of_birth: "23 June 1970", status: "unstaged" }, + { nhs_number: "853 619 4470", full_name: "Faye Turner", date_of_birth: "8 January 1957", status: "unstaged" }, + { nhs_number: "742 908 2233", full_name: "Leona Grant", date_of_birth: "15 October 1974", status: "unstaged" }, + { nhs_number: "631 776 9904", full_name: "Nora Blake", date_of_birth: "30 December 1966", status: "unstaged" }, + { nhs_number: "520 665 8805", full_name: "Olivia Lee", date_of_birth: "19 August 1960", status: "unstaged" }, + { nhs_number: "419 554 7706", full_name: "Priya Desai", date_of_birth: "10 May 1973", status: "unstaged" }, + { nhs_number: "308 443 6607", full_name: "Quinn Park", date_of_birth: "26 March 1964", status: "unstaged" }, + { nhs_number: "197 332 5508", full_name: "Rosa Kirk", date_of_birth: "13 July 1958", status: "unstaged" }, + { nhs_number: "086 221 4409", full_name: "Shannon Boyd", date_of_birth: "22 November 1971", status: "unstaged" }, + { nhs_number: "975 110 3310", full_name: "Tara Voss", date_of_birth: "9 February 1969", status: "unstaged" }, + { nhs_number: "864 009 2201", full_name: "Uma Jha", date_of_birth: "17 September 1962", status: "unstaged" }, + { nhs_number: "753 898 1192", full_name: "Victoria Dean", date_of_birth: "4 April 1976", status: "unstaged" }, + { nhs_number: "642 787 0083", full_name: "Wendy Fox", date_of_birth: "21 June 1967", status: "unstaged" }, + { nhs_number: "531 676 9974", full_name: "Xena Holt", date_of_birth: "11 December 1960", status: "unstaged" }, + { nhs_number: "420 565 8865", full_name: "Yasmin Noor", date_of_birth: "28 August 1961", status: "unstaged" }, + { nhs_number: "319 454 7756", full_name: "Zara Moon", date_of_birth: "6 May 1973", status: "unstaged" }, + { nhs_number: "208 343 6647", full_name: "Abigail Stone", date_of_birth: "14 October 1959", status: "unstaged" } +]; diff --git a/app/data/session-data-defaults.js b/app/data/session-data-defaults.js index d0e97e0..a470242 100644 --- a/app/data/session-data-defaults.js +++ b/app/data/session-data-defaults.js @@ -1,3 +1,5 @@ -// Use this file to set any default data +const participants = require('./participants') -module.exports = {} +module.exports = { + participants +} diff --git a/app/routes.js b/app/routes.js index 4da409a..06c7586 100644 --- a/app/routes.js +++ b/app/routes.js @@ -3,6 +3,14 @@ const express = require('express') const router = express.Router() -// Add your routes here - above the module.exports line +router.get('/action/stage/:participantIndex', function (req, res) { + req.session.data.participants.default[req.params.participantIndex].status = 'staged'; + res.redirect('/september-iteration-2/clickthru/04-choose-participants'); +}); + +router.get('/action/unstage/:participantIndex', function (req, res) { + req.session.data.participants.default[req.params.participantIndex].status = 'unstaged'; + res.redirect('/september-iteration-2/clickthru/04-choose-participants'); +}); module.exports = router diff --git a/app/views/index.html b/app/views/index.html index 4075ab1..2777a90 100755 --- a/app/views/index.html +++ b/app/views/index.html @@ -90,6 +90,9 @@

March 2026

Work for September Test

Iteration 2

+

+ Click-thru journey (all hard coded as an example) +

  1. Upload a batch diff --git a/app/views/september-iteration-2/clickthru/01-upload.html b/app/views/september-iteration-2/clickthru/01-upload.html new file mode 100644 index 0000000..9f81fbb --- /dev/null +++ b/app/views/september-iteration-2/clickthru/01-upload.html @@ -0,0 +1,21 @@ +{% extends 'layout.html' %} + +{% set pageName = "" %} + +{% from "z-september-transactional-journey/_includes/min-primary-navigation.html" import primaryNavigation %} +{% block header %} + {{ primaryNavigation() }} +{% endblock %} + +{% block beforeContent %}{% endblock %} + +{% block content %} + {% from "september-iteration-2/macros/batch-upload.html" import upload %} + {{ upload({ + button_url:"02-batch-detail" + }) }} +{% endblock %} + +{% block footer %} + {{ footer() }} +{% endblock %} \ No newline at end of file diff --git a/app/views/september-iteration-2/clickthru/02-batch-detail.html b/app/views/september-iteration-2/clickthru/02-batch-detail.html new file mode 100644 index 0000000..5365f07 --- /dev/null +++ b/app/views/september-iteration-2/clickthru/02-batch-detail.html @@ -0,0 +1,36 @@ +{% extends 'layout.html' %} + +{% set pageName = "" %} + +{% from "z-september-transactional-journey/_includes/min-primary-navigation.html" import primaryNavigation %} +{% block header %} + {{ primaryNavigation() }} +{% endblock %} + +{% block beforeContent %}{% endblock %} + +{% block content %} + +
    +
    + {% set html %} +

    Batch uploaded

    + {% endset %} + {{ notificationBanner({ + html: html, + type: "success" + }) }} +
    +
    + + {% from "september-iteration-2/macros/batch-detail.html" import batch_detail %} + {{ batch_detail({ + participant_count: "2000", + button_url:"03-select-clinic" + }) }} + +{% endblock %} + +{% block footer %} + {{ footer() }} +{% endblock %} \ No newline at end of file diff --git a/app/views/september-iteration-2/clickthru/03-select-clinic.html b/app/views/september-iteration-2/clickthru/03-select-clinic.html new file mode 100644 index 0000000..3d8385e --- /dev/null +++ b/app/views/september-iteration-2/clickthru/03-select-clinic.html @@ -0,0 +1,49 @@ +{% extends 'layout.html' %} + +{% set pageName = "" %} + +{% from "z-september-transactional-journey/_includes/min-primary-navigation.html" import primaryNavigation %} +{% block header %} + {{ primaryNavigation() }} +{% endblock %} + +{% block beforeContent %}{% endblock %} + +{% block content %} + +
    +

    + Select clinic +

    +
    +
    +
    + + {% from "september-iteration-2/macros/clinic-listing.html" import clinic_listing %} + {{ clinic_listing({ + clinics: [ + { + clinic_name: "Worthing - standard slots May 2026", + clinic_id: "HWO-NNN-standard-20260501", + clinic_location_name: "Worthing", + clinic_location_address_line_1: "Worthing Hospital", + clinic_unit_name: "West Sussex Breast Screening Centre", + clinic_unit_id: "HWO-static-1", + clinic_timespan: "31 May 2026", + clinic_length: "1 day", + clinic_capacity_percent_booked: "0", + clinic_capacity_available: "48", + clinic_capacity_total: "48", + button_url: "04-choose-participants" + } + ] + }) }} + +
    +
    + +{% endblock %} + +{% block footer %} + {{ footer() }} +{% endblock %} \ No newline at end of file diff --git a/app/views/september-iteration-2/clickthru/04-choose-participants.html b/app/views/september-iteration-2/clickthru/04-choose-participants.html new file mode 100644 index 0000000..9ad0fa5 --- /dev/null +++ b/app/views/september-iteration-2/clickthru/04-choose-participants.html @@ -0,0 +1,35 @@ +{% extends 'layout.html' %} + +{% set pageName = "" %} + +{% from "z-september-transactional-journey/_includes/min-primary-navigation.html" import primaryNavigation %} +{% block header %} + {{ primaryNavigation() }} +{% endblock %} + +{% block beforeContent %}{% endblock %} + +{% block content %} + +
    +

    + Choose participants to book +

    +
    + +{% from "september-iteration-2/macros/search-component.html" import participant_search %} +{{ participant_search({ + form_action: "test" +}) }} + +{% from "september-iteration-2/macros/participant-listing.html" import participant_listing %} +{{ participant_listing({ + mode: "browse", + participants: data.participants.default +}) }} + +{% endblock %} + +{% block footer %} + {{ footer() }} +{% endblock %} \ No newline at end of file diff --git a/app/views/september-iteration-2/macros/batch-detail.html b/app/views/september-iteration-2/macros/batch-detail.html new file mode 100644 index 0000000..9adc30d --- /dev/null +++ b/app/views/september-iteration-2/macros/batch-detail.html @@ -0,0 +1,36 @@ +{% macro batch_detail(options) %} +
    +
    +

    + BS1345815F + Test batch 1 +

    +
    + Batch uploaded 11 June 2026 at 15:53 +
    +
    +
    + +
    +
    +
    +
    +

    + + {{ options.participant_count }} + +

    + total participants +
    +
    +
    +
    + + +{% endmacro %} \ No newline at end of file diff --git a/app/views/september-iteration-2/macros/batch-upload.html b/app/views/september-iteration-2/macros/batch-upload.html new file mode 100644 index 0000000..d6629be --- /dev/null +++ b/app/views/september-iteration-2/macros/batch-upload.html @@ -0,0 +1,19 @@ +{% macro upload(options) %} +
    +
    +
    +

    + +

    + +
    + +
    +
    +{% endmacro %} \ No newline at end of file diff --git a/app/views/september-iteration-2/macros/clinic-listing.html b/app/views/september-iteration-2/macros/clinic-listing.html new file mode 100644 index 0000000..ca0733d --- /dev/null +++ b/app/views/september-iteration-2/macros/clinic-listing.html @@ -0,0 +1,57 @@ +{% macro clinic_listing(options) %} + + + + + + + + + + + + + {% for clinic in options.clinics %} + + + + + + + + + {% endfor %} + +
    + Clinic + + Location + + Unit + + Timeframe + + Capacity + + Action +
    + {{ clinic.clinic_name }}
    + {{ clinic.clinic_id }} +
    + {{ clinic.clinic_location_name }}
    + {{ clinic.clinic_location_address_line_1 }} +
    + {{ clinic.clinic_unit_name }}
    + {{ clinic.clinic_unit_id }} +
    + {{ clinic.clinic_timespan }}
    + {{ clinic.clinic_length }} +
    +
    + {{ clinic.clinic_capacity_available }} slots available of {{ clinic.clinic_capacity_total }} +
    + + Select this clinic + +
    +{% endmacro %} \ No newline at end of file diff --git a/app/views/september-iteration-2/macros/participant-listing.html b/app/views/september-iteration-2/macros/participant-listing.html new file mode 100644 index 0000000..7a9eea7 --- /dev/null +++ b/app/views/september-iteration-2/macros/participant-listing.html @@ -0,0 +1,59 @@ +{% macro participant_listing(options) %} +
    +
    + + + + + + + + + + + + + {% for participant in options.participants %} + + + + + + + + {% endfor %} + +
    + {% if options.mode == "search" %} + 4 participants found + {% else %} + {{ options.participants.length }} participants + {% endif %} +
    + NHS Number + + Full name + + Date of birth + + Status + + Actions +
    {{ participant.nhs_number }}{{ participant.full_name }}{{ participant.date_of_birth }} + {% if participant.status == "unstaged" %} + Will not be booked + {% else %} + + Ready to book + + {% endif %} + + {% if participant.status == "unstaged" %} + Add + {% else %} + Remove + {% endif %} +
    +
    +
    +{% endmacro %} diff --git a/app/views/september-iteration-2/macros/search-component.html b/app/views/september-iteration-2/macros/search-component.html new file mode 100644 index 0000000..203f3b7 --- /dev/null +++ b/app/views/september-iteration-2/macros/search-component.html @@ -0,0 +1,25 @@ +{% macro participant_search(options) %} +
    +
    +
    +
    + +
    + Search by NHS number, first name, or last name +
    +
    + + +
    +
    +
    +
    +
    +{% endmacro %} From 150ca8e6b39bb6ff4d47ac038d349925b9c34771 Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Thu, 9 Jul 2026 15:02:05 +0100 Subject: [PATCH 2/4] A just about working walkthrough --- app/data/participants.js | 198 +++++++--- app/data/session-data-defaults.js | 17 +- app/routes.js | 54 ++- .../clickthru/02-batch-detail.html | 2 +- .../clickthru/03-select-clinic.html | 23 +- .../clickthru/04-choose-participants.html | 134 ++++++- .../clickthru/04a-example-search-result.html | 45 +++ .../clickthru/05-review.html | 119 ++++++ .../clickthru/06-booked.html | 58 +++ .../includes/day-list-hard-coded.html | 365 ++++++++++++++++++ .../includes/participant-staging-control.html | 26 ++ .../macros/clinic-listing.html | 20 +- .../macros/participant-listing.html | 108 +++--- .../macros/search-component.html | 2 +- 14 files changed, 1033 insertions(+), 138 deletions(-) create mode 100644 app/views/september-iteration-2/clickthru/04a-example-search-result.html create mode 100644 app/views/september-iteration-2/clickthru/05-review.html create mode 100644 app/views/september-iteration-2/clickthru/06-booked.html create mode 100644 app/views/september-iteration-2/includes/day-list-hard-coded.html create mode 100644 app/views/september-iteration-2/includes/participant-staging-control.html diff --git a/app/data/participants.js b/app/data/participants.js index 9497cea..721c821 100644 --- a/app/data/participants.js +++ b/app/data/participants.js @@ -1,50 +1,152 @@ export default [ - { nhs_number: "999 054 3666", full_name: "Billie Joanne Marquardt", date_of_birth: "15 March 1960", status: "unstaged" }, - { nhs_number: "943 582 7164", full_name: "Alice Marie Gregory", date_of_birth: "8 November 1964", status: "unstaged" }, - { nhs_number: "821 374 0952", full_name: "Daphne Hart", date_of_birth: "22 July 1958", status: "unstaged" }, - { nhs_number: "702 195 4836", full_name: "Marta O'Neill", date_of_birth: "3 May 1971", status: "unstaged" }, - { nhs_number: "614 287 9305", full_name: "Susan Carter", date_of_birth: "19 September 1967", status: "unstaged" }, - { nhs_number: "505 463 1129", full_name: "Olivia Barnes", date_of_birth: "12 January 1975", status: "unstaged" }, - { nhs_number: "336 774 2201", full_name: "Rachel Price", date_of_birth: "27 April 1962", status: "unstaged" }, - { nhs_number: "223 546 8870", full_name: "Hannah Wallace", date_of_birth: "6 October 1959", status: "unstaged" }, - { nhs_number: "410 559 3322", full_name: "Fiona Lambert", date_of_birth: "14 December 1973", status: "unstaged" }, - { nhs_number: "196 804 7753", full_name: "Georgia Mills", date_of_birth: "30 June 1968", status: "unstaged" }, - { nhs_number: "378 290 4601", full_name: "Elaine Fox", date_of_birth: "11 February 1976", status: "unstaged" }, - { nhs_number: "957 613 2084", full_name: "Tessa King", date_of_birth: "25 August 1963", status: "unstaged" }, - { nhs_number: "604 118 9756", full_name: "Nadia Singh", date_of_birth: "7 April 1957", status: "unstaged" }, - { nhs_number: "842 039 6617", full_name: "Jane Reed", date_of_birth: "18 November 1970", status: "unstaged" }, - { nhs_number: "731 259 1148", full_name: "Laura White", date_of_birth: "29 May 1965", status: "unstaged" }, - { nhs_number: "665 880 3320", full_name: "Marissa Young", date_of_birth: "9 March 1961", status: "unstaged" }, - { nhs_number: "548 901 7732", full_name: "Naomi Bell", date_of_birth: "21 September 1974", status: "unstaged" }, - { nhs_number: "439 216 5087", full_name: "Paige Long", date_of_birth: "4 July 1969", status: "unstaged" }, - { nhs_number: "329 487 9901", full_name: "Catherine Wood", date_of_birth: "16 January 1956", status: "unstaged" }, - { nhs_number: "214 603 1774", full_name: "Victoria Hale", date_of_birth: "13 October 1966", status: "unstaged" }, - { nhs_number: "188 905 6423", full_name: "Imogen Frost", date_of_birth: "31 December 1972", status: "unstaged" }, - { nhs_number: "977 332 1108", full_name: "Dara Moss", date_of_birth: "24 June 1960", status: "unstaged" }, - { nhs_number: "861 427 5930", full_name: "Sophie Hartley", date_of_birth: "2 August 1962", status: "unstaged" }, - { nhs_number: "750 218 3446", full_name: "Emma Cole", date_of_birth: "17 April 1975", status: "unstaged" }, - { nhs_number: "642 109 8875", full_name: "Megan Price", date_of_birth: "5 February 1961", status: "unstaged" }, - { nhs_number: "531 678 2209", full_name: "Mia Ford", date_of_birth: "19 May 1972", status: "unstaged" }, - { nhs_number: "419 502 6683", full_name: "Zoe Grant", date_of_birth: "11 March 1965", status: "unstaged" }, - { nhs_number: "308 244 1196", full_name: "Ariana Miles", date_of_birth: "28 November 1959", status: "unstaged" }, - { nhs_number: "297 883 4455", full_name: "Bethany Cross", date_of_birth: "7 July 1975", status: "unstaged" }, - { nhs_number: "186 771 9002", full_name: "Callie Morris", date_of_birth: "14 September 1968", status: "unstaged" }, - { nhs_number: "075 439 3321", full_name: "Helena Rowe", date_of_birth: "2 April 1963", status: "unstaged" }, - { nhs_number: "964 210 5587", full_name: "Danielle Nash", date_of_birth: "23 June 1970", status: "unstaged" }, - { nhs_number: "853 619 4470", full_name: "Faye Turner", date_of_birth: "8 January 1957", status: "unstaged" }, - { nhs_number: "742 908 2233", full_name: "Leona Grant", date_of_birth: "15 October 1974", status: "unstaged" }, - { nhs_number: "631 776 9904", full_name: "Nora Blake", date_of_birth: "30 December 1966", status: "unstaged" }, - { nhs_number: "520 665 8805", full_name: "Olivia Lee", date_of_birth: "19 August 1960", status: "unstaged" }, - { nhs_number: "419 554 7706", full_name: "Priya Desai", date_of_birth: "10 May 1973", status: "unstaged" }, - { nhs_number: "308 443 6607", full_name: "Quinn Park", date_of_birth: "26 March 1964", status: "unstaged" }, - { nhs_number: "197 332 5508", full_name: "Rosa Kirk", date_of_birth: "13 July 1958", status: "unstaged" }, - { nhs_number: "086 221 4409", full_name: "Shannon Boyd", date_of_birth: "22 November 1971", status: "unstaged" }, - { nhs_number: "975 110 3310", full_name: "Tara Voss", date_of_birth: "9 February 1969", status: "unstaged" }, - { nhs_number: "864 009 2201", full_name: "Uma Jha", date_of_birth: "17 September 1962", status: "unstaged" }, - { nhs_number: "753 898 1192", full_name: "Victoria Dean", date_of_birth: "4 April 1976", status: "unstaged" }, - { nhs_number: "642 787 0083", full_name: "Wendy Fox", date_of_birth: "21 June 1967", status: "unstaged" }, - { nhs_number: "531 676 9974", full_name: "Xena Holt", date_of_birth: "11 December 1960", status: "unstaged" }, - { nhs_number: "420 565 8865", full_name: "Yasmin Noor", date_of_birth: "28 August 1961", status: "unstaged" }, - { nhs_number: "319 454 7756", full_name: "Zara Moon", date_of_birth: "6 May 1973", status: "unstaged" }, - { nhs_number: "208 343 6647", full_name: "Abigail Stone", date_of_birth: "14 October 1959", status: "unstaged" } + { participantId: 'p0001', nhs_number: "999 054 3666", full_name: "Billie Joanne Marquardt", date_of_birth: "15 March 1960", status: "unstaged" }, + { participantId: 'p0002', nhs_number: "943 582 7164", full_name: "Alice Marie Gregory", date_of_birth: "8 November 1964", status: "unstaged" }, + { participantId: 'p0003', nhs_number: "821 374 0952", full_name: "Daphne Hart", date_of_birth: "22 July 1958", status: "unstaged" }, + { participantId: 'p0004', nhs_number: "702 195 4836", full_name: "Marta O'Neill", date_of_birth: "3 May 1971", status: "unstaged" }, + { participantId: 'p0005', nhs_number: "614 287 9305", full_name: "Susan Carter", date_of_birth: "19 September 1967", status: "unstaged" }, + { participantId: 'p0006', nhs_number: "505 463 1129", full_name: "Olivia Barnes", date_of_birth: "12 January 1975", status: "unstaged" }, + { participantId: 'p0007', nhs_number: "336 774 2201", full_name: "Rachel Price", date_of_birth: "27 April 1962", status: "unstaged" }, + { participantId: 'p0008', nhs_number: "223 546 8870", full_name: "Hannah Wallace", date_of_birth: "6 October 1959", status: "unstaged" }, + { participantId: 'p0009', nhs_number: "410 559 3322", full_name: "Fiona Lambert", date_of_birth: "14 December 1973", status: "unstaged" }, + { participantId: 'p0010', nhs_number: "196 804 7753", full_name: "Georgia Mills", date_of_birth: "30 June 1968", status: "unstaged" }, + { participantId: 'p0011', nhs_number: "378 290 4601", full_name: "Elaine Fox", date_of_birth: "11 February 1976", status: "unstaged" }, + { participantId: 'p0012', nhs_number: "957 613 2084", full_name: "Tessa King", date_of_birth: "25 August 1963", status: "unstaged" }, + { participantId: 'p0013', nhs_number: "604 118 9756", full_name: "Nadia Singh", date_of_birth: "7 April 1957", status: "unstaged" }, + { participantId: 'p0014', nhs_number: "842 039 6617", full_name: "Jane Reed", date_of_birth: "18 November 1970", status: "unstaged" }, + { participantId: 'p0015', nhs_number: "731 259 1148", full_name: "Laura White", date_of_birth: "29 May 1965", status: "unstaged" }, + { participantId: 'p0016', nhs_number: "665 880 3320", full_name: "Marissa Young", date_of_birth: "9 March 1961", status: "unstaged" }, + { participantId: 'p0017', nhs_number: "548 901 7732", full_name: "Naomi Bell", date_of_birth: "21 September 1974", status: "unstaged" }, + { participantId: 'p0018', nhs_number: "439 216 5087", full_name: "Paige Long", date_of_birth: "4 July 1969", status: "unstaged" }, + { participantId: 'p0019', nhs_number: "329 487 9901", full_name: "Catherine Wood", date_of_birth: "16 January 1956", status: "unstaged" }, + { participantId: 'p0020', nhs_number: "214 603 1774", full_name: "Victoria Hale", date_of_birth: "13 October 1966", status: "unstaged" }, + { participantId: 'p0021', nhs_number: "188 905 6423", full_name: "Imogen Frost", date_of_birth: "31 December 1972", status: "unstaged" }, + { participantId: 'p0022', nhs_number: "977 332 1108", full_name: "Dara Moss", date_of_birth: "24 June 1960", status: "unstaged" }, + { participantId: 'p0023', nhs_number: "861 427 5930", full_name: "Sophie Hartley", date_of_birth: "2 August 1962", status: "unstaged" }, + { participantId: 'p0024', nhs_number: "750 218 3446", full_name: "Emma Cole", date_of_birth: "17 April 1975", status: "unstaged" }, + { participantId: 'p0025', nhs_number: "642 109 8875", full_name: "Megan Price", date_of_birth: "5 February 1961", status: "unstaged" }, + { participantId: 'p0026', nhs_number: "531 678 2209", full_name: "Mia Ford", date_of_birth: "19 May 1972", status: "unstaged" }, + { participantId: 'p0027', nhs_number: "419 502 6683", full_name: "Zoe Grant", date_of_birth: "11 March 1965", status: "unstaged" }, + { participantId: 'p0028', nhs_number: "308 244 1196", full_name: "Ariana Miles", date_of_birth: "28 November 1959", status: "unstaged" }, + { participantId: 'p0029', nhs_number: "297 883 4455", full_name: "Bethany Cross", date_of_birth: "7 July 1975", status: "unstaged" }, + { participantId: 'p0030', nhs_number: "186 771 9002", full_name: "Callie Morris", date_of_birth: "14 September 1968", status: "unstaged" }, + { participantId: 'p0031', nhs_number: "075 439 3321", full_name: "Helena Rowe", date_of_birth: "2 April 1963", status: "unstaged" }, + { participantId: 'p0032', nhs_number: "964 210 5587", full_name: "Danielle Nash", date_of_birth: "23 June 1970", status: "unstaged" }, + { participantId: 'p0033', nhs_number: "853 619 4470", full_name: "Faye Turner", date_of_birth: "8 January 1957", status: "unstaged" }, + { participantId: 'p0034', nhs_number: "742 908 2233", full_name: "Leona Grant", date_of_birth: "15 October 1974", status: "unstaged" }, + { participantId: 'p0035', nhs_number: "631 776 9904", full_name: "Nora Blake", date_of_birth: "30 December 1966", status: "unstaged" }, + { participantId: 'p0036', nhs_number: "520 665 8805", full_name: "Olivia Lee", date_of_birth: "19 August 1960", status: "unstaged" }, + { participantId: 'p0037', nhs_number: "419 554 7706", full_name: "Priya Desai", date_of_birth: "10 May 1973", status: "unstaged" }, + { participantId: 'p0038', nhs_number: "308 443 6607", full_name: "Quinn Park", date_of_birth: "26 March 1964", status: "unstaged" }, + { participantId: 'p0039', nhs_number: "197 332 5508", full_name: "Rosa Kirk", date_of_birth: "13 July 1958", status: "unstaged" }, + { participantId: 'p0040', nhs_number: "086 221 4409", full_name: "Shannon Boyd", date_of_birth: "22 November 1971", status: "unstaged" }, + { participantId: 'p0041', nhs_number: "975 110 3310", full_name: "Tara Voss", date_of_birth: "9 February 1969", status: "unstaged" }, + { participantId: 'p0042', nhs_number: "864 009 2201", full_name: "Uma Jha", date_of_birth: "17 September 1962", status: "unstaged" }, + { participantId: 'p0043', nhs_number: "753 898 1192", full_name: "Victoria Dean", date_of_birth: "4 April 1976", status: "unstaged" }, + { participantId: 'p0044', nhs_number: "642 787 0083", full_name: "Wendy Fox", date_of_birth: "21 June 1967", status: "unstaged" }, + { participantId: 'p0045', nhs_number: "531 676 9974", full_name: "Xena Holt", date_of_birth: "11 December 1960", status: "unstaged" }, + { participantId: 'p0046', nhs_number: "420 565 8865", full_name: "Yasmin Noor", date_of_birth: "28 August 1961", status: "unstaged" }, + { participantId: 'p0047', nhs_number: "319 454 7756", full_name: "Zara Moon", date_of_birth: "6 May 1973", status: "unstaged" }, + { participantId: 'p0048', nhs_number: "208 343 6647", full_name: "Abigail Stone", date_of_birth: "14 October 1959", status: "unstaged" }, + { participantId: 'p0049', nhs_number: "900 000 0001", full_name: "Olivia Smith", date_of_birth: "12 March 1968", status: "unstaged" }, + { participantId: 'p0050', nhs_number: "900 000 0002", full_name: "Emily Johnson", date_of_birth: "5 June 1974", status: "unstaged" }, + { participantId: 'p0051', nhs_number: "900 000 0003", full_name: "Charlotte Taylor", date_of_birth: "23 September 1961", status: "unstaged" }, + { participantId: 'p0052', nhs_number: "900 000 0004", full_name: "Sophie Brown", date_of_birth: "18 January 1959", status: "unstaged" }, + { participantId: 'p0053', nhs_number: "900 000 0005", full_name: "Chloe Williams", date_of_birth: "7 July 1970", status: "unstaged" }, + { participantId: 'p0054', nhs_number: "900 000 0006", full_name: "Amelia Davies", date_of_birth: "30 November 1965", status: "unstaged" }, + { participantId: 'p0055', nhs_number: "900 000 0007", full_name: "Isla Evans", date_of_birth: "2 April 1963", status: "unstaged" }, + { participantId: 'p0056', nhs_number: "900 000 0008", full_name: "Mia Wilson", date_of_birth: "14 February 1967", status: "unstaged" }, + { participantId: 'p0057', nhs_number: "900 000 0009", full_name: "Ella Thomas", date_of_birth: "29 May 1976", status: "unstaged" }, + { participantId: 'p0058', nhs_number: "900 000 0010", full_name: "Grace Roberts", date_of_birth: "11 August 1962", status: "unstaged" }, + { participantId: 'p0059', nhs_number: "900 000 0011", full_name: "Lily Johnson", date_of_birth: "4 October 1958", status: "unstaged" }, + { participantId: 'p0060', nhs_number: "900 000 0012", full_name: "Hannah Lewis", date_of_birth: "25 March 1964", status: "unstaged" }, + { participantId: 'p0061', nhs_number: "900 000 0013", full_name: "Ruby Walker", date_of_birth: "9 December 1960", status: "unstaged" }, + { participantId: 'p0062', nhs_number: "900 000 0014", full_name: "Evie Wright", date_of_birth: "16 May 1969", status: "unstaged" }, + { participantId: 'p0063', nhs_number: "900 000 0015", full_name: "Isabelle Robinson", date_of_birth: "21 November 1957", status: "unstaged" }, + { participantId: 'p0064', nhs_number: "900 000 0016", full_name: "Alice Wood", date_of_birth: "6 July 1971", status: "unstaged" }, + { participantId: 'p0065', nhs_number: "900 000 0017", full_name: "Matilda Thompson", date_of_birth: "19 April 1966", status: "unstaged" }, + { participantId: 'p0066', nhs_number: "900 000 0018", full_name: "Poppy White", date_of_birth: "27 February 1963", status: "unstaged" }, + { participantId: 'p0067', nhs_number: "900 000 0019", full_name: "Jessica Watson", date_of_birth: "1 January 1957", status: "unstaged" }, + { participantId: 'p0068', nhs_number: "900 000 0020", full_name: "Sarah Jackson", date_of_birth: "8 September 1968", status: "unstaged" }, + { participantId: 'p0069', nhs_number: "900 000 0021", full_name: "Laura Clarke", date_of_birth: "13 June 1962", status: "unstaged" }, + { participantId: 'p0070', nhs_number: "900 000 0022", full_name: "Megan Harrison", date_of_birth: "22 August 1959", status: "unstaged" }, + { participantId: 'p0071', nhs_number: "900 000 0023", full_name: "Victoria Green", date_of_birth: "3 March 1973", status: "unstaged" }, + { participantId: 'p0072', nhs_number: "900 000 0024", full_name: "Natalie Hall", date_of_birth: "15 October 1965", status: "unstaged" }, + { participantId: 'p0073', nhs_number: "900 000 0025", full_name: "Lauren Cooper", date_of_birth: "28 November 1961", status: "unstaged" }, + { participantId: 'p0074', nhs_number: "900 000 0026", full_name: "Zoe Mitchell", date_of_birth: "10 May 1960", status: "unstaged" }, + { participantId: 'p0075', nhs_number: "900 000 0027", full_name: "Amber Morgan", date_of_birth: "17 July 1969", status: "unstaged" }, + { participantId: 'p0076', nhs_number: "900 000 0028", full_name: "Lydia Hill", date_of_birth: "2 December 1975", status: "unstaged" }, + { participantId: 'p0077', nhs_number: "900 000 0029", full_name: "Bethany Moore", date_of_birth: "24 April 1958", status: "unstaged" }, + { participantId: 'p0078', nhs_number: "900 000 0030", full_name: "Natalie Ward", date_of_birth: "30 September 1964", status: "unstaged" }, + { participantId: 'p0079', nhs_number: "900 000 0031", full_name: "Rebecca Edwards", date_of_birth: "5 February 1970", status: "unstaged" }, + { participantId: 'p0080', nhs_number: "900 000 0032", full_name: "Danielle Hughes", date_of_birth: "14 June 1967", status: "unstaged" }, + { participantId: 'p0081', nhs_number: "900 000 0033", full_name: "Fiona Turner", date_of_birth: "9 October 1963", status: "unstaged" }, + { participantId: 'p0082', nhs_number: "900 000 0034", full_name: "Rachel Parker", date_of_birth: "26 January 1956", status: "unstaged" }, + { participantId: 'p0083', nhs_number: "900 000 0035", full_name: "Nicola Collins", date_of_birth: "7 August 1966", status: "unstaged" }, + { participantId: 'p0084', nhs_number: "900 000 0036", full_name: "Claire Stewart", date_of_birth: "12 November 1971", status: "unstaged" }, + { participantId: 'p0085', nhs_number: "900 000 0037", full_name: "Joanne Morris", date_of_birth: "19 March 1962", status: "unstaged" }, + { participantId: 'p0086', nhs_number: "900 000 0038", full_name: "Lorraine Rogers", date_of_birth: "3 May 1974", status: "unstaged" }, + { participantId: 'p0087', nhs_number: "900 000 0039", full_name: "Angela Cook", date_of_birth: "22 July 1958", status: "unstaged" }, + { participantId: 'p0088', nhs_number: "900 000 0040", full_name: "Emma Murphy", date_of_birth: "27 September 1969", status: "unstaged" }, + { participantId: 'p0089', nhs_number: "900 000 0041", full_name: "Jill Richardson", date_of_birth: "6 April 1965", status: "unstaged" }, + { participantId: 'p0090', nhs_number: "900 000 0042", full_name: "Sandra Cox", date_of_birth: "15 December 1957", status: "unstaged" }, + { participantId: 'p0091', nhs_number: "900 000 0043", full_name: "Yasmin Baker", date_of_birth: "23 June 1961", status: "unstaged" }, + { participantId: 'p0092', nhs_number: "900 000 0044", full_name: "Paige Bell", date_of_birth: "11 October 1970", status: "unstaged" }, + { participantId: 'p0093', nhs_number: "900 000 0045", full_name: "Harriet Butler", date_of_birth: "2 February 1968", status: "unstaged" }, + { participantId: 'p0094', nhs_number: "900 000 0046", full_name: "Imogen Gray", date_of_birth: "29 May 1964", status: "unstaged" }, + { participantId: 'p0095', nhs_number: "900 000 0047", full_name: "Tessa Chapman", date_of_birth: "18 November 1962", status: "unstaged" }, + { participantId: 'p0096', nhs_number: "900 000 0048", full_name: "Darcey Ellis", date_of_birth: "4 July 1973", status: "unstaged" }, + { participantId: 'p0097', nhs_number: "900 000 0049", full_name: "Casey Kelly", date_of_birth: "30 March 1960", status: "unstaged" }, + { participantId: 'p0098', nhs_number: "900 000 0050", full_name: "Morgan Porter", date_of_birth: "21 August 1959", status: "unstaged" }, + { participantId: 'p0099', nhs_number: "900 000 0051", full_name: "Alex Pearson", date_of_birth: "8 January 1966", status: "unstaged" }, + { participantId: 'p0100', nhs_number: "900 000 0052", full_name: "Jamie Barker", date_of_birth: "14 October 1963", status: "unstaged" }, + { participantId: 'p0101', nhs_number: "900 000 0053", full_name: "Rowan Hudson", date_of_birth: "25 May 1967", status: "unstaged" }, + { participantId: 'p0102', nhs_number: "900 000 0054", full_name: "Riley Harvey", date_of_birth: "6 April 1958", status: "unstaged" }, + { participantId: 'p0103', nhs_number: "900 000 0055", full_name: "Avery Powell", date_of_birth: "13 September 1975", status: "unstaged" }, + { participantId: 'p0104', nhs_number: "900 000 0056", full_name: "Quinn Jenkins", date_of_birth: "28 February 1961", status: "unstaged" }, + { participantId: 'p0105', nhs_number: "900 000 0057", full_name: "Jordan Simpson", date_of_birth: "17 June 1969", status: "unstaged" }, + { participantId: 'p0106', nhs_number: "900 000 0058", full_name: "Taylor Matthews", date_of_birth: "3 November 1960", status: "unstaged" }, + { participantId: 'p0107', nhs_number: "900 000 0059", full_name: "Sam Davidson", date_of_birth: "12 July 1964", status: "unstaged" }, + { participantId: 'p0108', nhs_number: "900 000 0060", full_name: "Pat Palmer", date_of_birth: "20 March 1956", status: "unstaged" }, + { participantId: 'p0109', nhs_number: "900 000 0061", full_name: "Blair Grant", date_of_birth: "9 September 1968", status: "unstaged" }, + { participantId: 'p0110', nhs_number: "900 000 0062", full_name: "Darcy Price", date_of_birth: "1 December 1965", status: "unstaged" }, + { participantId: 'p0111', nhs_number: "900 000 0063", full_name: "Skylar Grant", date_of_birth: "14 August 1971", status: "unstaged" }, + { participantId: 'p0112', nhs_number: "900 000 0064", full_name: "Noel King", date_of_birth: "5 May 1959", status: "unstaged" }, + { participantId: 'p0113', nhs_number: "900 000 0065", full_name: "Ariel Lee", date_of_birth: "23 January 1962", status: "unstaged" }, + { participantId: 'p0114', nhs_number: "900 000 0066", full_name: "Shannon Baker", date_of_birth: "11 November 1967", status: "unstaged" }, + { participantId: 'p0115', nhs_number: "900 000 0067", full_name: "Kerry Webb", date_of_birth: "4 April 1963", status: "unstaged" }, + { participantId: 'p0116', nhs_number: "900 000 0068", full_name: "Shannon Reid", date_of_birth: "29 June 1974", status: "unstaged" }, + { participantId: 'p0117', nhs_number: "900 000 0069", full_name: "Kelly Fox", date_of_birth: "16 October 1969", status: "unstaged" }, + { participantId: 'p0118', nhs_number: "900 000 0070", full_name: "Casey Ward", date_of_birth: "7 March 1966", status: "unstaged" }, + { participantId: 'p0119', nhs_number: "900 000 0071", full_name: "Rowan Stone", date_of_birth: "30 August 1961", status: "unstaged" }, + { participantId: 'p0120', nhs_number: "900 000 0072", full_name: "Skye Doyle", date_of_birth: "19 May 1958", status: "unstaged" }, + { participantId: 'p0121', nhs_number: "900 000 0073", full_name: "Morgan Heath", date_of_birth: "2 September 1960", status: "unstaged" }, + { participantId: 'p0122', nhs_number: "900 000 0074", full_name: "Alex Murray", date_of_birth: "25 December 1964", status: "unstaged" }, + { participantId: 'p0123', nhs_number: "900 000 0075", full_name: "Taylor Hughes", date_of_birth: "10 February 1967", status: "unstaged" }, + { participantId: 'p0124', nhs_number: "900 000 0076", full_name: "Jamie Arnold", date_of_birth: "18 July 1972", status: "unstaged" }, + { participantId: 'p0125', nhs_number: "900 000 0077", full_name: "Riley Bates", date_of_birth: "6 November 1957", status: "unstaged" }, + { participantId: 'p0126', nhs_number: "900 000 0078", full_name: "Avery Gill", date_of_birth: "22 April 1965", status: "unstaged" }, + { participantId: 'p0127', nhs_number: "900 000 0079", full_name: "Quinn Ellis", date_of_birth: "13 June 1963", status: "unstaged" }, + { participantId: 'p0128', nhs_number: "900 000 0080", full_name: "Jordan Neal", date_of_birth: "27 September 1969", status: "unstaged" }, + { participantId: 'p0129', nhs_number: "900 000 0081", full_name: "Casey Walton", date_of_birth: "8 December 1958", status: "unstaged" }, + { participantId: 'p0130', nhs_number: "900 000 0082", full_name: "Sam Nash", date_of_birth: "15 January 1966", status: "unstaged" }, + { participantId: 'p0131', nhs_number: "900 000 0083", full_name: "Robin Blake", date_of_birth: "4 October 1970", status: "unstaged" }, + { participantId: 'p0132', nhs_number: "900 000 0084", full_name: "Frances Potter", date_of_birth: "21 March 1959", status: "unstaged" }, + { participantId: 'p0133', nhs_number: "900 000 0085", full_name: "Marlow Bishop", date_of_birth: "11 July 1968", status: "unstaged" }, + { participantId: 'p0134', nhs_number: "900 000 0086", full_name: "Ellis Finch", date_of_birth: "29 November 1962", status: "unstaged" }, + { participantId: 'p0135', nhs_number: "900 000 0087", full_name: "Darcy Lane", date_of_birth: "6 May 1961", status: "unstaged" }, + { participantId: 'p0136', nhs_number: "900 000 0088", full_name: "Sky Morgan", date_of_birth: "17 August 1964", status: "unstaged" }, + { participantId: 'p0137', nhs_number: "900 000 0089", full_name: "Rowan Finch", date_of_birth: "3 June 1971", status: "unstaged" }, + { participantId: 'p0138', nhs_number: "900 000 0090", full_name: "Taylor Fields", date_of_birth: "24 February 1967", status: "unstaged" }, + { participantId: 'p0139', nhs_number: "900 000 0091", full_name: "Alex Rivers", date_of_birth: "13 October 1956", status: "unstaged" }, + { participantId: 'p0140', nhs_number: "900 000 0092", full_name: "Morgan Heath", date_of_birth: "2 January 1963", status: "unstaged" }, + { participantId: 'p0141', nhs_number: "900 000 0093", full_name: "Jamie Park", date_of_birth: "30 April 1969", status: "unstaged" }, + { participantId: 'p0142', nhs_number: "900 000 0094", full_name: "Riley Fox", date_of_birth: "9 September 1965", status: "unstaged" }, + { participantId: 'p0143', nhs_number: "900 000 0095", full_name: "Avery Cross", date_of_birth: "5 June 1975", status: "unstaged" }, + { participantId: 'p0144', nhs_number: "900 000 0096", full_name: "Quinn Haynes", date_of_birth: "18 August 1958", status: "unstaged" }, + { participantId: 'p0145', nhs_number: "900 000 0097", full_name: "Jordan Vance", date_of_birth: "27 November 1966", status: "unstaged" }, + { participantId: 'p0146', nhs_number: "900 000 0098", full_name: "Taylor Webb", date_of_birth: "14 February 1970", status: "unstaged" }, + { participantId: 'p0147', nhs_number: "900 000 0099", full_name: "Sam Rector", date_of_birth: "1 October 1962", status: "unstaged" }, + { participantId: 'p0148', nhs_number: "900 000 0100", full_name: "Casey Milton", date_of_birth: "20 July 1968", status: "unstaged" }, + { participantId: 'p0149', nhs_number: "900 000 0101", full_name: "Alex Harper", date_of_birth: "11 March 1960", status: "unstaged" }, + { participantId: 'p0150', nhs_number: "900 000 0102", full_name: "Morgan Kane", date_of_birth: "22 December 1957", status: "unstaged" } ]; diff --git a/app/data/session-data-defaults.js b/app/data/session-data-defaults.js index a470242..9e89485 100644 --- a/app/data/session-data-defaults.js +++ b/app/data/session-data-defaults.js @@ -1,5 +1,18 @@ const participants = require('./participants') +// currently just for the September Test "clickthru" module.exports = { - participants -} + participants, + stagedCount: 0, + clinicName: 'Worthing - test day September 2026', + clinicId: 'HWO-NNN-standard-20260501', + unitName: 'West Sussex Breast Screening Centre', + unitId: 'HWO-static-1', + locationName: 'Worthing', + locationAddressLine1: "Worthing Hospital", + clinicTimespan: "1 September 2026", + clinicLength: "1 day", + clinicCapacityPercentBooked: "0", + clinicCapacityAvailable: "48", + clinicCapacityTotal: "48" +} \ No newline at end of file diff --git a/app/routes.js b/app/routes.js index 06c7586..fb6a4e7 100644 --- a/app/routes.js +++ b/app/routes.js @@ -3,14 +3,56 @@ const express = require('express') const router = express.Router() -router.get('/action/stage/:participantIndex', function (req, res) { - req.session.data.participants.default[req.params.participantIndex].status = 'staged'; - res.redirect('/september-iteration-2/clickthru/04-choose-participants'); +router.get('/september-iteration-2/clickthru/04a-example-search-result', function (req, res) { + const query = (req.query['search-params'] || '').trim() + const allParticipants = (req.session.data.participants && req.session.data.participants.default) || [] + const normalizedQuery = query.toLowerCase().replace(/\s+/g, ' ') + const nhsQuery = normalizedQuery.replace(/\s+/g, '') + + const searchResults = (normalizedQuery ? allParticipants.map((participant, index) => { + const nhs = participant.nhs_number.toLowerCase().replace(/\s+/g, '') + const name = participant.full_name.toLowerCase() + const dob = participant.date_of_birth.toLowerCase() + + if ( + nhs.includes(nhsQuery) || + name.includes(normalizedQuery) || + dob.includes(normalizedQuery) + ) { + return Object.assign({}, participant, { participantIndex: index }) + } + + return null + }).filter(Boolean) : allParticipants.map((participant, index) => Object.assign({}, participant, { participantIndex: index }))) + + res.render('september-iteration-2/clickthru/04a-example-search-result', { + participants: searchResults, + searchQuery: query + }) +}) + +router.get('/action/stage/:participantId', function (req, res) { + const participants = (req.session.data.participants && req.session.data.participants.default) || [] + const participantIndex = participants.findIndex((participant) => participant.participantId === req.params.participantId) + + if (participantIndex !== -1) { + participants[participantIndex].status = 'staged' + req.session.data.stagedCount++ + } + + res.redirect(req.get('referer') || '/september-iteration-2/clickthru/04-choose-participants') }); -router.get('/action/unstage/:participantIndex', function (req, res) { - req.session.data.participants.default[req.params.participantIndex].status = 'unstaged'; - res.redirect('/september-iteration-2/clickthru/04-choose-participants'); +router.get('/action/unstage/:participantId', function (req, res) { + const participants = (req.session.data.participants && req.session.data.participants.default) || [] + const participantIndex = participants.findIndex((participant) => participant.participantId === req.params.participantId) + + if (participantIndex !== -1) { + participants[participantIndex].status = 'unstaged' + req.session.data.stagedCount-- + } + + res.redirect(req.get('referer') || '/september-iteration-2/clickthru/04-choose-participants') }); module.exports = router diff --git a/app/views/september-iteration-2/clickthru/02-batch-detail.html b/app/views/september-iteration-2/clickthru/02-batch-detail.html index 5365f07..374933e 100644 --- a/app/views/september-iteration-2/clickthru/02-batch-detail.html +++ b/app/views/september-iteration-2/clickthru/02-batch-detail.html @@ -25,7 +25,7 @@ {% from "september-iteration-2/macros/batch-detail.html" import batch_detail %} {{ batch_detail({ - participant_count: "2000", + participant_count: data.participants.default.length, button_url:"03-select-clinic" }) }} diff --git a/app/views/september-iteration-2/clickthru/03-select-clinic.html b/app/views/september-iteration-2/clickthru/03-select-clinic.html index 3d8385e..78a1aa2 100644 --- a/app/views/september-iteration-2/clickthru/03-select-clinic.html +++ b/app/views/september-iteration-2/clickthru/03-select-clinic.html @@ -21,19 +21,20 @@

    {% from "september-iteration-2/macros/clinic-listing.html" import clinic_listing %} {{ clinic_listing({ + controls: true, clinics: [ { - clinic_name: "Worthing - standard slots May 2026", - clinic_id: "HWO-NNN-standard-20260501", - clinic_location_name: "Worthing", - clinic_location_address_line_1: "Worthing Hospital", - clinic_unit_name: "West Sussex Breast Screening Centre", - clinic_unit_id: "HWO-static-1", - clinic_timespan: "31 May 2026", - clinic_length: "1 day", - clinic_capacity_percent_booked: "0", - clinic_capacity_available: "48", - clinic_capacity_total: "48", + clinic_name: data.clinicName, + clinic_id: data.clinicId, + clinic_location_name: data.locationName, + clinic_location_address_line_1: data.locationAddressLine1, + clinic_unit_name: data.unitName, + clinic_unit_id: data.unitId, + clinic_timespan: data.clinicTimespan, + clinic_length: data.clinicLength, + clinic_capacity_percent_booked: data.clinicCapacityPercentBooked, + clinic_capacity_available: data.clinicCapacityAvailable, + clinic_capacity_total: data.clinicCapacityTotal, button_url: "04-choose-participants" } ] diff --git a/app/views/september-iteration-2/clickthru/04-choose-participants.html b/app/views/september-iteration-2/clickthru/04-choose-participants.html index 9ad0fa5..efafc27 100644 --- a/app/views/september-iteration-2/clickthru/04-choose-participants.html +++ b/app/views/september-iteration-2/clickthru/04-choose-participants.html @@ -19,15 +19,137 @@

    {% from "september-iteration-2/macros/search-component.html" import participant_search %} {{ participant_search({ - form_action: "test" + form_action: "04a-example-search-result", + search_query: searchQuery }) }} -{% from "september-iteration-2/macros/participant-listing.html" import participant_listing %} -{{ participant_listing({ - mode: "browse", - participants: data.participants.default -}) }} +
    +
    + {% from "september-iteration-2/macros/participant-listing.html" import participant_listing %} + {{ participant_listing({ + mode: "browse", + participants: data.participants.default + }) }} +
    +
    + + + +{% include "september-iteration-2/includes/participant-staging-control.html" %} +{% endblock %} + +{% block pageScripts %} + {% endblock %} {% block footer %} diff --git a/app/views/september-iteration-2/clickthru/04a-example-search-result.html b/app/views/september-iteration-2/clickthru/04a-example-search-result.html new file mode 100644 index 0000000..ba43383 --- /dev/null +++ b/app/views/september-iteration-2/clickthru/04a-example-search-result.html @@ -0,0 +1,45 @@ +{% extends 'layout.html' %} + +{% set pageName = "" %} + +{% from "z-september-transactional-journey/_includes/min-primary-navigation.html" import primaryNavigation %} +{% block header %} + {{ primaryNavigation() }} +{% endblock %} + +{% block beforeContent %}{% endblock %} + +{% block content %} + +
    +

    + Choose participants to book +

    +
    + +{% from "september-iteration-2/macros/search-component.html" import participant_search %} +{{ participant_search({ + form_action: "04a-example-search-result", + search_query: searchQuery +}) }} + +
    +
    + {% from "september-iteration-2/macros/participant-listing.html" import participant_listing %} + {{ participant_listing({ + mode: "search", + participants: participants + }) }} + + Clear search results + +
    +
    + +{% include "september-iteration-2/includes/participant-staging-control.html" %} + +{% endblock %} + +{% block footer %} + {{ footer() }} +{% endblock %} \ No newline at end of file diff --git a/app/views/september-iteration-2/clickthru/05-review.html b/app/views/september-iteration-2/clickthru/05-review.html new file mode 100644 index 0000000..5e04f16 --- /dev/null +++ b/app/views/september-iteration-2/clickthru/05-review.html @@ -0,0 +1,119 @@ +{% extends 'layout.html' %} + +{% set pageName = "Assign slots to participants" %} + +{% from "z-september-transactional-journey/_includes/min-primary-navigation.html" import primaryNavigation %} +{% block header %} + {{ primaryNavigation() }} +{% endblock %} + +{% block beforeContent %}{% endblock %} + +{% block content %} + +
    +

    + Book participants +

    +
    + +
    +
    + +

    + {% if data.stagedCount === 1 %} + You are booking 1 participant + {% else %} + You are booking {{ data.stagedCount }} participants + {% endif %} +

    + +
    + + + Show chosen participants + + +
    + + + + + + + + + + {% for participant in data.participants.default %} + {% if participant.status === "staged" %} + + + + + + {% endif %} + {% endfor %} + +
    + NHS Number + + Full name + + Date of birth +
    {{ participant.nhs_number }}{{ participant.full_name }}{{ participant.date_of_birth }}
    +
    +
    + +

    into {{ data.clinicName }}

    +
    + + + Show clinic details + + +
    + {% from "september-iteration-2/macros/clinic-listing.html" import clinic_listing %} + {{ clinic_listing({ + controls: false, + clinics: [ + { + clinic_name: data.clinicName, + clinic_id: data.clinicId, + clinic_location_name: data.locationName, + clinic_location_address_line_1: data.locationAddressLine1, + clinic_unit_name: data.unitName, + clinic_unit_id: data.unitId, + clinic_timespan: data.clinicTimespan, + clinic_length: data.clinicLength, + clinic_capacity_percent_booked: data.clinicCapacityPercentBooked, + clinic_capacity_available: data.clinicCapacityAvailable, + clinic_capacity_total: data.clinicCapacityTotal + } + ] + }) }} +
    +
    + +
    +

    Participants will be booked in random order.

    +
    + +
    +
    + + + +{% endblock %} + +{% block footer %} + {{ footer() }} +{% endblock %} diff --git a/app/views/september-iteration-2/clickthru/06-booked.html b/app/views/september-iteration-2/clickthru/06-booked.html new file mode 100644 index 0000000..537b99e --- /dev/null +++ b/app/views/september-iteration-2/clickthru/06-booked.html @@ -0,0 +1,58 @@ +{% extends 'layout.html' %} + +{% set pageName = "" %} + +{% from "z-september-transactional-journey/_includes/min-primary-navigation.html" import primaryNavigation %} +{% block header %} + {{ primaryNavigation() }} +{% endblock %} + +{% block beforeContent %}{% endblock %} + +{% block content %} + +
    +
    + {% set html %} +

    + 48 participants booked +

    + {% endset %} + {{ notificationBanner({ + html: html, + type: "success" + }) }} +
    +

    + {{ data.clinicId }} + {{ data.clinicName }} +

    +
    + {{ data.unitName }} at {{ data.locationName }} +
    + {{ actionLink({ + text: "Download .csv", + href: "#" + }) }} +
    +
    +
    + +
    + +
    +
    +

    + Tuesday + {{ data.clinicTimespan }} +

    +
    +
    + + {% include "september-iteration-2/includes/day-list-hard-coded.html" %} + +{% endblock %} + +{% block footer %} + {{ footer() }} +{% endblock %} \ No newline at end of file diff --git a/app/views/september-iteration-2/includes/day-list-hard-coded.html b/app/views/september-iteration-2/includes/day-list-hard-coded.html new file mode 100644 index 0000000..35d05bf --- /dev/null +++ b/app/views/september-iteration-2/includes/day-list-hard-coded.html @@ -0,0 +1,365 @@ +
    +
    +

    + Morning session + 08:30 to 12:30 +

    +
    + + + 0 slots available of 24 + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Time + + NHS Number + + Full name + + Date of birth +
    08:30999 054 3666Billie Joanne Marquardt15 March 1960
    08:40943 582 7164Alice Marie Gregory8 November 1964
    08:50821 374 0952Daphne Hart22 July 1958
    09:00702 195 4836Marta O'Neill3 May 1971
    09:10614 287 9305Susan Carter19 September 1967
    09:20505 463 1129Olivia Barnes12 January 1975
    09:30336 774 2201Rachel Price27 April 1962
    09:40223 546 8870Hannah Wallace6 October 1959
    09:50410 559 3322Fiona Lambert14 December 1973
    10:00196 804 7753Georgia Mills30 June 1968
    10:10378 290 4601Elaine Fox11 February 1976
    10:20957 613 2084Tessa King25 August 1963
    10:30604 118 9756Nadia Singh7 April 1957
    10:40842 039 6617Jane Reed18 November 1970
    10:50731 259 1148Laura White29 May 1965
    11:00665 880 3320Marissa Young9 March 1961
    11:10548 901 7732Naomi Bell21 September 1974
    11:20439 216 5087Paige Long4 July 1969
    11:30329 487 9901Catherine Wood16 January 1956
    11:40214 603 1774Victoria Hale13 October 1966
    11:50188 905 6423Imogen Frost31 December 1972
    12:00977 332 1108Dara Moss24 June 1960
    12:10861 427 5930Sophie Hartley2 August 1962
    12:20750 218 3446Emma Cole17 April 1975
    +
    +
    +
    +
    + +
    +
    +
    +

    + Afternoon session + 13:30 to 17:30 +

    +
    +
    + + + 0 slots available of 24 + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Time + + NHS Number + + Full name + + Date of birth +
    13:30642 109 8875Megan Price5 February 1961
    13:40531 678 2209Mia Ford19 May 1972
    13:50419 502 6683Zoe Grant11 March 1965
    14:00308 244 1196Ariana Miles28 November 1959
    14:10297 883 4455Bethany Cross7 July 1975
    14:20186 771 9002Callie Morris14 September 1968
    14:30075 439 3321Helena Rowe2 April 1963
    14:40964 210 5587Danielle Nash23 June 1970
    14:50853 619 4470Faye Turner8 January 1957
    15:00742 908 2233Leona Grant15 October 1974
    15:10631 776 9904Nora Blake30 December 1966
    15:20520 665 8805Olivia Lee19 August 1960
    15:30419 554 7706Priya Desai10 May 1973
    15:40308 443 6607Quinn Park26 March 1964
    15:50197 332 5508Rosa Kirk13 July 1958
    16:00086 221 4409Shannon Boyd22 November 1971
    16:10975 110 3310Tara Voss9 February 1969
    16:20864 009 2201Uma Jha17 September 1962
    16:30753 898 1192Victoria Dean4 April 1976
    16:40642 787 0083Wendy Fox21 June 1967
    16:50531 676 9974Xena Holt11 December 1960
    17:00420 565 8865Yasmin Noor28 August 1961
    17:10319 454 7756Zara Moon6 May 1973
    17:20208 343 6647Abigail Stone14 October 1959
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/september-iteration-2/includes/participant-staging-control.html b/app/views/september-iteration-2/includes/participant-staging-control.html new file mode 100644 index 0000000..d4a5199 --- /dev/null +++ b/app/views/september-iteration-2/includes/participant-staging-control.html @@ -0,0 +1,26 @@ +
    +
    +
    + Information: + {% if data.stagedCount === 0 %} +

    0 participants ready to book

    + {% else %} +

    + {{ data.stagedCount }} participant{% if data.stagedCount > 1 %}s{% endif %} ready to book +

    + {% endif %} +
    +
    +
    + +
    + {% if data.stagedCount === 0 %} + + Book participants + + {% else %} + + Book participants + + {% endif %} +
    \ No newline at end of file diff --git a/app/views/september-iteration-2/macros/clinic-listing.html b/app/views/september-iteration-2/macros/clinic-listing.html index ca0733d..a867528 100644 --- a/app/views/september-iteration-2/macros/clinic-listing.html +++ b/app/views/september-iteration-2/macros/clinic-listing.html @@ -17,9 +17,11 @@ Capacity - - Action - + {% if options.controls != false %} + + Action + + {% endif %} @@ -45,11 +47,13 @@
    {{ clinic.clinic_capacity_available }} slots available of {{ clinic.clinic_capacity_total }} - - - Select this clinic - - + {% if options.controls != false %} + + + Select this clinic + + + {% endif %} {% endfor %} diff --git a/app/views/september-iteration-2/macros/participant-listing.html b/app/views/september-iteration-2/macros/participant-listing.html index 7a9eea7..a6acdea 100644 --- a/app/views/september-iteration-2/macros/participant-listing.html +++ b/app/views/september-iteration-2/macros/participant-listing.html @@ -1,59 +1,57 @@ {% macro participant_listing(options) %} -
    -
    - - - +
    - {% if options.mode == "search" %} - 4 participants found - {% else %} - {{ options.participants.length }} participants - {% endif %} -
    + + + + + + + + + + + + {% for participant in options.participants %} - - - - - + + + + + - - - {% for participant in options.participants %} - - - - - - - - {% endfor %} - -
    + {% set totalCount = options.totalCount or options.participants.length %} + {% if options.mode == "search" %} + {{ totalCount }} participant{% if totalCount != 1 %}s{% endif %} found + {% else %} + {{ totalCount }} participants + {% endif %} +
    + NHS Number + + Full name + + Date of birth + + Status + + Actions +
    - NHS Number - - Full name - - Date of birth - - Status - - Actions - {{ participant.nhs_number }}{{ participant.full_name }}{{ participant.date_of_birth }} + {% if participant.status == "unstaged" %} + Will not be booked + {% else %} + + Ready to book + + {% endif %} + + {% set participantId = participant.participantId or loop.index0 %} + {% if participant.status == "unstaged" %} + Add + {% else %} + Remove + {% endif %} +
    {{ participant.nhs_number }}{{ participant.full_name }}{{ participant.date_of_birth }} - {% if participant.status == "unstaged" %} - Will not be booked - {% else %} - - Ready to book - - {% endif %} - - {% if participant.status == "unstaged" %} - Add - {% else %} - Remove - {% endif %} -
    -
    -
    + {% endfor %} + + {% endmacro %} diff --git a/app/views/september-iteration-2/macros/search-component.html b/app/views/september-iteration-2/macros/search-component.html index 203f3b7..63c3734 100644 --- a/app/views/september-iteration-2/macros/search-component.html +++ b/app/views/september-iteration-2/macros/search-component.html @@ -10,7 +10,7 @@ Search by NHS number, first name, or last name
    - +
    - + {% include "september-iteration-2/includes/participant-staging-control.html" %} {% endblock %}