From 14b6003130f10631684f390468759bf6b41c3541 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 25 Sep 2026 16:53:08 +0100 Subject: [PATCH 01/22] Session workflows first commit --- app/locals.js | 1 + app/views/includes/header.html | 7 + app/views/sessions/index.html | 119 ++++++++++++ app/views/sessions/session.html | 332 ++++++++++++++++++++++++++++++++ 4 files changed, 459 insertions(+) create mode 100644 app/views/sessions/index.html create mode 100644 app/views/sessions/session.html diff --git a/app/locals.js b/app/locals.js index 09fefe28..9b3b378d 100644 --- a/app/locals.js +++ b/app/locals.js @@ -29,6 +29,7 @@ module.exports = function(req, res, next) { ] const now = new Date() + res.locals.today = now.toISOString().substring(0, 10) const lastMonthDate = new Date(now.getFullYear(), now.getMonth() - 1, 1) res.locals.lastCalendarMonth = `${monthNames[lastMonthDate.getMonth()]} ${lastMonthDate.getFullYear()}` diff --git a/app/views/includes/header.html b/app/views/includes/header.html index 9c9fafd6..1c28979d 100644 --- a/app/views/includes/header.html +++ b/app/views/includes/header.html @@ -16,6 +16,13 @@ }), navigationItems) %} {% endif %} + + {% set navigationItems = (navigationItems.push({ + href: "/sessions/", + text: "Sessions", + active: (currentSection == "sessions") + }), navigationItems) %} + {% if canShowRecordVaccinations %} {% set navigationItems = (navigationItems.push({ diff --git a/app/views/sessions/index.html b/app/views/sessions/index.html new file mode 100644 index 00000000..013dbe68 --- /dev/null +++ b/app/views/sessions/index.html @@ -0,0 +1,119 @@ +{% extends 'layout.html' %} + +{% set pageName = "Sessions" %} + +{% set currentSection = "sessions" %} + +{% block content %} + +
+
+ +

{{ pageName }}

+ + {{ button({ + text: "Create session" + }) }} + + {% set upcomingContent %} + {{ table({ + caption: { + text: "Existing clinics", + classes: "nhsuk-u-visually-hidden" + }, + head: [ + { + text: "Name" + }, + { + text: "Date" + }, + { + text: "Location" + }, + { + text: "Patients" + }, + { + text: "Action" + } + ], + rows: [ + [ + { + text: "Autumn vaccination clinic" + }, + { + text: today | formatDate + }, + { + text: "Hillside Care Home" + }, + { + text: "49" + }, + { + html: "View" + } + ], + [ + { + text: "Winter booster clinic" + }, + { + text: "22 October 2026" + }, + { + text: "Oaklands Residential Home" + }, + { + text: "36" + }, + { + html: "View" + } + ], + [ + { + text: "Flu vaccination visit" + }, + { + text: "5 November 2026" + }, + { + text: "Meadowbrook Care Centre" + }, + { + text: "58" + }, + { + html: "View" + } + ] + ] + }) }} + {% endset -%} + + {{ tabs({ + items: [ + { + label: "Upcoming (3)", + id: "upcoming", + panel: { + html: upcomingContent + } + }, + { + label: "Completed (2)", + id: "completed", + panel: { + html: completedContent + } + } + ] + }) }} + +
+
+ +{% endblock %} \ No newline at end of file diff --git a/app/views/sessions/session.html b/app/views/sessions/session.html new file mode 100644 index 00000000..17f0e074 --- /dev/null +++ b/app/views/sessions/session.html @@ -0,0 +1,332 @@ +{% extends 'layout.html' %} + +{% set pageName = "Autumn vaccination clinic" %} + +{% set currentSection = "sessions" %} + +{% block beforeContent %} + + {{ backLink({ + href: "/sessions", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
+
+ +

{{ pageName }}

+ + {{ summaryList({ + rows: [ + { + key: { + text: "Date" + }, + value: { + text: today | formatDate + } + }, + { + key: { + text: "Location" + }, + value: { + text: "Hillside Care Home" + } + }, + { + key: { + text: "Status" + }, + value: { + html: tag({ + text: "Preparing", + colour: "yellow" + }) + } + } if data.status=="preparing", + { + key: { + text: "Status" + }, + value: { + html: tag({ + text: "In session", + colour: "white" + }) + } + } if data.status=="insession", + { + key: { + text: "Status" + }, + value: { + html: tag({ + text: "Complete", + colour: "green" + }) + } + } if data.status=="complete" + + ] + }) }} + +
+
+ +
+
+ +
+ + {% if data.status == "insession" %} + + {{ button({ + text: "Record a walk-in", + variant: "secondary" + }) }} + + {% elif data.status == "complete" %} + + {% else %} + + {{ button({ + text: "Start session", + href: "?status=insession" + }) }} + + {% endif %} + + {% if data.status == "complete" %} + + {% else %} + + {{ button({ + text: "Add patients", + variant: "secondary" + }) }} + + {# {{ button({ + text: "Pre-fill all with template", + variant: "secondary" + }) }} #} + + {% endif %} + +
+ +
+
+ +
+
+ + {% if data.status == "complete" %} + + + + {% endif %} + + {% set patientActionsContent %} + + {% if data.status == "complete" %} + + View record + + {% elif data.status == "preparing" %} + + Pre-fill + + {% else %} + +
+ + Pre-fill + + Record + + {# {{ button({ + text: "Mark as ready", + small: true, + variant: "secondary" + }) }} #} + + {{ button({ + text: "DNA", + small: true, + variant: "secondary" + }) }} + +
+ + {% endif %} + + {% endset -%} + + {% set patientStatusContent %} + + {% if data.status == "complete" %} + + {{ tag({ + text: "Vaccinated", + colour: "green" + }) }} + + {% elif data.status == "insession" %} + + {{ tag({ + text: "In session", + colour: "white" + }) }} + + {% else %} + + {{ tag({ + text: "New", + colour: "yellow" + }) }} + + {% endif %} + + {% endset -%} + + {% set allPatientContent %} + {{ table({ + caption: { + text: "Patients", + classes: "nhsuk-u-visually-hidden" + }, + head: [ + { + text: "Name and NHS number" + }, + { + text: "Date of birth" + }, + { + text: "Status" + }, + { + text: "Actions" + } + ], + rows: [ + [ + { + html: "Alan Teapot
912 312 3123
" + }, + { + html: "14 April 1940
86 years old
" + }, + { + html: patientStatusContent + }, + { + html: patientActionsContent + } + ], + [ + { + html: "Margaret Green
943 876 2109
" + }, + { + html: "2 September 1943
83 years old
" + }, + { + html: patientStatusContent + }, + { + html: patientActionsContent + } + ], + [ + { + html: "George Wilson
978 654 3210
" + }, + { + html: "19 November 1946
79 years old
" + }, + { + html: patientStatusContent + }, + { + html: patientActionsContent + } + ] + ] + }) }} + {% endset -%} + + {{ tabs({ + items: [ + { + label: "All patients (49)", + id: "patients", + panel: { + html: allPatientContent + } + } + , + { + label: "Pre-filled (8)", + id: "prefilled" + } if data.status=="preparing" or data.status=="insession" + , + { + label: "Vaccinated (33)", + id: "vaccinated" + } if data.status=="insession" or data.status=="complete" + , + { + label: "DNAs (16)", + id: "dnas" + } if data.status=="insession" or data.status=="complete" + ] + }) }} + + {% if data.status == "insession" %} + + {{ button({ + text: "Complete session", + href: "?status=complete", + variant: "warning" + }) }} + + {% endif %} + +

+ Print patient list +

+ +
+
+ +{% endblock %} \ No newline at end of file From 32eeaa69c58055007bfca43fa0d6ffb2112eeeea Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:12:42 +0100 Subject: [PATCH 02/22] Add CP appointments scenario --- app/locals.js | 3 + app/views/sessions/index.html | 39 +++++++++--- app/views/sessions/session.html | 108 +++++++++++++++++++++++--------- 3 files changed, 111 insertions(+), 39 deletions(-) diff --git a/app/locals.js b/app/locals.js index 9b3b378d..2174ff25 100644 --- a/app/locals.js +++ b/app/locals.js @@ -30,6 +30,9 @@ module.exports = function(req, res, next) { const now = new Date() res.locals.today = now.toISOString().substring(0, 10) + const tomorrow = new Date(now) + tomorrow.setUTCDate(tomorrow.getUTCDate() + 1) + res.locals.tomorrow = tomorrow.toISOString().substring(0, 10) const lastMonthDate = new Date(now.getFullYear(), now.getMonth() - 1, 1) res.locals.lastCalendarMonth = `${monthNames[lastMonthDate.getMonth()]} ${lastMonthDate.getFullYear()}` diff --git a/app/views/sessions/index.html b/app/views/sessions/index.html index 013dbe68..dfa8b3f5 100644 --- a/app/views/sessions/index.html +++ b/app/views/sessions/index.html @@ -39,6 +39,23 @@

{{ pageName }}

} ], rows: [ + [ + { + text: "Tomorrow’s appointments" + }, + { + text: tomorrow | formatDate + }, + { + text: "On site (Pickfords Pharmacy)" + }, + { + text: "49" + }, + { + html: "View session" + } + ], [ { text: "Autumn vaccination clinic" @@ -53,9 +70,10 @@

{{ pageName }}

text: "49" }, { - html: "View" + html: "View session" } - ], + ] if data.scenario != "appts" + , [ { text: "Winter booster clinic" @@ -70,9 +88,10 @@

{{ pageName }}

text: "36" }, { - html: "View" + html: "View session" } - ], + ] if data.scenario != "appts" + , [ { text: "Flu vaccination visit" @@ -87,9 +106,9 @@

{{ pageName }}

text: "58" }, { - html: "View" + html: "View session" } - ] + ] if data.scenario != "appts" ] }) }} {% endset -%} @@ -97,14 +116,16 @@

{{ pageName }}

{{ tabs({ items: [ { - label: "Upcoming (3)", + label: "Upcoming (3)" if data.scenario != "appts", + label: "Upcoming (1)" if data.scenario == "appts", id: "upcoming", panel: { html: upcomingContent } - }, + } + , { - label: "Completed (2)", + label: "Completed", id: "completed", panel: { html: completedContent diff --git a/app/views/sessions/session.html b/app/views/sessions/session.html index 17f0e074..b1b4e234 100644 --- a/app/views/sessions/session.html +++ b/app/views/sessions/session.html @@ -1,6 +1,20 @@ {% extends 'layout.html' %} +{% if data.scenario == "appts" and data.status == "complete" %} +{% set pageName = "Yesterday’s appointments" %} +{% elif data.scenario == "appts" and data.status == "preparing" %} +{% set pageName = "Tomorrow’s appointments" %} +{% elif data.scenario == "appts" %} +{% set pageName = "Today’s appointments" %} +{% else %} {% set pageName = "Autumn vaccination clinic" %} +{% endif %} + +{% if data.scenario == "appts" %} +{% set sessionLocation = "On site (Pickfords Pharmacy)" %} +{% else %} +{% set sessionLocation = "Hillside Care Home" %} +{% endif %} {% set currentSection = "sessions" %} @@ -27,15 +41,25 @@

{{ pageName }}

text: "Date" }, value: { - text: today | formatDate + text: tomorrow | formatDate } + } if data.scenario == "appts" + , + { + key: { + text: "Date" }, + value: { + text: today | formatDate + } + } if data.scenario != "appts" + , { key: { text: "Location" }, value: { - text: "Hillside Care Home" + text: sessionLocation } }, { @@ -86,13 +110,13 @@

{{ pageName }}

{% if data.status == "insession" %} {{ button({ - text: "Record a walk-in", + text: "Add a walk-in", variant: "secondary" }) }} {% elif data.status == "complete" %} - {% else %} + {% elif data.scenario != "appts" %} {{ button({ text: "Start session", @@ -103,17 +127,19 @@

{{ pageName }}

{% if data.status == "complete" %} - {% else %} + {% elif data.scenario!="appts" %} {{ button({ text: "Add patients", variant: "secondary" }) }} - {# {{ button({ - text: "Pre-fill all with template", + {% else %} + + {{ button({ + text: "Pre-fill all", variant: "secondary" - }) }} #} + }) }} {% endif %} @@ -142,13 +168,24 @@

{{ pageName }}

  • {% call card({ - heading: { - text: "16", + heading: { + text: "2", + visuallyHiddenText: "vaccinations", + classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" + } + }) %} + Cancelled + {% endcall %} +
  • +
  • + {% call card({ + heading: { + text: "4", visuallyHiddenText: "vaccinations", classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" } }) %} - DNAs + Not eligible {% endcall %}
  • @@ -173,17 +210,7 @@

    {{ pageName }}

    Record - {# {{ button({ - text: "Mark as ready", - small: true, - variant: "secondary" - }) }} #} - - {{ button({ - text: "DNA", - small: true, - variant: "secondary" - }) }} + Cancel @@ -225,6 +252,9 @@

    {{ pageName }}

    classes: "nhsuk-u-visually-hidden" }, head: [ + { + text: "Time" + }, { text: "Name and NHS number" }, @@ -233,13 +263,17 @@

    {{ pageName }}

    }, { text: "Status" - }, + } if data.scenario!="appts" + , { text: "Actions" } ], rows: [ [ + { + html: "10:00am" + }, { html: "Alan Teapot
    912 312 3123
    " }, @@ -248,12 +282,16 @@

    {{ pageName }}

    }, { html: patientStatusContent - }, + } if data.scenario!="appts" + , { html: patientActionsContent } ], [ + { + html: "10:30am" + }, { html: "Margaret Green
    943 876 2109
    " }, @@ -262,12 +300,16 @@

    {{ pageName }}

    }, { html: patientStatusContent - }, + } if data.scenario!="appts" + , { html: patientActionsContent } ], [ + { + html: "N/A
    Walk-in
    " + }, { html: "George Wilson
    978 654 3210
    " }, @@ -276,11 +318,12 @@

    {{ pageName }}

    }, { html: patientStatusContent - }, + } if data.scenario!="appts" + , { html: patientActionsContent } - ] + ] if data.status!="preparing" ] }) }} {% endset -%} @@ -288,7 +331,7 @@

    {{ pageName }}

    {{ tabs({ items: [ { - label: "All patients (49)", + label: "All (49)", id: "patients", panel: { html: allPatientContent @@ -301,13 +344,18 @@

    {{ pageName }}

    } if data.status=="preparing" or data.status=="insession" , { - label: "Vaccinated (33)", + label: "Completed (33)", id: "vaccinated" } if data.status=="insession" or data.status=="complete" , { - label: "DNAs (16)", + label: "Cancelled (2)", id: "dnas" + } + , + { + label: "Not eligible (4)", + id: "noteligible" } if data.status=="insession" or data.status=="complete" ] }) }} From 99750dde20d151b2f91a447d4671133713689131 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Tue, 29 Sep 2026 16:45:14 +0100 Subject: [PATCH 03/22] Respond to team crit --- app/views/sessions/index.html | 32 +++++++-------- app/views/sessions/scenarios.html | 26 +++++++++++++ app/views/sessions/session.html | 65 ++----------------------------- 3 files changed, 45 insertions(+), 78 deletions(-) create mode 100644 app/views/sessions/scenarios.html diff --git a/app/views/sessions/index.html b/app/views/sessions/index.html index dfa8b3f5..5b9943cc 100644 --- a/app/views/sessions/index.html +++ b/app/views/sessions/index.html @@ -1,8 +1,8 @@ {% extends 'layout.html' %} -{% set pageName = "Sessions" %} +{% set pageName = "Clinics" %} -{% set currentSection = "sessions" %} +{% set currentSection = "clinics" %} {% block content %} @@ -12,11 +12,11 @@

    {{ pageName }}

    {{ button({ - text: "Create session" + text: "Create clinic" }) }} {% set upcomingContent %} - {{ table({ + {{ table({ caption: { text: "Existing clinics", classes: "nhsuk-u-visually-hidden" @@ -53,12 +53,13 @@

    {{ pageName }}

    text: "49" }, { - html: "View session" + html: "View" } - ], + ] if data.scenario + , [ { - text: "Autumn vaccination clinic" + text: "Hillside Care home - Flu over 75s" }, { text: today | formatDate @@ -70,13 +71,13 @@

    {{ pageName }}

    text: "49" }, { - html: "View session" + html: "View" } ] if data.scenario != "appts" , [ { - text: "Winter booster clinic" + text: "Oaklands care home - Covid" }, { text: "22 October 2026" @@ -88,13 +89,13 @@

    {{ pageName }}

    text: "36" }, { - html: "View session" + html: "View" } ] if data.scenario != "appts" , [ { - text: "Flu vaccination visit" + text: "Housebound patients Meadowbrook list" }, { text: "5 November 2026" @@ -106,7 +107,7 @@

    {{ pageName }}

    text: "58" }, { - html: "View session" + html: "View" } ] if data.scenario != "appts" ] @@ -116,12 +117,11 @@

    {{ pageName }}

    {{ tabs({ items: [ { - label: "Upcoming (3)" if data.scenario != "appts", - label: "Upcoming (1)" if data.scenario == "appts", + label: "Upcoming (3)", id: "upcoming", panel: { - html: upcomingContent - } + html: upcomingContent + } } , { diff --git a/app/views/sessions/scenarios.html b/app/views/sessions/scenarios.html new file mode 100644 index 00000000..62a9fb85 --- /dev/null +++ b/app/views/sessions/scenarios.html @@ -0,0 +1,26 @@ +{% extends 'layout.html' %} + +{% set pageName = "Prototype scenarios" %} + +{% set currentSection = "sessions" %} + +{% block content %} + +
    +
    + +

    {{ pageName }}

    + + + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/sessions/session.html b/app/views/sessions/session.html index b1b4e234..736025ff 100644 --- a/app/views/sessions/session.html +++ b/app/views/sessions/session.html @@ -7,7 +7,7 @@ {% elif data.scenario == "appts" %} {% set pageName = "Today’s appointments" %} {% else %} -{% set pageName = "Autumn vaccination clinic" %} +{% set pageName = "Hillside Care home - Flu over 75s" %} {% endif %} {% if data.scenario == "appts" %} @@ -109,11 +109,6 @@

    {{ pageName }}

    {% if data.status == "insession" %} - {{ button({ - text: "Add a walk-in", - variant: "secondary" - }) }} - {% elif data.status == "complete" %} {% elif data.scenario != "appts" %} @@ -177,17 +172,6 @@

    {{ pageName }}

    Cancelled {% endcall %} -
  • - {% call card({ - heading: { - text: "4", - visuallyHiddenText: "vaccinations", - classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" - } - }) %} - Not eligible - {% endcall %} -
  • {% endif %} @@ -198,16 +182,10 @@

    {{ pageName }}

    View record - {% elif data.status == "preparing" %} - - Pre-fill - {% else %}
    - Pre-fill - Record Cancel @@ -252,18 +230,12 @@

    {{ pageName }}

    classes: "nhsuk-u-visually-hidden" }, head: [ - { - text: "Time" - }, { text: "Name and NHS number" }, { text: "Date of birth" - }, - { - text: "Status" - } if data.scenario!="appts" + } , { text: "Actions" @@ -271,59 +243,38 @@

    {{ pageName }}

    ], rows: [ [ - { - html: "10:00am" - }, { html: "Alan Teapot
    912 312 3123
    " }, { html: "14 April 1940
    86 years old
    " }, - { - html: patientStatusContent - } if data.scenario!="appts" - , { html: patientActionsContent } ], [ - { - html: "10:30am" - }, { html: "Margaret Green
    943 876 2109
    " }, { html: "2 September 1943
    83 years old
    " }, - { - html: patientStatusContent - } if data.scenario!="appts" - , { html: patientActionsContent } ], [ - { - html: "N/A
    Walk-in
    " - }, { html: "George Wilson
    978 654 3210
    " }, { html: "19 November 1946
    79 years old
    " }, - { - html: patientStatusContent - } if data.scenario!="appts" - , { html: patientActionsContent } - ] if data.status!="preparing" + ] if data.status!="appts" ] }) }} {% endset -%} @@ -338,11 +289,6 @@

    {{ pageName }}

    } } , - { - label: "Pre-filled (8)", - id: "prefilled" - } if data.status=="preparing" or data.status=="insession" - , { label: "Completed (33)", id: "vaccinated" @@ -352,11 +298,6 @@

    {{ pageName }}

    label: "Cancelled (2)", id: "dnas" } - , - { - label: "Not eligible (4)", - id: "noteligible" - } if data.status=="insession" or data.status=="complete" ] }) }} From 3e9eac0d32d4f36912d0d2d7e6fd1c0c25da4365 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Tue, 29 Sep 2026 19:53:33 +0100 Subject: [PATCH 04/22] Continue iterating following design crit --- app/views/clinics/add-patients.html | 42 ++++++++ app/views/clinics/cancel.html | 72 +++++++++++++ app/views/clinics/create.html | 101 ++++++++++++++++++ app/views/{sessions => clinics}/index.html | 11 +- .../{sessions => clinics}/scenarios.html | 0 app/views/{sessions => clinics}/session.html | 35 +++++- app/views/includes/header.html | 8 +- 7 files changed, 257 insertions(+), 12 deletions(-) create mode 100644 app/views/clinics/add-patients.html create mode 100644 app/views/clinics/cancel.html create mode 100644 app/views/clinics/create.html rename app/views/{sessions => clinics}/index.html (89%) rename app/views/{sessions => clinics}/scenarios.html (100%) rename app/views/{sessions => clinics}/session.html (89%) diff --git a/app/views/clinics/add-patients.html b/app/views/clinics/add-patients.html new file mode 100644 index 00000000..e7b22f59 --- /dev/null +++ b/app/views/clinics/add-patients.html @@ -0,0 +1,42 @@ +{% extends 'layout.html' %} + +{% set pageName = "Add patients" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
    +
    + + {#

    {{ pageName }}

    #} + + {{ textarea({ + label: { + text: pageName, + size: "l", + isPageHeading: true + }, + id: "example", + name: "example" + }) }} + + + {{ button({ + text: "Continue", + href: "/clinics/session?scenario&status=preparing" + }) }} + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/cancel.html b/app/views/clinics/cancel.html new file mode 100644 index 00000000..1dd3320e --- /dev/null +++ b/app/views/clinics/cancel.html @@ -0,0 +1,72 @@ +{% extends 'layout.html' %} + +{% set pageName = "Cancel" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
    +
    + + {{ radios({ + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + idPrefix: "example-hints", + name: "exampleHints", + items: [ + { + value: "Consent not given", + text: "Consent not given" + }, + { + value: "Patient declined vaccination", + text: "Patient declined vaccination" + }, + { + value: "Patient unwell", + text: "Patient unwell" + }, + { + value: "Vaccination not suitable", + text: "Vaccination not suitable", + hint: "Medically contra-indindicated, for example patient has allergy or previous reaction" + }, + { + value: "Not eligible", + text: "Not eligible" + }, + { + value: "Patient has died", + text: "Patient has died" + }, + { + value: "Already vaccinated", + text: "Already vaccinated" + } + ] + }) }} + + {{ button({ + text: "Cancel", + variant: "warning" + }) }} + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/create.html b/app/views/clinics/create.html new file mode 100644 index 00000000..a396f18b --- /dev/null +++ b/app/views/clinics/create.html @@ -0,0 +1,101 @@ +{% extends 'layout.html' %} + +{% set pageName = "Create clinic" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
    +
    + +

    {{ pageName }}

    + + {{ input({ + label: { + text: "Name" + }, + id: "example-with-hint-text", + name: "exampleWithHintText", + width: 20 + }) }} + + + {# {{ dateInput({ + fieldset: { + legend: { + text: "Date" + } + }, + id: "appointment-date", + namePrefix: "appointmentDate", + day: { + width: 2 + }, + month: { + width: 2 + }, + year: { + width: 4 + } + }) }} + + {{ input({ + label: { + text: "Location" + }, + id: "example-with-hint-text", + name: "exampleWithHintText", + width: 10 + }) }} #} + + {{ checkboxes({ + fieldset: { + legend: { + text: "Set defaults" + } + }, + idPrefix: "example", + name: "example", + items: [ + { + value: "Date", + text: "Date" + }, + { + value: "Location", + text: "Location" + }, + { + value: "Vaccinator", + text: "Vaccinator" + }, + { + value: "Vaccine", + text: "Vaccine" + }, + { + value: "Eligibility", + text: "Eligibility" + } + ] + }) }} + + {{ button({ + text: "Continue", + href: "/clinics/add-patients" + }) }} + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/sessions/index.html b/app/views/clinics/index.html similarity index 89% rename from app/views/sessions/index.html rename to app/views/clinics/index.html index 5b9943cc..770ee20c 100644 --- a/app/views/sessions/index.html +++ b/app/views/clinics/index.html @@ -12,7 +12,8 @@

    {{ pageName }}

    {{ button({ - text: "Create clinic" + text: "Create clinic", + href: "create" }) }} {% set upcomingContent %} @@ -53,7 +54,7 @@

    {{ pageName }}

    text: "49" }, { - html: "View" + html: "View" } ] if data.scenario , @@ -71,7 +72,7 @@

    {{ pageName }}

    text: "49" }, { - html: "View" + html: "View" } ] if data.scenario != "appts" , @@ -89,7 +90,7 @@

    {{ pageName }}

    text: "36" }, { - html: "View" + html: "View" } ] if data.scenario != "appts" , @@ -107,7 +108,7 @@

    {{ pageName }}

    text: "58" }, { - html: "View" + html: "View" } ] if data.scenario != "appts" ] diff --git a/app/views/sessions/scenarios.html b/app/views/clinics/scenarios.html similarity index 100% rename from app/views/sessions/scenarios.html rename to app/views/clinics/scenarios.html diff --git a/app/views/sessions/session.html b/app/views/clinics/session.html similarity index 89% rename from app/views/sessions/session.html rename to app/views/clinics/session.html index 736025ff..965a990b 100644 --- a/app/views/sessions/session.html +++ b/app/views/clinics/session.html @@ -16,12 +16,12 @@ {% set sessionLocation = "Hillside Care Home" %} {% endif %} -{% set currentSection = "sessions" %} +{% set currentSection = "clinics" %} {% block beforeContent %} {{ backLink({ - href: "/sessions", + href: "/clinics/", text: "Back" }) }} @@ -63,6 +63,30 @@

    {{ pageName }}

    } }, { + key: { + text: "Vaccinator" + }, + value: { + text: currentUser.firstName + " " + currentUser.lastName + } + }, + { + key: { + text: "Vaccine" + }, + value: { + text: "Flu - Adjuvanted Trivalent Influenza Vaccine (aTIV)" + } + }, + { + key: { + text: "Reason" + }, + value: { + text: "Resident in a care home" + } + }, + { key: { text: "Status" }, @@ -118,6 +142,11 @@

    {{ pageName }}

    href: "?status=insession" }) }} + {{ button({ + text: "Edit defaults", + variant: "secondary" + }) }} + {% endif %} {% if data.status == "complete" %} @@ -304,7 +333,7 @@

    {{ pageName }}

    {% if data.status == "insession" %} {{ button({ - text: "Complete session", + text: "Complete clinic", href: "?status=complete", variant: "warning" }) }} diff --git a/app/views/includes/header.html b/app/views/includes/header.html index 1c28979d..fb4e29f4 100644 --- a/app/views/includes/header.html +++ b/app/views/includes/header.html @@ -16,11 +16,11 @@ }), navigationItems) %} {% endif %} - + {% set navigationItems = (navigationItems.push({ - href: "/sessions/", - text: "Sessions", - active: (currentSection == "sessions") + href: "/clinics/", + text: "Clinics", + active: (currentSection == "clinics") }), navigationItems) %} From 38468921da6bc70af4c2045793e2fe8d069984a8 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:48:12 +0100 Subject: [PATCH 05/22] Iterating on journey following team crits --- app/views/clinics/add-patients.html | 1 + app/views/clinics/appointments.html | 339 +++++++++++++++++++ app/views/clinics/cancel-appointment.html | 69 ++++ app/views/clinics/create.html | 39 +-- app/views/clinics/index.html | 51 ++- app/views/clinics/scenarios.html | 6 +- app/views/clinics/session.html | 125 +++---- app/views/clinics/set-todays-vaccinator.html | 55 +++ app/views/includes/header.html | 14 +- 9 files changed, 548 insertions(+), 151 deletions(-) create mode 100644 app/views/clinics/appointments.html create mode 100644 app/views/clinics/cancel-appointment.html create mode 100644 app/views/clinics/set-todays-vaccinator.html diff --git a/app/views/clinics/add-patients.html b/app/views/clinics/add-patients.html index e7b22f59..5a5fe188 100644 --- a/app/views/clinics/add-patients.html +++ b/app/views/clinics/add-patients.html @@ -26,6 +26,7 @@ size: "l", isPageHeading: true }, + hint: "Copy and paste NHS numbers from a spreadsheet or another source.", id: "example", name: "example" }) }} diff --git a/app/views/clinics/appointments.html b/app/views/clinics/appointments.html new file mode 100644 index 00000000..5c06cdd5 --- /dev/null +++ b/app/views/clinics/appointments.html @@ -0,0 +1,339 @@ +{% extends 'layout.html' %} + +{% set pageName = "Today’s appointments" %} + +{% set currentSection = "appointments" %} + +{% block content %} + +
    +
    + +

    {{ pageName }}

    + + {{ summaryList({ + rows: [ + { + key: { + text: "Date" + }, + value: { + html: today | formatDate + } + }, + { + key: { + text: "Vaccinator" + }, + value: { + html: "Set today's vaccinator" + } + }, + { + key: { + text: "Vaccine" + }, + value: { + html: "Set today's vaccine" + } + } + ] + }) }} + +
    + + {% if data.status != "complete" %} + + {{ button({ + text: "Add walk-in patient", + variant: "secondary" + }) }} + + {% else %} + {% endif %} + +
    + +
    +
    + +
    +
    + + {{ pagination({ + previous: { + label: "Yesterday", + href: "#" + }, + next: { + label: "Tomorrow", + href: "#" + } + }) }} + + {% if data.status == "complete" %} + +
      + +
    • + {% call card({ + heading: { + text: "33", + visuallyHiddenText: "vaccinations", + classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" + } + }) %} + Vaccinations + {% endcall %} +
    • +
    • + {% call card({ + heading: { + text: "2", + visuallyHiddenText: "vaccinations", + classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" + } + }) %} + Cancelled + {% endcall %} +
    • +
    • + {% call card({ + heading: { + text: "29", + visuallyHiddenText: "vaccinations", + classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" + } + }) %} + Appointments + {% endcall %} +
    • +
    • + {% call card({ + heading: { + text: "4", + visuallyHiddenText: "vaccinations", + classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" + } + }) %} + Walk-ins + {% endcall %} +
    • +
    + + {% endif %} + + {% set patientActionsContent %} + + {% if data.status == "complete" %} + + View record + + {% else %} + + {{ button({ + text: "Check-in", + small: true, + variant: "secondary" + }) }} + + + + Cancel + + + {% endif %} + + {% endset -%} + + {% set patientActionsCheckedInContent %} + + {% if data.status == "complete" %} + + View record + + {% else %} + +

    {{ tag({ text: "Checked in" }) }}

    + + + + Cancel + + {% endif %} + + {% endset -%} + + {% set patientActionsContinueRecordingContent %} + + {% if data.status == "complete" %} + + View record + + {% else %} + +

    {{ tag({ text: "Checked in" }) }}

    + + + + Cancel + + {% endif %} + + {% endset -%} + + {% set allPatientContent %} + {{ table({ + caption: { + text: "Patients", + classes: "nhsuk-u-visually-hidden" + }, + compact: false, + head: [ + { + text: "Time" + }, + { + text: "Details" + }, + { + text: "Date of birth" + } + , + { + text: "Vaccines" + } + , + { + text: "Contact details" + } + , + { + text: "Actions" + } + ], + rows: [ + [ + { + html: "10:00am" + }, + { + html: "Alan Teapot
    912 312 3123
    " + }, + { + html: "14 April 1940
    86 years old
    " + }, + { + html: "COVID-19" + }, + { + html: "07588547704
    alan.teapot@btinternet.com", + classes: "nhsuk-u-text-break-word" + }, + { + html: patientActionsContinueRecordingContent + } + ], + [ + { + html: "Walk-in" + }, + { + html: "Alan Teapot
    912 312 3123
    " + }, + { + html: "14 April 1940
    86 years old
    " + }, + { + html: "COVID-19" + }, + { + html: "077345813941", + classes: "nhsuk-u-text-break-word" + }, + { + html: patientActionsCheckedInContent + } + ], + [ + { + html: "10:30am" + }, + { + html: "Margaret Green
    943 876 2109
    " + }, + { + html: "2 September 1943
    83 years old
    " + }, + { + html: "COVID-19 and flu" + }, + { + html: "07623842424", + classes: "nhsuk-u-text-break-word" + }, + { + html: patientActionsContent + } + ], + [ + { + html: "10:40am" + }, + { + html: "George Wilson
    978 654 3210
    " + }, + { + html: "19 November 1946
    79 years old
    " + }, + { + html: "RSV" + }, + { + html: "07623913141", + classes: "nhsuk-u-text-break-word" + }, + { + html: patientActionsContent + } + ] + ] + }) }} + {% endset -%} + + {{ tabs({ + items: [ + { + label: "Scheduled (49)", + id: "patients", + panel: { + html: allPatientContent + } + } + , + { + label: "Completed (33)", + id: "vaccinated", + panel: { + html: allPatientContent + } + } if data.status=="insession" or data.status=="complete" + , + { + label: "Cancelled (2)", + id: "dnas" + } + ] + }) }} + +

    Imported from Manage your appointments (opens in new tab) +

    + +

    + Print patient list +

    + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/cancel-appointment.html b/app/views/clinics/cancel-appointment.html new file mode 100644 index 00000000..2e74e672 --- /dev/null +++ b/app/views/clinics/cancel-appointment.html @@ -0,0 +1,69 @@ +{% extends 'layout.html' %} + +{% set pageName = "Cancel" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + + {{ backLink({ + href: "/clinics/appointments", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
    +
    + + {{ radios({ + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + idPrefix: "example-hints", + name: "exampleHints", + items: [ + { + value: "Consent not given", + text: "Consent not given" + }, + { + value: "Patient declined vaccination", + text: "Patient declined vaccination" + }, + { + value: "Patient unwell", + text: "Patient unwell" + }, + { + value: "Vaccination not suitable", + text: "Vaccination not suitable", + hint: "Medically contra-indindicated, for example patient has allergy or previous reaction" + }, + { + value: "Not eligible", + text: "Not eligible" + }, + { + value: "Already vaccinated", + text: "Already vaccinated" + } + ] + }) }} + + {{ button({ + text: "Cancel", + variant: "warning", + href: "/clinics/appointments#cancelled" + }) }} + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/create.html b/app/views/clinics/create.html index a396f18b..2624b39f 100644 --- a/app/views/clinics/create.html +++ b/app/views/clinics/create.html @@ -16,48 +16,21 @@ {% block content %}
    -
    +

    {{ pageName }}

    +

    Choose if you want to set a date, location, vaccinator or other defaults that apply to all vaccinations given during this clinic.

    + {{ input({ label: { - text: "Name" + text: "Clinic name" }, id: "example-with-hint-text", name: "exampleWithHintText", width: 20 }) }} - - {# {{ dateInput({ - fieldset: { - legend: { - text: "Date" - } - }, - id: "appointment-date", - namePrefix: "appointmentDate", - day: { - width: 2 - }, - month: { - width: 2 - }, - year: { - width: 4 - } - }) }} - - {{ input({ - label: { - text: "Location" - }, - id: "example-with-hint-text", - name: "exampleWithHintText", - width: 10 - }) }} #} - {{ checkboxes({ fieldset: { legend: { @@ -86,6 +59,10 @@

    {{ pageName }}

    { value: "Eligibility", text: "Eligibility" + }, + { + value: "Consent", + text: "Consent" } ] }) }} diff --git a/app/views/clinics/index.html b/app/views/clinics/index.html index 770ee20c..e5120cf2 100644 --- a/app/views/clinics/index.html +++ b/app/views/clinics/index.html @@ -11,11 +11,22 @@

    {{ pageName }}

    +
    +

    To save time when you record vaccinations, you can set up a clinic with default answers for a group of patients.

    +
    + {{ button({ text: "Create clinic", href: "create" }) }} + {% set actionsContent %} + + +
    Edit
    + + {% endset -%} + {% set upcomingContent %} {{ table({ caption: { @@ -36,34 +47,16 @@

    {{ pageName }}

    text: "Patients" }, { - text: "Action" + text: "Actions" } ], rows: [ - [ - { - text: "Tomorrow’s appointments" - }, - { - text: tomorrow | formatDate - }, - { - text: "On site (Pickfords Pharmacy)" - }, - { - text: "49" - }, - { - html: "View" - } - ] if data.scenario - , [ { text: "Hillside Care home - Flu over 75s" }, { - text: today | formatDate + text: "30 October 2026" }, { text: "Hillside Care Home" @@ -72,16 +65,16 @@

    {{ pageName }}

    text: "49" }, { - html: "View" + html: actionsContent } - ] if data.scenario != "appts" + ] , [ { text: "Oaklands care home - Covid" }, { - text: "22 October 2026" + text: "22 Novemeber 2026" }, { text: "Oaklands Residential Home" @@ -90,16 +83,16 @@

    {{ pageName }}

    text: "36" }, { - html: "View" + html: actionsContent } - ] if data.scenario != "appts" + ] , [ { text: "Housebound patients Meadowbrook list" }, { - text: "5 November 2026" + text: "5 December 2026 to 6 December 2026" }, { text: "Meadowbrook Care Centre" @@ -108,9 +101,9 @@

    {{ pageName }}

    text: "58" }, { - html: "View" + html: actionsContent } - ] if data.scenario != "appts" + ] ] }) }} {% endset -%} @@ -118,7 +111,7 @@

    {{ pageName }}

    {{ tabs({ items: [ { - label: "Upcoming (3)", + label: "Scheduled (3)", id: "upcoming", panel: { html: upcomingContent diff --git a/app/views/clinics/scenarios.html b/app/views/clinics/scenarios.html index 62a9fb85..3cffa641 100644 --- a/app/views/clinics/scenarios.html +++ b/app/views/clinics/scenarios.html @@ -11,12 +11,12 @@

    {{ pageName }}

    -
      + diff --git a/app/views/clinics/session.html b/app/views/clinics/session.html index 965a990b..61ea8203 100644 --- a/app/views/clinics/session.html +++ b/app/views/clinics/session.html @@ -1,19 +1,19 @@ {% extends 'layout.html' %} {% if data.scenario == "appts" and data.status == "complete" %} -{% set pageName = "Yesterday’s appointments" %} + {% set pageName = "Yesterday’s appointments" %} {% elif data.scenario == "appts" and data.status == "preparing" %} -{% set pageName = "Tomorrow’s appointments" %} + {% set pageName = "Tomorrow’s appointments" %} {% elif data.scenario == "appts" %} -{% set pageName = "Today’s appointments" %} + {% set pageName = "Today’s appointments" %} {% else %} -{% set pageName = "Hillside Care home - Flu over 75s" %} + {% set pageName = "Hillside Care home - Flu over 75s" %} {% endif %} {% if data.scenario == "appts" %} -{% set sessionLocation = "On site (Pickfords Pharmacy)" %} + {% set sessionLocation = "On site (Pickfords Pharmacy)" %} {% else %} -{% set sessionLocation = "Hillside Care Home" %} + {% set sessionLocation = "Hillside Care Home" %} {% endif %} {% set currentSection = "clinics" %} @@ -41,18 +41,9 @@

      {{ pageName }}

      text: "Date" }, value: { - text: tomorrow | formatDate + text: "30 October 2026" } - } if data.scenario == "appts" - , - { - key: { - text: "Date" - }, - value: { - text: today | formatDate } - } if data.scenario != "appts" , { key: { @@ -80,45 +71,12 @@

      {{ pageName }}

      }, { key: { - text: "Reason" + text: "Eligibility" }, value: { text: "Resident in a care home" } - }, - { - key: { - text: "Status" - }, - value: { - html: tag({ - text: "Preparing", - colour: "yellow" - }) - } - } if data.status=="preparing", - { - key: { - text: "Status" - }, - value: { - html: tag({ - text: "In session", - colour: "white" - }) - } - } if data.status=="insession", - { - key: { - text: "Status" - }, - value: { - html: tag({ - text: "Complete", - colour: "green" - }) - } - } if data.status=="complete" + } ] }) }} @@ -131,37 +89,17 @@

      {{ pageName }}

      - {% if data.status == "insession" %} - - {% elif data.status == "complete" %} - - {% elif data.scenario != "appts" %} - - {{ button({ - text: "Start session", - href: "?status=insession" - }) }} - - {{ button({ - text: "Edit defaults", - variant: "secondary" - }) }} - - {% endif %} - {% if data.status == "complete" %} - {% elif data.scenario!="appts" %} + {% else %} {{ button({ - text: "Add patients", + text: "Edit clinic", variant: "secondary" }) }} - {% else %} - {{ button({ - text: "Pre-fill all", + text: "Add patients", variant: "secondary" }) }} @@ -175,7 +113,7 @@

      {{ pageName }}

      - {% if data.status == "complete" %} + {# {% if data.status == "complete" %}
        @@ -203,7 +141,7 @@

        {{ pageName }}

      - {% endif %} + {% endif %} #} {% set patientActionsContent %} @@ -303,7 +241,29 @@

      {{ pageName }}

      { html: patientActionsContent } - ] if data.status!="appts" + ], + [ + { + html: "Evelyn Carter
      621 874 3056
      " + }, + { + html: "7 June 1938
      88 years old
      " + }, + { + html: patientActionsContent + } + ], + [ + { + html: "Arthur Bennett
      584 207 9163
      " + }, + { + html: "23 January 1945
      81 years old
      " + }, + { + html: patientActionsContent + } + ] ] }) }} {% endset -%} @@ -311,16 +271,19 @@

      {{ pageName }}

      {{ tabs({ items: [ { - label: "All (49)", + label: "Scheduled (49)", id: "patients", panel: { html: allPatientContent } - } + } if data.status!="complete" , { label: "Completed (33)", - id: "vaccinated" + id: "vaccinated", + panel: { + html: allPatientContent + } } if data.status=="insession" or data.status=="complete" , { @@ -333,7 +296,7 @@

      {{ pageName }}

      {% if data.status == "insession" %} {{ button({ - text: "Complete clinic", + text: "End clinic", href: "?status=complete", variant: "warning" }) }} diff --git a/app/views/clinics/set-todays-vaccinator.html b/app/views/clinics/set-todays-vaccinator.html new file mode 100644 index 00000000..37146bf3 --- /dev/null +++ b/app/views/clinics/set-todays-vaccinator.html @@ -0,0 +1,55 @@ +{% extends 'layout.html' %} + +{% set pageName = "Set today’s vaccinator" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
      +
      + + {{ radios({ + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + idPrefix: "example-hints", + name: "exampleHints", + items: [ + { + value: "Me (Jeremy Blue)", + text: "Me (Jeremy Blue)" + }, + { + value: "Grady Campos (grady.campos@nhs.net)", + text: "Grady Campos (grady.campos@nhs.net)" + }, + { + value: "Nina Hunt (nina.hunt@nhs.net)", + text: "Nina Hunt (nina.hunt@nhs.net)" + } + ] + }) }} + + {{ button({ + text: "Continue", + href: "#" + }) }} + +
      +
      + +{% endblock %} \ No newline at end of file diff --git a/app/views/includes/header.html b/app/views/includes/header.html index fb4e29f4..744fc404 100644 --- a/app/views/includes/header.html +++ b/app/views/includes/header.html @@ -16,13 +16,6 @@ }), navigationItems) %} {% endif %} - - {% set navigationItems = (navigationItems.push({ - href: "/clinics/", - text: "Clinics", - active: (currentSection == "clinics") - }), navigationItems) %} - {% if canShowRecordVaccinations %} {% set navigationItems = (navigationItems.push({ @@ -32,6 +25,13 @@ }), navigationItems) %} {% endif %} + + {% set navigationItems = (navigationItems.push({ + href: "/clinics/", + text: "Clinics", + active: (currentSection == "clinics") + }), navigationItems) %} + {% set navigationItems = (navigationItems.push({ href: "/home/", From f7c9a85d44641df082dff8f6acc37f16ae8fb7bb Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:40:22 +0100 Subject: [PATCH 06/22] Remove changes --- app/locals.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/locals.js b/app/locals.js index 2174ff25..09fefe28 100644 --- a/app/locals.js +++ b/app/locals.js @@ -29,10 +29,6 @@ module.exports = function(req, res, next) { ] const now = new Date() - res.locals.today = now.toISOString().substring(0, 10) - const tomorrow = new Date(now) - tomorrow.setUTCDate(tomorrow.getUTCDate() + 1) - res.locals.tomorrow = tomorrow.toISOString().substring(0, 10) const lastMonthDate = new Date(now.getFullYear(), now.getMonth() - 1, 1) res.locals.lastCalendarMonth = `${monthNames[lastMonthDate.getMonth()]} ${lastMonthDate.getFullYear()}` From 9c890b53857c03c26a1d81842f75b070129152ad Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:46:24 +0100 Subject: [PATCH 07/22] Hide clinics unless clinics=true --- app/views/includes/header.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/includes/header.html b/app/views/includes/header.html index 744fc404..9dc83cb6 100644 --- a/app/views/includes/header.html +++ b/app/views/includes/header.html @@ -25,12 +25,14 @@ }), navigationItems) %} {% endif %} - - {% set navigationItems = (navigationItems.push({ - href: "/clinics/", - text: "Clinics", - active: (currentSection == "clinics") - }), navigationItems) %} + + {% if data.clinics == "true" %} + {% set navigationItems = (navigationItems.push({ + href: "/clinics/", + text: "Clinics", + active: (currentSection == "clinics") + }), navigationItems) %} + {% endif %} {% set navigationItems = (navigationItems.push({ From 9d50d37d4a8e51a37134cc85a6d567853e22d53e Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:47:35 +0100 Subject: [PATCH 08/22] Update scenarios.html --- app/views/clinics/scenarios.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/clinics/scenarios.html b/app/views/clinics/scenarios.html index 3cffa641..1b5c8b60 100644 --- a/app/views/clinics/scenarios.html +++ b/app/views/clinics/scenarios.html @@ -13,10 +13,10 @@

      {{ pageName }}

      From 2145c201f33bbc2b973030d5a0ee179622ac4e7a Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 10:02:08 +0100 Subject: [PATCH 09/22] Add copy of basic record screens for clinic journey --- app/views/clinics/check.html | 251 +++++++++++++++++++++++++ app/views/clinics/confirmation.html | 49 +++++ app/views/clinics/consent.html | 68 +++++++ app/views/clinics/injection-site.html | 57 ++++++ app/views/clinics/patient-history.html | 239 +++++++++++++++++++++++ 5 files changed, 664 insertions(+) create mode 100644 app/views/clinics/check.html create mode 100644 app/views/clinics/confirmation.html create mode 100644 app/views/clinics/consent.html create mode 100644 app/views/clinics/injection-site.html create mode 100644 app/views/clinics/patient-history.html diff --git a/app/views/clinics/check.html b/app/views/clinics/check.html new file mode 100644 index 00000000..fdd5695a --- /dev/null +++ b/app/views/clinics/check.html @@ -0,0 +1,251 @@ +{% extends 'layout.html' %} + +{% set pageName = "Check and confirm" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
      +
      + +

      {{ pageName }}

      + +

      Patient

      + + {{ summaryList({ + rows: [ + { + key: { + text: "Name" + }, + value: { + text: "Jodie Brown" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "name" + } + ] + } + }, + { + key: { + text: "Date of birth" + }, + value: { + html: "15 March 1950
      (76 years old)" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "date of birth" + } + ] + } + }, + { + key: { + text: "Address" + }, + value: { + html: "73 Roman Road
      Leeds
      LS2 5ZN" + }, + actions: { + items: [] + } + }, + { + key: { + text: "NHS number" + }, + value: { + text: "912 345 6789" + }, + actions: { + items: [] + } + } + ] + }) }} + +

      Vaccination

      + + {{ summaryList({ + rows: [ + { + key: { + text: "Date" + }, + value: { + text: "Today" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccination date" + } + ] + } + }, + { + key: { + text: "Site" + }, + value: { + text: "Leeds City Centre Clinic" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "site" + } + ] + } + }, + { + key: { + text: "Vaccinator" + }, + value: { + text: "Alex Smith" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccinator" + } + ] + } + }, + { + key: { + text: "Vaccine" + }, + value: { + html: "Flu
      Influenza vaccine" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccine" + } + ] + } + }, + { + key: { + text: "Batch" + }, + value: { + html: "AB123
      Expires 4 January 2027" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccine batch" + } + ] + } + }, + { + key: { + text: "Eligibility" + }, + value: { + text: "Aged 65 years or over" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "eligibility" + } + ] + } + }, + { + key: { + text: "Consent given by" + }, + value: { + text: "Patient" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "consent" + } + ] + } + }, + { + key: { + text: "Injection site" + }, + value: { + text: "Left arm" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "injection site" + } + ] + } + } + ] + }) }} + +
      + {{ textarea({ + name: "notes", + id: "notes", + label: { + text: "Optional note" + }, + hint: { + text: "This will not be sent to the patient's GP. Only your organisation will see it." + }, + rows: 3, + classes: "nhsuk-u-margin-bottom-7" + }) }} + + {{ button({ + text: "Confirm and save" + }) }} +
      + +
      +
      + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/confirmation.html b/app/views/clinics/confirmation.html new file mode 100644 index 00000000..ce997ed1 --- /dev/null +++ b/app/views/clinics/confirmation.html @@ -0,0 +1,49 @@ +{% extends 'layout.html' %} + +{% set pageName = "Vaccination saved" %} + +{% set currentSection = "clinics" %} + +{% block content %} + +
      +
      + + {{ panel({ + titleText: pageName, + text: "Jodie Brown’s flu record will be sent to their GP." + }) }} + + {{ radios({ + fieldset: { + legend: { + text: "What would you like to record now?", + size: "m" + } + }, + idPrefix: "example-hints", + name: "exampleHints", + items: [ + { + value: "Jodie Brown’s next vaccination", + text: "Jodie Brown’s next vaccination" + }, + { + value: "A flu vaccination for another patient", + text: "A flu vaccination for another patient" + }, + { + value: "A different vaccination for another patient", + text: "A different vaccination for another patient" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} + +
      +
      + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/consent.html b/app/views/clinics/consent.html new file mode 100644 index 00000000..3fcbf136 --- /dev/null +++ b/app/views/clinics/consent.html @@ -0,0 +1,68 @@ +{% extends 'layout.html' %} + +{% set pageName = "Who is giving consent?" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
      +
      + + {{ radios({ + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + idPrefix: "example-hints", + name: "exampleHints", + items: [ + { + value: "Jodie Brown", + text: "Jodie Brown" + }, + { + divider: "or" + }, + { + value: "Clinician acting in the patient’s best interests", + text: "Clinician acting in the patient’s best interests" + }, + { + value: "Person with lasting power of attorney for health and welfare", + text: "Person with lasting power of attorney for health and welfare" + }, + { + value: "Parent or guardian", + text: "Parent or guardian" + }, + { + value: "Independent mental capacity advocate", + text: "Independent mental capacity advocate" }, + { + value: "Court appointed deputy", + text: "Court appointed deputy" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} + +
      +
      + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/injection-site.html b/app/views/clinics/injection-site.html new file mode 100644 index 00000000..017a7e7e --- /dev/null +++ b/app/views/clinics/injection-site.html @@ -0,0 +1,57 @@ +{% extends 'layout.html' %} + +{% set pageName = "Where was the injection given?" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
      +
      + + {{ radios({ + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + idPrefix: "example-hints", + name: "exampleHints", + items: [ + { + value: "Left arm", + text: "Left arm" + }, + { + value: "Right arm", + text: "Right arm" + }, + { + divider: "or" + }, + { + value: "Somewhere else", + text: "Somewhere else" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} + +
      +
      + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/patient-history.html b/app/views/clinics/patient-history.html new file mode 100644 index 00000000..504fad6a --- /dev/null +++ b/app/views/clinics/patient-history.html @@ -0,0 +1,239 @@ +{% extends 'layout.html' %} + +{% set pageName = "Check the patient's details" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + {{ backLink({ href: "#" }) }} +{% endblock %} + +{% block content %} +
      +
      + +

      Check Jodie Brown’s details and vaccination history

      + + {{ summaryList({ + rows: [ + { + key: { + text: "Name" + }, + value: { + text: "Jodie Brown" + } + }, + { + key: { + text: "Date of birth" + }, + value: { + html: "15 March 1950
      76 years old
      " + } + }, + { + key: { + text: "Address" + }, + value: { + html: "73 Roman Road
      Leeds
      LS2 5ZN" + } + }, + { + key: { + text: "NHS number" + }, + value: { + text: "912 345 6789" + } + } + , + { + key: { + text: "GP surgery" + }, + value: { + html: "Beech House surgery
      1 Ash Tree Road
      Knaresborough
      HG5 0UB" + } + } + ] + }) }} + +

      Vaccination history

      + + {% set insetTextHtml %} +

      This shows NHS vaccinations given in England. It includes all vaccinations recorded in RAVS but only some recorded in other systems.

      + {% endset %} + + {{ insetText({ + html: insetTextHtml, + classes: "nhsuk-u-padding-top-2 nhsuk-u-padding-bottom-2 nhsuk-u-margin-top-2 nhsuk-u-margin-bottom-4" + }) }} + +
      +
      + +
      +
      + + {{ table({ + panel: false, + caption: "", + firstCellIsHeader: false, + head: [ + { + text: "Date" + }, + { + text: "Vaccine" + }, + { + text: "Product" + } + ], + rows: [ + [ + { + text: "15 April 2025" + }, + { + text: "COVID-19" + }, + { + text: "Spikevax JN.1" + } + ], + [ + { + text: "11 November 2024" + }, + { + text: "RSV" + }, + { + text: "Abrysvo" + } + ], + [ + { + text: "9 November 2024" + }, + { + text: "MMR (2nd dose)" + }, + { + text: "Priorix" + } + ], + [ + { + text: "29 October 2024" + }, + { + text: "Pneumococcal" + }, + { + text: "Pneumovax" + } + ], + [ + { + text: "25 October 2024" + }, + { + text: "Flu (1st dose)" + }, + { + text: "Adjuvanted Quadrivalent Influenza Vaccine (aQIV)" + } + ], + [ + { + text: "15 October 2023" + }, + { + text: "COVID-19" + }, + { + text: "Comirnaty 30 Omicron XBB.1.5" + } + ], + [ + { + text: "10 October 2023" + }, + { + text: "Flu" + }, + { + text: "Not known", + classes: "nhsuk-u-secondary-text-color" + } + ], + [ + { + text: "7 October 2023" + }, + { + text: "Pertussis" + }, + { + text: "Boostrix-IPV suspension" + } + ], + [ + { + text: "11 March 2022" + }, + { + text: "COVID-19" + }, + { + text: "Moderna mRNA (Spikevax) Original" + } + ], + [ + { + text: "4 December 2023" + }, + { + text: "MMR" + }, + { + text: "Priorix" + } + ] + ] + }) }} + + {{ pagination({ + next: { + href: "#" + }, + items: [ + { + href: "#", + number: 1, + current: true + }, + { + href: "#", + number: 2 + }, + { + href: "#", + number: 3 + } + ] + }) }} + +
      + {{ button({ + text: "Continue" + }) }} +
      + +
      +
      +{% endblock %} \ No newline at end of file From 25555cdeddab129445f8fac95ab31d019298c908 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 12:05:27 +0100 Subject: [PATCH 10/22] Adding basic recording screens for appointments --- app/views/clinics/batch.html | 49 ++++++ app/views/clinics/check-walk-in.html | 145 ++++++++++++++++++ app/views/clinics/check.html | 20 +-- app/views/clinics/confirmation.html | 2 +- app/views/clinics/consent.html | 2 +- app/views/clinics/eligibility.html | 73 +++++++++ app/views/clinics/injection-site.html | 2 +- app/views/clinics/patient-history.html | 2 +- app/views/clinics/patient-search.html | 87 +++++++++++ app/views/clinics/patient.html | 65 ++++++++ ...todays-vaccinator.html => vaccinator.html} | 4 +- app/views/clinics/vaccine-product.html | 41 +++++ app/views/clinics/vaccine.html | 112 ++++++++++++++ 13 files changed, 580 insertions(+), 24 deletions(-) create mode 100644 app/views/clinics/batch.html create mode 100644 app/views/clinics/check-walk-in.html create mode 100644 app/views/clinics/eligibility.html create mode 100644 app/views/clinics/patient-search.html create mode 100644 app/views/clinics/patient.html rename app/views/clinics/{set-todays-vaccinator.html => vaccinator.html} (92%) create mode 100644 app/views/clinics/vaccine-product.html create mode 100644 app/views/clinics/vaccine.html diff --git a/app/views/clinics/batch.html b/app/views/clinics/batch.html new file mode 100644 index 00000000..f6a1d4e3 --- /dev/null +++ b/app/views/clinics/batch.html @@ -0,0 +1,49 @@ +{% extends 'layout.html' %} + +{% set pageName = "Which batch are you using?" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + {{ backLink({ href: "#" }) }} +{% endblock %} + +{% block content %} +
      +
      + +
      + {{ radios({ + idPrefix: "batch", + name: "batch", + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + items: [ + { + value: "914-151", + text: "914-151", + hint: "Expires 19 February 2028" + }, + { + divider: "or" + }, + { + value: "Add a batch", + text: "Add a batch" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} +
      + +
      +
      +{% endblock %} diff --git a/app/views/clinics/check-walk-in.html b/app/views/clinics/check-walk-in.html new file mode 100644 index 00000000..b58c3ec2 --- /dev/null +++ b/app/views/clinics/check-walk-in.html @@ -0,0 +1,145 @@ +{% extends 'layout.html' %} + +{% set pageName = "Check and confirm walk-in details" %} + +{% set currentSection = "clinics" %} + +{% block beforeContent %} + + {{ backLink({ + href: "#", + text: "Back" + }) }} + +{% endblock %} + +{% block content %} + +
      +
      + +

      {{ pageName }}

      + +

      Patient

      + + {{ summaryList({ + rows: [ + { + key: { + text: "Name" + }, + value: { + text: "Jodie Brown" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "name" + } + ] + } + }, + { + key: { + text: "Date of birth" + }, + value: { + html: "15 March 1950
      (76 years old)" + } + }, + { + key: { + text: "Address" + }, + value: { + html: "73 Roman Road
      Leeds
      LS2 5ZN" + }, + actions: { + items: [] + } + }, + { + key: { + text: "NHS number" + }, + value: { + text: "912 345 6789" + }, + actions: { + items: [] + } + } + ] + }) }} + +

      Vaccination

      + + {{ summaryList({ + rows: [ + { + key: { + text: "Date" + }, + value: { + text: "Today" + } + }, + { + key: { + text: "Site" + }, + value: { + text: "Leeds City Centre Clinic" + } + }, + { + key: { + text: "Vaccinator" + }, + value: { + text: "Alex Smith" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccinator" + } + ] + } + }, + { + key: { + text: "Vaccine" + }, + value: { + html: "Flu
      Influenza vaccine" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccine" + } + ] + } + } + ] + }) }} + +
      + + {{ button({ + text: "Add walk-in" + }) }} + +
      + +
      +
      + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/check.html b/app/views/clinics/check.html index fdd5695a..0768db83 100644 --- a/app/views/clinics/check.html +++ b/app/views/clinics/check.html @@ -2,7 +2,7 @@ {% set pageName = "Check and confirm" %} -{% set currentSection = "clinics" %} +{% set currentSection = "appointments" %} {% block beforeContent %} @@ -93,15 +93,6 @@

      Vaccination

      }, value: { text: "Today" - }, - actions: { - items: [ - { - href: "#", - text: "Change", - visuallyHiddenText: "vaccination date" - } - ] } }, { @@ -110,15 +101,6 @@

      Vaccination

      }, value: { text: "Leeds City Centre Clinic" - }, - actions: { - items: [ - { - href: "#", - text: "Change", - visuallyHiddenText: "site" - } - ] } }, { diff --git a/app/views/clinics/confirmation.html b/app/views/clinics/confirmation.html index ce997ed1..6a547105 100644 --- a/app/views/clinics/confirmation.html +++ b/app/views/clinics/confirmation.html @@ -2,7 +2,7 @@ {% set pageName = "Vaccination saved" %} -{% set currentSection = "clinics" %} +{% set currentSection = "appointments" %} {% block content %} diff --git a/app/views/clinics/consent.html b/app/views/clinics/consent.html index 3fcbf136..1dc72e29 100644 --- a/app/views/clinics/consent.html +++ b/app/views/clinics/consent.html @@ -2,7 +2,7 @@ {% set pageName = "Who is giving consent?" %} -{% set currentSection = "clinics" %} +{% set currentSection = "appointments" %} {% block beforeContent %} diff --git a/app/views/clinics/eligibility.html b/app/views/clinics/eligibility.html new file mode 100644 index 00000000..beef85a2 --- /dev/null +++ b/app/views/clinics/eligibility.html @@ -0,0 +1,73 @@ +{% extends 'layout.html' %} + +{% set pageName = "Why are you giving them the flu vaccine?" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + {{ backLink({ href: "#" }) }} +{% endblock %} + +{% block content %} +
      +
      + +
      + {{ radios({ + idPrefix: "vaccine", + name: "vaccine", + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + items: [ + { + value: "Based on age", + text: "Based on age" + }, + { + value: "Healthcare worker", + text: "Healthcare worker" + }, + { + value: "Pregnant", + text: "Pregnant" + }, + { + value: "In a clinical risk group", + text: "In a clinical risk group" + }, + { + value: "Resident in a care home", + text: "Resident in a care home" + }, + { + value: "Carer", + text: "Carer" + }, + { + value: "Household contact of someone immunosuppressed", + text: "Household contact of someone immunosuppressed" + }, + { + value: "Social care worker", + text: "Social care worker" + }, + { + value: "Homeless", + text: "Homeless" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} +
      + +
      +
      +{% endblock %} diff --git a/app/views/clinics/injection-site.html b/app/views/clinics/injection-site.html index 017a7e7e..413ef9cc 100644 --- a/app/views/clinics/injection-site.html +++ b/app/views/clinics/injection-site.html @@ -2,7 +2,7 @@ {% set pageName = "Where was the injection given?" %} -{% set currentSection = "clinics" %} +{% set currentSection = "appointments" %} {% block beforeContent %} diff --git a/app/views/clinics/patient-history.html b/app/views/clinics/patient-history.html index 504fad6a..2027687b 100644 --- a/app/views/clinics/patient-history.html +++ b/app/views/clinics/patient-history.html @@ -2,7 +2,7 @@ {% set pageName = "Check the patient's details" %} -{% set currentSection = "clinics" %} +{% set currentSection = "appointments" %} {% block beforeContent %} {{ backLink({ href: "#" }) }} diff --git a/app/views/clinics/patient-search.html b/app/views/clinics/patient-search.html new file mode 100644 index 00000000..11c149ee --- /dev/null +++ b/app/views/clinics/patient-search.html @@ -0,0 +1,87 @@ +{% extends 'layout.html' %} + +{% set pageName = "Search for the patient" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + {{ backLink({ href: "/clinics/patient" }) }} +{% endblock %} + +{% block content %} +
      +
      + +

      Search for the patient

      + +

      Make sure the details you enter match those registered with the patient’s GP.

      + +
      + {{ input({ + label: { + text: "First name" + }, + id: "firstName", + name: "firstName", + classes: "nhsuk-input--width-20" + }) }} + + {{ input({ + label: { + text: "Last name" + }, + id: "lastName", + name: "lastName", + classes: "nhsuk-input--width-20" + }) }} + + {{ dateInput({ + id: "dateOfBirth", + namePrefix: "dateOfBirth", + fieldset: { + legend: { + text: "Date of birth", + classes: "" + } + }, + hint: { + text: "For example, 15 3 1984" + }, + items: [ + { + name: "day", + classes: "nhsuk-input--width-2" + }, + { + name: "month", + classes: "nhsuk-input--width-2" + }, + { + name: "year", + classes: "nhsuk-input--width-4" + } + ] + }) }} + + {{ input({ + label: { + text: "Postcode (optional)" + }, + id: "postcode", + name: "postcode", + classes: "nhsuk-input--width-10" + }) }} + + {{ details({ + summaryText: "If the patient is homeless", + html: "

      Try searching with the postcode ZZ99 3VZ.

      " + }) }} + + {{ button({ + text: "Search" + }) }} +
      + +
      +
      +{% endblock %} diff --git a/app/views/clinics/patient.html b/app/views/clinics/patient.html new file mode 100644 index 00000000..a40515d2 --- /dev/null +++ b/app/views/clinics/patient.html @@ -0,0 +1,65 @@ +{% extends 'layout.html' %} + +{% set pageName = "Do you have the patient’s NHS number?" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + {{ backLink({ href: "/clinics/add-patients" }) }} +{% endblock %} + +{% block content %} +
      +
      + +
      + {% set nhsNumberHtml %} + {{ input({ + id: "nhs-number", + name: "nhsNumber", + classes: "nhsuk-input--width-10 nhsuk-input--code", + inputmode: "numeric", + label: { + text: "NHS number", + size: "s" + }, + hint: { + text: "For example, 999 123 4567" + } + }) }} + {% endset %} + + {{ radios({ + idPrefix: "nhs-number-known", + name: "nhsNumberKnown", + fieldset: { + legend: { + text: "Do you have the patient’s NHS number?", + size: "l", + isPageHeading: true + } + }, + items: [ + { + value: "yes", + text: "Yes", + checked: true, + conditional: { + html: nhsNumberHtml + } + }, + { + value: "no", + text: "No" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} +
      + +
      +
      +{% endblock %} diff --git a/app/views/clinics/set-todays-vaccinator.html b/app/views/clinics/vaccinator.html similarity index 92% rename from app/views/clinics/set-todays-vaccinator.html rename to app/views/clinics/vaccinator.html index 37146bf3..e778cc73 100644 --- a/app/views/clinics/set-todays-vaccinator.html +++ b/app/views/clinics/vaccinator.html @@ -1,6 +1,8 @@ {% extends 'layout.html' %} -{% set pageName = "Set today’s vaccinator" %} +{# {% set pageName = "Set today’s vaccinator" %} #} + +{% set pageName = "Who is the vaccinator?" %} {% set currentSection = "appointments" %} diff --git a/app/views/clinics/vaccine-product.html b/app/views/clinics/vaccine-product.html new file mode 100644 index 00000000..6b724ef1 --- /dev/null +++ b/app/views/clinics/vaccine-product.html @@ -0,0 +1,41 @@ +{% extends 'layout.html' %} + +{% set pageName = "Which vaccine product?" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + {{ backLink({ href: "#" }) }} +{% endblock %} + +{% block content %} +
      +
      + +
      + {{ radios({ + idPrefix: "vaccine-product", + name: "vaccine-product", + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + items: [ + { + value: "Adjuvanted Trivalent Influenza Vaccine (aTIV)", + text: "Adjuvanted Trivalent Influenza Vaccine (aTIV)" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} +
      + +
      +
      +{% endblock %} diff --git a/app/views/clinics/vaccine.html b/app/views/clinics/vaccine.html new file mode 100644 index 00000000..d01d6701 --- /dev/null +++ b/app/views/clinics/vaccine.html @@ -0,0 +1,112 @@ +{% extends 'layout.html' %} + +{% set pageName = "Which vaccine?" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + {{ backLink({ href: "/clinics/patient-search" }) }} +{% endblock %} + +{% block content %} +
      +
      + + {% set covidProductHtml %} + {{ radios({ + idPrefix: "vaccineProductCovid", + name: "vaccineProduct", + fieldset: { + legend: { + text: "Vaccine product" + } + }, + items: [ + { + value: "Spikevax XFG", + text: "Spikevax XFG" + } + ] + }) }} + {% endset %} + + {% set fluProductHtml %} + {{ radios({ + idPrefix: "vaccineProductFlu", + name: "vaccineProduct", + fieldset: { + legend: { + text: "Vaccine product" + } + }, + items: [ + { + value: "Adjuvanted Trivalent Influenza Vaccine (aTIV)", + text: "Adjuvanted Trivalent Influenza Vaccine (aTIV)" + } + ] + }) }} + {% endset %} + + {% set rsvProductHtml %} + {{ radios({ + idPrefix: "vaccineProductRsv", + name: "vaccineProduct", + fieldset: { + legend: { + text: "Vaccine product" + } + }, + items: [ + { + value: "Abrysvo", + text: "Abrysvo" + } + ] + }) }} + {% endset %} + +
      + {{ radios({ + idPrefix: "vaccine", + name: "vaccine", + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + items: [ + { + value: "COVID-19", + text: "COVID-19", + conditional: { + html: covidProductHtml + } + }, + { + value: "Flu", + text: "Flu", + conditional: { + html: fluProductHtml + } + }, + { + value: "RSV", + text: "RSV", + conditional: { + html: rsvProductHtml + } + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} +
      + +
      +
      +{% endblock %} From c20b08d1a3f61874230aace65d8136bd27376532 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:12:38 +0100 Subject: [PATCH 11/22] Getting ready for UR --- app/views/clinics/add-patients.html | 10 +-- app/views/clinics/cancel.html | 14 +-- app/views/clinics/check.html | 30 ++++--- app/views/clinics/confirmation.html | 16 ++-- app/views/clinics/consent.html | 17 ++-- app/views/clinics/create.html | 8 +- app/views/clinics/index.html | 2 +- app/views/clinics/injection-site.html | 17 ++-- app/views/clinics/patient-history.html | 15 +++- app/views/clinics/scenarios.html | 4 +- app/views/clinics/session.html | 118 +++++++++++-------------- app/views/clinics/vaccine.html | 74 ++-------------- app/views/includes/header.html | 2 +- 13 files changed, 139 insertions(+), 188 deletions(-) diff --git a/app/views/clinics/add-patients.html b/app/views/clinics/add-patients.html index 5a5fe188..d4474271 100644 --- a/app/views/clinics/add-patients.html +++ b/app/views/clinics/add-patients.html @@ -6,10 +6,10 @@ {% block beforeContent %} - {{ backLink({ - href: "#", - text: "Back" - }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} @@ -34,7 +34,7 @@ {{ button({ text: "Continue", - href: "/clinics/session?scenario&status=preparing" + href: "/clinics/session" }) }}
      diff --git a/app/views/clinics/cancel.html b/app/views/clinics/cancel.html index 1dd3320e..e7882727 100644 --- a/app/views/clinics/cancel.html +++ b/app/views/clinics/cancel.html @@ -6,10 +6,10 @@ {% block beforeContent %} - {{ backLink({ - href: "#", - text: "Back" - }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} @@ -18,6 +18,7 @@
      +
      {{ radios({ fieldset: { legend: { @@ -26,8 +27,8 @@ isPageHeading: true } }, - idPrefix: "example-hints", - name: "exampleHints", + idPrefix: "cancel-reason", + name: "cancelReason", items: [ { value: "Consent not given", @@ -65,6 +66,7 @@ text: "Cancel", variant: "warning" }) }} +
      diff --git a/app/views/clinics/check.html b/app/views/clinics/check.html index 0768db83..f99cc7eb 100644 --- a/app/views/clinics/check.html +++ b/app/views/clinics/check.html @@ -2,15 +2,17 @@ {% set pageName = "Check and confirm" %} +{% if data.scenario == "clinics" %} +{% set currentSection = "clinics" %} +{% elif data.scenario == "appts" %} {% set currentSection = "appointments" %} +{% endif %} {% block beforeContent %} - - {{ backLink({ - href: "#", - text: "Back" - }) }} - +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %} @@ -46,7 +48,7 @@

      Patient

      text: "Date of birth" }, value: { - html: "15 March 1950
      (76 years old)" + html: "14 April 1940
      (86 years old)" }, actions: { items: [ @@ -74,7 +76,7 @@

      Patient

      text: "NHS number" }, value: { - text: "912 345 6789" + text: "912 312 3123" }, actions: { items: [] @@ -100,7 +102,7 @@

      Vaccination

      text: "Site" }, value: { - text: "Leeds City Centre Clinic" + text: "Hillside Care Home" } }, { @@ -108,7 +110,7 @@

      Vaccination

      text: "Vaccinator" }, value: { - text: "Alex Smith" + text: currentUser.firstName + " " + currentUser.lastName }, actions: { items: [ @@ -125,7 +127,7 @@

      Vaccination

      text: "Vaccine" }, value: { - html: "Flu
      Influenza vaccine" + html: "Flu
      Adjuvanted Trivalent Influenza Vaccine (aTIV)" }, actions: { items: [ @@ -142,7 +144,7 @@

      Vaccination

      text: "Batch" }, value: { - html: "AB123
      Expires 4 January 2027" + html: "914-151
      Expires 19 February 2028" }, actions: { items: [ @@ -159,7 +161,7 @@

      Vaccination

      text: "Eligibility" }, value: { - text: "Aged 65 years or over" + text: "Resident in a care home" }, actions: { items: [ @@ -208,7 +210,7 @@

      Vaccination

      ] }) }} -
      + {{ textarea({ name: "notes", id: "notes", diff --git a/app/views/clinics/confirmation.html b/app/views/clinics/confirmation.html index 6a547105..1cbc85d4 100644 --- a/app/views/clinics/confirmation.html +++ b/app/views/clinics/confirmation.html @@ -2,7 +2,11 @@ {% set pageName = "Vaccination saved" %} +{% if data.scenario == "clinics" %} +{% set currentSection = "clinics" %} +{% elif data.scenario == "appts" %} {% set currentSection = "appointments" %} +{% endif %} {% block content %} @@ -29,18 +33,18 @@ text: "Jodie Brown’s next vaccination" }, { - value: "A flu vaccination for another patient", - text: "A flu vaccination for another patient" + divider: "or" }, { - value: "A different vaccination for another patient", - text: "A different vaccination for another patient" - } + value: "Go to appointments list", + text: "Go to clinic list" + } if data.scenario == "clinics" ] }) }} {{ button({ - text: "Continue" + text: "Continue", + href: "/clinics/session" }) }}
      diff --git a/app/views/clinics/consent.html b/app/views/clinics/consent.html index 1dc72e29..bd065f88 100644 --- a/app/views/clinics/consent.html +++ b/app/views/clinics/consent.html @@ -2,15 +2,17 @@ {% set pageName = "Who is giving consent?" %} +{% if data.scenario == "clinics" %} +{% set currentSection = "clinics" %} +{% elif data.scenario == "appts" %} {% set currentSection = "appointments" %} +{% endif %} {% block beforeContent %} - - {{ backLink({ - href: "#", - text: "Back" - }) }} - +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %} @@ -59,7 +61,8 @@ }) }} {{ button({ - text: "Continue" + text: "Continue", + href: "injection-site" }) }}
      diff --git a/app/views/clinics/create.html b/app/views/clinics/create.html index 2624b39f..17783eee 100644 --- a/app/views/clinics/create.html +++ b/app/views/clinics/create.html @@ -6,10 +6,10 @@ {% block beforeContent %} - {{ backLink({ - href: "#", - text: "Back" - }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} diff --git a/app/views/clinics/index.html b/app/views/clinics/index.html index e5120cf2..fc8c8551 100644 --- a/app/views/clinics/index.html +++ b/app/views/clinics/index.html @@ -17,7 +17,7 @@

      {{ pageName }}

      {{ button({ text: "Create clinic", - href: "create" + href: "/clinics/create" }) }} {% set actionsContent %} diff --git a/app/views/clinics/injection-site.html b/app/views/clinics/injection-site.html index 413ef9cc..b45b762f 100644 --- a/app/views/clinics/injection-site.html +++ b/app/views/clinics/injection-site.html @@ -2,15 +2,17 @@ {% set pageName = "Where was the injection given?" %} +{% if data.scenario == "clinics" %} +{% set currentSection = "clinics" %} +{% elif data.scenario == "appts" %} {% set currentSection = "appointments" %} +{% endif %} {% block beforeContent %} - - {{ backLink({ - href: "#", - text: "Back" - }) }} - +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %} @@ -48,7 +50,8 @@ }) }} {{ button({ - text: "Continue" + text: "Continue", + href: "check" }) }}
    diff --git a/app/views/clinics/patient-history.html b/app/views/clinics/patient-history.html index 2027687b..7539fd19 100644 --- a/app/views/clinics/patient-history.html +++ b/app/views/clinics/patient-history.html @@ -2,10 +2,17 @@ {% set pageName = "Check the patient's details" %} +{% if data.scenario == "clinics" %} +{% set currentSection = "clinics" %} +{% elif data.scenario == "appts" %} {% set currentSection = "appointments" %} +{% endif %} {% block beforeContent %} - {{ backLink({ href: "#" }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %} @@ -29,7 +36,7 @@

    Check Jodie Brown’s details and vaccination histor text: "Date of birth" }, value: { - html: "15 March 1950
    76 years old
    " + html: "14 April 1940
    86 years old
    " } }, { @@ -45,7 +52,7 @@

    Check Jodie Brown’s details and vaccination histor text: "NHS number" }, value: { - text: "912 345 6789" + text: "912 312 3123" } } , @@ -228,7 +235,7 @@

    Vaccination history

    ] }) }} - + {{ button({ text: "Continue" }) }} diff --git a/app/views/clinics/scenarios.html b/app/views/clinics/scenarios.html index 1b5c8b60..5a496dfc 100644 --- a/app/views/clinics/scenarios.html +++ b/app/views/clinics/scenarios.html @@ -13,10 +13,10 @@

    {{ pageName }}

    diff --git a/app/views/clinics/session.html b/app/views/clinics/session.html index 61ea8203..72211475 100644 --- a/app/views/clinics/session.html +++ b/app/views/clinics/session.html @@ -1,29 +1,17 @@ {% extends 'layout.html' %} -{% if data.scenario == "appts" and data.status == "complete" %} - {% set pageName = "Yesterday’s appointments" %} -{% elif data.scenario == "appts" and data.status == "preparing" %} - {% set pageName = "Tomorrow’s appointments" %} -{% elif data.scenario == "appts" %} - {% set pageName = "Today’s appointments" %} -{% else %} - {% set pageName = "Hillside Care home - Flu over 75s" %} -{% endif %} - -{% if data.scenario == "appts" %} - {% set sessionLocation = "On site (Pickfords Pharmacy)" %} -{% else %} - {% set sessionLocation = "Hillside Care Home" %} -{% endif %} +{% set pageName = "Hillside Care home - Flu over 75s" %} + +{% set sessionLocation = "Hillside Care Home" %} {% set currentSection = "clinics" %} {% block beforeContent %} - {{ backLink({ - href: "/clinics/", - text: "Back" - }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} @@ -95,12 +83,14 @@

    {{ pageName }}

    {{ button({ text: "Edit clinic", - variant: "secondary" + variant: "secondary", + href: "/clinics/create" }) }} {{ button({ text: "Add patients", - variant: "secondary" + variant: "secondary", + href: "/clinics/add-patients" }) }} {% endif %} @@ -113,36 +103,6 @@

    {{ pageName }}

    - {# {% if data.status == "complete" %} - -
      - -
    • - {% call card({ - heading: { - text: "33", - visuallyHiddenText: "vaccinations", - classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" - } - }) %} - Vaccinations - {% endcall %} -
    • -
    • - {% call card({ - heading: { - text: "2", - visuallyHiddenText: "vaccinations", - classes: "nhsuk-u-font-size-64 nhsuk-u-margin-bottom-1" - } - }) %} - Cancelled - {% endcall %} -
    • -
    - - {% endif %} #} - {% set patientActionsContent %} {% if data.status == "complete" %} @@ -153,9 +113,9 @@

    {{ pageName }}

    @@ -172,20 +132,13 @@

    {{ pageName }}

    colour: "green" }) }} - {% elif data.status == "insession" %} + {% else %} {{ tag({ text: "In session", colour: "white" }) }} - {% else %} - - {{ tag({ - text: "New", - colour: "yellow" - }) }} - {% endif %} {% endset -%} @@ -211,7 +164,7 @@

    {{ pageName }}

    rows: [ [ { - html: "Alan Teapot
    912 312 3123
    " + html: "Jodie Brown
    912 312 3123
    " }, { html: "14 April 1940
    86 years old
    " @@ -268,6 +221,40 @@

    {{ pageName }}

    }) }} {% endset -%} + {% set cancelledPatientContent %} + {{ table({ + caption: { + text: "Patients", + classes: "nhsuk-u-visually-hidden" + }, + head: [ + { + text: "Name and NHS number" + }, + { + text: "Date of birth" + } + , + { + text: "Cancellation reason" + } + ], + rows: [ + [ + { + html: "Jodie Brown
    912 312 3123
    " + }, + { + html: "14 April 1940
    86 years old
    " + }, + { + html: data.cancelReason or "Consent not given" + } + ] + ] + }) }} + {% endset -%} + {{ tabs({ items: [ { @@ -284,11 +271,14 @@

    {{ pageName }}

    panel: { html: allPatientContent } - } if data.status=="insession" or data.status=="complete" + } , { label: "Cancelled (2)", - id: "dnas" + id: "cancelled", + panel: { + html: cancelledPatientContent + } } ] }) }} diff --git a/app/views/clinics/vaccine.html b/app/views/clinics/vaccine.html index d01d6701..0e6e7783 100644 --- a/app/views/clinics/vaccine.html +++ b/app/views/clinics/vaccine.html @@ -5,67 +5,16 @@ {% set currentSection = "appointments" %} {% block beforeContent %} - {{ backLink({ href: "/clinics/patient-search" }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %}
    - {% set covidProductHtml %} - {{ radios({ - idPrefix: "vaccineProductCovid", - name: "vaccineProduct", - fieldset: { - legend: { - text: "Vaccine product" - } - }, - items: [ - { - value: "Spikevax XFG", - text: "Spikevax XFG" - } - ] - }) }} - {% endset %} - - {% set fluProductHtml %} - {{ radios({ - idPrefix: "vaccineProductFlu", - name: "vaccineProduct", - fieldset: { - legend: { - text: "Vaccine product" - } - }, - items: [ - { - value: "Adjuvanted Trivalent Influenza Vaccine (aTIV)", - text: "Adjuvanted Trivalent Influenza Vaccine (aTIV)" - } - ] - }) }} - {% endset %} - - {% set rsvProductHtml %} - {{ radios({ - idPrefix: "vaccineProductRsv", - name: "vaccineProduct", - fieldset: { - legend: { - text: "Vaccine product" - } - }, - items: [ - { - value: "Abrysvo", - text: "Abrysvo" - } - ] - }) }} - {% endset %} - {{ radios({ idPrefix: "vaccine", @@ -80,24 +29,15 @@ items: [ { value: "COVID-19", - text: "COVID-19", - conditional: { - html: covidProductHtml - } + text: "COVID-19" }, { value: "Flu", - text: "Flu", - conditional: { - html: fluProductHtml - } + text: "Flu" }, { value: "RSV", - text: "RSV", - conditional: { - html: rsvProductHtml - } + text: "RSV" } ] }) }} diff --git a/app/views/includes/header.html b/app/views/includes/header.html index 9dc83cb6..fcaa0129 100644 --- a/app/views/includes/header.html +++ b/app/views/includes/header.html @@ -26,7 +26,7 @@ {% endif %} - {% if data.clinics == "true" %} + {% if data.scenario == "clinics" %} {% set navigationItems = (navigationItems.push({ href: "/clinics/", text: "Clinics", From 4146b80c299fa1112c43c1d8fdf296bd5a5ad734 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:54:39 +0100 Subject: [PATCH 12/22] Add completed content --- app/views/clinics/index.html | 70 ++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/app/views/clinics/index.html b/app/views/clinics/index.html index fc8c8551..c18b526e 100644 --- a/app/views/clinics/index.html +++ b/app/views/clinics/index.html @@ -27,6 +27,10 @@

    {{ pageName }}

    {% endset -%} + {% set completedActionsContent %} + + {% endset -%} + {% set upcomingContent %} {{ table({ caption: { @@ -74,7 +78,7 @@

    {{ pageName }}

    text: "Oaklands care home - Covid" }, { - text: "22 Novemeber 2026" + text: "22 November 2026" }, { text: "Oaklands Residential Home" @@ -108,6 +112,68 @@

    {{ pageName }}

    }) }} {% endset -%} + {% set completedContent %} + {{ table({ + caption: { + text: "Completed clinics", + classes: "nhsuk-u-visually-hidden" + }, + head: [ + { + text: "Name" + }, + { + text: "Date" + }, + { + text: "Location" + }, + { + text: "Patients" + }, + { + text: "Action" + } + ], + rows: [ + [ + { + text: "Willowbrook GP Flu clinic" + }, + { + text: "18 September 2026" + }, + { + text: "Willowbrook Medical Centre" + }, + { + text: "72" + }, + { + html: completedActionsContent + } + ], + [ + { + text: "Ashfield Care Home Covid vaccination" + }, + { + text: "9 August 2026" + }, + { + text: "Ashfield Residential Home" + }, + { + text: "41" + }, + { + html: completedActionsContent + } + ] + ] + }) }} + {% endset -%} + {{ tabs({ items: [ { @@ -119,7 +185,7 @@

    {{ pageName }}

    } , { - label: "Completed", + label: "Completed (2)", id: "completed", panel: { html: completedContent From ac393d2b53ab49a436c0d8f0aa8d0c6881803df0 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:55:02 +0100 Subject: [PATCH 13/22] Add completed content and fake pagination --- app/views/clinics/session.html | 131 ++++++++++++++++++++++++++------- 1 file changed, 104 insertions(+), 27 deletions(-) diff --git a/app/views/clinics/session.html b/app/views/clinics/session.html index 72211475..c103cd0c 100644 --- a/app/views/clinics/session.html +++ b/app/views/clinics/session.html @@ -105,12 +105,6 @@

    {{ pageName }}

    {% set patientActionsContent %} - {% if data.status == "complete" %} - - View record - - {% else %} -
    Record @@ -119,27 +113,11 @@

    {{ pageName }}

    - {% endif %} - {% endset -%} - {% set patientStatusContent %} + {% set completedActionsContent %} - {% if data.status == "complete" %} - - {{ tag({ - text: "Vaccinated", - colour: "green" - }) }} - - {% else %} - - {{ tag({ - text: "In session", - colour: "white" - }) }} - - {% endif %} + View record {% endset -%} @@ -221,6 +199,84 @@

    {{ pageName }}

    }) }} {% endset -%} + {% set completedPatientContent %} + {{ table({ + caption: { + text: "Completed patients", + classes: "nhsuk-u-visually-hidden" + }, + head: [ + { + text: "Name and NHS number" + }, + { + text: "Date of birth" + } + , + { + text: "Action" + } + ], + rows: [ + [ + { + html: "Claire Thompson
    482 194 8651
    " + }, + { + html: "12 January 1939
    87 years old
    " + }, + { + html: completedActionsContent + } + ], + [ + { + html: "Donald Walsh
    764 953 1185
    " + }, + { + html: "28 May 1942
    84 years old
    " + }, + { + html: completedActionsContent + } + ], + [ + { + html: "Maureen Patel
    318 642 9076
    " + }, + { + html: "4 July 1941
    85 years old
    " + }, + { + html: completedActionsContent + } + ], + [ + { + html: "Thomas Hughes
    852 317 6649
    " + }, + { + html: "17 October 1937
    89 years old
    " + }, + { + html: completedActionsContent + } + ], + [ + { + html: "Sylvia Adams
    475 603 2248
    " + }, + { + html: "3 February 1944
    82 years old
    " + }, + { + html: completedActionsContent + } + ] + ] + }) }} + {% endset -%} + {% set cancelledPatientContent %} {{ table({ caption: { @@ -258,7 +314,7 @@

    {{ pageName }}

    {{ tabs({ items: [ { - label: "Scheduled (49)", + label: "Scheduled (15)", id: "patients", panel: { html: allPatientContent @@ -269,12 +325,12 @@

    {{ pageName }}

    label: "Completed (33)", id: "vaccinated", panel: { - html: allPatientContent + html: completedPatientContent } } , { - label: "Cancelled (2)", + label: "Cancelled (1)", id: "cancelled", panel: { html: cancelledPatientContent @@ -283,6 +339,27 @@

    {{ pageName }}

    ] }) }} + {{ pagination({ + next: { + href: "#" + }, + items: [ + { + href: "#", + number: 1, + current: true + }, + { + href: "#", + number: 2 + }, + { + href: "#", + number: 3 + } + ] + }) }} + {% if data.status == "insession" %} {{ button({ From 3eab29aa88743fddd84a4a7649378c0e27231aae Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:00:25 +0100 Subject: [PATCH 14/22] Display today's date --- app/locals.js | 2 +- app/views/clinics/appointments.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/locals.js b/app/locals.js index 09fefe28..2f9c1e91 100644 --- a/app/locals.js +++ b/app/locals.js @@ -29,6 +29,7 @@ module.exports = function(req, res, next) { ] const now = new Date() + res.locals.today = now.toISOString().substring(0,10) const lastMonthDate = new Date(now.getFullYear(), now.getMonth() - 1, 1) res.locals.lastCalendarMonth = `${monthNames[lastMonthDate.getMonth()]} ${lastMonthDate.getFullYear()}` @@ -85,4 +86,3 @@ module.exports = function(req, res, next) { next() } - diff --git a/app/views/clinics/appointments.html b/app/views/clinics/appointments.html index 5c06cdd5..03346a70 100644 --- a/app/views/clinics/appointments.html +++ b/app/views/clinics/appointments.html @@ -18,7 +18,7 @@

    {{ pageName }}

    text: "Date" }, value: { - html: today | formatDate + html: today | formatDate } }, { From 4be442d45ca9d014852f919322ffeaa20478ffc1 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:14:59 +0100 Subject: [PATCH 15/22] Add link to vaccinator --- app/views/clinics/appointments.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/clinics/appointments.html b/app/views/clinics/appointments.html index 03346a70..5bcac9cd 100644 --- a/app/views/clinics/appointments.html +++ b/app/views/clinics/appointments.html @@ -26,7 +26,7 @@

    {{ pageName }}

    text: "Vaccinator" }, value: { - html: "Set today's vaccinator" + html: "Set today's vaccinator" } }, { From 27e5aafbbb37680c4454fa8bf595b7c75217ac28 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:15:16 +0100 Subject: [PATCH 16/22] Fix scenario link --- app/views/clinics/scenarios.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/clinics/scenarios.html b/app/views/clinics/scenarios.html index 5a496dfc..01564491 100644 --- a/app/views/clinics/scenarios.html +++ b/app/views/clinics/scenarios.html @@ -16,7 +16,7 @@

    {{ pageName }}

    Care home clinics (starts on 'home page')
  • - Pharmacy appointments + Pharmacy appointments
  • From 3de7bcdaa472db6b160059fb59fcf3d207db689a Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:15:29 +0100 Subject: [PATCH 17/22] Fix back link and current user --- app/views/clinics/vaccinator.html | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/views/clinics/vaccinator.html b/app/views/clinics/vaccinator.html index e778cc73..1d1a8d17 100644 --- a/app/views/clinics/vaccinator.html +++ b/app/views/clinics/vaccinator.html @@ -1,5 +1,6 @@ {% extends 'layout.html' %} + {# {% set pageName = "Set today’s vaccinator" %} #} {% set pageName = "Who is the vaccinator?" %} @@ -7,12 +8,10 @@ {% set currentSection = "appointments" %} {% block beforeContent %} - - {{ backLink({ - href: "#", - text: "Back" - }) }} - +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %} @@ -32,8 +31,8 @@ name: "exampleHints", items: [ { - value: "Me (Jeremy Blue)", - text: "Me (Jeremy Blue)" + value: "Me" + currentUser.firstName + " " + currentUser.lastName, + text: "Me (" + currentUser.firstName + " " + currentUser.lastName + ")" }, { value: "Grady Campos (grady.campos@nhs.net)", From 678be0b528d93a7da7a832672b0f328aa13897d5 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:19:42 +0100 Subject: [PATCH 18/22] Link to begin add walk-in --- app/views/clinics/appointments.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/clinics/appointments.html b/app/views/clinics/appointments.html index 5bcac9cd..72b8a207 100644 --- a/app/views/clinics/appointments.html +++ b/app/views/clinics/appointments.html @@ -46,7 +46,8 @@

    {{ pageName }}

    {{ button({ text: "Add walk-in patient", - variant: "secondary" + variant: "secondary", + href: "/clinics/patient" }) }} {% else %} From 889946d57dece418c447b3c4fd779cd3de2dab6d Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 16:12:32 +0100 Subject: [PATCH 19/22] Start adding clinic routes --- app/routes.js | 1 + app/routes/clinics.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 app/routes/clinics.js diff --git a/app/routes.js b/app/routes.js index 73349898..2415830f 100644 --- a/app/routes.js +++ b/app/routes.js @@ -44,6 +44,7 @@ router.use('/support{*splat}', authorise({userType: 'admin'})) require('./routes/apply')(router) require('./routes/appointments')(router) +require('./routes/clinics')(router) require('./routes/record-vaccinations')(router) require('./routes/regions')(router) require('./routes/user-admin')(router) diff --git a/app/routes/clinics.js b/app/routes/clinics.js new file mode 100644 index 00000000..dedffa59 --- /dev/null +++ b/app/routes/clinics.js @@ -0,0 +1,15 @@ +module.exports = router => { + + router.post('/clinics/answer-patient-nhs-number-known', (req, res) => { + const nhsNumberKnown = req.session.data.nhsNumberKnown + + if (nhsNumberKnown === 'yes') { + return res.redirect('/clinics/patient-history') + } else if (nhsNumberKnown === 'no') { + return res.redirect('/clinics/patient-search') + } + + return res.redirect('/clinics/patient') + }) + +} From 17a0e4ed130f24094bec2291994f090e4d30862c Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 16:12:46 +0100 Subject: [PATCH 20/22] Prepare appointments for UR --- app/views/clinics/appointments.html | 120 +++++++++++++----- app/views/clinics/cancel-appointment.html | 20 +-- app/views/clinics/cancel.html | 2 - app/views/clinics/check-walk-in.html | 12 +- .../clinics/confirmation-saved-for-later.html | 26 ++++ app/views/clinics/eligibility.html | 12 +- app/views/clinics/patient-history.html | 4 +- app/views/clinics/patient-search.html | 7 +- app/views/clinics/patient.html | 7 +- app/views/clinics/session.html | 38 +++--- app/views/clinics/vaccine.html | 13 +- 11 files changed, 188 insertions(+), 73 deletions(-) create mode 100644 app/views/clinics/confirmation-saved-for-later.html diff --git a/app/views/clinics/appointments.html b/app/views/clinics/appointments.html index 72b8a207..02187883 100644 --- a/app/views/clinics/appointments.html +++ b/app/views/clinics/appointments.html @@ -132,15 +132,22 @@

    {{ pageName }}

    {% else %} +
    {{ button({ text: "Check-in", small: true, - variant: "secondary" + variant: "secondary", + attributes: { + "data-check-in": "true" + } }) }} - + +
    + + - Cancel + Cancel {% endif %} @@ -159,25 +166,7 @@

    {{ pageName }}

    - Cancel - - {% endif %} - - {% endset -%} - - {% set patientActionsContinueRecordingContent %} - - {% if data.status == "complete" %} - - View record - - {% else %} - -

    {{ tag({ text: "Checked in" }) }}

    - - - - Cancel + Cancel {% endif %} @@ -219,20 +208,20 @@

    {{ pageName }}

    html: "10:00am" }, { - html: "Alan Teapot
    912 312 3123
    " + html: "Jodie Brown
    912 312 3123
    " }, { html: "14 April 1940
    86 years old
    " }, { - html: "COVID-19" + html: "Flu" }, { - html: "07588547704
    alan.teapot@btinternet.com", + html: "07588547704", classes: "nhsuk-u-text-break-word" }, { - html: patientActionsContinueRecordingContent + html: patientActionsContent } ], [ @@ -302,10 +291,44 @@

    {{ pageName }}

    }) }} {% endset -%} + {% set cancelledPatientContent %} + {{ table({ + caption: { + text: "Patients", + classes: "nhsuk-u-visually-hidden" + }, + head: [ + { + text: "Name and NHS number" + }, + { + text: "Date of birth" + } + , + { + text: "Cancellation reason" + } + ], + rows: [ + [ + { + html: "Jodie Brown
    912 312 3123
    " + }, + { + html: "14 April 1940
    86 years old
    " + }, + { + html: data.cancelReason or "Consent not given" + } + ] + ] + }) }} + {% endset -%} + {{ tabs({ items: [ { - label: "Scheduled (49)", + label: "Scheduled (15)", id: "patients", panel: { html: allPatientContent @@ -321,8 +344,32 @@

    {{ pageName }}

    } if data.status=="insession" or data.status=="complete" , { - label: "Cancelled (2)", - id: "dnas" + label: "Cancelled (1)", + id: "cancelled", + panel: { + html: cancelledPatientContent + } + } + ] + }) }} + + {{ pagination({ + next: { + href: "#" + }, + items: [ + { + href: "#", + number: 1, + current: true + }, + { + href: "#", + number: 2 + }, + { + href: "#", + number: 3 } ] }) }} @@ -337,4 +384,19 @@

    {{ pageName }}

    +{% endblock %} + +{% block bodyEnd %} + {{ super() }} + {% endblock %} \ No newline at end of file diff --git a/app/views/clinics/cancel-appointment.html b/app/views/clinics/cancel-appointment.html index 2e74e672..a2d56977 100644 --- a/app/views/clinics/cancel-appointment.html +++ b/app/views/clinics/cancel-appointment.html @@ -5,12 +5,10 @@ {% set currentSection = "appointments" %} {% block beforeContent %} - - {{ backLink({ - href: "/clinics/appointments", - text: "Back" - }) }} - +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %} @@ -18,6 +16,8 @@
    + + {{ radios({ fieldset: { legend: { @@ -26,8 +26,8 @@ isPageHeading: true } }, - idPrefix: "example-hints", - name: "exampleHints", + idPrefix: "cancel-reason", + name: "cancelReason", items: [ { value: "Consent not given", @@ -59,9 +59,9 @@ {{ button({ text: "Cancel", - variant: "warning", - href: "/clinics/appointments#cancelled" + variant: "warning" }) }} +
    diff --git a/app/views/clinics/cancel.html b/app/views/clinics/cancel.html index e7882727..fda8bfc8 100644 --- a/app/views/clinics/cancel.html +++ b/app/views/clinics/cancel.html @@ -5,12 +5,10 @@ {% set currentSection = "clinics" %} {% block beforeContent %} - {{ backLink({ href: "javascript:window.history.back()", text: "Back" }) }} - {% endblock %} {% block content %} diff --git a/app/views/clinics/check-walk-in.html b/app/views/clinics/check-walk-in.html index b58c3ec2..29d629a8 100644 --- a/app/views/clinics/check-walk-in.html +++ b/app/views/clinics/check-walk-in.html @@ -46,7 +46,7 @@

    Patient

    text: "Date of birth" }, value: { - html: "15 March 1950
    (76 years old)" + html: "14 April 1940
    (86 years old)" } }, { @@ -65,7 +65,7 @@

    Patient

    text: "NHS number" }, value: { - text: "912 345 6789" + text: "912 312 3123" }, actions: { items: [] @@ -91,7 +91,7 @@

    Vaccination

    text: "Site" }, value: { - text: "Leeds City Centre Clinic" + text: "Pickfords Pharmacy" } }, { @@ -99,7 +99,7 @@

    Vaccination

    text: "Vaccinator" }, value: { - text: "Alex Smith" + text: currentUser.firstName + " " + currentUser.lastName }, actions: { items: [ @@ -116,7 +116,7 @@

    Vaccination

    text: "Vaccine" }, value: { - html: "Flu
    Influenza vaccine" + html: "Flu" }, actions: { items: [ @@ -131,7 +131,7 @@

    Vaccination

    ] }) }} -
    + {{ button({ text: "Add walk-in" diff --git a/app/views/clinics/confirmation-saved-for-later.html b/app/views/clinics/confirmation-saved-for-later.html new file mode 100644 index 00000000..4bb36d8a --- /dev/null +++ b/app/views/clinics/confirmation-saved-for-later.html @@ -0,0 +1,26 @@ +{% extends 'layout.html' %} + +{% set pageName = "Saved for later" %} + +{% if data.scenario == "clinics" %} +{% set currentSection = "clinics" %} +{% elif data.scenario == "appts" %} +{% set currentSection = "appointments" %} +{% endif %} + +{% block content %} + +
    +
    + + {{ panel({ + titleText: pageName, + text: "The vaccinator can complete this record later" + }) }} + +

    Return to appointments list

    + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/eligibility.html b/app/views/clinics/eligibility.html index beef85a2..94e28314 100644 --- a/app/views/clinics/eligibility.html +++ b/app/views/clinics/eligibility.html @@ -12,7 +12,7 @@
    - + {{ radios({ idPrefix: "vaccine", name: "vaccine", @@ -63,9 +63,19 @@ ] }) }} +
    + {{ button({ text: "Continue" }) }} + + {{ button({ + text: "Save and return", + variant: "secondary", + href:"#" + }) }} + +
    diff --git a/app/views/clinics/patient-history.html b/app/views/clinics/patient-history.html index 7539fd19..b8265870 100644 --- a/app/views/clinics/patient-history.html +++ b/app/views/clinics/patient-history.html @@ -4,8 +4,10 @@ {% if data.scenario == "clinics" %} {% set currentSection = "clinics" %} +{% set nextPage = "/clinics/consent" %} {% elif data.scenario == "appts" %} {% set currentSection = "appointments" %} +{% set nextPage = "/clinics/vaccine" %} {% endif %} {% block beforeContent %} @@ -235,7 +237,7 @@

    Vaccination history

    ] }) }} -
    + {{ button({ text: "Continue" }) }} diff --git a/app/views/clinics/patient-search.html b/app/views/clinics/patient-search.html index 11c149ee..9f1c2353 100644 --- a/app/views/clinics/patient-search.html +++ b/app/views/clinics/patient-search.html @@ -5,7 +5,10 @@ {% set currentSection = "appointments" %} {% block beforeContent %} - {{ backLink({ href: "/clinics/patient" }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %} @@ -16,7 +19,7 @@

    Search for the patient

    Make sure the details you enter match those registered with the patient’s GP.

    - + {{ input({ label: { text: "First name" diff --git a/app/views/clinics/patient.html b/app/views/clinics/patient.html index a40515d2..7be8caac 100644 --- a/app/views/clinics/patient.html +++ b/app/views/clinics/patient.html @@ -5,14 +5,17 @@ {% set currentSection = "appointments" %} {% block beforeContent %} - {{ backLink({ href: "/clinics/add-patients" }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %}
    - + {% set nhsNumberHtml %} {{ input({ id: "nhs-number", diff --git a/app/views/clinics/session.html b/app/views/clinics/session.html index c103cd0c..0c39a20b 100644 --- a/app/views/clinics/session.html +++ b/app/views/clinics/session.html @@ -340,25 +340,25 @@

    {{ pageName }}

    }) }} {{ pagination({ - next: { - href: "#" - }, - items: [ - { - href: "#", - number: 1, - current: true - }, - { - href: "#", - number: 2 - }, - { - href: "#", - number: 3 - } - ] - }) }} + next: { + href: "#" + }, + items: [ + { + href: "#", + number: 1, + current: true + }, + { + href: "#", + number: 2 + }, + { + href: "#", + number: 3 + } + ] + }) }} {% if data.status == "insession" %} diff --git a/app/views/clinics/vaccine.html b/app/views/clinics/vaccine.html index 0e6e7783..d5f887c1 100644 --- a/app/views/clinics/vaccine.html +++ b/app/views/clinics/vaccine.html @@ -15,7 +15,7 @@
    - + {{ radios({ idPrefix: "vaccine", name: "vaccine", @@ -42,9 +42,20 @@ ] }) }} +
    + {{ button({ text: "Continue" }) }} + + {{ button({ + text: "Save for later", + variant: "secondary", + href:"#" + }) }} + +
    +
    From e3cb67429303ca840abc61367f9a7f006ba24ac2 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 17:25:40 +0100 Subject: [PATCH 21/22] Getting ready for UR --- app/views/clinics/appointments.html | 12 +- app/views/clinics/batch.html | 7 +- app/views/clinics/check-so-far.html | 157 ++++++++++++++++++++++++ app/views/clinics/check-walk-in.html | 4 +- app/views/clinics/check.html | 8 +- app/views/clinics/patient-history.html | 12 ++ app/views/clinics/vaccinator-today.html | 56 +++++++++ app/views/clinics/vaccinator.html | 2 +- app/views/clinics/vaccine-product.html | 7 +- app/views/clinics/vaccine-today.html | 53 ++++++++ app/views/clinics/vaccine.html | 4 +- 11 files changed, 305 insertions(+), 17 deletions(-) create mode 100644 app/views/clinics/check-so-far.html create mode 100644 app/views/clinics/vaccinator-today.html create mode 100644 app/views/clinics/vaccine-today.html diff --git a/app/views/clinics/appointments.html b/app/views/clinics/appointments.html index 02187883..6e157a5f 100644 --- a/app/views/clinics/appointments.html +++ b/app/views/clinics/appointments.html @@ -26,7 +26,7 @@

    {{ pageName }}

    text: "Vaccinator" }, value: { - html: "Set today's vaccinator" + html: data.vaccinator or "Set today's vaccinator" } }, { @@ -34,7 +34,7 @@

    {{ pageName }}

    text: "Vaccine" }, value: { - html: "Set today's vaccine" + html: data.vaccine or "Set today's vaccine" } } ] @@ -145,7 +145,7 @@

    {{ pageName }}

    - + Cancel @@ -235,7 +235,7 @@

    {{ pageName }}

    html: "14 April 1940
    86 years old
    " }, { - html: "COVID-19" + html: "Flu" }, { html: "077345813941", @@ -256,7 +256,7 @@

    {{ pageName }}

    html: "2 September 1943
    83 years old
    " }, { - html: "COVID-19 and flu" + html: "Flu" }, { html: "07623842424", @@ -277,7 +277,7 @@

    {{ pageName }}

    html: "19 November 1946
    79 years old
    " }, { - html: "RSV" + html: "Flu" }, { html: "07623913141", diff --git a/app/views/clinics/batch.html b/app/views/clinics/batch.html index f6a1d4e3..8c20fbc7 100644 --- a/app/views/clinics/batch.html +++ b/app/views/clinics/batch.html @@ -5,14 +5,17 @@ {% set currentSection = "appointments" %} {% block beforeContent %} - {{ backLink({ href: "#" }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %}
    -
    + {{ radios({ idPrefix: "batch", name: "batch", diff --git a/app/views/clinics/check-so-far.html b/app/views/clinics/check-so-far.html new file mode 100644 index 00000000..9a1c3f5c --- /dev/null +++ b/app/views/clinics/check-so-far.html @@ -0,0 +1,157 @@ +{% extends 'layout.html' %} + +{% set pageName = "Check recording so far" %} + +{% block beforeContent %} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} +{% endblock %} + +{% block content %} + +
    +
    + +

    {{ pageName }}

    + +

    Patient

    + + {{ summaryList({ + rows: [ + { + key: { + text: "Name" + }, + value: { + text: "Jodie Brown" + }, + actions: { + items: [ + + ] + } + }, + { + key: { + text: "Date of birth" + }, + value: { + html: "14 April 1940
    (86 years old)" + }, + actions: { + items: [ + + ] + } + }, + { + key: { + text: "Address" + }, + value: { + html: "73 Roman Road
    Leeds
    LS2 5ZN" + }, + actions: { + items: [] + } + }, + { + key: { + text: "NHS number" + }, + value: { + text: "912 312 3123" + }, + actions: { + items: [] + } + } + ] + }) }} + +

    Vaccination

    + + {{ summaryList({ + rows: [ + { + key: { + text: "Date" + }, + value: { + text: "Today" + } + }, + { + key: { + text: "Site" + }, + value: { + text: "MediCare Pharmacy" + } + }, + { + key: { + text: "Vaccinator" + }, + value: { + text: currentUser.firstName + " " + currentUser.lastName + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccinator" + } + ] + } + }, + { + key: { + text: "Vaccine" + }, + value: { + html: "Flu" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "vaccine" + } + ] + } + }, + { + key: { + text: "Eligibility" + }, + value: { + text: "Based on age" + }, + actions: { + items: [ + { + href: "#", + text: "Change", + visuallyHiddenText: "eligibility" + } + ] + } + } + ] + }) }} + + + {{ button({ + text: "Continue" + }) }} + + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/check-walk-in.html b/app/views/clinics/check-walk-in.html index 29d629a8..26da5d79 100644 --- a/app/views/clinics/check-walk-in.html +++ b/app/views/clinics/check-walk-in.html @@ -91,7 +91,7 @@

    Vaccination

    text: "Site" }, value: { - text: "Pickfords Pharmacy" + text: "MediCare Pharmacy" } }, { @@ -116,7 +116,7 @@

    Vaccination

    text: "Vaccine" }, value: { - html: "Flu" + html: data.vaccine or "Flu" }, actions: { items: [ diff --git a/app/views/clinics/check.html b/app/views/clinics/check.html index f99cc7eb..25c4600d 100644 --- a/app/views/clinics/check.html +++ b/app/views/clinics/check.html @@ -4,8 +4,12 @@ {% if data.scenario == "clinics" %} {% set currentSection = "clinics" %} +{% set location = "Hillside Care Home" %} +{% set eligiblity = "Resident in a care home" %} {% elif data.scenario == "appts" %} +{% set location = "MediCare Pharmacy" %} {% set currentSection = "appointments" %} +{% set eligiblity = "Based on age" %} {% endif %} {% block beforeContent %} @@ -102,7 +106,7 @@

    Vaccination

    text: "Site" }, value: { - text: "Hillside Care Home" + text: location } }, { @@ -161,7 +165,7 @@

    Vaccination

    text: "Eligibility" }, value: { - text: "Resident in a care home" + text: eligiblity }, actions: { items: [ diff --git a/app/views/clinics/patient-history.html b/app/views/clinics/patient-history.html index b8265870..ad5a4eea 100644 --- a/app/views/clinics/patient-history.html +++ b/app/views/clinics/patient-history.html @@ -10,6 +10,18 @@ {% set nextPage = "/clinics/vaccine" %} {% endif %} +{% if data.vaccine %} +{% set nextPage = "/clinics/check-walk-in" %} +{% endif %} + +{% if data.recording == "start" and data.vaccinator and data.vaccine %} +{% set nextPage = "/clinics/eligibility" %} +{% elif data.recording == "start" and data.vaccinator %} +{% set nextPage = "/clinics/vaccine" %} +{% elif data.recording == "start" %} +{% set nextPage = "/clinics/vaccinator" %} +{% endif %} + {% block beforeContent %} {{ backLink({ href: "javascript:window.history.back()", diff --git a/app/views/clinics/vaccinator-today.html b/app/views/clinics/vaccinator-today.html new file mode 100644 index 00000000..580de257 --- /dev/null +++ b/app/views/clinics/vaccinator-today.html @@ -0,0 +1,56 @@ +{% extends 'layout.html' %} + +{% set pageName = "Set today’s vaccinator" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} +{% endblock %} + +{% block content %} + +
    +
    + +
    + + {{ radios({ + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + idPrefix: "vaccinator", + name: "vaccinator", + items: [ + { + value: currentUser.firstName + " " + currentUser.lastName, + text: "Me (" + currentUser.firstName + " " + currentUser.lastName + ")" + }, + { + value: "Grady Campos (grady.campos@nhs.net)", + text: "Grady Campos (grady.campos@nhs.net)" + }, + { + value: "Nina Hunt (nina.hunt@nhs.net)", + text: "Nina Hunt (nina.hunt@nhs.net)" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} + +
    + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/vaccinator.html b/app/views/clinics/vaccinator.html index 1d1a8d17..44886c13 100644 --- a/app/views/clinics/vaccinator.html +++ b/app/views/clinics/vaccinator.html @@ -47,7 +47,7 @@ {{ button({ text: "Continue", - href: "#" + href: "vaccine" }) }}
    diff --git a/app/views/clinics/vaccine-product.html b/app/views/clinics/vaccine-product.html index 6b724ef1..143de35e 100644 --- a/app/views/clinics/vaccine-product.html +++ b/app/views/clinics/vaccine-product.html @@ -5,14 +5,17 @@ {% set currentSection = "appointments" %} {% block beforeContent %} - {{ backLink({ href: "#" }) }} +{{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} {% endblock %} {% block content %}
    -
    + {{ radios({ idPrefix: "vaccine-product", name: "vaccine-product", diff --git a/app/views/clinics/vaccine-today.html b/app/views/clinics/vaccine-today.html new file mode 100644 index 00000000..7198aa11 --- /dev/null +++ b/app/views/clinics/vaccine-today.html @@ -0,0 +1,53 @@ +{% extends 'layout.html' %} + +{% set pageName = " Set today's vaccine" %} + +{% set currentSection = "appointments" %} + +{% block beforeContent %} + {{ backLink({ +href: "javascript:window.history.back()", +text: "Back" +}) }} +{% endblock %} + +{% block content %} +
    +
    + + + {{ radios({ + idPrefix: "vaccine", + name: "vaccine", + fieldset: { + legend: { + text: pageName, + size: "l", + isPageHeading: true + } + }, + items: [ + { + value: "COVID-19", + text: "COVID-19" + }, + { + value: "Flu", + text: "Flu" + }, + { + value: "RSV", + text: "RSV" + } + ] + }) }} + + {{ button({ + text: "Continue" + }) }} + + + +
    +
    +{% endblock %} \ No newline at end of file diff --git a/app/views/clinics/vaccine.html b/app/views/clinics/vaccine.html index d5f887c1..20f7b79c 100644 --- a/app/views/clinics/vaccine.html +++ b/app/views/clinics/vaccine.html @@ -48,11 +48,11 @@ text: "Continue" }) }} - {{ button({ + {# {{ button({ text: "Save for later", variant: "secondary", href:"#" - }) }} + }) }} #}
    From 8cecec2bf3cae17e86c99026dd3031769d52adc5 Mon Sep 17 00:00:00 2001 From: Benjy Stanton <2545065+benjystanton@users.noreply.github.com> Date: Fri, 2 Oct 2026 17:30:40 +0100 Subject: [PATCH 22/22] Getting ready for UR --- app/views/clinics/appointments.html | 49 +++++++++------------------- app/views/clinics/check-walk-in.html | 2 +- 2 files changed, 17 insertions(+), 34 deletions(-) diff --git a/app/views/clinics/appointments.html b/app/views/clinics/appointments.html index 6e157a5f..5580b87c 100644 --- a/app/views/clinics/appointments.html +++ b/app/views/clinics/appointments.html @@ -154,24 +154,6 @@

    {{ pageName }}

    {% endset -%} - {% set patientActionsCheckedInContent %} - - {% if data.status == "complete" %} - - View record - - {% else %} - -

    {{ tag({ text: "Checked in" }) }}

    - - - - Cancel - - {% endif %} - - {% endset -%} - {% set allPatientContent %} {{ table({ caption: { @@ -223,43 +205,44 @@

    {{ pageName }}

    { html: patientActionsContent } - ], + ] + , [ { - html: "Walk-in" + html: "10:30am" }, { - html: "Alan Teapot
    912 312 3123
    " + html: "Margaret Green
    943 876 2109
    " }, { - html: "14 April 1940
    86 years old
    " + html: "2 September 1943
    83 years old
    " }, { html: "Flu" }, { - html: "077345813941", + html: "07623842424", classes: "nhsuk-u-text-break-word" }, { - html: patientActionsCheckedInContent + html: patientActionsContent } ], [ { - html: "10:30am" + html: "10:40am" }, { - html: "Margaret Green
    943 876 2109
    " + html: "George Wilson
    978 654 3210
    " }, { - html: "2 September 1943
    83 years old
    " + html: "19 November 1946
    79 years old
    " }, { html: "Flu" }, { - html: "07623842424", + html: "07623913141", classes: "nhsuk-u-text-break-word" }, { @@ -268,25 +251,25 @@

    {{ pageName }}

    ], [ { - html: "10:40am" + html: "Walk-in" }, { - html: "George Wilson
    978 654 3210
    " + html: "Alan Teapot
    912 312 3123
    " }, { - html: "19 November 1946
    79 years old
    " + html: "14 April 1940
    86 years old
    " }, { html: "Flu" }, { - html: "07623913141", + html: "077345813941", classes: "nhsuk-u-text-break-word" }, { html: patientActionsContent } - ] + ] if data.walkin == "true" ] }) }} {% endset -%} diff --git a/app/views/clinics/check-walk-in.html b/app/views/clinics/check-walk-in.html index 26da5d79..71641b69 100644 --- a/app/views/clinics/check-walk-in.html +++ b/app/views/clinics/check-walk-in.html @@ -131,7 +131,7 @@

    Vaccination

    ] }) }} -
    + {{ button({ text: "Add walk-in"