Skip to content

Commit 17ecb0d

Browse files
Merge pull request #28 from NHSDigital/jan-updates
Adds confirmation page when taking mammograms Renames service to Manage breast screening Reworks clinic list to include date of birth and age, and tweaks design Adds participant views Adds participant list Adds minimal searching for participants Refactors main event page Adds page before imaging Misc refactoring
2 parents 2b63e86 + 8dbddd3 commit 17ecb0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2052
-690
lines changed

app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ nunjucksAppEnv.addGlobal('version', packageInfo.version);
7373
// Add Nunjucks filters
7474
utils.addNunjucksFilters(nunjucksAppEnv);
7575

76+
// Add Nunjucks functions
77+
utils.addNunjucksFunctions(nunjucksAppEnv);
78+
7679
// Session uses service name to avoid clashes with other prototypes
7780
const sessionName = `nhsuk-prototype-kit-${(Buffer.from(config.serviceName, 'utf8')).toString('hex')}`;
7881
const sessionOptions = {

app/assets/sass/_misc.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,15 @@
88
margin-left: 5px;
99
}
1010
}
11+
12+
13+
.app-suppress-link-styles * {
14+
text-decoration: none;
15+
color: $nhsuk-secondary-text-color;
16+
}
17+
18+
19+
.app-image-flip-horizontal {
20+
-webkit-transform: scaleX(-1);
21+
transform: scaleX(-1);
22+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
// Reduce the large default margins the component comes with
4+
.nhsuk-inset-text {
5+
@include nhsuk-responsive-margin(3, "top");
6+
@include nhsuk-responsive-margin(4, "bottom");
7+
}
8+
9+
p:has(+ .nhsuk-inset-text) {
10+
margin-bottom: 0;
11+
}

app/assets/sass/main.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
@import 'components/header-organisation';
99
@import 'components/secondary-navigation';
1010
@import 'components/count';
11+
@import 'components/overrides';
12+
13+
@import 'pages/events';
1114

1215
@import 'misc';
1316

app/assets/sass/pages/_events.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.app-event-header {
2+
position: relative;
3+
}
4+
5+
.app-event-status {
6+
position: absolute;
7+
top: 10px;
8+
right: 0px;
9+
}
10+

app/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require('path')
55

66
module.exports = {
77
// Service name
8-
serviceName: 'Manage screening events',
8+
serviceName: 'Manage breast screening',
99

1010
// Port to run nodemon on locally
1111
port: 2000,

app/data/breast-screening-units.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ module.exports = [
1515
phoneNumber: '01865235621',
1616
abbreviation: 'WSB',
1717
clinicTypes: ['screening', 'assessment'], // Can do both
18+
riskLevelHandling: [
19+
'routine',
20+
'moderate',
21+
],
1822
// Default operating hours for the BSU
1923
sessionPatterns: [
2024
// {
@@ -39,6 +43,11 @@ module.exports = [
3943
name: 'West Sussex BSS',
4044
type: 'hospital',
4145
isMainSite: true,
46+
// Main sites can handle all supported risk levels
47+
riskLevelHandling: [
48+
'routine',
49+
'moderate',
50+
],
4251
address: {
4352
line1: 'Breast Screening Unit',
4453
line2: 'Worthing Hospital',
@@ -66,6 +75,10 @@ module.exports = [
6675
type: 'mobile_unit',
6776
isMainSite: false,
6877
clinicTypes: ['screening'], // Can only do screening
78+
// Mobile units only handle routine screening
79+
riskLevelHandling: [
80+
'routine',
81+
],
6982
registration: 'JA1 CP7',
7083
// Override BSU session patterns for this location
7184
sessionPatterns: [
@@ -84,6 +97,10 @@ module.exports = [
8497
type: 'mobile_unit',
8598
isMainSite: false,
8699
clinicTypes: ['screening'], // Can only do screening
100+
// Mobile units only handle routine screening
101+
riskLevelHandling: [
102+
'routine',
103+
],
87104
registration: 'WX71 HCR',
88105
// Override BSU session patterns for this location
89106
sessionPatterns: [
@@ -102,6 +119,10 @@ module.exports = [
102119
// type: "mobile_unit",
103120
// isMainSite: false,
104121
// clinicTypes: ['screening'], // Can only do screening
122+
// // Mobile units only handle routine screening
123+
// riskLevelHandling: [
124+
// 'routine',
125+
// ],
105126
// registration: "CD1 5HR",
106127
// // Override BSU session patterns for this location
107128
// sessionPatterns: [

app/data/risk-levels.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// app/data/risk-levels.js
2+
3+
module.exports = {
4+
5+
routine: {
6+
weight: 0.7,
7+
frequency: 36, // months
8+
ageRange: {
9+
upper: 70,
10+
lower: 50
11+
}
12+
},
13+
moderate: {
14+
weight: 0.25,
15+
frequency: 12, // months
16+
ageRange: {
17+
upper: 50,
18+
lower: 40
19+
}
20+
},
21+
high: {
22+
weight: 0.05,
23+
frequency: 12, // months
24+
ageRange: {
25+
upper: 70,
26+
lower: 50
27+
}
28+
},
29+
// veryHigh: {
30+
// frequency: 12, // months
31+
// ageRange: {
32+
// upper: 40,
33+
// }
34+
// }
35+
}

app/data/test-scenarios.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ module.exports = [
1616
middleName: null,
1717
lastName: 'Williams',
1818
dateOfBirth: '1959-07-22',
19+
ethnicGroup: null,
20+
ethnicBackground: null,
1921
},
2022
extraNeeds: ['Wheelchair user'],
23+
defaultRiskLevel: 'routine',
2124
},
2225
scheduling: {
2326
whenRelativeToToday: 0,
24-
status: 'scheduled',
27+
status: 'event_scheduled',
2528
approximateTime: '10:30',
2629
},
2730
},
@@ -33,12 +36,15 @@ module.exports = [
3336
lastName: 'McIntosh',
3437
middleName: 'Rose',
3538
dateOfBirth: '1964-03-15',
39+
ethnicGroup: null,
40+
ethnicBackground: null,
3641
},
3742
extraNeeds: null,
43+
defaultRiskLevel: 'routine',
3844
},
3945
scheduling: {
4046
whenRelativeToToday: 0,
41-
status: 'checked_in',
47+
status: 'event_checked_in',
4248
approximateTime: '11:30',
4349
// slotIndex: 20,
4450
},

0 commit comments

Comments
 (0)