Skip to content

Commit a8a7dff

Browse files
Add 'pack size' to vaccine management (#207)
Some vaccines, for example Spikevax JN.1, come in multiple pack sizes (or possibly types), and for pharmacies and potentially other organisations, we might need to report which pack size was used when making payment claims. In the prototype this only works for Spikevax JN.1 for now. 🗂️ [Jira card](https://nhsd-jira.digital.nhs.uk/browse/RAVS-1616) It would affect multiple screens: ## Screenshots | Before | After | |--------|-------| | ![add-batch-before](https://github.com/user-attachments/assets/176f9349-dacb-40d9-9cda-a24b1e068ba5) | ![record-a-vac-add-pack-t-1ix8pt herokuapp com_vaccines_123456_add](https://github.com/user-attachments/assets/1e2539c0-5c01-413c-8bb2-4da5d3a01fb7) | | ![check-before](https://github.com/user-attachments/assets/f09960d9-e1c7-4723-a22e-3673b3f3678c) | ![record-a-vac-add-pack-t-1ix8pt herokuapp com_vaccines_123456_add-batch-check](https://github.com/user-attachments/assets/0d06ea8c-a69b-4957-b691-11ff3485f109) | | ![list-before](https://github.com/user-attachments/assets/d340c307-c6f2-47f9-8458-ef82c6bb999e) | ![record-a-vac-add-pack-t-1ix8pt herokuapp com_vaccines_123456](https://github.com/user-attachments/assets/4c1d3869-6d78-4eb0-b98b-254a6be0074b) | | ![edit-before](https://github.com/user-attachments/assets/d4ed5446-e2de-45df-8ed4-ba5bfa26ec68) | ![record-a-vac-add-pack-t-1ix8pt herokuapp com_vaccines_123456_3634747](https://github.com/user-attachments/assets/93adfbab-2437-4ad0-b2d0-ace15adb6ea4) |
1 parent 8f903d3 commit a8a7dff

File tree

9 files changed

+133
-26
lines changed

9 files changed

+133
-26
lines changed

app/data/session-data-defaults.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,20 @@ module.exports = {
8282
{
8383
id: "123456",
8484
vaccine: "COVID-19",
85-
vaccineProduct: "Comirnaty Original/Omicron BA.4-5",
85+
vaccineProduct: "Spikevax JN.1",
8686
siteCode: "RWX37",
8787
batches: [
8888
{
8989
id: "2208294",
9090
batchNumber: "3634747",
91-
expiryDate: "2024-12-17"
91+
expiryDate: "2025-12-17",
92+
packType: "Single vial"
9293
},
9394
{
9495
id: "457554",
9596
batchNumber: "7473857",
96-
expiryDate: "2025-01-02"
97+
expiryDate: "2025-01-02",
98+
packType: "10 vials"
9799
}
98100
]
99101
},

app/routes/vaccines.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ module.exports = (router) => {
1818
{
1919
id: Math.floor(Math.random() * 10000000).toString(),
2020
batchNumber: data.batchNumber,
21-
expiryDate: expiryDate
21+
expiryDate: expiryDate,
22+
packType: data.packType
2223
}
2324
]
2425
})
2526

2627
// Reset data
2728
req.session.data.vaccine = ''
2829
req.session.data.vaccineProduct = ''
30+
req.session.data.packType = ''
2931
req.session.data.siteCode = ''
3032
req.session.data.batchNumber = ''
3133
req.session.data.batchExpiryDate.day = ''
@@ -73,7 +75,8 @@ module.exports = (router) => {
7375
vaccine.batches.push({
7476
id: generatedId,
7577
batchNumber: data.batchNumber,
76-
expiryDate: expiryDate
78+
expiryDate: expiryDate,
79+
packType: data.packType
7780
})
7881

7982
// Reset data

app/views/vaccines/add-batch-to-site-check.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,15 @@ <h1 class="nhsuk-heading-xl">Check and confirm</h1>
6969
value: {
7070
html: vaccine.vaccineProduct
7171
}
72-
}
72+
},
73+
{
74+
key: {
75+
text: "Pack size"
76+
},
77+
value: {
78+
html: data.packType
79+
}
80+
} if data.packType
7381
]
7482
}) }}
7583

app/views/vaccines/add-batch-to-site.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,33 @@ <h1 class="nhsuks-heading-xl">Add batch</h1>
4848
values: data.batchExpiryDate
4949
}) }}
5050

51+
{% if vaccine.vaccineProduct == "Spikevax JN.1" %}
52+
53+
{{ radios({
54+
"idPrefix": "pack-type",
55+
"name": "packType",
56+
"fieldset": {
57+
"legend": {
58+
"text": "Pack size",
59+
classes: "nhsuk-fieldset__legend--s"
60+
}
61+
},
62+
"items": [
63+
{
64+
"value": "Single vial",
65+
"text": "Single vial",
66+
checked: (data.packType == "Single vial")
67+
},
68+
{
69+
"value": "10 vials",
70+
"text": "10 vials",
71+
checked: (data.packType == "10 vials")
72+
}
73+
]
74+
}) }}
75+
76+
{% endif %}
77+
5178
{{ button({
5279
"text": "Continue"
5380
}) }}

app/views/vaccines/add-batch.html

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="nhsuk-grid-row">
1818
<div class="nhsuk-grid-column-two-thirds">
1919

20-
<h1 class="nhsuks-heading-xl">Add batch</h1>
20+
<h1 class="nhsuk-heading-l">Add batch</h1>
2121

2222
<form action="/vaccines/check" method="post" novalidate="true">
2323

@@ -48,6 +48,33 @@ <h1 class="nhsuks-heading-xl">Add batch</h1>
4848
values: data.batchExpiryDate
4949
}) }}
5050

51+
{% if data.vaccineProduct == "Spikevax JN.1" %}
52+
53+
{{ radios({
54+
"idPrefix": "pack-type",
55+
"name": "packType",
56+
"fieldset": {
57+
"legend": {
58+
"text": "Pack size",
59+
classes: "nhsuk-fieldset__legend--s"
60+
}
61+
},
62+
"items": [
63+
{
64+
"value": "Single vial",
65+
"text": "Single vial",
66+
checked: (data.packType == "Single vial")
67+
},
68+
{
69+
"value": "10 vials",
70+
"text": "10 vials",
71+
checked: (data.packType == "10 vials")
72+
}
73+
]
74+
}) }}
75+
76+
{% endif %}
77+
5178
{{ button({
5279
"text": "Continue"
5380
}) }}

app/views/vaccines/check.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,15 @@ <h1 class="nhsuk-heading-xl">Check and confirm</h1>
6565
value: {
6666
html: data["vaccineProduct"]
6767
}
68-
}
68+
},
69+
{
70+
key: {
71+
text: "Pack size"
72+
},
73+
value: {
74+
html: data.packType
75+
}
76+
} if data.packType
6977
]
7078
}) }}
7179

app/views/vaccines/choose-vaccine.html

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,24 @@
3232
},
3333
"items": [
3434
{
35-
"value": "Comirnaty Original/Omicron BA.4-5",
36-
"text": "Comirnaty Original/Omicron BA.4-5",
37-
checked: (data.vaccineProduct == "Comirnaty Original/Omicron BA.4-5")
35+
"value": "Comirnaty 30 JN.1",
36+
"text": "Comirnaty 30 JN.1",
37+
checked: (data.vaccineProduct == "Comirnaty 30 JN.1")
3838
},
3939
{
40-
"value": "Comirnaty 30 Omicron XBB.1.5",
41-
"text": "Comirnaty 30 Omicron XBB.1.5",
42-
checked: (data.vaccineProduct == "Comirnaty 30 Omicron XBB.1.5")
40+
"value": "Comirnaty 10 JN.1",
41+
"text": "Comirnaty 10 JN.1",
42+
checked: (data.vaccineProduct == "Comirnaty 10 JN.1")
4343
},
4444
{
45-
"value": "Comirnaty 3 Omicron XBB.1.5",
46-
"text": "Comirnaty 3 Omicron XBB.1.5",
47-
checked: (data.vaccineProduct == "Comirnaty 3 Omicron XBB.1.5")
45+
"value": "Comirnaty 3 JN.1",
46+
"text": "Comirnaty 3 JN.1",
47+
checked: (data.vaccineProduct == "Comirnaty 3 JN.1")
4848
},
4949
{
50-
"value": "Comirnaty 10 Omicron XBB.1.5",
51-
"text": "Comirnaty 10 Omicron XBB.1.5",
52-
checked: (data.vaccineProduct == "Comirnaty 10 Omicron XBB.1.5")
53-
},
54-
{
55-
"value": "Spikevax XBB.1.5",
56-
"text": "Spikevax XBB.1.5",
57-
checked: (data.vaccineProduct == "Spikevax XBB.1.5")
50+
"value": "Spikevax JN.1",
51+
"text": "Spikevax JN.1",
52+
checked: (data.vaccineProduct == "Spikevax JN.1")
5853
}
5954
]
6055
}) }}

app/views/vaccines/edit-batch.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,33 @@ <h1 class="nhsuks-heading-xl">Edit batch</h1>
4444
}
4545
}) }}
4646

47+
{% if vaccine.vaccineProduct == "Spikevax JN.1" %}
48+
49+
{{ radios({
50+
"idPrefix": "pack-type",
51+
"name": "packType",
52+
"fieldset": {
53+
"legend": {
54+
"text": "Pack size",
55+
classes: "nhsuk-fieldset__legend--s"
56+
}
57+
},
58+
"items": [
59+
{
60+
"value": "Single vial",
61+
"text": "Single vial",
62+
checked: (batch.packType == "Single vial")
63+
},
64+
{
65+
"value": "10 vials",
66+
"text": "10 vials",
67+
checked: (batch.packType == "10 vials")
68+
}
69+
]
70+
}) }}
71+
72+
{% endif %}
73+
4774
{{ button({
4875
"text": "Continue"
4976
}) }}

app/views/vaccines/product-page.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1 class="nhsuk-heading-xl">{{ vaccine.vaccineProduct }}</h1>
3030
text: "Vaccine"
3131
},
3232
value: {
33-
text: "RSV"
33+
text: vaccine.vaccine
3434
}
3535
},
3636
{
@@ -70,6 +70,11 @@ <h1 class="nhsuk-heading-xl">{{ vaccine.vaccineProduct }}</h1>
7070
<th role="columnheader" scope="col">
7171
Batch number
7272
</th>
73+
{% if vaccine.vaccineProduct == "Spikevax JN.1" %}
74+
<th role="columnheader" scope="col">
75+
Pack size
76+
</th>
77+
{% endif %}
7378
<th role="columnheader" scope="col">
7479
Expiry date
7580
</th>
@@ -93,6 +98,11 @@ <h1 class="nhsuk-heading-xl">{{ vaccine.vaccineProduct }}</h1>
9398
<td class="nhsuk-table__cell">
9499
{{ batch.batchNumber }}
95100
</td>
101+
{% if vaccine.vaccineProduct == "Spikevax JN.1" %}
102+
<td class="nhsuk-table__cell">
103+
{{ batch.packType }}
104+
</td>
105+
{% endif %}
96106
<td class="nhsuk-table__cell">
97107
{{ batch.expiryDate | govukDate }}
98108
</td>

0 commit comments

Comments
 (0)