Skip to content

Commit 2a21df0

Browse files
committed
Update CSV import details to include reason
The reason will capture why the vaccination wasn't administered if that's the case.
1 parent ede2a69 commit 2a21df0

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

app/components/app_import_format_details_component.rb

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def immunisation_import_columns
101101
},
102102
{
103103
name: "DATE_OF_VACCINATION",
104-
notes: "#{tag.strong("Required")}, must use #{tag.i("YYYYMMDD")} format"
104+
notes:
105+
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}, must use #{tag.i("YYYYMMDD")} format"
105106
},
106107
{
107108
name: "TIME_OF_VACCINATION",
@@ -110,7 +111,7 @@ def immunisation_import_columns
110111
{
111112
name: "VACCINE_GIVEN",
112113
notes:
113-
"#{tag.strong("Required")}, must be " +
114+
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}, must be " +
114115
@programme
115116
.vaccines
116117
.pluck(:nivs_name)
@@ -120,20 +121,36 @@ def immunisation_import_columns
120121
two_words_connector: " or "
121122
)
122123
},
123-
{ name: "BATCH_NUMBER", notes: tag.strong("Required") },
124+
{
125+
name: "BATCH_NUMBER",
126+
notes: "Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}"
127+
},
124128
{
125129
name: "BATCH_EXPIRY_DATE",
126-
notes: "#{tag.strong("Required")}, must use #{tag.i("YYYYMMDD")} format"
130+
notes:
131+
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}, must use #{tag.i("YYYYMMDD")} format"
127132
},
128133
{
129134
name: "ANATOMICAL_SITE",
130135
notes:
131-
"#{tag.strong("Required")}, must be #{tag.i("Left Buttock")}, " \
136+
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}, must be #{tag.i("Left Buttock")}, " \
132137
"#{tag.i("Right Buttock")}, #{tag.i("Left Thigh")}, " \
133138
"#{tag.i("Right Thigh")}, #{tag.i("Left Upper Arm")}, " \
134139
"#{tag.i("Right Upper Arm")} or #{tag.i("Nasal")}"
140+
},
141+
{
142+
name: "VACCINATED",
143+
notes:
144+
"Optional, must be #{tag.i("Y")} or #{tag.i("N")}. If omitted, " \
145+
"#{tag.i("Y")} is assumed."
146+
},
147+
{
148+
name: "REASON",
149+
notes:
150+
"Required if #{tag.code("VACCINATED")} is #{tag.i("N")}, must be #{tag.i("did not attend")}, " \
151+
"#{tag.i("vaccination contraindicated")} or #{tag.i("unwell")}"
135152
}
136-
] + dose_sequence + vaccinated + care_setting + performing_professional
153+
] + dose_sequence + care_setting + performing_professional
137154
end
138155

139156
def child_columns
@@ -196,8 +213,8 @@ def dose_sequence
196213
{
197214
name: "DOSE_SEQUENCE",
198215
notes:
199-
"#{tag.strong("Required")}, must be #{tag.i("1")}, #{tag.i("2")} or " \
200-
"#{tag.i("3")}"
216+
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}, " \
217+
"must be #{tag.i("1")}, #{tag.i("2")} or #{tag.i("3")}"
201218
}
202219
]
203220
end
@@ -208,23 +225,12 @@ def care_setting
208225
{
209226
name: "CARE_SETTING",
210227
notes:
211-
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}. Must be " \
228+
"Required if #{tag.code("VACCINATED")} is #{tag.i("Y")}, must be " \
212229
"#{tag.i("1")} (school) or #{tag.i("2")} (care setting)"
213230
}
214231
]
215232
end
216233

217-
def vaccinated
218-
[
219-
{
220-
name: "VACCINATED",
221-
notes:
222-
"Optional, must be #{tag.i("Y")} or #{tag.i("N")}. If omitted, " \
223-
"#{tag.i("Y")} is assumed."
224-
}
225-
]
226-
end
227-
228234
def performing_professional
229235
[
230236
{

0 commit comments

Comments
 (0)