Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
b2b6026
Add workgroup column
thomasleese Jul 28, 2025
321f523
Add workgroup to onboarding
thomasleese Jul 28, 2025
8e1a4c2
Use workgroup as team identifier
thomasleese Jul 28, 2025
f0cc135
Remove temporary archive Rake tasks
thomasleese Aug 5, 2025
09fd60f
Prevent invalidated patients' records from being sent to the Imms API
alistair-white-horne-tng Aug 7, 2025
df3b10f
Add a feature test for patient invalidation
alistair-white-horne-tng Aug 7, 2025
155edb8
Merge pull request #4095 from nhsuk/add-workgroup-to-teams
thomasleese Aug 7, 2025
ebe3288
Merge pull request #4187 from nhsuk/remove-archive-tasks
thomasleese Aug 7, 2025
4e14dd0
Merge pull request #4205 from nhsuk/imms-api-invalidated-patients
alistair-white-horne-tng Aug 7, 2025
5a26f56
Fix tests following independent merges
thomasleese Aug 7, 2025
c4b90b8
Merge pull request #4208 from nhsuk/fix-tests-workgroup
thomasleese Aug 7, 2025
b269b45
Rename "Session outcomes" tab
thomasleese Aug 6, 2025
52d6f4a
Show programme status in register and children tabs
thomasleese Aug 6, 2025
63591e5
Hide attendance buttons if vaccinated
thomasleese Aug 6, 2025
5eac3c4
Hide patients who don't need consent
thomasleese Aug 6, 2025
2c6a85b
refactor: Change `Triage` table from `triage` to `triages`
MartinVanIJcken Aug 7, 2025
2a9260f
Merge pull request #4201 from nhsuk/improve-already-vaccinated-patien…
thomasleese Aug 7, 2025
055de87
Merge pull request #4163 from nhsuk/rename-triage-table-to-triages
MartinVanIJcken Aug 7, 2025
a657f1e
feat: add expiration event for seasonal programmes' health information
MartinVanIJcken Aug 5, 2025
91e7fff
test: add test for card shown for seasonal vaccinated programme
MartinVanIJcken Aug 5, 2025
386028d
test: health info expiration card does not show for other programmes
MartinVanIJcken Aug 5, 2025
bdc8b75
Merge pull request #4178 from nhsuk/show-expired-flu-consents-in-acti…
MartinVanIJcken Aug 7, 2025
acec063
Add status generators
thomasleese Aug 7, 2025
4221a6d
Add latest_session_status column
thomasleese Aug 7, 2025
792b998
Set latest_session_status
thomasleese Aug 7, 2025
405af9d
Display latest session outcome
thomasleese Aug 7, 2025
9c1a6ac
Merge pull request #4207 from nhsuk/show-latest-session-status-next-t…
thomasleese Aug 7, 2025
034706d
Fix logic to decide which status text to show
alistair-white-horne-tng Aug 7, 2025
c8a1217
Merge pull request #4210 from nhsuk/fix-notify-parents-status
alistair-white-horne-tng Aug 7, 2025
0b20a9d
Bump actions/download-artifact from 4 to 5
dependabot[bot] Aug 7, 2025
2626886
Bump sass from 1.89.2 to 1.90.0
dependabot[bot] Aug 7, 2025
e0079d1
Merge pull request #4212 from nhsuk/dependabot/npm_and_yarn/next/sass…
thomasleese Aug 8, 2025
7b8e5cc
Merge pull request #4211 from nhsuk/dependabot/github_actions/next/ac…
thomasleese Aug 8, 2025
ba01a87
Handle rollover and out of cohort school move scenarios
thomasleese Aug 8, 2025
6deda26
Rename `reset_unused_fields`
thomasleese Aug 8, 2025
e39da4a
Make `reset_unused_attributes` optional
thomasleese Aug 8, 2025
7b5c7c6
Add `clear_attributes`
thomasleese Aug 8, 2025
65a004c
Rename `reset!`
thomasleese Aug 8, 2025
8376ba7
Merge pull request #4213 from nhsuk/improve-not-in-team-logic
thomasleese Aug 8, 2025
71c3173
Merge pull request #4214 from nhsuk/improve-request-session-persistable
thomasleese Aug 8, 2025
1873bb5
Ensure sessions are found by programme
thomasleese Aug 5, 2025
76fc171
Don't add school patients to community clinic
thomasleese Aug 5, 2025
7269cfb
When creating sessions add suitable patients
thomasleese Aug 5, 2025
c5fc058
Add patients to clinic when inviting
thomasleese Aug 5, 2025
715e29f
Send clinic invitations to all patients
thomasleese Aug 6, 2025
df7214e
Add button to invite a patient to the clinic
thomasleese Aug 6, 2025
f237125
Fix strict loading error when viewing patient card
alistair-white-horne-tng Aug 8, 2025
aee783f
Add ClinicPationSessionsFactory
thomasleese Aug 8, 2025
8d361d6
Remove `include ODSCodeConcern`
thomasleese Aug 8, 2025
cb1644b
Merge pull request #4215 from nhsuk/fix-gillick-notice-stict-loading
alistair-white-horne-tng Aug 8, 2025
1e970f6
Merge pull request #4186 from nhsuk/dont-add-all-patients-to-generic-…
thomasleese Aug 8, 2025
943362b
Merge pull request #4216 from nhsuk/remove-team-ods-code-concern
thomasleese Aug 8, 2025
2fd9d27
Add ImportantNotices
thomasleese Aug 8, 2025
07439a6
Fix important notices count
alistair-white-horne-tng Aug 8, 2025
4bd7b22
Merge pull request #4218 from nhsuk/fix-important-notice-count
thomasleese Aug 8, 2025
af0abd9
Ensure register attendance buttons show correctly
thomasleese Aug 8, 2025
1f48087
Merge pull request #4219 from nhsuk/fix-session-attendance
thomasleese Aug 8, 2025
147c82a
Add mavis teams list command
misaka Aug 8, 2025
ad3d82d
Merge pull request #4220 from nhsuk/mavis-teams-list
misaka Aug 8, 2025
ebcf0d7
Remove vaccine_methods assignment
thomasleese Aug 8, 2025
0ef57d7
Merge pull request #4221 from nhsuk/remove-default-vaccine-method
thomasleese Aug 8, 2025
eb3305f
Fix imms API sync status precedence
alistair-white-horne-tng Aug 8, 2025
69bb16a
Merge pull request #4222 from nhsuk/fix-api-status-precedence
alistair-white-horne-tng Aug 8, 2025
142d219
fix: unify session overview page with prototype
MartinVanIJcken Jul 1, 2025
ae59806
feat: show number of children without NHS number of session actions page
MartinVanIJcken Aug 7, 2025
aa9e990
test: the missing nhs number row on session action page
MartinVanIJcken Aug 7, 2025
cf3c671
feat: show warning on consent page for children without nhs number
MartinVanIJcken Aug 7, 2025
84c53ca
test: warning component on session pages
MartinVanIJcken Aug 7, 2025
9d872ad
feat: allow adding NHS number from patient session page
MartinVanIJcken Aug 7, 2025
4822bac
test: add tests for the NHS number on the patient session page
MartinVanIJcken Aug 7, 2025
e5088d7
Add ReportingApi::OneTimeToken model (+ spec, factory)
Aug 8, 2025
d5541fc
Merge pull request #4209 from nhsuk/show-notice-in-session-if-any-pat…
MartinVanIJcken Aug 8, 2025
acc7f39
Merge pull request #4223 from nhsuk/add-one-time-tokens-model
Aug 8, 2025
c6009aa
Replace onboard Rake task
thomasleese Aug 10, 2025
ec9a736
Fix syntax of onboarding configuration
thomasleese Aug 10, 2025
1528800
Add rollover training onboarding configuration
thomasleese Aug 10, 2025
3800808
Turn off preparation period in QA
thomasleese Aug 10, 2025
72e9344
Reduce generate class indentation
thomasleese Aug 10, 2025
a1e6e1a
Update Generate::CohortImports interface
thomasleese Aug 10, 2025
a0d0feb
Generate cohort imports with multiple programmes
thomasleese Aug 10, 2025
7e34cb8
Memoise cohort_import_csv_filepath
thomasleese Aug 10, 2025
9929988
Add script to generate cohort imports
thomasleese Aug 10, 2025
30a5516
Add script to create sessions
thomasleese Aug 10, 2025
cc86c89
add reporting_app_session_token attribute to user, and has_one :repor…
Aug 8, 2025
c9b70fc
Fix specs for consent and invitation jobs
thomasleese Aug 11, 2025
fb4a605
Merge pull request #4226 from nhsuk/training-rollover-preparation
thomasleese Aug 11, 2025
9db3223
Merge pull request #4227 from nhsuk/fix-job-tests-rollover
thomasleese Aug 11, 2025
add960d
Merge pull request #4225 from nhsuk/add-token-fields-and-relation-to-…
Aug 11, 2025
8fc4440
Revert "Turn off preparation period in QA"
thomasleese Aug 11, 2025
a17c3eb
Add docs for commissioner reporting authentication
Aug 11, 2025
9ee1f3b
Avoid loading CSV files twice
thomasleese Aug 11, 2025
b71f8fe
Reset progress bar between feature test runs
thomasleese Aug 11, 2025
7267370
Change github-branch in the reporting component auth adoc
Aug 11, 2025
84fbb81
Merge pull request #4230 from nhsuk/remove-progress-bar-warning
thomasleese Aug 11, 2025
95a175e
Show eligible programmes on patient page
jhenderson Aug 8, 2025
cbddd5b
Improve team destruction endpoint
thomasleese Aug 11, 2025
dbbecc7
Merge pull request #4217 from nhsuk/show-eligible-programmes-on-patie…
jhenderson Aug 11, 2025
b41713b
Merge pull request #4231 from nhsuk/improve-destroy-endpoint
thomasleese Aug 11, 2025
cf9fad0
fix: link missing NHS number overview to children tab
MartinVanIJcken Aug 11, 2025
5d067ee
Merge pull request #4232 from nhsuk/link-missing-nhs-numbers-overview…
MartinVanIJcken Aug 11, 2025
040e547
Only show aged out filter in global child view
thomasleese Aug 11, 2025
83b4f2e
Merge pull request #4235 from nhsuk/hide-aged-out-filter-in-sessions
thomasleese Aug 11, 2025
5874df0
remove the outdataed `:github-repo:` line from authentication adoc
Aug 11, 2025
62e062d
Expand patient and activity pages to full width
jhenderson Aug 11, 2025
5c1d393
put correct repo ref in, as it now shows a missing image
Aug 11, 2025
cd1c0cb
Merge pull request #4237 from nhsuk/expand-patient-page-to-full-width
thomasleese Aug 11, 2025
76862e0
Merge pull request #4229 from nhsuk/add-docs-for-reporting-app-auth
Aug 11, 2025
cd1bee4
Merge pull request #4228 from nhsuk/enable-preparation-qa
benilovj Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
aws-role: ${{ fromJSON(needs.define-matrix.outputs.aws-roles) }}
steps:
- name: Download Docker image
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: image
- name: Configure AWS Credentials
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/data-replication-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
role-to-assume: ${{ env.aws_role }}
aws-region: eu-west-2
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: tfplan_infrastructure-${{ inputs.environment }}
path: ${{ runner.temp }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
id-token: write
steps:
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: DEPLOYMENT_ENVS-${{ inputs.environment }}
path: ${{ runner.temp }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
id-token: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: DEPLOYMENT_ENVS-${{ inputs.environment }}
path: ${{ runner.temp }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-backup-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
role-to-assume: ${{ env.aws_role }}
aws-region: eu-west-2
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: tfplan_infrastructure-${{ inputs.environment }}
path: ${{ runner.temp }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
role-to-assume: ${{ env.aws_role }}
aws-region: eu-west-2
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: tfplan_infrastructure-${{ inputs.environment }}
path: ${{ runner.temp }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
role-to-assume: ${{ env.aws_role }}
aws-region: eu-west-2
- name: Download AWS plan artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: tfplan_monitoring_aws-${{ inputs.environment }}
path: ${{ runner.temp }}
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ gem "rubyzip"
gem "sentry-rails"
gem "sentry-ruby"
gem "splunk-sdk-ruby"
gem "table_tennis"
gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw jruby]
gem "uk_postcode"
gem "wicked"
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ GEM
rubyntlm (~> 0.6, >= 0.6.3)
webrick (~> 1.7)
webrobots (~> 0.1.2)
memo_wise (1.13.0)
method_source (1.1.0)
mime-types (3.6.0)
logger
Expand Down Expand Up @@ -425,6 +426,7 @@ GEM
orm_adapter (0.5.0)
ostruct (0.6.2)
pagy (9.3.5)
paint (2.3.0)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -662,6 +664,12 @@ GEM
prettier_print
rbs
syntax_tree (>= 2.0.1)
table_tennis (0.0.7)
csv (~> 3.3)
ffi (~> 1.17)
memo_wise (~> 1.11)
paint (~> 2.3)
unicode-display_width (~> 3.1)
temple (0.10.0)
thor (1.4.0)
thruster (0.1.15-arm64-darwin)
Expand Down Expand Up @@ -811,6 +819,7 @@ DEPENDENCIES
syntax_tree
syntax_tree-haml
syntax_tree-rbs
table_tennis
thruster
turbo-rails
tzinfo-data
Expand Down
118 changes: 73 additions & 45 deletions app/components/app_activity_log_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,59 +318,87 @@ def programmes_by_id
def decision_expiration_events
all_programmes = Programme.all.to_a

AcademicYear.all.filter_map do |academic_year|
next if academic_year >= AcademicYear.current
AcademicYear.all.flat_map do |academic_year|
next [] if academic_year >= AcademicYear.current

vaccinated_programmes =
all_programmes.select do |programme|
not_vaccinated_programmes =
all_programmes.reject do |programme|
patient.vaccination_status(programme:, academic_year:).vaccinated?
end

programmes_with_expired_consents =
consents
.select { it.academic_year == academic_year }
.flat_map { programmes_for(it) }
.reject { vaccinated_programmes.include?(it) }

programmes_with_expired_triages =
triages
.select { it.academic_year == academic_year }
.flat_map { programmes_for(it) }
.reject { vaccinated_programmes.include?(it) }

programmes_with_expired_psds =
patient_specific_directions
.select { it.academic_year == academic_year }
.flat_map { programmes_for(it) }
.reject { vaccinated_programmes.include?(it) }

expired_items = []
if programmes_with_expired_consents.any?
expired_items += ["consent", "health information"]
end
expired_items << "triage outcome" if programmes_with_expired_triages.any?
expired_items << "PSD status" if programmes_with_expired_psds.any?
vaccinated_but_seasonal_programmes =
all_programmes.select do |programme|
patient.vaccination_status(programme:, academic_year:).vaccinated? &&
programme.seasonal?
end

next if expired_items.empty?
expired_items =
{
vaccinated_but_seasonal: vaccinated_but_seasonal_programmes,
not_vaccinated: not_vaccinated_programmes
}.transform_values do |programmes|
get_expired_items(academic_year:, programmes:)
end

programmes_with_expired_items = [
programmes_with_expired_consents,
programmes_with_expired_triages,
programmes_with_expired_psds
].flatten.uniq
expired_items.map do |category, expired_items_in_category|
expired_item_names = []
if expired_items_in_category[:consents].any?
expired_item_names += ["consent", "health information"]
end
if expired_items_in_category[:triages].any?
expired_item_names << "triage outcome"
end
if expired_items_in_category[:psds].any?
expired_item_names << "PSD status"
end

expired_items_sentence =
expired_items.to_sentence(
words_connector: ", ",
last_word_connector: " and "
)
next [] if expired_item_names.empty?

title =
"#{
expired_item_names.to_sentence(
words_connector: ", ",
last_word_connector: " and "
).upcase_first
} expired"

body =
case category
when :not_vaccinated
"#{@patient.full_name} was not vaccinated."
when :vaccinated_but_seasonal
"#{@patient.full_name} was vaccinated."
end

{
title: "#{expired_items_sentence.upcase_first} expired",
body: "#{@patient.full_name} was not vaccinated.",
at: academic_year.to_academic_year_date_range.end.end_of_day - 1.second,
programmes: programmes_with_expired_items
}
programmes = expired_items_in_category.values.flatten.uniq

{
title:,
body:,
at:
academic_year.to_academic_year_date_range.end.end_of_day - 1.second,
programmes:
}
end
end
end

private

def filter_expired(items, academic_year:, programmes:)
items
.select { it.academic_year == academic_year }
.flat_map { programmes_for(it) }
.select { programmes.include?(it) }
end

def get_expired_items(academic_year:, programmes:)
{
consents:,
triages:,
psds: patient_specific_directions
}.transform_values do |items|
filter_expired(items, academic_year:, programmes:)
end
end
end
4 changes: 2 additions & 2 deletions app/components/app_imports_navigation_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def issues_text
end

def notices_text
count = helpers.policy_scope(Patient).with_notice.count

count =
ImportantNotices.call(patient_scope: helpers.policy_scope(Patient)).length
safe_join(["Important notices", " ", render(AppCountComponent.new(count))])
end
end
35 changes: 3 additions & 32 deletions app/components/app_notices_table_component.rb
Original file line number Diff line number Diff line change
@@ -1,42 +1,13 @@
# frozen_string_literal: true

class AppNoticesTableComponent < ViewComponent::Base
def initialize(
deceased_patients:,
invalidated_patients:,
restricted_patients:,
has_vaccination_records_dont_notify_parents_patients:
)
def initialize(notices)
super

@deceased_patients = deceased_patients
@invalidated_patients = invalidated_patients
@restricted_patients = restricted_patients
@has_vaccination_records_dont_notify_parents_patients =
has_vaccination_records_dont_notify_parents_patients
end

def render?
@deceased_patients.present? || @invalidated_patients.present? ||
@restricted_patients.present? ||
@has_vaccination_records_dont_notify_parents_patients.present?
@notices = notices
end

private

def notices
all_patients =
(
@deceased_patients + @invalidated_patients + @restricted_patients +
@has_vaccination_records_dont_notify_parents_patients
).uniq

notices =
all_patients.flat_map do |patient|
helpers
.patient_important_notices(patient)
.map { |notification| notification.merge(patient:) }
end
notices.sort_by { it[:date_time] }.reverse
end
attr_reader :notices
end
6 changes: 4 additions & 2 deletions app/components/app_patient_card_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class AppPatientCardComponent < ViewComponent::Base
<%= render AppCardComponent.new(heading_level:, section: true) do |card| %>
<% card.with_heading { "Child’s details" } %>

<% helpers.patient_important_notices(patient).each do |notification| %>
<%= render AppStatusComponent.new(text: notification[:message]) %>
<% important_notices.each do |notice| %>
<%= render AppStatusComponent.new(text: notice[:message]) %>
<% end %>

<%= render AppChildSummaryComponent.new(
Expand Down Expand Up @@ -47,4 +47,6 @@ def initialize(
:heading_level

def show_school_and_year_group = patient.show_year_group?(team: current_team)

def important_notices = ImportantNotices.call(patient:)
end
Loading