Skip to content

Commit b4d567a

Browse files
Enable regions to set vaccines per organisation (#365)
1 parent 3e0c053 commit b4d567a

33 files changed

+586
-213
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
// Temporary fix for checkboxes within Details
3+
.nhsuk-label {
4+
box-sizing: border-box;
5+
}

app/assets/sass/components/_header.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,27 @@
3232
padding-top: 0px;
3333
padding-bottom: 0px;
3434
}
35+
36+
37+
.app-header__navigation-item--with-count {
38+
.app-count {
39+
margin-left: 6px;
40+
min-width: nhsuk-spacing(4);
41+
padding-bottom: 3px;
42+
padding-top: 5px;
43+
text-decoration: none;
44+
@include nhsuk-font(14, $line-height: 1);
45+
}
46+
}
47+
48+
.app-count {
49+
background-color: rgba(0, 47, 92, 0.4);
50+
border-radius: nhsuk-spacing(3);
51+
color: $color_nhsuk-white;
52+
display: inline-block;
53+
min-width: nhsuk-spacing(5);
54+
padding-left: nhsuk-spacing(2);
55+
padding-right: nhsuk-spacing(2);
56+
text-align: center;
57+
@include nhsuk-font(16);
58+
}

app/assets/sass/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@import 'components/indent-list';
1111
@import 'components/feedback-panel';
1212
@import 'components/button-group';
13+
@import 'components/checkboxes';
1314

1415
// Import GOVUK-frontend
1516
//

app/data/filters.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

app/data/organisations.js

Lines changed: 68 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,13 @@ module.exports = [
710710
},
711711
"status": "Active",
712712
"type": "NHS Trust",
713+
region: "Y62",
714+
vaccines: [
715+
{name: "RSV", status: "disabled"},
716+
{name: "COVID-19", status: "enabled"},
717+
{name: "pertussis", status: "disabled"},
718+
{name: "flu", status: "enabled"}
719+
],
713720
sites: [
714721
{
715722
id: "RW3NM",
@@ -1852,12 +1859,18 @@ module.exports = [
18521859
},
18531860
{
18541861
"id": "RMA",
1855-
"name": "Greater manchester ambulance service NHS trust",
1862+
"name": "Greater Manchester Ambulance Service NHS trust",
18561863
"address": {
18571864
"line1": "156-158 bury old road",
18581865
"town": "Manchester",
18591866
"postcode": "M45 6AQ"
18601867
},
1868+
vaccines: [
1869+
{name: "RSV", status: "enabled"},
1870+
{name: "COVID-19", status: "enabled"},
1871+
{name: "pertussis", status: "enabled"},
1872+
{name: "flu", status: "enabled"}
1873+
],
18611874
"status": "Active",
18621875
"type": "NHS Trust",
18631876
"region": "Y62"
@@ -2711,12 +2724,18 @@ module.exports = [
27112724
},
27122725
{
27132726
"id": "R0A",
2714-
"name": "Manchester university NHS Foundation Trust",
2727+
"name": "Manchester University NHS Foundation Trust",
27152728
"address": {
27162729
"line1": "Cobbett house",
27172730
"town": "Manchester",
27182731
"postcode": "M13 9WL"
27192732
},
2733+
vaccines: [
2734+
{name: "RSV", status: "enabled"},
2735+
{name: "COVID-19", status: "enabled"},
2736+
{name: "pertussis", status: "enabled"},
2737+
{name: "flu", status: "enabled"}
2738+
],
27202739
"status": "Active",
27212740
"type": "NHS Trust",
27222741
"region": "Y62"
@@ -3016,8 +3035,14 @@ module.exports = [
30163035
"postcode": "NR4 7UY"
30173036
},
30183037
"status": "Active",
3038+
vaccines: [
3039+
{name: "RSV", status: "enabled"},
3040+
{name: "COVID-19", status: "enabled"},
3041+
{name: "pertussis", status: "enabled"},
3042+
{name: "flu", status: "enabled"}
3043+
],
30193044
"type": "NHS Trust",
3020-
"region": "Y61"
3045+
"region": "Y62"
30213046
},
30223047
{
30233048
"id": "RMY",
@@ -3194,16 +3219,22 @@ module.exports = [
31943219
},
31953220
"status": "Active",
31963221
"type": "NHS Trust",
3197-
"region": "Y62"
3222+
"region": "Y61"
31983223
},
31993224
{
32003225
"id": "RES",
3201-
"name": "North mersey community NHS trust",
3226+
"name": "North Mersey Community NHS trust",
32023227
"address": {
32033228
"line1": "Rathbone hospital",
32043229
"town": "Liverpool",
32053230
"postcode": "L9 7JP"
32063231
},
3232+
vaccines: [
3233+
{name: "RSV", status: "enabled"},
3234+
{name: "COVID-19", status: "enabled"},
3235+
{name: "pertussis", status: "enabled"},
3236+
{name: "flu", status: "enabled"}
3237+
],
32073238
"status": "Active",
32083239
"type": "NHS Trust",
32093240
"region": "Y62"
@@ -4121,8 +4152,14 @@ module.exports = [
41214152
"postcode": "CB2 0AY"
41224153
},
41234154
"status": "Active",
4155+
vaccines: [
4156+
{name: "RSV", status: "enabled"},
4157+
{name: "COVID-19", status: "enabled"},
4158+
{name: "pertussis", status: "enabled"},
4159+
{name: "flu", status: "enabled"}
4160+
],
41244161
"type": "NHS Trust",
4125-
"region": "Y61"
4162+
"region": "Y62"
41264163
},
41274164
{
41284165
"id": "RLZ",
@@ -6058,8 +6095,14 @@ module.exports = [
60586095
postcode: 'NN17 1NU'
60596096
},
60606097
type: 'Community Pharmacy',
6098+
vaccines: [
6099+
{name: "RSV", status: "enabled"},
6100+
{name: "COVID-19", status: "enabled"},
6101+
{name: "pertussis", status: "disabled"},
6102+
{name: "flu", status: "enabled"}
6103+
],
60616104
status: 'Active',
6062-
"region": "Y61"
6105+
"region": "Y62"
60636106
},
60646107
{
60656108
id: 'FA02S',
@@ -6070,9 +6113,15 @@ module.exports = [
60706113
postcode: 'KT15 2AD'
60716114
},
60726115
type: 'Community Pharmacy',
6073-
status: 'Applied',
6074-
region: "Y61",
6116+
status: 'Active',
6117+
region: "Y62",
60756118
appliedOn: "2015-04-12",
6119+
vaccines: [
6120+
{name: "RSV", status: "disabled"},
6121+
{name: "COVID-19", status: "enabled"},
6122+
{name: "pertussis", status: "requested"},
6123+
{name: "flu", status: "enabled"}
6124+
],
60766125
application: {
60776126
firstName: "Francis",
60786127
lastName: "Blue",
@@ -6090,7 +6139,7 @@ module.exports = [
60906139
},
60916140
type: 'Community Pharmacy',
60926141
status: 'Applied',
6093-
region: "Y61",
6142+
region: "Y62",
60946143
appliedOn: "2015-04-15",
60956144
application: {
60966145
firstName: "James",
@@ -6108,9 +6157,15 @@ module.exports = [
61086157
postcode: 'B63 8PX'
61096158
},
61106159
type: 'Community Pharmacy',
6111-
status: 'Applied',
6112-
region: "Y61",
6160+
status: 'Active',
6161+
region: "Y62",
61136162
appliedOn: "2015-04-13",
6163+
vaccines: [
6164+
{name: "RSV", status: "disabled"},
6165+
{name: "COVID-19", status: "requested"},
6166+
{name: "pertussis", status: "disabled"},
6167+
{name: "flu", status: "enabled"}
6168+
],
61146169
application: {
61156170
firstName: "Jason",
61166171
lastName: "Green",
@@ -6128,7 +6183,7 @@ module.exports = [
61286183
},
61296184
type: 'Community Pharmacy',
61306185
status: 'Applied',
6131-
region: "Y61",
6186+
region: "Y62",
61326187
appliedOn: "2015-04-02",
61336188
application: {
61346189
firstName: "Elizabeth",

app/data/regions.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,27 @@ module.exports = [
4242
"line1": "c/o nhs england",
4343
"town": "leeds",
4444
"postcode": "LS2 7UA"
45-
}
45+
},
46+
inbox: [
47+
{
48+
id: "HKFFU48574",
49+
fromOrganisationId: "FA424",
50+
vaccinesRequested: ["flu"],
51+
sentOn: "2025-06-22"
52+
},
53+
{
54+
id: "PFU47263463",
55+
fromOrganisationId: "FA02S",
56+
vaccinesRequested: ["pertussis", "RSV"],
57+
sentOn: "2025-06-24"
58+
},
59+
{
60+
id: "OFU536369FUF",
61+
fromOrganisationId: "PDL93",
62+
vaccinesRequested: ["COVID-19"],
63+
sentOn: "2025-06-25"
64+
}
65+
]
4666
},
4767
{
4868
"id": "Y59",

app/data/session-data-defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = {
1616
nhsNumberKnown: "yes",
1717
currentUserId: "2387441662601",
1818
currentOrganisationId: "RW3",
19+
currentRegionId: "Y62",
1920
vaccinationsRecorded: [
2021
{
2122
id: "ABC123",

app/data/vaccines.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = [
1717
]
1818
},
1919
{
20-
name: "Flu",
20+
name: "flu",
2121
products: [
2222
{
2323
name: "Adjuvanted Quadrivalent Influenza Vaccine (aQIV)"
@@ -40,7 +40,7 @@ module.exports = [
4040
]
4141
},
4242
{
43-
name: "Pertussis",
43+
name: "pertussis",
4444
products: [
4545
{
4646
name: "Adacel vaccine supsension"

app/filters.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ module.exports = function (env) { /* eslint-disable-line no-unused-vars */
3131
return dateFormatter.format(date)
3232
}
3333

34+
filters.pluck = function(array, attribute) {
35+
return array.map((item) => item[attribute])
36+
}
37+
38+
filters.capitaliseFirstLetter = function(string) {
39+
return string.charAt(0) .toUpperCase() + string.slice(1)
40+
}
41+
3442
/* ------------------------------------------------------------------
3543
add your methods to the filters obj below this comment block:
3644
@example:

app/locals.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module.exports = (config) => (req, res, next) => {
77
// Set currentUser for convenience
88
res.locals.currentOrganisation = req.session.data.organisations.find((organisation) => organisation.id === req.session.data.currentOrganisationId);
99

10+
// set current logged in region
11+
res.locals.currentRegion = req.session.data.regions.find((region) => region.id === req.session.data.currentRegionId);
1012

1113
next();
1214
};

0 commit comments

Comments
 (0)