Skip to content

Commit 677d443

Browse files
authored
Merge pull request #5823 from nhsuk/next
Version 6.13
2 parents 28b40e0 + 8d03d00 commit 677d443

150 files changed

Lines changed: 2647 additions & 1236 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/end-to-end-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ jobs:
329329
fi
330330
env:
331331
BRANCH_TO_CHECK: ${{ github.head_ref }}
332-
call-functional-tests:
332+
call-end-to-end-tests:
333333
needs: [ launch-dockerized-devimage, wait-for-task-stability, find-correct-test-branch ]
334334
if: ${{ !cancelled() && needs.launch-dockerized-devimage.result == 'success' && needs.wait-for-task-stability.result == 'success'}}
335-
uses: NHSDigital/manage-vaccinations-in-schools-testing/.github/workflows/functional_selected_device.yaml@main
335+
uses: NHSDigital/manage-vaccinations-in-schools-testing/.github/workflows/end-to-end-tests.yaml@main
336336
permissions:
337337
contents: write
338338
with:
@@ -343,7 +343,7 @@ jobs:
343343
HTTP_AUTH_TOKEN_FOR_TESTS: ${{ secrets.HTTP_AUTH_TOKEN_FOR_TESTS }}
344344
MAVIS_TESTING_REPO_ACCESS_TOKEN: ${{ secrets.MAVIS_TESTING_REPO_ACCESS_TOKEN }}
345345
stop-docker-environment:
346-
needs: [ call-functional-tests, launch-dockerized-devimage, wait-for-task-stability ]
346+
needs: [ call-end-to-end-tests, launch-dockerized-devimage, wait-for-task-stability ]
347347
if: ${{ always() && needs.launch-dockerized-devimage.result != 'skipped'}}
348348
runs-on: ubuntu-latest
349349
permissions:

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ gem "sentry-sidekiq"
6969
gem "sidekiq"
7070
gem "sidekiq-scheduler"
7171
gem "sidekiq-throttled"
72+
gem "sidekiq-unique-jobs"
7273
gem "splunk-sdk-ruby"
7374
gem "table_tennis"
7475
gem "tzinfo-data", platforms: %i[jruby windows]

Gemfile.lock

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -136,35 +136,35 @@ GEM
136136
ast (2.4.3)
137137
attr_required (1.0.2)
138138
aws-eventstream (1.4.0)
139-
aws-partitions (1.1205.0)
140-
aws-sdk-accessanalyzer (1.84.0)
141-
aws-sdk-core (~> 3, >= 3.241.3)
139+
aws-partitions (1.1206.0)
140+
aws-sdk-accessanalyzer (1.85.0)
141+
aws-sdk-core (~> 3, >= 3.241.4)
142142
aws-sigv4 (~> 1.5)
143-
aws-sdk-core (3.241.3)
143+
aws-sdk-core (3.241.4)
144144
aws-eventstream (~> 1, >= 1.3.0)
145145
aws-partitions (~> 1, >= 1.992.0)
146146
aws-sigv4 (~> 1.9)
147147
base64
148148
bigdecimal
149149
jmespath (~> 1, >= 1.6.1)
150150
logger
151-
aws-sdk-ec2 (1.590.0)
152-
aws-sdk-core (~> 3, >= 3.241.3)
151+
aws-sdk-ec2 (1.591.0)
152+
aws-sdk-core (~> 3, >= 3.241.4)
153153
aws-sigv4 (~> 1.5)
154-
aws-sdk-ecr (1.118.0)
155-
aws-sdk-core (~> 3, >= 3.241.3)
154+
aws-sdk-ecr (1.119.0)
155+
aws-sdk-core (~> 3, >= 3.241.4)
156156
aws-sigv4 (~> 1.5)
157-
aws-sdk-iam (1.139.0)
158-
aws-sdk-core (~> 3, >= 3.241.3)
157+
aws-sdk-iam (1.140.0)
158+
aws-sdk-core (~> 3, >= 3.241.4)
159159
aws-sigv4 (~> 1.5)
160-
aws-sdk-kms (1.120.0)
161-
aws-sdk-core (~> 3, >= 3.241.3)
160+
aws-sdk-kms (1.121.0)
161+
aws-sdk-core (~> 3, >= 3.241.4)
162162
aws-sigv4 (~> 1.5)
163-
aws-sdk-rds (1.305.0)
164-
aws-sdk-core (~> 3, >= 3.241.3)
163+
aws-sdk-rds (1.306.0)
164+
aws-sdk-core (~> 3, >= 3.241.4)
165165
aws-sigv4 (~> 1.5)
166-
aws-sdk-s3 (1.211.0)
167-
aws-sdk-core (~> 3, >= 3.241.3)
166+
aws-sdk-s3 (1.212.0)
167+
aws-sdk-core (~> 3, >= 3.241.4)
168168
aws-sdk-kms (~> 1)
169169
aws-sigv4 (~> 1.5)
170170
aws-sigv4 (1.12.1)
@@ -355,8 +355,8 @@ GEM
355355
pg (>= 0.18.1)
356356
jwt (3.1.2)
357357
base64
358-
kramdown (2.5.1)
359-
rexml (>= 3.3.9)
358+
kramdown (2.5.2)
359+
rexml (>= 3.4.4)
360360
kramdown-parser-gfm (1.1.0)
361361
kramdown (~> 2.0)
362362
language_server-protocol (3.17.0.5)
@@ -678,13 +678,17 @@ GEM
678678
concurrent-ruby (>= 1.2.0)
679679
redis-prescription (~> 2.2)
680680
sidekiq (>= 8.0)
681+
sidekiq-unique-jobs (8.0.13)
682+
concurrent-ruby (~> 1.0, >= 1.0.5)
683+
sidekiq (>= 7.0.0, < 9.0.0)
684+
thor (>= 1.0, < 3.0)
681685
simplecov (0.22.0)
682686
docile (~> 1.1)
683687
simplecov-html (~> 0.11)
684688
simplecov_json_formatter (~> 0.1)
685689
simplecov-html (0.13.2)
686690
simplecov_json_formatter (0.1.4)
687-
solargraph (0.58.1)
691+
solargraph (0.58.2)
688692
ast (~> 2.4.3)
689693
backport (~> 1.2)
690694
benchmark (~> 0.4)
@@ -741,7 +745,7 @@ GEM
741745
tilt (2.7.0)
742746
timeout (0.6.0)
743747
tsort (0.2.0)
744-
turbo-rails (2.0.20)
748+
turbo-rails (2.0.21)
745749
actionpack (>= 7.1.0)
746750
railties (>= 7.1.0)
747751
tzinfo (2.0.6)
@@ -890,6 +894,7 @@ DEPENDENCIES
890894
sidekiq
891895
sidekiq-scheduler
892896
sidekiq-throttled
897+
sidekiq-unique-jobs
893898
simplecov
894899
solargraph
895900
solargraph-rails

app/components/app_patient_search_result_card_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ def call
105105
to: :helpers
106106

107107
def programme_status_tag
108-
return if programmes.empty?
109-
110108
status_by_programme =
111109
programmes.each_with_object({}) do |programme, hash|
112110
resolved_status =
@@ -119,6 +117,8 @@ def programme_status_tag
119117
hash[resolved_status.fetch(:prefix)] = resolved_status
120118
end
121119

120+
return if status_by_programme.empty?
121+
122122
render AppAttachedTagsComponent.new(status_by_programme)
123123
end
124124

app/components/app_programme_session_table_component.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def cohort_count(session:)
1818
end
1919

2020
def no_response_scope(session:)
21-
patients(session:).has_consent_status(
22-
:no_response,
21+
patients(session:).has_programme_status(
22+
"needs_consent_no_response",
2323
programme:,
2424
academic_year:
2525
)
@@ -38,8 +38,8 @@ def no_response_percentage(session:)
3838

3939
def triage_needed_count(session:)
4040
format_number(
41-
patients(session:).has_triage_status(
42-
:required,
41+
patients(session:).has_programme_status(
42+
"needs_triage",
4343
programme:,
4444
academic_year:
4545
).count

app/components/app_session_actions_component.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def no_consent_response_row
7272

7373
def conflicting_consent_row
7474
count =
75-
patients.has_consent_status(
76-
"conflicts",
75+
patients.has_programme_status(
76+
"has_refusal_consent_conflicts",
7777
programme: programmes,
7878
academic_year:
7979
).count
@@ -90,8 +90,8 @@ def conflicting_consent_row
9090

9191
def triage_required_row
9292
count =
93-
patients.has_triage_status(
94-
"required",
93+
patients.has_programme_status(
94+
"needs_triage",
9595
programme: programmes,
9696
academic_year:
9797
).count

app/components/app_vaccination_record_summary_component.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ def call
154154
summary_list.with_row do |row|
155155
row.with_key { "Dose number" }
156156
row.with_value { dose_number_value }
157+
if (href = @change_links[:dose_sequence])
158+
row.with_action(
159+
text: "Change",
160+
href:,
161+
visually_hidden_text: "dose number"
162+
)
163+
end
157164
end
158165
end
159166
end
@@ -218,6 +225,13 @@ def call
218225
summary_list.with_row do |row|
219226
row.with_key { "Vaccinator" }
220227
row.with_value { vaccinator_value }
228+
if (href = @change_links[:vaccinator])
229+
row.with_action(
230+
text: "Change",
231+
visually_hidden_text: "vaccinator",
232+
href:
233+
)
234+
end
221235
end
222236
end
223237

app/controllers/draft_vaccination_records_controller.rb

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def update
3737
handle_date_and_time
3838
when :outcome
3939
handle_outcome
40+
when :location
41+
handle_location
4042
when :batch
4143
handle_batch
4244
when :confirm
@@ -98,6 +100,22 @@ def handle_batch
98100
end
99101
end
100102

103+
def handle_location
104+
if @draft_vaccination_record.bulk_upload_user_and_record?
105+
parsed_location_id =
106+
(
107+
if update_params[:location_id] == "unknown"
108+
nil
109+
else
110+
update_params[:location_id]
111+
end
112+
)
113+
@draft_vaccination_record.location_id = parsed_location_id
114+
@draft_vaccination_record.location_name =
115+
(@draft_vaccination_record.location_id.present? ? nil : "Unknown")
116+
end
117+
end
118+
101119
def handle_confirm
102120
return unless @draft_vaccination_record.save
103121

@@ -161,6 +179,7 @@ def update_params
161179
date_and_time: %i[performed_at],
162180
delivery: %i[delivery_site delivery_method],
163181
dose: %i[full_dose],
182+
dose_sequence: %i[dose_sequence],
164183
identity: %i[
165184
identity_check_confirmed_by_patient
166185
identity_check_confirmed_by_other_name
@@ -169,7 +188,8 @@ def update_params
169188
location: %i[location_id],
170189
notes: %i[notes],
171190
outcome: %i[outcome],
172-
supplier: %i[supplied_by_user_id]
191+
supplier: %i[supplied_by_user_id],
192+
vaccinator: %i[performed_by_given_name performed_by_family_name]
173193
}.fetch(current_step)
174194

175195
params
@@ -222,7 +242,12 @@ def set_batches
222242
end
223243

224244
def set_locations
225-
@locations = policy_scope(Location).community_clinic
245+
@locations =
246+
if @draft_vaccination_record.bulk_upload_user_and_record?
247+
Location.school.where(status: "open").order(:name)
248+
else
249+
policy_scope(Location).community_clinic
250+
end
226251
end
227252

228253
def set_supplied_by_users

app/controllers/sessions/patient_specific_directions_controller.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,15 @@ def patients_allowed_psd
6666
@patients_allowed_psd ||=
6767
@session
6868
.patients
69-
.has_consent_status(
70-
"given",
69+
.has_programme_status(
70+
"due",
7171
programme: @programme,
72-
academic_year: @session.academic_year,
73-
vaccine_method: "nasal"
72+
academic_year: @session.academic_year
7473
)
75-
.has_triage_status(
76-
"not_required",
74+
.has_vaccine_criteria(
7775
programme: @programme,
78-
academic_year: @session.academic_year
76+
academic_year: @session.academic_year,
77+
vaccine_methods: [%w[nasal], %w[nasal injection]]
7978
)
8079
.without_patient_specific_direction(
8180
programme: @programme,

app/helpers/parents_helper.rb

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ def format_parents_with_relationships(parent_relationships)
1414
def format_parent_with_relationship(parent_relationship, include_phone: true)
1515
parent = parent_relationship.parent
1616

17-
[
18-
parent_relationship.label_with_parent,
19-
if (email = parent.email).present?
20-
tag.span(email, class: "nhsuk-u-secondary-text-colour")
21-
end,
22-
if include_phone && (phone = parent.phone).present?
23-
tag.span(phone, class: "nhsuk-u-secondary-text-colour")
24-
end
25-
].compact.join(tag.br).html_safe
17+
safe_join(
18+
[
19+
parent_relationship.label_with_parent,
20+
if (email = parent.email).present?
21+
tag.span(email, class: "nhsuk-u-secondary-text-colour")
22+
end,
23+
if include_phone && (phone = parent.phone).present?
24+
tag.span(phone, class: "nhsuk-u-secondary-text-colour")
25+
end
26+
].compact,
27+
tag.br
28+
)
2629
end
2730
end

0 commit comments

Comments
 (0)