diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..fc6ae43d --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +When using components from the NHS.UK Frontend library, prefer the Nunjucks version over HTML. diff --git a/app/views/index.html b/app/views/index.html index b0b46014..e3d77afb 100755 --- a/app/views/index.html +++ b/app/views/index.html @@ -97,7 +97,7 @@

COVID-19

Flu

RSV

@@ -112,20 +112,26 @@

Pertussis

  • Not yet 16 weeks pregnant
  • -

    Pneumococcal

    +

    Pneumococcal London service

    -

    MMR

    +

    MMR London service

    + +

    MenB

    + + diff --git a/app/views/pharmacies/index.html b/app/views/pharmacies/index.html new file mode 100644 index 00000000..de7d72cf --- /dev/null +++ b/app/views/pharmacies/index.html @@ -0,0 +1,88 @@ +{% extends 'layout.html' %} + +{% set currentSection = "pharmacies" %} + +{% block content %} +
    +
    + + {% if added %} + {% set html %} +

    + {{ added | int | plural('pharmacy') }} added +

    +

    You can now add users to these pharmacies.

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

    Pharmacies

    + +

    Add pharmacies or manage users at an existing pharmacy.

    + + {{ button({ + text: "Add pharmacies", + href: "/pharmacies/select" + }) }} + + + +
    Pharmacies added ({{ organisations | length }})
    + {% if (organisations | length) > 10 %} +
    + + +
    + {% endif %} + + + + + + + + + + + {% for organisation in organisations %} + + + + + + + {% endfor %} + + +
    + Name + + Vaccines + + Users + + Actions +
    + {{ organisation.name }} ({{ organisation.id}}) + + {% set vaccinesEnabled = [] %} + {% for vaccine in organisation.vaccines %} + {% if vaccine.status == "enabled" %} + {% set vaccinesEnabled = (vaccinesEnabled.push(vaccine.name | vaccineDisplayName), vaccinesEnabled) %} + {% endif %} + {% endfor %} + + {{ vaccinesEnabled | sort | join(", ") }} + + {{ organisationUserCounts[organisation.id] }} + + Manage +
    +
    +
    + +{% endblock %} diff --git a/app/views/record-vaccinations/covid-19/interval-warning.html b/app/views/record-vaccinations/covid-19/interval-warning.html index 6060af62..3ce3fa90 100644 --- a/app/views/record-vaccinations/covid-19/interval-warning.html +++ b/app/views/record-vaccinations/covid-19/interval-warning.html @@ -12,23 +12,35 @@
    -

    {{ data.firstName }} {{ data.lastName }} had a COVID-19 vaccine less than 3 months ago

    - -

    - They had a COVID-19 vaccine on 15 April 2025. -

    - -

    - For most people, the minimum recommended gap between COVID-19 vaccine doses is 3 months. -

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    + They had a COVID-19 vaccine on 15 April 2025. +

    + +

    + The minimum recommended gap between COVID-19 vaccine doses is 3 months. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " had a COVID-19 vaccine less than 3 months ago", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }}
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/covid-19/too-young-warning.html b/app/views/record-vaccinations/covid-19/too-young-warning.html index b2da41a7..994b0851 100644 --- a/app/views/record-vaccinations/covid-19/too-young-warning.html +++ b/app/views/record-vaccinations/covid-19/too-young-warning.html @@ -13,18 +13,31 @@
    -

    {{ data.firstName }} {{ data.lastName }} may be too young for this vaccine product

    -

    Adjuvanted Quadrivalent Influenza Vaccine (aQIV) is not usually recommended for people under the age of 65. {{ data.firstName }} {{ data.lastName }} is 64 years old.

    -

    Check before going ahead or refer to a prescriber for a patient specific direction (PSD).

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    Adjuvanted Quadrivalent Influenza Vaccine (aQIV) is not usually recommended for people under the age of 65. {{ displayName }} is 64 years old.

    +

    Check before going ahead or refer to a prescriber for a patient specific direction (PSD).

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " may be too young for this vaccine product", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }}
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/dose.html b/app/views/record-vaccinations/dose.html index 8913c9b2..24611e3d 100644 --- a/app/views/record-vaccinations/dose.html +++ b/app/views/record-vaccinations/dose.html @@ -1,6 +1,8 @@ {% extends 'layout.html' %} -{% set pageName = "Which dose of the " + data.vaccine + " are you giving?" %} + + +{% set pageName = "Which dose of the " + vaccineDisplayName + " are you giving?" %} {% set currentSection = "vaccinate" %} {% set organisationSetting = currentUser.organisations | findById(data.currentOrganisationId) %} @@ -17,7 +19,7 @@ {% if data.showError == "yes" %} {% set errors = [{ - text: "Select which dose of the " + data.vaccine + " are you giving", + text: "Select which dose of the " + vaccineDisplayName + " are you giving", href: "#vaccineDose" }] %} {% endif %} @@ -109,7 +111,7 @@ } if (errors | length) > 0, fieldset: { legend: { - text: ("Which dose of the " + data.vaccine + " vaccine are you giving?" if data.vaccinationToday == 'yes' else "Which dose of the " + data.vaccine + " vaccine was it?"), + text: ("Which dose of the " + vaccineDisplayName + " vaccine are you giving?" if data.vaccinationToday == 'yes' else "Which dose of the " + vaccineDisplayName + " vaccine was it?"), classes: "nhsuk-fieldset__legend--l", isPageHeading: true } diff --git a/app/views/record-vaccinations/flu/too-young-warning.html b/app/views/record-vaccinations/flu/too-young-warning.html index dbd135d3..37ff62fa 100644 --- a/app/views/record-vaccinations/flu/too-young-warning.html +++ b/app/views/record-vaccinations/flu/too-young-warning.html @@ -13,18 +13,31 @@
    -

    {{ data.firstName }} {{ data.lastName }} may be too young for this vaccine product

    - -

    [Product name] is not usually recommended for people under the age of 65. {{ data.firstName }} {{ data.lastName }} is 64 years old.

    -

    Check before going ahead or refer to a prescriber for a patient specific direction (PSD).

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    [Product name] is not usually recommended for people under the age of 65. {{ displayName }} is 64 years old.

    +

    Check before going ahead or refer to a prescriber for a patient specific direction (PSD).

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " may be too young for this vaccine product", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }}
    - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/menb/interval-warning.html b/app/views/record-vaccinations/menb/interval-warning.html new file mode 100644 index 00000000..44255795 --- /dev/null +++ b/app/views/record-vaccinations/menb/interval-warning.html @@ -0,0 +1,46 @@ +{% extends 'layout.html' %} + +{% set pageName = "MenB vaccine interval warning" %} + +{% set currentSection = "vaccinate" %} + +{% block beforeContent %} + {{ backLink({ href: "/record-vaccinations/patient-history" }) }} +{% endblock %} + +{% block content %} +
    +
    + + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    + They had a MenB vaccine on 15 April 2025. +

    + +

    + The minimum recommended gap between MenB vaccine doses is 4 weeks. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " had a MenB vaccine less than 3 months ago", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }} + +
    +
    +{% endblock %} + diff --git a/app/views/record-vaccinations/mmr/already-had-2-doses-warning.html b/app/views/record-vaccinations/mmr/already-had-2-doses-warning.html index de68ef0f..b9e0436f 100644 --- a/app/views/record-vaccinations/mmr/already-had-2-doses-warning.html +++ b/app/views/record-vaccinations/mmr/already-had-2-doses-warning.html @@ -12,23 +12,35 @@
    -

    Jodie Brown has already had 2 MMR vaccinations

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    + {{ displayName }} had a 2nd MMR vaccination on 10 July 2025. +

    + +

    + Most people only need 2 doses of the MMR vaccine. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " has already had 2 MMR vaccinations", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }} -

    - Jodie Brown had a second MMR vaccination on 10 July 2025. -

    - -

    - Most people only need 2 doses of the MMR vaccine. -

    -
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/mmr/interval-warning.html b/app/views/record-vaccinations/mmr/interval-warning.html index 0089685b..1c6003c6 100644 --- a/app/views/record-vaccinations/mmr/interval-warning.html +++ b/app/views/record-vaccinations/mmr/interval-warning.html @@ -12,23 +12,35 @@
    -

    Jodie Brown had an MMR vaccination less than 1 month ago

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    + {{ displayName }} had an MMR vaccination on 10 July 2025. +

    + +

    + The minimum recommended gap between MMR doses is 1 month. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " had an MMR vaccination less than 4 weeks ago", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }} -

    - Jodie Brown had an MMR vaccination on 10 July 2025. -

    - -

    - The minimum recommended gap between MMR doses is 1 month. -

    -
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/mmr/too-old-warning.html b/app/views/record-vaccinations/mmr/too-old-warning.html index 9a8119eb..e84a25c0 100644 --- a/app/views/record-vaccinations/mmr/too-old-warning.html +++ b/app/views/record-vaccinations/mmr/too-old-warning.html @@ -12,27 +12,39 @@
    -

    Jodie Brown is too old for the London MMR service

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    + {{ displayName }} is 20 years old. +

    + +

    + To be eligible for this service, you have to be under the age of 20. Refer this patient to their GP for a vaccination. +

    + +

    + Your organisation may not be paid for this vaccination. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " is too old for the London MMR service", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }} -

    - Jodie Brown is 20 years old. -

    - -

    - To be eligible for this service, you have to be under the age of 20. Refer this patient to their GP for a vaccination. -

    - -

    - Your organisation may not be paid for this vaccination. -

    -
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/mmr/too-young-warning.html b/app/views/record-vaccinations/mmr/too-young-warning.html index a34207a7..cdaf84bb 100644 --- a/app/views/record-vaccinations/mmr/too-young-warning.html +++ b/app/views/record-vaccinations/mmr/too-young-warning.html @@ -12,27 +12,40 @@
    -

    Jodie Brown is too young for the London MMR service

    - -

    - Jodie Brown is 4 years old. -

    - -

    - To be eligible for this service, you have to be aged 5 years or over. Refer this patient to their GP for a vaccination. -

    - -

    - Your organisation may not be paid for this vaccination. -

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    + {{ displayName }} is 4 years old. +

    + +

    + To be eligible for this service, you have to be aged 5 years or over. Refer this patient to their GP for a vaccination. +

    + +

    + Your organisation may not be paid for this vaccination. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " is too young for the London MMR service", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }}
    - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/pertussis/not-yet-16-weeks-pregnant-warning.html b/app/views/record-vaccinations/pertussis/not-yet-16-weeks-pregnant-warning.html index 7b0c2cff..a2f1968d 100644 --- a/app/views/record-vaccinations/pertussis/not-yet-16-weeks-pregnant-warning.html +++ b/app/views/record-vaccinations/pertussis/not-yet-16-weeks-pregnant-warning.html @@ -12,22 +12,41 @@
    -

    {{ data.firstName }} {{ data.lastName }} is not yet 16 weeks pregnant

    - - -

    {{ data.firstName }} {{ data.lastName }} is {{ fullWeeksPregnant | plural("week") }}{% if remainderDaysPregnant > 0 %} and {{ remainderDaysPregnant | plural("day") }}{% endif %} pregnant.

    -

    The pertussis vaccine is recommended between 16 and 32 weeks of pregnancy.

    - -

    UKHSA guidance on pertussis vaccination of pregnant women (opens in new tab). - + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} + {% set randomWeeks = (range(1, 15) | random) %} +

    + {{ displayName }} is + {% if fullWeeksPregnant is defined and fullWeeksPregnant is not none %} + {{ fullWeeksPregnant | plural("week") }} + {% else %} + {{ randomWeeks }} week{{ 's' if randomWeeks > 1 }} + {% endif %} + {% if remainderDaysPregnant is defined and remainderDaysPregnant > 0 %} and {{ remainderDaysPregnant | plural("day") }}{% endif %} pregnant. +

    +

    The pertussis vaccine is recommended between 16 and 32 weeks of pregnancy.

    + +

    UKHSA guidance on pertussis vaccination of pregnant women (opens in new tab).

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " is not yet 16 weeks pregnant", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }}
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/ppv/already-had-it-warning.html b/app/views/record-vaccinations/ppv/already-had-it-warning.html index da32cbe2..16162858 100644 --- a/app/views/record-vaccinations/ppv/already-had-it-warning.html +++ b/app/views/record-vaccinations/ppv/already-had-it-warning.html @@ -12,22 +12,35 @@
    -

    Jodie Brown has already had a pneumococcal vaccine

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} +

    + {{ displayName }} had a pneumococcal vaccine on 15 September 2024. +

    + +

    + Most adults only need 1 dose of the pneumococcal vaccine. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " has already had a pneumococcal vaccine", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }} -

    - Jodie Brown had a pneumococcal vaccine on 15 September 2024. -

    - -

    - Most adults only need 1 dose of the pneumococcal vaccine.

    -
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/ppv/too-young-warning.html b/app/views/record-vaccinations/ppv/too-young-warning.html index 50a0bdbd..5dd684a6 100644 --- a/app/views/record-vaccinations/ppv/too-young-warning.html +++ b/app/views/record-vaccinations/ppv/too-young-warning.html @@ -12,28 +12,45 @@
    -

    Jodie Brown is too young for the London pneumococcal service -

    + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} + {% set randomAge = (range(1, 17) | random) %} +

    + {{ displayName }} is + {% if data.age is defined and data.age is not none %} + {{ data.age }} years old. + {% else %} + {{ randomAge }} years old. + {% endif %} +

    + +

    + To be eligible for this service, you have to be aged 18 or older. +

    + +

    + Your organisation may not be paid for this vaccination. +

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " is too young for the London pneumococcal service", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }} -

    - Jodie Brown is 17 years old. -

    - -

    - To be eligible for this service, you have to be aged 18 or older. -

    - -

    - Your organisation may not be paid for this vaccination. -

    -
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %} diff --git a/app/views/record-vaccinations/rsv/not-yet-28-weeks-pregnant-warning.html b/app/views/record-vaccinations/rsv/not-yet-28-weeks-pregnant-warning.html index ea8aa2dd..ddd77b5b 100644 --- a/app/views/record-vaccinations/rsv/not-yet-28-weeks-pregnant-warning.html +++ b/app/views/record-vaccinations/rsv/not-yet-28-weeks-pregnant-warning.html @@ -12,24 +12,42 @@
    -

    {{ data.firstName }} {{ data.lastName }} is not yet 28 weeks pregnant

    - - -

    {{ data.firstName }} {{ data.lastName }} is {{ fullWeeksPregnant | plural("week") }}{% if remainderDaysPregnant > 0 %} and {{ remainderDaysPregnant | plural("day") }}{% endif %} pregnant. -

    - -

    The {{ data.vaccine }} vaccine is not routinely recommended before 28 weeks of pregnancy.

    - -

    UKHSA guidance on RSV vaccination of pregnant women (opens in new tab). - + {% if data.firstName and data.lastName %} + {% set displayName = data.firstName ~ ' ' ~ data.lastName %} + {% else %} + {% set displayName = 'Patient Name' %} + {% endif %} + + {% set panelHtml %} + {% set randomWeeks = (range(1, 27) | random) %} +

    + {{ displayName }} is + {% if fullWeeksPregnant is defined and fullWeeksPregnant is not none %} + {{ fullWeeksPregnant | plural("week") }} + {% else %} + {{ randomWeeks }} week{{ 's' if randomWeeks > 1 }} + {% endif %} + {% if remainderDaysPregnant is defined and remainderDaysPregnant > 0 %} and {{ remainderDaysPregnant | plural("day") }}{% endif %} pregnant. +

    + +

    The RSV vaccine is not routinely recommended before 28 weeks of pregnancy.

    + +

    UKHSA guidance on RSV vaccination of pregnant women (opens in new tab).

    + + {{ button({ + "text": "Continue anyway", + "href": "/record-vaccinations/consent", + "classes": "nhsuk-button--reverse" + }) }} + {% endset %} + + {{ panel({ + titleText: displayName + " is not yet 28 weeks pregnant", + html: panelHtml, + classes: "nhsuk-panel--interruption" + }) }}
    - - {{ button({ - "text": "Continue anyway", - "href": "/record-vaccinations/consent" - }) }} - {% endblock %}