Skip to content

Commit f0d1236

Browse files
authored
changes (#398)
1 parent 5e6f445 commit f0d1236

File tree

3 files changed

+324
-0
lines changed

3 files changed

+324
-0
lines changed

app/views/records/by-batch.html

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{% extends 'layout.html' %}
2+
3+
{% set pageName = "Which batch was used? – Records" %}
4+
5+
{% set currentSection = "records" %}
6+
7+
{% block beforeContent %}
8+
{{ backLink({
9+
href: "/records/index1",
10+
text: "Back"
11+
}) }}
12+
{% endblock %}
13+
14+
{% block content %}
15+
<div class="nhsuk-grid-row">
16+
<div class="nhsuk-grid-column-two-thirds">
17+
18+
<form action="/records/records" method="post">
19+
<input type="hidden" name="changedField" value="Batch">
20+
21+
{{ radios({
22+
"idPrefix": "batchNumber",
23+
"name": "batchNumber",
24+
"fieldset": {
25+
"legend": {
26+
"text": ("Choose a batch" if vaccination.vaccinationToday == 'yes' else "Select a batch"),
27+
"classes": "nhsuk-fieldset__legend--l",
28+
"isPageHeading": true
29+
}
30+
},
31+
"items": [
32+
{
33+
"value": "AB2345",
34+
"text": "AB2345",
35+
hint: {
36+
text: "Expires 14 February 2025"
37+
},
38+
checked: (vaccination.batchNumber == "AB2345")
39+
},
40+
{
41+
"value": "DE8342",
42+
"text": "DE8342",
43+
hint: {
44+
text: "Expires 19 February 2025"
45+
},
46+
checked: (vaccination.batchNumber == "DE8342")
47+
},
48+
{
49+
"value": "LF842",
50+
"text": "LF842",
51+
hint: {
52+
text: "Expires 28 February 2025"
53+
},
54+
checked: (vaccination.batchNumber == "LF842")
55+
},
56+
{
57+
"value": "XT1234",
58+
"text": "XT1234",
59+
hint: {
60+
text: "Expired 3 March 2024"
61+
},
62+
checked: (vaccination.batchNumber == "XT1234")
63+
},
64+
{
65+
"value": "PU1234",
66+
"text": "PU1234",
67+
hint: {
68+
text: "Expired 28 February 2024"
69+
},
70+
checked: (vaccination.batchNumber == "PU1234")
71+
},
72+
{
73+
"value": "HN6543",
74+
"text": "HN6543",
75+
hint: {
76+
text: "Expired 22 January 2024"
77+
},
78+
checked: (vaccination.batchNumber == "HN6543")
79+
}
80+
]
81+
}) }}
82+
83+
{{ button({
84+
text: "Save"
85+
})}}
86+
</form>
87+
88+
</div>
89+
</div>
90+
91+
{% endblock %}
92+

app/views/records/index1.html

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{% extends 'layout.html' %}
2+
3+
{% set pageName = "Records" %}
4+
5+
{% set currentSection = "records" %}
6+
7+
{% block content %}
8+
<div class="nhsuk-grid-row">
9+
<div class="nhsuk-grid-column-full">
10+
11+
<h1 class="nhsuk-heading-l">Records</h1>
12+
<p class="nhsuk-body-l">Search for a vaccination record you want to view, edit or delete.</p>
13+
14+
<form action="/records/by-batch" method="post" novalidate>
15+
16+
17+
18+
<div class="nhsuk-form-group">
19+
20+
<fieldset class="nhsuk-fieldset" aria-describedby="contact-hint">
21+
<legend class="nhsuk-fieldset__legend nhsuk-fieldset__legend--m">
22+
<h1 class="nhsuk-fieldset__heading">
23+
How do you want to search for a record?
24+
</h1>
25+
</legend>
26+
27+
28+
<p>By patient information</p>
29+
30+
31+
<div class="nhsuk-radios nhsuk-radios--conditional">
32+
<div class="nhsuk-radios__item">
33+
<input class="nhsuk-radios__input" id="contact-1" name="contact" type="radio" value="email" aria-controls="conditional-contact-1" aria-expanded="false">
34+
<label class="nhsuk-label nhsuk-radios__label" for="contact-1">
35+
NHS number
36+
</label>
37+
</div>
38+
<div class="nhsuk-radios__conditional nhsuk-radios__conditional--hidden" id="conditional-contact-1">
39+
40+
41+
42+
<div class="nhsuk-form-group">
43+
<label class="nhsuk-label nhsuk-hint nhsuk-radios__hint" for="email">
44+
For example, 485 777 3456
45+
</div>
46+
</label> <input class="nhsuk-input nhsuk-u-width-one-third" id="email" name="email" type="text">
47+
</div>
48+
49+
50+
51+
</div>
52+
53+
<div class="nhsuk-radios__item">
54+
<input class="nhsuk-radios__input" id="contact-2" name="contact" type="radio" value="phone" aria-controls="conditional-contact-2" aria-expanded="false">
55+
<label class="nhsuk-label nhsuk-radios__label" for="contact-2">
56+
Patient details
57+
</label>
58+
</div>
59+
60+
61+
62+
<br>
63+
<p>or by vaccine details </p>
64+
65+
<div class="nhsuk-radios nhsuk-radios--conditional">
66+
<div class="nhsuk-radios__item">
67+
<input class="nhsuk-radios__input" id="contact-3" name="contact" type="radio" value="email" aria-controls="conditional-contact-3" aria-expanded="false">
68+
<label class="nhsuk-label nhsuk-radios__label" for="contact-3">
69+
COVID-19
70+
71+
</label>
72+
</div>
73+
<div class="nhsuk-radios__conditional nhsuk-radios__conditional--hidden" id="conditional-contact-3">
74+
75+
76+
77+
<div class="nhsuk-radios__item">
78+
<input class="nhsuk-radios__input" id="example-3" name="example" type="radio" value="yes">
79+
<label class="nhsuk-label nhsuk-radios__label" for="example-3">
80+
Corminarty 30 JN.1
81+
</label>
82+
</div>
83+
84+
<div class="nhsuk-radios__item">
85+
<input class="nhsuk-radios__input" id="example-3" name="example" type="radio" value="yes">
86+
<label class="nhsuk-label nhsuk-radios__label" for="example-3">
87+
Spikevax JN.1
88+
</label>
89+
</div>
90+
91+
</div>
92+
93+
94+
95+
96+
97+
98+
</div>
99+
100+
101+
102+
<div class="nhsuk-radios nhsuk-radios--conditional">
103+
<div class="nhsuk-radios__item">
104+
<input class="nhsuk-radios__input" id="contact-4" name="contact" type="radio" value="email" aria-controls="conditional-contact-4" aria-expanded="false">
105+
<label class="nhsuk-label nhsuk-radios__label" for="contact-4">
106+
Flu </label>
107+
</div>
108+
<div class="nhsuk-radios__conditional nhsuk-radios__conditional--hidden" id="conditional-contact-3">
109+
110+
111+
112+
<div class="nhsuk-radios__item">
113+
<input class="nhsuk-radios__input" id="example-4" name="example" type="radio" value="yes">
114+
<label class="nhsuk-label nhsuk-radios__label" for="example-4">
115+
COVID-19
116+
</label>
117+
</div>
118+
119+
<div class="nhsuk-radios__item">
120+
<input class="nhsuk-radios__input" id="example-divider-4" name="example" type="radio" value="yes">
121+
<label class="nhsuk-label nhsuk-radios__label" for="example-4">
122+
Flu
123+
</label>
124+
</div>
125+
126+
127+
</fieldset>
128+
</div>
129+
130+
131+
132+
133+
134+
135+
{{ button({
136+
text: "Continue"
137+
})}}
138+
</form>
139+
140+
141+
142+
</div>
143+
</div>
144+
145+
146+
147+
148+
149+
{% endblock %}

app/views/records/records.html

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{% extends 'layout.html' %}
2+
3+
{% set pageName = "Patient's vaccination records – Records" %}
4+
5+
{% set currentSection = "records" %}
6+
7+
{% block beforeContent %}
8+
{{ backLink({ href: "/records/by-batch" }) }}
9+
{% endblock %}
10+
11+
{% set dateOfBirthHtml %}
12+
{% if data.dateOfBirth %}
13+
{{ (data.dateOfBirth | isoDateFromDateInput | govukDate) }}
14+
<br>(75 years old)
15+
{% endif %}
16+
{% endset %}
17+
18+
{% block content %}
19+
<div class="nhsuk-grid-row">
20+
<div class="nhsuk-grid-column-two-thirds">
21+
22+
23+
<h1 class="nhsuk-heading-l">AB2345 records</h1>
24+
25+
26+
27+
28+
29+
<br>
30+
31+
<h2 class="nhsuk-heading-m">Vaccination history</h2>
32+
33+
<p>You can only view, change or delete records your organisation has created.</p>
34+
35+
{% set rows = [] %}
36+
37+
{% for vaccinationRecorded in vaccinationsRecorded %}
38+
39+
{% set rows = (rows.push([
40+
{
41+
text: (vaccinationRecorded.date | isoDateFromDateInput | govukDate)
42+
},
43+
{
44+
text: vaccinationRecorded.vaccine
45+
},
46+
{
47+
text: vaccinationRecorded.vaccineProduct
48+
},
49+
{
50+
html: '<a href="/records/records/' + vaccinationRecorded.id + '">View<span class="nhsuk-u-visually-hidden"> Y vaccination recorded on X</span></a>'
51+
} if vaccinationRecorded.editable
52+
]), rows) %}
53+
54+
{% endfor %}
55+
56+
57+
{{ table({
58+
responsive: true,
59+
panel: false,
60+
firstCellIsHeader: true,
61+
head: [
62+
{
63+
text: "Date"
64+
},
65+
{
66+
text: "Vaccine"
67+
},
68+
{
69+
text: "Product"
70+
},
71+
{
72+
}
73+
],
74+
rows: rows
75+
}) }}
76+
77+
78+
</div>
79+
80+
81+
82+
{% endblock %}
83+

0 commit comments

Comments
 (0)