Skip to content

Commit 20fe030

Browse files
authored
Merge pull request #4444 from nhsuk/next
Version 3.3.0
2 parents 8b814db + 385ea37 commit 20fe030

File tree

152 files changed

+4289
-1784
lines changed

Some content is hidden

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

152 files changed

+4289
-1784
lines changed

.github/workflows/data-replication-pipeline.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,18 @@ on:
3535
type: string
3636
required: true
3737
default: "[]"
38+
take_db_snapshot:
39+
description: Take a new DB snapshot before creating the environment
40+
type: boolean
41+
default: false
3842

3943
env:
4044
aws_role: ${{ inputs.environment == 'production'
4145
&& 'arn:aws:iam::820242920762:role/GithubDeployDataReplicationInfrastructure'
4246
|| 'arn:aws:iam::393416225559:role/GithubDeployDataReplicationInfrastructure' }}
47+
db_snapshot_role: ${{ inputs.environment == 'production'
48+
&& 'arn:aws:iam::820242920762:role/DatabaseSnapshotRole'
49+
|| 'arn:aws:iam::393416225559:role/DatabaseSnapshotRole' }}
4350

4451
defaults:
4552
run:
@@ -58,12 +65,27 @@ jobs:
5865
steps:
5966
- name: Checkout code
6067
uses: actions/checkout@v5
68+
- name: Assume DB Snapshot role
69+
if: inputs.take_db_snapshot
70+
uses: aws-actions/configure-aws-credentials@v4
71+
with:
72+
role-to-assume: ${{ env.db_snapshot_role }}
73+
aws-region: eu-west-2
74+
- name: Take DB snapshot
75+
if: inputs.take_db_snapshot
76+
run: |
77+
set -e
78+
snapshot_identifier=snapshot-for-data-replication-$(date +"%Y-%m-%d-%H-%M-%S")
79+
aws rds create-db-cluster-snapshot --db-cluster-identifier mavis-${{ inputs.environment }} --db-cluster-snapshot-identifier $snapshot_identifier
80+
echo "Waiting for snapshot to be available. This can take a while."
81+
aws rds wait db-cluster-snapshot-available --db-cluster-snapshot-identifier $snapshot_identifier
82+
echo "New snapshot is now available"
6183
- name: Configure AWS Credentials
6284
uses: aws-actions/configure-aws-credentials@v4
6385
with:
6486
role-to-assume: ${{ env.aws_role }}
6587
aws-region: eu-west-2
66-
- name: get latest snapshot
88+
- name: Get latest snapshot
6789
id: get-latest-snapshot
6890
run: |
6991
set -e

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ gem "ruby-progressbar"
6161
gem "rubyzip"
6262
gem "sentry-rails"
6363
gem "sentry-ruby"
64+
gem "sentry-sidekiq"
6465
gem "sidekiq"
6566
gem "sidekiq-throttled"
6667
gem "splunk-sdk-ruby"

Gemfile.lock

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ GEM
101101
public_suffix (>= 2.0.2, < 7.0)
102102
aes_key_wrap (1.1.0)
103103
amazing_print (1.8.1)
104-
annotaterb (4.18.0)
104+
annotaterb (4.19.0)
105105
activerecord (>= 6.0.0)
106106
activesupport (>= 6.0.0)
107107
array_enum (1.6.0)
@@ -113,35 +113,35 @@ GEM
113113
ast (2.4.3)
114114
attr_required (1.0.2)
115115
aws-eventstream (1.4.0)
116-
aws-partitions (1.1150.0)
117-
aws-sdk-accessanalyzer (1.77.0)
118-
aws-sdk-core (~> 3, >= 3.228.0)
116+
aws-partitions (1.1152.0)
117+
aws-sdk-accessanalyzer (1.78.0)
118+
aws-sdk-core (~> 3, >= 3.231.0)
119119
aws-sigv4 (~> 1.5)
120-
aws-sdk-core (3.230.0)
120+
aws-sdk-core (3.232.0)
121121
aws-eventstream (~> 1, >= 1.3.0)
122122
aws-partitions (~> 1, >= 1.992.0)
123123
aws-sigv4 (~> 1.9)
124124
base64
125125
bigdecimal
126126
jmespath (~> 1, >= 1.6.1)
127127
logger
128-
aws-sdk-ec2 (1.550.0)
129-
aws-sdk-core (~> 3, >= 3.228.0)
128+
aws-sdk-ec2 (1.553.0)
129+
aws-sdk-core (~> 3, >= 3.231.0)
130130
aws-sigv4 (~> 1.5)
131-
aws-sdk-ecr (1.108.0)
132-
aws-sdk-core (~> 3, >= 3.228.0)
131+
aws-sdk-ecr (1.110.0)
132+
aws-sdk-core (~> 3, >= 3.231.0)
133133
aws-sigv4 (~> 1.5)
134-
aws-sdk-iam (1.128.0)
135-
aws-sdk-core (~> 3, >= 3.228.0)
134+
aws-sdk-iam (1.129.0)
135+
aws-sdk-core (~> 3, >= 3.231.0)
136136
aws-sigv4 (~> 1.5)
137-
aws-sdk-kms (1.110.0)
138-
aws-sdk-core (~> 3, >= 3.228.0)
137+
aws-sdk-kms (1.111.0)
138+
aws-sdk-core (~> 3, >= 3.231.0)
139139
aws-sigv4 (~> 1.5)
140-
aws-sdk-rds (1.287.0)
141-
aws-sdk-core (~> 3, >= 3.228.0)
140+
aws-sdk-rds (1.290.0)
141+
aws-sdk-core (~> 3, >= 3.231.0)
142142
aws-sigv4 (~> 1.5)
143-
aws-sdk-s3 (1.197.0)
144-
aws-sdk-core (~> 3, >= 3.228.0)
143+
aws-sdk-s3 (1.198.0)
144+
aws-sdk-core (~> 3, >= 3.231.0)
145145
aws-sdk-kms (~> 1)
146146
aws-sigv4 (~> 1.5)
147147
aws-sigv4 (1.12.1)
@@ -426,7 +426,7 @@ GEM
426426
validate_url
427427
webfinger (~> 2.0)
428428
orm_adapter (0.5.0)
429-
ostruct (0.6.2)
429+
ostruct (0.6.3)
430430
pagy (9.4.0)
431431
paint (2.3.0)
432432
parallel (1.27.0)
@@ -534,7 +534,7 @@ GEM
534534
railties (>= 5.2)
535535
reverse_markdown (3.0.0)
536536
nokogiri
537-
rexml (3.4.1)
537+
rexml (3.4.2)
538538
rladr (1.2.0)
539539
rspec (3.13.1)
540540
rspec-core (~> 3.13.0)
@@ -618,6 +618,9 @@ GEM
618618
sentry-ruby (5.26.0)
619619
bigdecimal
620620
concurrent-ruby (~> 1.0, >= 1.0.2)
621+
sentry-sidekiq (5.26.0)
622+
sentry-ruby (~> 5.26.0)
623+
sidekiq (>= 3.0)
621624
shoulda-matchers (6.5.0)
622625
activesupport (>= 5.2.0)
623626
sidekiq (8.0.7)
@@ -656,9 +659,9 @@ GEM
656659
tilt (~> 2.0)
657660
yard (~> 0.9, >= 0.9.24)
658661
yard-solargraph (~> 0.1)
659-
solargraph-rails (1.2.0)
662+
solargraph-rails (1.2.2)
660663
activesupport
661-
solargraph (= 0.56.0)
664+
solargraph (>= 0.48.0, < 0.57)
662665
splunk-sdk-ruby (1.0.5)
663666
stackprof (0.2.27)
664667
stimulus-rails (1.3.4)
@@ -689,7 +692,7 @@ GEM
689692
thor (1.4.0)
690693
thruster (0.1.15-arm64-darwin)
691694
thruster (0.1.15-x86_64-linux)
692-
tilt (2.6.0)
695+
tilt (2.6.1)
693696
timeout (0.4.3)
694697
turbo-rails (2.0.16)
695698
actionpack (>= 7.1.0)
@@ -825,6 +828,7 @@ DEPENDENCIES
825828
rufo
826829
sentry-rails
827830
sentry-ruby
831+
sentry-sidekiq
828832
shoulda-matchers
829833
sidekiq
830834
sidekiq-throttled

app/assets/stylesheets/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@
1717
@forward "summary-list";
1818
@forward "tables";
1919
@forward "tag";
20+
@forward "vaccine-method";

app/assets/stylesheets/components/_summary-list.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@
2323
margin-bottom: 0;
2424
padding-bottom: 0;
2525
}
26+
27+
.nhsuk-summary-list__value {
28+
padding-top: nhsuk-spacing(1);
29+
}
2630
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
@use "../core" as app;
3+
4+
.app-vaccine-method {
5+
align-items: center;
6+
column-gap: nhsuk-spacing(2);
7+
display: inline-flex;
8+
9+
&::before {
10+
content: "";
11+
height: 1em;
12+
width: 1em;
13+
}
14+
15+
&[data-method="injection"]::before {
16+
background-color: currentcolor;
17+
rotate: 45deg;
18+
scale: 0.75;
19+
transform-origin: center;
20+
}
21+
22+
&[data-method="nasal"]::before {
23+
border: 0.25em solid currentcolor;
24+
border-radius: 100%;
25+
height: 1em;
26+
width: 1em;
27+
}
28+
}

app/components/app_activity_log_component.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ def initialize(team:, patient: nil, patient_session: nil)
3737
)
3838

3939
@gillick_assessments =
40-
(patient || patient_session).gillick_assessments.includes(:performed_by)
40+
(patient || patient_session)
41+
.gillick_assessments
42+
.includes(:performed_by)
43+
.order(:created_at)
4144

4245
@notes =
4346
(patient || patient_session).notes.includes(

app/components/app_import_format_details_component.rb

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,34 @@ def immunisation_import_columns
124124

125125
def child_columns
126126
[
127-
{ name: "CHILD_FIRST_NAME", notes: tag.strong("Required") },
128-
{ name: "CHILD_LAST_NAME", notes: tag.strong("Required") },
129-
{ name: "CHILD_PREFERRED_FIRST_NAME", notes: "Optional" },
130-
{ name: "CHILD_PREFERRED_LAST_NAME", notes: "Optional" },
127+
{
128+
name: "CHILD_FIRST_NAME",
129+
notes:
130+
"#{tag.strong("Required")}, must use alphabetical characters (you" \
131+
" can include accents like Chloë, hyphens like Anne-Marie or" \
132+
" apostrophes like D'Arcy but no other special characters)."
133+
},
134+
{
135+
name: "CHILD_LAST_NAME",
136+
notes:
137+
"#{tag.strong("Required")}, must use alphabetical characters (you" \
138+
" can include accents like Jiménez, hyphens like Burne-Jones or" \
139+
" apostrophes like O'Hare but no other special characters)."
140+
},
141+
{
142+
name: "CHILD_PREFERRED_FIRST_NAME",
143+
notes:
144+
"Optional, must use alphabetical characters (you can include" \
145+
" accents like Chloë, hyphens like Anne-Marie or apostrophes like" \
146+
" D'Arcy but no other special characters)."
147+
},
148+
{
149+
name: "CHILD_PREFERRED_LAST_NAME",
150+
notes:
151+
"Optional, must use alphabetical characters (you can include" \
152+
" accents like Jiménez, hyphens like Burne-Jones or apostrophes" \
153+
" like O'Hare but no other special characters)."
154+
},
131155
{
132156
name: "CHILD_DATE_OF_BIRTH",
133157
notes:
@@ -164,7 +188,13 @@ def child_columns
164188
def parent_columns
165189
%w[PARENT_1 PARENT_2].flat_map do |prefix|
166190
[
167-
{ name: "#{prefix}_NAME", notes: "Optional" },
191+
{
192+
name: "#{prefix}_NAME",
193+
notes:
194+
"Optional, must use alphabetical characters (you can include" \
195+
" accents like Chloë, hyphens like Anne-Marie or apostrophes" \
196+
" like D'Arcy but no other special characters)."
197+
},
168198
{
169199
name: "#{prefix}_RELATIONSHIP",
170200
notes:

app/components/app_patient_session_record_component.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def heading
5151
"vaccination"
5252
end
5353

54-
"Record #{programme.name_in_sentence} #{vaccination}"
54+
tag.span(class: "app-vaccine-method", data: { method: vaccine_method }) do
55+
"Record #{programme.name_in_sentence} #{vaccination}"
56+
end
5557
end
5658
end

app/components/app_patient_session_search_result_card_component.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def action_required
119119
end
120120

121121
def vaccination_method
122-
return if context == :patients
122+
return unless %i[register record].include?(context)
123123

124124
programmes_to_check = programmes.select(&:has_multiple_vaccine_methods?)
125125

@@ -139,7 +139,12 @@ def vaccination_method
139139

140140
return if vaccine_methods.empty?
141141

142-
Vaccine.human_enum_name(:method, vaccine_methods.first)
142+
tag.span(
143+
class: "app-vaccine-method",
144+
data: {
145+
method: vaccine_methods.first
146+
}
147+
) { Vaccine.human_enum_name(:method, vaccine_methods.first) }
143148
end
144149

145150
def status_tags

0 commit comments

Comments
 (0)