Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 1 addition & 4 deletions app/controllers/school.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ export const schoolController = {
},

readAll(request, response, next) {
// Combine children with no known school with home-schooled children)
response.locals.schools = School.findAll(request.session.data).filter(
(school) => school.id !== '888888'
)
response.locals.schools = School.findAll(request.session.data)

next()
},
Expand Down
2 changes: 1 addition & 1 deletion app/datasets/schools.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
'999999': {
id: '999999',
urn: '999999',
name: 'Home-schooled',
name: 'Home-educated',
yearGroups: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
team_id: '001',
presetNames
Expand Down
2 changes: 1 addition & 1 deletion app/generators/child.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export function generateChild() {
school_id = faker.helpers.arrayElement(secondarySchools).id
}

// Add examples of children who are home-schooled or at an unknown school
// Add examples of children who are home-educated or at an unknown school
if (faker.datatype.boolean(0.01)) {
school_id = faker.helpers.arrayElement(['888888', '999999'])
}
Expand Down
4 changes: 2 additions & 2 deletions app/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ export const en = {
yes: 'Yes, they go to this school',
no: 'No, they go to a different school'
},
'home-schooled': {
title: 'Is your child home-schooled?',
'home-educated': {
title: 'Is your child home-educated?',
yes: 'Yes',
no: 'No, they go to a school'
},
Expand Down
2 changes: 1 addition & 1 deletion app/models/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class Download {
case this.type === DownloadType.Session && this.session_id:
return `Offline spreadsheet for ${this.session.name}`
case this.type === DownloadType.Session:
return `Offline spreadsheet for no known school (including home-schooled children)`
return `Offline spreadsheet for no known school (including home-educated children)`
default:
return 'Download'
}
Expand Down
11 changes: 0 additions & 11 deletions app/models/school.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export class School extends Location {
this.phase = options?.phase
this.yearGroups = options?.yearGroups || []
this.homeOrUnknown = ['888888', '999999'].includes(this.urn)

if (this.homeOrUnknown) {
this.name = 'No known school (including home-schooled children)'
}
}

/**
Expand Down Expand Up @@ -67,13 +63,6 @@ export class School extends Location {
*/
get patients() {
if (this.context?.patients && this.id) {
// Combine children with no known school with home-schooled children)
if (this.homeOrUnknown) {
return Object.values(this.context?.patients)
.filter(({ school_id }) => ['888888', '999999'].includes(school_id))
.map((patient) => new Patient(patient, this.context))
}

return Object.values(this.context?.patients)
.filter(({ school_id }) => school_id === this.id)
.map((patient) => new Patient(patient, this.context))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "_layouts/form.njk" %}

{% set title = __("consent.child.home-schooled.title") %}
{% set title = __("consent.child.home-educated.title") %}

{% block form %}
{{ radios({
Expand All @@ -13,12 +13,12 @@
}
},
items: [{
text: __("consent.child.home-schooled.yes"),
text: __("consent.child.home-educated.yes"),
value: "yes"
}, {
text: __("consent.child.home-schooled.no"),
text: __("consent.child.home-educated.no"),
value: "no"
}],
decorate: "consent.child.homeSchooled"
decorate: "consent.child.homeEducated"
}) }}
{% endblock %}
2 changes: 1 addition & 1 deletion app/views/upload/_template-format-cohort.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Make sure the CSV you upload uses the following columns:
| `CHILD_LAST_NAME` | **Required** |
| `CHILD_DATE_OF_BIRTH` | **Required** |
| `CHILD_GENDER` | **Required**, must be <i>Male</i>, <i>Female</i>, <i>Not known</i> or <i>Not specified</i> |
| `CHILD_SCHOOL_URN` | **Required**, must be 6 digits and numeric. Use <i>888888</i> for school unknown and <i>999999</i> for homeschooled. |
| `CHILD_SCHOOL_URN` | **Required**, must be 6 digits and numeric. Use <i>888888</i> for school unknown and <i>999999</i> for home-educated. |
| `CHILD_NHS_NUMBER` | Optional, must be 10 digits and numeric |
| `CHILD_ADDRESS_LINE_1` | Optional |
| `CHILD_ADDRESS_LINE_2` | Optional |
Expand Down
2 changes: 1 addition & 1 deletion app/views/upload/_template-format-report.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Make sure the CSV you upload uses the following columns:
| Column name | Notes |
| ----------- | ----- |
| `ORGANISATION_CODE` | **Required**, must be a valid [ODS code](https://odsportal.digital.nhs.uk/) |
| `school_id` | **Required**, must be 6 digits and numeric. Use <i>888888</i> for school unknown and <i>999999</i> for homeschooled. |
| `school_id` | **Required**, must be 6 digits and numeric. Use <i>888888</i> for school unknown and <i>999999</i> for home-educated. |
| `SCHOOL_NAME` | Required if `school_id` is <i>888888</i> |
| `NHS_NUMBER` | Optional, must be 10 digits and numeric |
| `PERSON_FORENAME` | **Required** |
Expand Down
2 changes: 1 addition & 1 deletion lib/create-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ for (let session of Object.values(context.sessions)) {
// Add patient to session
patient.addToSession(patientSession.session)

// 2️⃣🅱️ INVITE home-schooled/school unknown patient to clinic
// 2️⃣🅱️ INVITE home-educated/school unknown patient to clinic
patient.requestConsent(patientSession)

context.patientSessions[patientSession.uuid] = patientSession
Expand Down