Skip to content

Commit c96e7f3

Browse files
committed
Show dose classification on individual vaccination record page
1 parent 946073c commit c96e7f3

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

app/locales/en.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3116,6 +3116,9 @@ export const en = {
31163116
countryOther: {
31173117
title: 'Which country was the vaccination given in?'
31183118
},
3119+
schedule: {
3120+
label: 'Schedule'
3121+
},
31193122
outcome: {
31203123
label: 'Outcome',
31213124
title: 'Vaccination outcome',

app/views/vaccination/show.njk

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,31 @@
2828
title: title
2929
}) }}
3030

31+
{% set patientProgramme = vaccination.patient.programmes[vaccination.programme_id] %}
32+
{% set summary = patientProgramme.scheduleSummary %}
33+
{% set scheduleValue %}
34+
{% set found = false %}
35+
{% for valid in summary.validDoses %}
36+
{% if valid.vaccination.uuid == vaccination.uuid %}
37+
{% set found = true %}
38+
{{ __mf("patientProgramme.vaccinationRecord.dose.number", { sequence: valid.sequence }) }}
39+
{% endif %}
40+
{% endfor %}
41+
{% for ignored in summary.ignoredDoses %}
42+
{% if ignored.vaccination.uuid == vaccination.uuid %}
43+
{% set found = true %}
44+
<span>
45+
{{- tag({
46+
text: __("patientProgramme.vaccinationRecord.ignored.label"),
47+
classes: "nhsuk-tag--grey"
48+
}) -}}
49+
<br>
50+
<span class="nhsuk-u-secondary-text-colour nhsuk-u-font-size-16">{{ ignored.reason }}</span>
51+
</span>
52+
{% endif %}
53+
{% endfor %}
54+
{% endset %}
55+
3156
{{ summaryList({
3257
card: {
3358
heading: __("vaccination.show.summary"),
@@ -43,6 +68,7 @@
4368
},
4469
rows: summaryRows(vaccination, {
4570
programme: {},
71+
schedule: { value: scheduleValue | trim, label: __("patientProgramme.vaccinationRecord.dose.label") },
4672
outcome: {},
4773
vaccine_snomed: {},
4874
method: {},

0 commit comments

Comments
 (0)