Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When using components from the NHS.UK Frontend library, prefer the Nunjucks version over HTML.
20 changes: 13 additions & 7 deletions app/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h3>COVID-19</h3>
<h3>Flu</h3>

<ul>
<li><a href="/record-vaccinations/flu/wrong-age-for-product-warning">Too young for product</a></li>
<li><a href="/record-vaccinations/flu/too-young-warning">Too young for product</a></li>
</ul>

<h3>RSV</h3>
Expand All @@ -112,20 +112,26 @@ <h3>Pertussis</h3>
<li><a href="/record-vaccinations/pertussis/not-yet-16-weeks-pregnant-warning">Not yet 16 weeks pregnant</a></li>
</ul>

<h3>Pneumococcal</h3>
<h3>Pneumococcal London service</h3>

<ul>
<li><a href="/record-vaccinations/ppv/already-had-it-warning">Already had vaccine</a></li>
<li><a href="/record-vaccinations/ppv/too-young-warning">Too young</a></li>
<li><a href="/record-vaccinations/ppv/too-young-warning">Too young for the London pneumococcal service</a></li>
</ul>

<h3>MMR</h3>
<h3>MMR London service</h3>

<ul>
<li><a href="/record-vaccinations/mmr/interval-warning">Had an MMR vaccine less than 1 month ago</a></li>
<li><a href="/record-vaccinations/mmr/interval-warning">Had an MMR vaccine less than 4 weeks ago</a></li>
<li><a href="/record-vaccinations/mmr/already-had-2-doses-warning">Already had 2 doses</a></li>
<li><a href="/record-vaccinations/mmr/too-young-warning">Too young</a></li>
<li><a href="/record-vaccinations/mmr/too-old-warning">Too old</a></li>
<li><a href="/record-vaccinations/mmr/too-young-warning">Too young for the London MMR service</a></li>
<li><a href="/record-vaccinations/mmr/too-old-warning">Too old for the London MMR service</a></li>
</ul>

<h3>MenB</h3>

<ul>
<li><a href="/record-vaccinations/menb/interval-warning">Had a MenB vaccine less than 4 weeks ago</a></li>
</ul>

</div>
Expand Down
88 changes: 88 additions & 0 deletions app/views/pharmacies/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{% extends 'layout.html' %}

{% set currentSection = "pharmacies" %}

{% block content %}
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-three-quarters">

{% if added %}
{% set html %}
<h3 class="nhsuk-notification-banner__heading">
{{ added | int | plural('pharmacy') }} added
</h3>
<p>You can now add users to these pharmacies.</p>
{% endset %}

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

<h1 class="nhsuk-heading-l">Pharmacies</h1>

<p>Add pharmacies or manage users at an existing pharmacy.</p>

{{ button({
text: "Add pharmacies",
href: "/pharmacies/select"
}) }}

<table class="nhsuk-table" id="pharmacies-table">
<caption class="nhsuk-table__caption nhsuk-table__caption--m">Pharmacies added ({{ organisations | length }})</caption>
</table>
{% if (organisations | length) > 10 %}
<div class="nhsuk-form-group nhsuk-u-margin-bottom-4" style="margin-top: -30px;">
<label class="nhsuk-label" for="pharmacy-search">Search</label>
<input class="nhsuk-input nhsuk-input--width-20" id="pharmacy-search" name="pharmacy-search" type="search" autocomplete="off" placeholder="">
</div>
{% endif %}
<table class="nhsuk-table" id="pharmacies-table-data">
<thead role="rowgroup" class="nhsuk-table__head">
<tr role="row">
<th role="columnheader" class="" scope="col">
Name
</th>
<th role="columnheader" class="" scope="col">
Vaccines
</th>
<th role="columnheader" class="" scope="col">
Users
</th>
<th role="columnheader" class="" scope="col">
Actions
</th>
</tr>
</thead>
<tbody class="nhsuk-table__body">
{% for organisation in organisations %}
<tr role="row" class="nhsuk-table__row">
<td class="nhsuk-table__cell">
{{ organisation.name }} ({{ organisation.id}})
</td>
<td class="nhsuk-table__cell ">
{% set vaccinesEnabled = [] %}
{% for vaccine in organisation.vaccines %}
{% if vaccine.status == "enabled" %}
{% set vaccinesEnabled = (vaccinesEnabled.push(vaccine.name | vaccineDisplayName), vaccinesEnabled) %}
{% endif %}
{% endfor %}

{{ vaccinesEnabled | sort | join(", ") }}
</td>
<td class="nhsuk-table__cell ">
{{ organisationUserCounts[organisation.id] }}
</td>
<td class="nhsuk-table__cell ">
<a href="/pharmacies/{{ organisation.id }}">Manage</a>
</td>
</tr>
{% endfor %}

</tbody>
</table>
</div>
</div>

{% endblock %}
42 changes: 27 additions & 15 deletions app/views/record-vaccinations/covid-19/interval-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,35 @@
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

<h1 class="nhsuk-heading-l">{{ data.firstName }} {{ data.lastName }} had a COVID-19 vaccine less than 3 months ago</h1>

<p>
They had a COVID-19 vaccine on 15 April 2025.
</p>

<p>
For most people, the minimum recommended gap between COVID-19 vaccine doses is 3 months.
</p>
{% if data.firstName and data.lastName %}
{% set displayName = data.firstName ~ ' ' ~ data.lastName %}
{% else %}
{% set displayName = 'Patient Name' %}
{% endif %}

{% set panelHtml %}
<p>
They had a COVID-19 vaccine on 15 April 2025.
</p>

<p>
The minimum recommended gap between COVID-19 vaccine doses is 3 months.
</p>

{{ 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"
}) }}

</div>
</div>

{{ button({
"text": "Continue anyway",
"href": "/record-vaccinations/consent"
}) }}

{% endblock %}

31 changes: 22 additions & 9 deletions app/views/record-vaccinations/covid-19/too-young-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,31 @@
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

<h1 class="nhsuk-heading-l">{{ data.firstName }} {{ data.lastName }} may be too young for this vaccine product</h1>

<p>Adjuvanted Quadrivalent Influenza Vaccine (aQIV) is not usually recommended for people under the age of 65. {{ data.firstName }} {{ data.lastName }} is 64 years old.</p>
<p>Check before going ahead or refer to a prescriber for a patient specific direction (PSD).</p>
{% if data.firstName and data.lastName %}
{% set displayName = data.firstName ~ ' ' ~ data.lastName %}
{% else %}
{% set displayName = 'Patient Name' %}
{% endif %}

{% set panelHtml %}
<p>Adjuvanted Quadrivalent Influenza Vaccine (aQIV) is not usually recommended for people under the age of 65. {{ displayName }} is 64 years old.</p>
<p>Check before going ahead or refer to a prescriber for a patient specific direction (PSD).</p>

{{ 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"
}) }}

</div>
</div>

{{ button({
"text": "Continue anyway",
"href": "/record-vaccinations/consent"
}) }}

{% endblock %}

8 changes: 5 additions & 3 deletions app/views/record-vaccinations/dose.html
Original file line number Diff line number Diff line change
@@ -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) %}
Expand All @@ -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 %}
Expand Down Expand Up @@ -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
}
Expand Down
31 changes: 22 additions & 9 deletions app/views/record-vaccinations/flu/too-young-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,31 @@
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

<h1 class="nhsuk-heading-l">{{ data.firstName }} {{ data.lastName }} may be too young for this vaccine product</h1>

<p>[Product name] is not usually recommended for people under the age of 65. {{ data.firstName }} {{ data.lastName }} is 64 years old.</p>
<p>Check before going ahead or refer to a prescriber for a patient specific direction (PSD).</p>
{% if data.firstName and data.lastName %}
{% set displayName = data.firstName ~ ' ' ~ data.lastName %}
{% else %}
{% set displayName = 'Patient Name' %}
{% endif %}

{% set panelHtml %}
<p>[Product name] is not usually recommended for people under the age of 65. {{ displayName }} is 64 years old.</p>
<p>Check before going ahead or refer to a prescriber for a patient specific direction (PSD).</p>

{{ 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"
}) }}

</div>
</div>

{{ button({
"text": "Continue anyway",
"href": "/record-vaccinations/consent"
}) }}

{% endblock %}

46 changes: 46 additions & 0 deletions app/views/record-vaccinations/menb/interval-warning.html
Original file line number Diff line number Diff line change
@@ -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 %}
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

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

{% set panelHtml %}
<p>
They had a MenB vaccine on 15 April 2025.
</p>

<p>
The minimum recommended gap between MenB vaccine doses is 4 weeks.
</p>

{{ 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"
}) }}

</div>
</div>
{% endblock %}

42 changes: 27 additions & 15 deletions app/views/record-vaccinations/mmr/already-had-2-doses-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,35 @@
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

<h1 class="nhsuk-heading-l">Jodie Brown has already had 2 MMR vaccinations</h1>
{% if data.firstName and data.lastName %}
{% set displayName = data.firstName ~ ' ' ~ data.lastName %}
{% else %}
{% set displayName = 'Patient Name' %}
{% endif %}

{% set panelHtml %}
<p>
{{ displayName }} had a 2nd MMR vaccination on 10 July 2025.
</p>

<p>
Most people only need 2 doses of the MMR vaccine.
</p>

{{ 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"
}) }}

<p>
Jodie Brown had a second MMR vaccination on 10 July 2025.
</p>

<p>
Most people only need 2 doses of the MMR vaccine.
</p>

</div>
</div>

{{ button({
"text": "Continue anyway",
"href": "/record-vaccinations/consent"
}) }}

{% endblock %}

Loading