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 @@
You can now add users to these pharmacies.
+ {% endset %} + + {{ notificationBanner({ + html: html, + type: "success" + }) }} + {% endif %} + +Add pharmacies or manage users at an existing pharmacy.
+ + {{ button({ + text: "Add pharmacies", + href: "/pharmacies/select" + }) }} + +| + 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 + | +
- 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" + }) }}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" + }) }}[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" + }) }}+ 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" + }) }} + ++ {{ 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. -
-+ {{ 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. -
-+ {{ 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. -
-- 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" + }) }}{{ 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" + }) }}+ {{ 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.
-+ {{ 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. -
-{{ 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" + }) }}