Skip to content

Commit 960f95b

Browse files
Changed 'clinician' to 'vaccinator' (#380)
We’ve decided to change the "Clinician" permission boolean, which controls whether that user can be selected as the vaccinator, to "Vaccinator". This is because in some settings, those who are not registered clinicians can give vaccinators, such as healthcare assistants. --------- Co-authored-by: Frankie Roberto <[email protected]>
1 parent 193d66c commit 960f95b

File tree

18 files changed

+1031
-1031
lines changed

18 files changed

+1031
-1031
lines changed

app/data/users.js

Lines changed: 973 additions & 973 deletions
Large diffs are not rendered by default.

app/routes/record-vaccinations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ module.exports = router => {
105105

106106
const userOrgnisationSetting = (user.organisations || []).find((organisation) => organisation.id === data.currentOrganisationId)
107107

108-
return (user.id != data.currentUserId) && userOrgnisationSetting && userOrgnisationSetting.clinician && (userOrgnisationSetting.status === "Active")
108+
return (user.id != data.currentUserId) && userOrgnisationSetting && userOrgnisationSetting.vaccinator && (userOrgnisationSetting.status === "Active")
109109
})
110110
.sort((a, b) => {
111111
const nameA = a.firstName.toUpperCase(); // ignore upper and lowercase

app/routes/regions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ module.exports = router => {
231231
id: organisation.id,
232232
status: 'Invited',
233233
permissionLevel: 'Lead administrator',
234-
clinician: false
234+
vaccinator: false
235235
}
236236
]
237237
})

app/routes/support.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const userId = Math.floor(Math.random() * 10000000).toString()
145145
id: id,
146146
permissionLevel: req.body.permissionLevel,
147147
status: "Active",
148-
clinician: (req.body.clinician === "yes")
148+
vaccinator: (req.body.vaccinator === "yes")
149149
}
150150
]
151151
})
@@ -233,7 +233,7 @@ const userId = Math.floor(Math.random() * 10000000).toString()
233233
const organisation = data.organisations.find((organisation) => organisation.id === organisationId)
234234
const userOrganisationSettings = user.organisations.find((organisation) => organisation.id === organisationId)
235235

236-
userOrganisationSettings.clinician = (req.body.clinician === "yes")
236+
userOrganisationSettings.vaccinator = (req.body.vaccinator === "yes")
237237
userOrganisationSettings.status = req.body.status
238238
userOrganisationSettings.permissionLevel = req.body.permissionLevel
239239

app/routes/user-admin.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,14 @@ module.exports = (router) => {
155155
const { lastName } = req.session.data
156156
const { email } = req.session.data
157157
const { permissionLevel } = req.session.data
158-
const { clinician } = req.session.data
158+
const { vaccinator } = req.session.data
159159

160160
let existingUserWithSameEmail = false
161161
if (email) {
162162
existingUserWithSameEmail = data.users.find((user) => user.email === email)
163163
}
164164

165-
let firstNameError, lastNameError, emailError, permissionLevelError, clinicianError
165+
let firstNameError, lastNameError, emailError, permissionLevelError, vaccinatorError
166166

167167
if (!firstName || firstName === '') {
168168
firstNameError = 'Enter a first name'
@@ -184,17 +184,17 @@ module.exports = (router) => {
184184
permissionLevelError = 'Select a permission level'
185185
}
186186

187-
if (!clinician || clinician === '') {
188-
clinicianError = 'Select if they’re a clinician'
187+
if (!vaccinator || vaccinator === '') {
188+
vaccinatorError = 'Select if they’re a vaccinator'
189189
}
190190

191-
if (firstNameError || lastNameError || emailError || permissionLevelError || clinicianError) {
191+
if (firstNameError || lastNameError || emailError || permissionLevelError || vaccinatorError) {
192192
res.render('user-admin/add-user', {
193193
firstNameError,
194194
lastNameError,
195195
emailError,
196196
permissionLevelError,
197-
clinicianError
197+
vaccinatorError
198198
})
199199
} else {
200200
res.redirect('/user-admin/check')
@@ -205,7 +205,7 @@ module.exports = (router) => {
205205
router.post('/user-admin/add', (req, res) => {
206206

207207
const data = req.session.data
208-
const {firstName, lastName, email, permissionLevel, clinician} = data
208+
const {firstName, lastName, email, permissionLevel, vaccinator} = data
209209

210210
const existingUserWithSameEmail = data.users.find((user) => user.email === email)
211211

@@ -216,7 +216,7 @@ module.exports = (router) => {
216216
existingUserWithSameEmail.organisations.push({
217217
id: data.currentOrganisationId,
218218
status: 'Invited',
219-
clinician: (data.clinician === 'yes'),
219+
vaccinator: (data.vaccinator === 'yes'),
220220
permissionLevel: data.permissionLevel
221221
})
222222

@@ -230,7 +230,7 @@ module.exports = (router) => {
230230
{
231231
id: data.currentOrganisationId,
232232
status: 'Invited',
233-
clinician: (data.clinician === 'yes'),
233+
vaccinator: (data.vaccinator === 'yes'),
234234
permissionLevel: data.permissionLevel
235235
}
236236
]
@@ -242,13 +242,13 @@ module.exports = (router) => {
242242
req.session.data.firstName = ''
243243
req.session.data.lastName = ''
244244
req.session.data.permissionLevel = ''
245-
req.session.data.clinician = ''
245+
req.session.data.vaccinator = ''
246246
req.session.data.showErrors = ''
247247

248248
res.redirect('/user-admin')
249249
})
250250

251-
// Editing a user’s permission level and clinician status
251+
// Editing a user’s permission level and vaccinator status
252252
router.get('/user-admin/users/:id/change-role', (req, res) => {
253253
const { id } = req.params
254254
const data = req.session.data
@@ -264,7 +264,7 @@ module.exports = (router) => {
264264
})
265265
})
266266

267-
// Updating a user’s permission level and clinician status
267+
// Updating a user’s permission level and vaccinator status
268268
router.post('/user-admin/users/:id/update', (req, res) => {
269269
const { id } = req.params
270270

@@ -273,11 +273,11 @@ module.exports = (router) => {
273273
const organisationSetting = user.organisations.find((organisation) => organisation.id === req.session.data.currentOrganisationId)
274274

275275
organisationSetting.permissionLevel = req.body.permissionLevel
276-
organisationSetting.clinician = (req.body.clinician === 'yes')
276+
organisationSetting.vaccinator = (req.body.vaccinator === 'yes')
277277

278278
// Reset session data
279279
req.session.data.permissionLevel = ''
280-
req.session.data.clinician = ''
280+
req.session.data.vaccinator = ''
281281

282282
res.redirect('/user-admin')
283283
})

app/views/record-vaccinations/vaccinator.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
{% set items = [] %}
3838

39-
{% if organisationSetting.clinician %}
39+
{% if organisationSetting.vaccinator %}
4040
{% set items = (items.push({
4141
value: data.currentUserId,
4242
text: "Me (" + currentUser.firstName + " " + currentUser.lastName + ")"
@@ -61,7 +61,7 @@
6161
}
6262
},
6363
xhint: {
64-
text: "Only users with clinician status are listed"
64+
text: "Only users with vaccinator status are listed"
6565
},
6666
errorMessage: {
6767
text: vaccinatorError

app/views/regions/_email-preview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h2 class="nhsuk-heading-s">3. Get ready to record vaccinations</h2>
1717
<ul class="nhsuk-list nhsuk-list--bullet">
1818
<li>go to the ‘Vaccines’ section and add vaccines for your organisation</li>
1919
<li>go to ‘Manage users’ to add more users to your organisation</li>
20-
<li>if you are a clinician, go to your profile in ‘Manage users’ and select that you are a clinician</li></ul>
20+
<li>if you can give vaccinations, go to your profile in ‘Manage users’ and select that you are a vaccinator</li></ul>
2121
<p>Kind regards,</p>
2222
<p>NHS Record a vaccination</p>
2323

app/views/reports/choose-data.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
text: "Staff",
5454
checked: (data.data | arrayOrStringIncludes("Staff")),
5555
hint: {
56-
text: "Recorder, vaccinator, assessing and consenting clinician names and email addresses"
56+
text: "Recorder or vaccinator names and email addresses"
5757
}
5858
},
5959
{

app/views/support/organisations/add-user.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ <h1 class="nhsuk-header-l">Add user</h1>
5656
}) }}
5757

5858
{{ radios({
59-
name: "clinician",
59+
name: "vaccinator",
6060
fieldset: {
6161
legend: {
62-
text: "Are they a registered clinician?"
62+
text: "Are they a vaccinator?"
6363
}
6464
},
6565
hint: {
66-
text: "Only registered clinicians can assess the patient and record their consent"
66+
text: "Vaccination records include the name of the person who gave the vaccination"
6767
},
6868
"items": [
6969
{
7070
value: "yes",
7171
text: "Yes",
72-
id: "clinician"
72+
id: "vaccinator"
7373
},
7474
{
7575
value: "no",

app/views/support/organisations/show.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h2 class="nhsuk-heading-m">Users</h2>
157157
Permission level
158158
</th>
159159
<th role="columnheader" class="" scope="col">
160-
Clinician
160+
Vaccinator
161161
</th>
162162
<th role="columnheader" class="" scope="col">
163163
Status
@@ -178,7 +178,7 @@ <h2 class="nhsuk-heading-m">Users</h2>
178178
{{ userOrganisationSettings.permissionLevel }}
179179
</td>
180180
<td class="nhsuk-table__cell " style="min-width: 150px;">
181-
{{ "Yes" if userOrganisationSettings.clinician else "No" }}
181+
{{ "Yes" if userOrganisationSettings.vaccinator else "No" }}
182182
</td>
183183
<td class="nhsuk-table__cell ">
184184
{{ userOrganisationSettings.status }}

0 commit comments

Comments
 (0)