diff --git a/app/data/organisations.js b/app/data/organisations.js
index 5e5d7389..59e4d8dc 100644
--- a/app/data/organisations.js
+++ b/app/data/organisations.js
@@ -8283,6 +8283,31 @@ module.exports = [
status: 'Active',
region: "Y62"
},
+ {
+ id: 'FA425',
+ name: 'Simpsons Surgery',
+ companyId: "P0191N",
+ sites: [
+ {
+ id: "FA425X",
+ name: "Simpsons Surgery"
+ }
+ ],
+ address: {
+ line1: '8 Spencer Court',
+ town: 'Corby',
+ postcode: 'NN17 1NU'
+ },
+ type: 'GP Surgery',
+ vaccines: [
+ {name: "RSV", status: "enabled"},
+ {name: "COVID-19", status: "enabled"},
+ {name: "pertussis", status: "disabled"},
+ {name: "flu", status: "enabled"}
+ ],
+ status: 'Active',
+ region: "Y62"
+ },
{
id: 'FA02S',
name: 'Addlestone Pharmacy',
diff --git a/app/data/users.js b/app/data/users.js
index 27d8578c..c81f14fb 100644
--- a/app/data/users.js
+++ b/app/data/users.js
@@ -13954,5 +13954,20 @@ module.exports = [
"vaccinator": true
}
]
- }
+ },
+ // Add an example GP user linked to GP org
+ {
+ "id": "12345678",
+ "email": "lydia.harris@nhs.net",
+ "organisations": [
+ {
+ "id": "FA425",
+ "permissionLevel": "Lead administrator",
+ "status": "Active",
+ "vaccinator": true
+ }
+ ],
+ "firstName": "Lydia",
+ "lastName": "Harris"
+ },
]
diff --git a/app/routes/prototype-admin.js b/app/routes/prototype-admin.js
index 2189a9f1..e074e81f 100644
--- a/app/routes/prototype-admin.js
+++ b/app/routes/prototype-admin.js
@@ -484,6 +484,11 @@ module.exports = (router) => {
} else if (scenario === 'support') {
data.currentUserId = '66435353634'
data.currentOrganisationId = null
+ } else if (scenario === 'gp') {
+ data.currentUserId = '12345678'
+ data.currentOrganisationId = 'FA425'
+ setupBatchesForOrg(data, 'FA425')
+ addRandomVaccinations(data, 'FA425', 30)
} else {
res.redirect('/')
return
@@ -699,6 +704,26 @@ module.exports = (router) => {
res.redirect(getDefaultLandingPath(data, data.currentOrganisationId))
})
+ // ----------------------------------------------------------------
+ // Preset: Basic GP user
+ // ----------------------------------------------------------------
+
+ router.get('/prototype-setup/preset/gp-surgery', (req, res) => {
+ resetSession(req)
+ const data = req.session.data
+
+ const scenarioUser = SIGN_IN_USERS.find(user => user.id === '12345678')
+ ensureUserExistsForScenario(data, scenarioUser)
+
+ data.currentUserId = '12345678'
+ data.currentOrganisationId = 'FA425'
+ setAppointmentsInterfaceForUserOrganisations(data, data.currentUserId, false)
+
+ setupBatchesForOrg(data, 'FA425')
+ addRandomVaccinations(data, 'FA425', 10)
+ res.redirect(getDefaultLandingPath(data, data.currentOrganisationId))
+ })
+
// ----------------------------------------------------------------
// Custom configuration — Step 1: Choose user
// ----------------------------------------------------------------
diff --git a/app/routes/record-vaccinations.js b/app/routes/record-vaccinations.js
index e6f3bb4f..928f00bc 100644
--- a/app/routes/record-vaccinations.js
+++ b/app/routes/record-vaccinations.js
@@ -227,8 +227,17 @@ module.exports = router => {
const nhsNumberKnown = req.session.data.nhsNumberKnown;
req.session.data.nhsNumber = req.session.data.nhsNumber.trim()
const nhsNumber = req.session.data.nhsNumber.replaceAll(' ', '')
+ const data = req.session.data
+
+ if (nhsNumberKnown === "yes" && nhsNumber.match(/^\d{10}$/) && nhsNumber.startsWith('9') && data.gpit === "noGP") {
+
+ req.session.data.firstName = "Jodie"
+ req.session.data.lastName = "Brown"
+ req.session.data.dateOfBirth = {day: "15", month: "8", year: "1949"}
+ req.session.data.postcode = "GD3 I83"
- if (nhsNumberKnown === "yes" && nhsNumber.match(/^\d{10}$/) && nhsNumber.startsWith('9')) {
+ res.redirect('/record-vaccinations/patient-history-no-gp')
+ } else if (nhsNumberKnown === "yes" && nhsNumber.match(/^\d{10}$/) && nhsNumber.startsWith('9')) {
req.session.data.firstName = "Jodie"
req.session.data.lastName = "Brown"
@@ -439,7 +448,7 @@ module.exports = router => {
if (firstName != '' && lastName != '' && dateOfBirth.day != '' && dateOfBirth.month != '' && dateOfBirth.year != '' && postcode != '' && gender != '') {
- res.redirect('/record-vaccinations/consent')
+ res.redirect('/record-vaccinations/patient-history-none')
} else {
res.redirect('/record-vaccinations/create-a-record?showErrors=yes')
}
@@ -891,6 +900,10 @@ module.exports = router => {
if (!data.locationType) {
redirectPath = "/record-vaccinations/location?showErrors=yes"
+ } else if (data.gpit === "notInPCN" && data.locationType !== "Outreach event"){
+ redirectPath = "/record-vaccinations/covid-19/not-in-pcn-warning"
+ } else if (data.gpit === "noGP" && data.locationType !== "Outreach event"){
+ redirectPath = "/record-vaccinations/covid-19/no-gp-surgery-warning"
} else {
redirectPath = "/record-vaccinations/consent"
}
diff --git a/app/views/includes/_preset-scenarios-table.html b/app/views/includes/_preset-scenarios-table.html
index 8652de2a..50290130 100644
--- a/app/views/includes/_preset-scenarios-table.html
+++ b/app/views/includes/_preset-scenarios-table.html
@@ -110,6 +110,14 @@
userEmail: "jeremy13.blue@nhs.net",
role: "Lead administrator",
scenarioDetails: "Pharmacy configured for MMR and flu (London service) only."
+ },
+ {
+ presetLabel: "GP surgery",
+ presetPath: "/prototype-setup/preset/gp-surgery",
+ userName: "Lydia Harris",
+ userEmail: "lydia.harris@nhs.net",
+ role: "Lead administrator",
+ scenarioDetails: "Basic GP surgery"
}
] %}
diff --git a/app/views/index.html b/app/views/index.html
index fa25b97b..8dfdc8bc 100755
--- a/app/views/index.html
+++ b/app/views/index.html
@@ -105,6 +105,17 @@
Main interface
Profile page
+ GP scenarios
+
+
Regions interface
@@ -150,6 +161,8 @@ COVID-19
flu
diff --git a/app/views/record-vaccinations/covid-19/no-gp-surgery-warning.html b/app/views/record-vaccinations/covid-19/no-gp-surgery-warning.html
new file mode 100644
index 00000000..002e4f69
--- /dev/null
+++ b/app/views/record-vaccinations/covid-19/no-gp-surgery-warning.html
@@ -0,0 +1,48 @@
+
+{% extends 'layout.html' %}
+
+{% set pageName = "Patient has no GP surgery" %}
+
+{% 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 %}
+
+ {% if data.locationType %}
+ {% set locationType = data.locationType %}
+ {% else %}
+ {% set locationType = '[Location Type]' %}
+ {% endif %}
+
+ {% set panelHtml %}
+ {#
This patient does not have a registered GP surgery.
#}
+
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 not registered with a GP surgery",
+ html: panelHtml,
+ classes: "nhsuk-panel--interruption"
+ }) }}
+
+
+
+{% endblock %}
+
diff --git a/app/views/record-vaccinations/covid-19/not-in-pcn-warning.html b/app/views/record-vaccinations/covid-19/not-in-pcn-warning.html
new file mode 100644
index 00000000..ceb22725
--- /dev/null
+++ b/app/views/record-vaccinations/covid-19/not-in-pcn-warning.html
@@ -0,0 +1,42 @@
+
+{% extends 'layout.html' %}
+
+{% set pageName = "Patient not in PCN" %}
+
+{% 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 %}
+
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 + "'s GP surgery is not in your PCN",
+ html: panelHtml,
+ classes: "nhsuk-panel--interruption"
+ }) }}
+
+
+
+{% endblock %}
+
diff --git a/app/views/record-vaccinations/patient-history-no-gp.html b/app/views/record-vaccinations/patient-history-no-gp.html
new file mode 100644
index 00000000..cb0047cb
--- /dev/null
+++ b/app/views/record-vaccinations/patient-history-no-gp.html
@@ -0,0 +1,266 @@
+{% extends 'layout.html' %}
+
+{% set pageName = "Check the patient's details" %}
+
+{% set currentSection = "vaccinate" %}
+
+{% set dateOfBirthHtml %}
+ {% if data.dateOfBirth.day %}
+ {{ (data.dateOfBirth | isoDateFromDateInput | govukDate) }}
+ {{ data.dateOfBirth | isoDateFromDateInput | age }} old
+ {% else %}
+ {{ (data.dateOfBirth | govukDate) }}
+ {{ data.dateOfBirth | age }} old
+ {% endif %}
+{% endset %}
+
+{% if data.repeatVaccination === "yes" %}
+ {% set nextPage = "/record-vaccinations/consent" %}
+{% elseif data.repeatPatient === "yes" %}
+ {% set nextPage = "/record-vaccinations/vaccine" %}
+{% else %}
+ {% set nextPage = "/record-vaccinations/vaccination-date" %}
+{% endif %}
+
+{% if data.from == "appointments" %}
+ {% set previousPage = "/appointments" %}
+{% elseif data.repeatVaccination === "yes" %}
+ {% set previousPage = "/record-vaccinations/patient" %}
+{% elseif data.repeatPatient === "yes" %}
+ {% set previousPage = "/record-vaccinations/done" %}
+{% else %}
+ {% set previousPage = "/record-vaccinations" %}
+{% endif %}
+
+{% block beforeContent %}
+ {{ backLink({ href: previousPage }) }}
+{% endblock %}
+
+{% block content %}
+
+
+
+
Check {{ data.firstName }} {{ data.lastName }}’s details and vaccination history
+
+ {{ warningCallout({
+ heading: "No GP surgery",
+ headingLevel: 2,
+ text: "This patient is not registered with a GP surgery."
+ }) }}
+
+ {{ summaryList({
+ rows: [
+ {
+ key: {
+ text: "Name"
+ },
+ value: {
+ text: (data.firstName + " " + data.lastName)
+ }
+ },
+ {
+ key: {
+ text: "Date of birth"
+ },
+ value: {
+ html: dateOfBirthHtml
+ }
+ },
+ {
+ key: {
+ text: "Address"
+ },
+ value: {
+ html: "73 Roman Rd
Leeds
LS2 5ZN"
+ }
+ },
+ {
+ key: {
+ text: "NHS number"
+ },
+ value: {
+ text: data.nhsNumber
+ }
+ }
+ ]
+ }) }}
+
+
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: "9 November 2024"
+ },
+ {
+ text: "MMR (2nd dose)"
+ },
+ {
+ text: "Priorix"
+ }
+ ],[
+ {
+ text: "11 November 2024"
+ },
+ {
+ text: "RSV"
+ },
+ {
+ text: "Abrysvo"
+ }
+ ],
+ [
+ {
+ 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
+ }
+ ]
+ }) }}
+
+
+
+
+
+
+
+{% endblock %}
+
diff --git a/app/views/record-vaccinations/patient-history-none.html b/app/views/record-vaccinations/patient-history-none.html
index 1955fde8..a073ff7e 100644
--- a/app/views/record-vaccinations/patient-history-none.html
+++ b/app/views/record-vaccinations/patient-history-none.html
@@ -7,7 +7,7 @@
{% if ((data.vaccine == "RSV") and (data.eligibility | arrayOrStringIncludes("Pregnant"))) or (data.vaccine == "Pertussis") %}
{% set nextPage = "/record-vaccinations/patient-estimated-due-date" %}
{% else %}
- {% set nextPage = "/record-vaccinations/consent" %}
+ {% set nextPage = "/record-vaccinations/vaccination-date" %}
{% endif %}
{% set dateOfBirthHtml %}
@@ -22,10 +22,38 @@
{% endblock %}
{% block content %}
+
+{% if data.firstName and data.lastName %}
+ {% set displayName = data.firstName ~ ' ' ~ data.lastName %}
+{% else %}
+ {% set displayName = 'Patient Name' %}
+{% endif %}
+
+{% if data.dateOfBirth %}
+ {% set dateOfBirth = data.dateOfBirth | formatDate %}
+{% else %}
+ {% set dateOfBirth = '15 August 1949' %}
+{% endif %}
+
+{% if data.postcode %}
+ {% set postcode = data.postcode %}
+{% else %}
+ {% set postcode = 'N7 0EA' %}
+{% endif %}
+
-
Check Jodie Brown’s details and vaccination history
+
Check {{ displayName }}’s details and vaccination history
+
+ {% if data.gpit === "noGP" %}
+ {{ warningCallout({
+ heading: "Important",
+ headingLevel: 2,
+ text: "This patient is not registered with a GP surgery, and we could not get any vaccination history for them."
+ }) }}
+ {% else %}
+ {% endif %}
{{ summaryList({
classes: 'xnhsuk-summary-list--no-border',
@@ -35,7 +63,7 @@
Check Jodie Brown’s details and vaccination histor
text: "Name"
},
value: {
- text: "Jodie Brown"
+ text: (displayName)
}
},
{
@@ -43,15 +71,7 @@ Check Jodie Brown’s details and vaccination histor
text: "Date of birth"
},
value: {
- html: "15 August 1949
(75 years old)"
- }
- },
- {
- key: {
- text: "Address"
- },
- value: {
- html: "73 Roman Rd
Leeds
LS2 5ZN"
+ text: (dateOfBirth)
}
},
{
@@ -59,18 +79,23 @@ Check Jodie Brown’s details and vaccination histor
text: "Postcode"
},
value: {
- text: "N7 0EA"
+ text: (postcode)
}
}
]
}) }}
+ {% if data.gpit === "noGP" %}
+ {% else %}
+
{% from "warning-callout/macro.njk" import warningCallout %}
-{{ warningCallout({
- heading: "Important",
- text: "We could not get any vaccination history for this patient."
-}) }}
+ {{ warningCallout({
+ heading: "Important",
+ headingLevel: 2,
+ text: "We could not get any vaccination history for this patient."
+ }) }}
+ {% endif %}