Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ce856d5
Add appointments view
frankieroberto Jan 23, 2026
0b135fb
fix typo
frankieroberto Jan 23, 2026
c3f4788
Merge branch 'main' into appointments-sketch-2
frankieroberto Jan 28, 2026
a7fcbd2
Merge branch 'main' into appointments-sketch-2
frankieroberto Feb 17, 2026
7631fd5
Merge branch 'main' into appointments-sketch-2
frankieroberto Mar 3, 2026
1471003
Merge branch 'main' into appointments-sketch-2
frankieroberto Mar 4, 2026
72b5284
Make appointments page more dynamic
frankieroberto Mar 16, 2026
b090a78
Code style fix
frankieroberto Mar 16, 2026
47581c0
Merge branch 'main' into appointments-sketch-2
frankieroberto Apr 17, 2026
7aab252
Merge branch 'main' into appointments-sketch-2
frankieroberto Apr 17, 2026
f89fcce
Move file into folder
frankieroberto Apr 17, 2026
53e741b
Add cancellation tab mockup
frankieroberto Apr 17, 2026
db6f316
More design exploration
frankieroberto Apr 17, 2026
52b814e
Merge branch 'main' into appointments-sketch-2
frankieroberto Apr 21, 2026
da959f5
Make email address usual size
frankieroberto Apr 21, 2026
672f424
Start refactoring
frankieroberto Apr 21, 2026
eaa7783
Make the lists dynamic
frankieroberto Apr 21, 2026
2058ad4
Make date navigation work
frankieroberto Apr 21, 2026
5238446
Show appointments yesterday and tomorrow
frankieroberto Apr 21, 2026
5f7ef5a
Add a completed vaccination for yesterday
frankieroberto Apr 22, 2026
2c25da1
Removed Completed appointments for future dates
frankieroberto Apr 22, 2026
9fc33f9
A bunch of fixes
frankieroberto Apr 22, 2026
8fb3a99
Merge branch 'main' into appointments-sketch-2
frankieroberto Apr 22, 2026
08e5153
Allow you to set today’s vaccinators
frankieroberto Apr 22, 2026
f58ffeb
Merge branch 'main' into appointments-sketch-2
frankieroberto Apr 29, 2026
57b7cda
Add date of birth?
frankieroberto Apr 30, 2026
8e763a7
Changes from 07 May conversation for MVP research
caitlinroach-nhs May 7, 2026
ca2e604
Update app/views/appointments/_cancelled.html
caitlinroach-nhs May 18, 2026
b1d8d34
Fix table headers and add age to all appt tables
caitlinroach-nhs May 18, 2026
04c7ec2
Merge branch 'appointments-sketch-5' of https://github.com/NHSDigital…
caitlinroach-nhs May 18, 2026
664da2f
completed appts file name updated
caitlinroach-nhs May 18, 2026
fc50b75
Update app/views/appointments/_scheduled.html
caitlinroach-nhs May 18, 2026
f3e16f2
Format NHS numbers on canceled and completed tab
caitlinroach-nhs May 18, 2026
72c7277
Fixed Lorna Biscuitbarrel's nhs number
caitlinroach-nhs May 18, 2026
9b08862
Added visually hidden text to record links for screenreaders
caitlinroach-nhs May 18, 2026
e0e13cc
Update cancellation reasons
caitlinroach-nhs May 18, 2026
b5aa82b
Added Rosie Smith as a patient with appointment
caitlinroach-nhs May 20, 2026
b8ed680
Set date for today to always be 11 May 2026 for demo purposes
caitlinroach-nhs May 20, 2026
625737d
Pharmacy name change and Rosie path routing fix
caitlinroach-nhs May 20, 2026
5330a21
Fixes to pass code style checks
caitlinroach-nhs May 20, 2026
40392d5
Update to town and postcodes for rosie and GP
caitlinroach-nhs May 20, 2026
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
27 changes: 27 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ const filters = require('./app/filters')
const locals = require('./app/locals')
const routes = require('./app/routes')

const RealDate = Date
if (config.useFixedPrototypeDate && config.fixedPrototypeDate) {
class FixedDate extends RealDate {
constructor(...args) {
if (args.length === 0) {
super(config.fixedPrototypeDate)
} else {
super(...args)
}
}

static now() {
return new RealDate(config.fixedPrototypeDate).getTime()
}

static parse(value) {
return RealDate.parse(value)
}

static UTC(...args) {
return RealDate.UTC(...args)
}
}

global.Date = FixedDate
}

const SERVICE_NAME = config.serviceName

const viewsPath = ['app/views/', 'app/components/']
Expand Down
6 changes: 5 additions & 1 deletion app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ module.exports = {
serviceName: 'Record a vaccination',

// Port to run the prototype on locally
port: 3000
port: 3000,

// Keep date-sensitive journeys stable in prototype mode
useFixedPrototypeDate: true,
fixedPrototypeDate: '2026-05-11T12:00:00'
}
221 changes: 221 additions & 0 deletions app/data/appointments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
// These are organisations set up as using RAVS
module.exports = [

{
id: "2364364369",
date: "today",
time: "10:40",
patient: {
nhsNumber: "9841515715",
firstName: "Lynn",
lastName: "Feather",
dateOfBirth: "1963-05-23",
contactDetails: {
email: "lynn.feather@gmail.com"
}
},
vaccinations: [
"Flu", "RSV"
]
},
{
id: "2841736509",
date: "today",
time: "11:10",
patient: {
nhsNumber: "9835715151",
firstName: "Rosie",
lastName: "Smith",
dateOfBirth: "1949-10-08",
contactDetails: {
mobile: "07364824944",
email: "rosie.smith@hotmail.com"
}
},
vaccinations: [
"RSV", "COVID-19"
]
},
{
id: "3026352592",
date: "today",
time: "11:10",
cancelled: {
reason: "patient"
},
patient: {
nhsNumber: "9835715151",
firstName: "Lorna",
lastName: "Biscuitbarrel",
dateOfBirth: "1962-08-19",
contactDetails: {
mobile: "07364824944"
}
},
vaccinations: [
"Flu"
]
},
{
id: "410059235",
date: "today",
time: "11:20",
patient: {
nhsNumber: "9847471413",
firstName: "Moira",
lastName: "Packet",
dateOfBirth: "1950-04-14",
contactDetails: {
mobile: "07623842424"
}
},
vaccinations: [
"COVID-19"
]
},
{
id: "5019581446",
date: "today",
time: "11:30",
patient: {
nhsNumber: "9841411411",
firstName: "Cliff",
lastName: "Sugarbowl",
dateOfBirth: "1957-01-23",
contactDetails: {
mobile: "07623913141"
}
},
vaccinations: [
"COVID-19"
]
},
{
id: "69263464",
date: "today",
time: "11:40",
patient: {
nhsNumber: "9841411411",
firstName: "James",
lastName: "Brown",
dateOfBirth: "1952-04-19",
contactDetails: {
mobile: "0723456123",
email: "james.brown@hotmail.com"
}
},
vaccinations: [
"COVID-19"
]
},
{
id: "7692855825",
date: "today",
time: "11:50",
patient: {
nhsNumber: "9917425141",
firstName: "Emma",
lastName: "Blue",
dateOfBirth: "1973-01-23",
contactDetails: {
mobile: "07524222525",
email: "emma.blue123@nhs.net"
}
},
vaccinations: [
"COVID-19", "RSV"
]
},
{
id: "8928558275",
date: "today",
time: "12:10",
cancelled: {
reason: "organisation"
},
patient: {
nhsNumber: "9741851731",
firstName: "Charlie",
lastName: "Green",
dateOfBirth: "1983-06-12",
contactDetails: {
email: "charlie.green@hotmail.com"
}
},
vaccinations: [
"COVID-19"
]
},
{
id: "9255253581",
date: "today",
time: "12:40",
cancelled: {
reason: "auto"
},
patient: {
nhsNumber: "9951736814",
firstName: "Jason",
lastName: "White",
dateOfBirth: "1998-03-19",
contactDetails: {
email: "jw225235@gmail.com"
}
},
vaccinations: [
"Flu"
]
},
{
id: "634633242",
date: "yesterday",
time: "11:20",
patient: {
nhsNumber: "9918571751",
firstName: "Danny",
lastName: "Green",
dateOfBirth: "1998-03-19",
contactDetails: {
email: "dgreen@gmail.com"
}
},
vaccinations: [
"Flu"
]
},
{
id: "10363212525",
date: "yesterday",
time: "13:20",
patient: {
nhsNumber: "99472754141",
firstName: "Jason",
lastName: "Black",
dateOfBirth: "1967-09-21",
contactDetails: {
email: "jblack@hotmail.com"
}
},
vaccinations: [
"Flu"
],
vaccinationIds: ["464743636"]
},
{
id: "64639185885",
date: "tomorrow",
time: "11:20",
patient: {
nhsNumber: "9017474141",
firstName: "Mohammed",
lastName: "Khan",
dateOfBirth: "1993-01-23",
contactDetails: {
email: "mk25325@gmail.com"
}
},
vaccinations: [
"Flu"
]
}
]
10 changes: 5 additions & 5 deletions app/data/organisations.js
Original file line number Diff line number Diff line change
Expand Up @@ -8260,17 +8260,17 @@ module.exports = [
},
{
id: 'FA424',
name: 'Pickfords Pharmacy',
name: "Dean's Pharmacy",
sites: [
{
id: "FA424X",
name: "Pickfords Pharmacy"
name: "Dean's Pharmacy"
}
],
address: {
line1: '8 Spencer Court',
town: 'Corby',
postcode: 'NN17 1NU'
line1: '123 Fake Street',
town: 'Faketown',
postcode: 'FK1 2AB'
},
type: 'Community Pharmacy',
vaccines: [
Expand Down
6 changes: 4 additions & 2 deletions app/data/session-data-defaults.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const allOrganisations = require('./all-organisations')
const appointments = require('./appointments')
const featureFlags = require('./feature-flags')
const organisations = require('./organisations')
const users = require('./users')
Expand All @@ -13,10 +14,11 @@ module.exports = {
users: users,
vaccines: vaccines,
vaccineStock: vaccineStock,
appointments: appointments,
lists: [],
nhsNumberKnown: "yes",
currentUserId: "2387441662601",
currentOrganisationId: "RW3",
currentUserId: "46436346", // Jeremy Blue
currentOrganisationId: "FA424", // Pickfords Pharmacy
vaccinationsRecorded: vaccinationsRecorded,

// These are the options for extracting CSV reports
Expand Down
4 changes: 2 additions & 2 deletions app/data/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ module.exports = [
"firstName": "Paulina",
"lastName": "Sloan"
},
// Each pharmacy in Paulina Sloan’s chain has its own vaccinator
// Each pharmacy in Paulina Sloan’s chain has its own vaccinator, some of who are also admins
{
"id": "46436346",
"email": "jeremy.blue@nhs.net",
"organisations": [
{
"id": "FA424",
"permissionLevel": "Recorder",
"permissionLevel": "Lead administrator",
"status": "Active",
"vaccinator": true
}
Expand Down
28 changes: 28 additions & 0 deletions app/data/vaccine-stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,34 @@ module.exports = [
}
]
},
{
id: "7436323",
vaccine: "Flu",
vaccineProduct: "Adjuvanted Trivalent Influenza Vaccine (aTIV)",
organisationId: "FA424", // Pickfords Pharmacy
siteId: "FA424X", // Pickfords Pharmacy
batches: [
{
id: "464735235325",
batchNumber: "714-14",
expiryDate: "2026-12-14"
}
]
},
{
id: "9235235325",
vaccine: "COVID-19",
vaccineProduct: "Comirnaty 3 LP.8.1",
organisationId: "FA424", // Pickfords Pharmacy
siteId: "FA424X", // Pickfords Pharmacy
batches: [
{
id: "82725252",
batchNumber: "AB-255",
expiryDate: "2027-01-22"
}
]
},
{
id: "2514771",
vaccine: "flu (London service)",
Expand Down
5 changes: 3 additions & 2 deletions app/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ module.exports = function () {

filters.findById = findById

filters.dayName = function(isoDate) {
filters.dayName = function(isoDate, style = 'short') {
const date = new Date(Date.parse(isoDate))
const dateFormatter = new Intl.DateTimeFormat('en-GB', {weekday: 'short'});
const weekdayStyle = (style === 'long') ? 'long' : 'short'
const dateFormatter = new Intl.DateTimeFormat('en-GB', {weekday: weekdayStyle});

return dateFormatter.format(date)
}
Expand Down
1 change: 1 addition & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ router.use('/regions{*splat}', authorise({userType: 'regional'}))
router.use('/support{*splat}', authorise({userType: 'admin'}))

require('./routes/apply')(router)
require('./routes/appointments')(router)
require('./routes/record-vaccinations')(router)
require('./routes/regions')(router)
require('./routes/user-admin')(router)
Expand Down
Loading