diff --git a/app/data/appointments.js b/app/data/appointments.js new file mode 100644 index 00000000..657a52fd --- /dev/null +++ b/app/data/appointments.js @@ -0,0 +1,130 @@ +// These are organisations set up as using RAVS +module.exports = [ + + { + time: "10:00", + patient: { + nhsNumber: "9123123123", + firstName: "Alan", + lastName: "Teapot", + dateOfBirth: "1969-04-16", + contactDetails: { + mobile: "07588547704", + phone: "0111432626", + email: "alan.teapot@btinternet.com" + } + }, + vaccinations: [ + "COVID-19" + ] + }, + { + time: "10:30", + patient: { + nhsNumber: "9841414141", + firstName: "Keith", + lastName: "Napkin", + dateOfBirth: "1976-02-12", + contactDetails: { + mobile: "077345813941" + } + }, + vaccinations: [ + "COVID-19", + "Flu" + ] + }, + { + time: "10:40", + patient: { + nhsNumber: "9841515715", + firstName: "Lynn", + lastName: "Feather", + dateOfBirth: "1963-05-23", + contactDetails: { + email: "lynn.feather@gmail.com" + } + }, + vaccinations: [ + "Flu", "RSV" + ] + }, + { + time: "11:10", + patient: { + nhsNumber: "98357151513", + firstName: "Lorna", + lastName: "Biscuitbarrel", + dateOfBirth: "1962-08-19", + contactDetails: { + mobile: "07364824944" + } + }, + vaccinations: [ + "Flu" + ] + }, + { + time: "11:20", + patient: { + nhsNumber: "9847471413", + firstName: "Moira", + lastName: "Packet", + dateOfBirth: "1950-04-14", + contactDetails: { + mobile: "07623842424" + } + }, + vaccinations: [ + "COVID-19" + ] + }, + { + time: "11:30", + patient: { + nhsNumber: "9841411411", + firstName: "Cliff", + lastName: "Sugarbowl", + dateOfBirth: "1957-01-23", + contactDetails: { + mobile: "07623913141" + } + }, + vaccinations: [ + "COVID-19" + ] + }, + { + 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" + ] + }, + { + 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" + ] + } + +] diff --git a/app/data/session-data-defaults.js b/app/data/session-data-defaults.js index 63629e74..cb2120a0 100644 --- a/app/data/session-data-defaults.js +++ b/app/data/session-data-defaults.js @@ -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') @@ -13,6 +14,7 @@ module.exports = { users: users, vaccines: vaccines, vaccineStock: vaccineStock, + appointments: appointments, lists: [], nhsNumberKnown: "yes", currentUserId: "2387441662601", diff --git a/app/views/appointments.html b/app/views/appointments.html new file mode 100644 index 00000000..058942e0 --- /dev/null +++ b/app/views/appointments.html @@ -0,0 +1,95 @@ +{% extends 'layout.html' %} + +{% set pageName = "Today’s appointments" %} +{% set currentSection = "appointments" %} + + +{% block content %} +
+
+ +

{{ pageName }}

+ +

Imported from Manage your appointments.

+ + {% set todayContent %} + + + + + + + + + + + + + + + + + {% for appointment in data.appointments %} + + + + + + + + + + + {% endfor %} + +
TimeNameDate of birthContact detailsVaccinesAction
{{ appointment.time }} am + {{ appointment.patient.firstName }} + {{ appointment.patient.lastName }} + + {{ appointment.patient.dateOfBirth | govukDate }} + + {% if appointment.patient.contactDetails.mobile %} + {{ appointment.patient.contactDetails.mobile }}
+ {% endif %} + {% if appointment.patient.contactDetails.email %} + {{ appointment.patient.contactDetails.email }}
+ {% endif %} +
+ {{ appointment.vaccinations | join(", ") }} + + Record +
+ {% endset %} + + {{ tabs({ + items: [ + { + label: "Scheduled", + id: "scheduled", + panel: { + html: todayContent + } + }, + { + label: "Cancelled", + id: "cancelled", + panel: { + html: "TODO" + } + }, + { + label: "Vaccinations given", + id: "done", + panel: { + html: "TODO" + } + } + ] + }) }} + + +
+
+ + +{% endblock %} diff --git a/app/views/includes/header.html b/app/views/includes/header.html index af2c9c64..9212b770 100644 --- a/app/views/includes/header.html +++ b/app/views/includes/header.html @@ -12,6 +12,12 @@ }), navigationItems) %} {% if currentOrganisation %} + {% set navigationItems = (navigationItems.push({ + href: "/appointments", + html: "Appointments New", + active: (currentSection == "appointments") + }), navigationItems) %} + {% set navigationItems = (navigationItems.push({ href: "/record-vaccinations", text: "Record vaccinations", diff --git a/app/views/record-vaccinations/patient-history.html b/app/views/record-vaccinations/patient-history.html index 2b5bb47b..e0ee8c06 100644 --- a/app/views/record-vaccinations/patient-history.html +++ b/app/views/record-vaccinations/patient-history.html @@ -24,7 +24,9 @@ {% set nextPage = "/record-vaccinations/vaccination-date" %} {% endif %} -{% if data.repeatVaccination === "yes" %} +{% 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" %}