Skip to content

Commit f649202

Browse files
Show vaccination recording source
1 parent 7b7d9f1 commit f649202

5 files changed

Lines changed: 24 additions & 1 deletion

File tree

app/enums.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,17 @@ export const VaccinationProtocol = {
707707
National: 'National protocol'
708708
}
709709

710+
/**
711+
* @readonly
712+
* @enum {string}
713+
*/
714+
export const VaccinationSource = {
715+
Service: 'Recorded in Mavis',
716+
HistoricalUpload: 'Uploaded as a historical vaccination',
717+
NhsImmunisationsApi: 'External source such as GP practice',
718+
ConsentRefusal: 'Parent reported already vaccinated'
719+
}
720+
710721
/**
711722
* @readonly
712723
* @enum {string}

app/locales/en.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,6 +2583,9 @@ export const en = {
25832583
label: 'Site',
25842584
title: 'Which injection site was used?'
25852585
},
2586+
source: {
2587+
label: 'Source'
2588+
},
25862589
ttcv: {
25872590
label: 'Dose'
25882591
},

app/models/vaccination.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
VaccinationOutcome,
1212
VaccinationProtocol,
1313
VaccinationSite,
14+
VaccinationSource,
1415
VaccinationSyncStatus,
1516
VaccineCriteria
1617
} from '../enums.js'
@@ -71,6 +72,7 @@ import {
7172
* @property {VaccinationOutcome} [outcome] - Outcome
7273
* @property {VaccinationMethod} [injectionMethod] - Injection method
7374
* @property {VaccinationSite} [injectionSite] - Injection site on body
75+
* @property {VaccinationSource} [source] - Vaccination reporting source
7476
* @property {number} [dose] - Dosage (ml)
7577
* @property {string} [sequence] - Dose sequence
7678
* @property {string} [protocol] - Protocol
@@ -112,6 +114,7 @@ export class Vaccination {
112114
].includes(this.outcome)
113115
this.injectionMethod = options?.injectionMethod
114116
this.injectionSite = options?.injectionSite
117+
this.source = options?.source || VaccinationSource.Service
115118
this.dose = this.given ? options?.dose || '' : undefined
116119
this.sequence = options?.sequence
117120
this.protocol = this.given

app/views/patient/programme.njk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
{
5050
header: __("vaccination.programme.label"),
5151
html: vaccination.formatted.programmeWithSequence
52+
},
53+
{
54+
header: __("vaccination.source.label"),
55+
text: vaccination.source
5256
}
5357
]) %}
5458
{% endfor %}
@@ -59,7 +63,8 @@
5963
head: [
6064
{ text: __("vaccination.createdAt.label") },
6165
{ text: __("vaccination.age.label") },
62-
{ text: __("vaccination.programme.label") }
66+
{ text: __("vaccination.programme.label") },
67+
{ text: __("vaccination.source.label") }
6368
],
6469
rows: vaccinationRows
6570
}) }}

app/views/vaccination/show.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
location: {},
5959
protocol: {},
6060
note: {},
61+
source: {},
6162
syncStatus: {}
6263
})
6364
}) }}

0 commit comments

Comments
 (0)