Skip to content

Commit 6b2e205

Browse files
committed
Rename register status
The model class is called registration status so this helps to keep the wording consistent. Jira-Issue: MAV-2581
1 parent b6ec124 commit 6b2e205

9 files changed

Lines changed: 39 additions & 39 deletions

File tree

app/components/app_patient_search_form_component.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ class AppPatientSearchFormComponent < ViewComponent::Base
8686
<% end %>
8787
<% end %>
8888
89-
<% if register_statuses.any? %>
90-
<%= f.govuk_radio_buttons_fieldset :register_status,
89+
<% if registration_statuses.any? %>
90+
<%= f.govuk_radio_buttons_fieldset :registration_status,
9191
legend: { text: "Registration status", size: "s" },
9292
small: true do %>
93-
<%= f.govuk_radio_button :register_status, "", checked: form.register_status.blank?, label: { text: "Any" } %>
94-
<% register_statuses.each do |status| %>
95-
<%= f.govuk_radio_button :register_status,
93+
<%= f.govuk_radio_button :registration_status, "", checked: form.registration_status.blank?, label: { text: "Any" } %>
94+
<% registration_statuses.each do |status| %>
95+
<%= f.govuk_radio_button :registration_status,
9696
status,
97-
checked: form.register_status == status,
98-
label: { text: t(status, scope: %i[status register label]) } %>
97+
checked: form.registration_status == status,
98+
label: { text: t(status, scope: %i[status registration label]) } %>
9999
<% end %>
100100
<% end %>
101101
<% end %>
@@ -236,7 +236,7 @@ def initialize(
236236
url:,
237237
programmes: [],
238238
consent_statuses: [],
239-
register_statuses: [],
239+
registration_statuses: [],
240240
triage_statuses: [],
241241
vaccination_statuses: [],
242242
patient_specific_direction_statuses: [],
@@ -252,7 +252,7 @@ def initialize(
252252

253253
@programmes = programmes
254254
@consent_statuses = consent_statuses
255-
@register_statuses = register_statuses
255+
@registration_statuses = registration_statuses
256256
@triage_statuses = triage_statuses
257257
@vaccination_statuses = vaccination_statuses
258258
@patient_specific_direction_statuses = patient_specific_direction_statuses
@@ -270,7 +270,7 @@ def initialize(
270270
:url,
271271
:programmes,
272272
:consent_statuses,
273-
:register_statuses,
273+
:registration_statuses,
274274
:triage_statuses,
275275
:vaccination_statuses,
276276
:patient_specific_direction_statuses,
@@ -296,7 +296,7 @@ def open_details?
296296
def show_buttons_in_details?
297297
!(
298298
consent_statuses.any? || vaccination_statuses.any? ||
299-
register_statuses.any? || triage_statuses.any? || year_groups.any?
299+
registration_statuses.any? || triage_statuses.any? || year_groups.any?
300300
)
301301
end
302302

app/components/app_patient_session_search_result_card_component.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def status_tags
170170
when :record
171171
[]
172172
when :register
173-
[register_status_tag, vaccination_status_tag]
173+
[registration_status_tag, vaccination_status_tag]
174174
when :consent
175175
[consent_status_tag]
176176
when :triage
@@ -196,14 +196,14 @@ def vaccination_status_tag
196196
}
197197
end
198198

199-
def register_status_tag
199+
def registration_status_tag
200200
{
201-
key: :register,
201+
key: :registration,
202202
value:
203203
render(
204204
AppStatusTagComponent.new(
205205
patient.registration_status(session:)&.status || "unknown",
206-
context: :register
206+
context: :registration
207207
)
208208
)
209209
}

app/components/app_session_actions_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def register_attendance_row
9696

9797
status = "unknown"
9898
count = patients.has_registration_status(status, session:).count
99-
href = session_register_path(session, register_status: status)
99+
href = session_register_path(session, registration_status: status)
100100

101101
generate_row(:children_to_register, count:, href:)
102102
end

app/controllers/concerns/patient_search_form_concern.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def patient_search_form_params
3030
:missing_nhs_number,
3131
:patient_specific_direction_status,
3232
:q,
33-
:register_status,
33+
:registration_status,
3434
:still_to_vaccinate,
3535
:triage_status,
3636
:vaccination_status,

app/forms/patient_search_form.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class PatientSearchForm < SearchForm
1414
attribute :patient_specific_direction_status, :string
1515
attribute :programme_types, array: true
1616
attribute :q, :string
17-
attribute :register_status, :string
17+
attribute :registration_status, :string
1818
attribute :still_to_vaccinate, :boolean
1919
attribute :triage_status, :string
2020
attribute :vaccination_status, :string
@@ -84,7 +84,7 @@ def apply(scope)
8484
scope = filter_programmes(scope)
8585
scope = filter_consent_statuses(scope)
8686
scope = filter_vaccination_statuses(scope)
87-
scope = filter_register_status(scope)
87+
scope = filter_registration_status(scope)
8888
scope = filter_triage_status(scope)
8989
scope = filter_vaccine_criteria(scope)
9090
scope = filter_patient_specific_direction_status(scope)
@@ -237,8 +237,8 @@ def filter_patient_specific_direction_status(scope)
237237
end
238238
end
239239

240-
def filter_register_status(scope)
241-
if (status = register_status&.to_sym).present?
240+
def filter_registration_status(scope)
241+
if (status = registration_status&.to_sym).present?
242242
scope.has_registration_status(status, session:)
243243
else
244244
scope

app/views/patient_sessions/_header.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<% attendance_record = @patient.attendance_records.find_or_initialize_by(location: @session.location, date:) %>
4343

4444
<li class="app-action-list__item">
45-
<%= render AppStatusTagComponent.new(@patient.registration_status(session: @session)&.status || "unknown", context: :register) %>
45+
<%= render AppStatusTagComponent.new(@patient.registration_status(session: @session)&.status || "unknown", context: :registration) %>
4646
</li>
4747

4848
<% attendance_record.session = @session %>

app/views/sessions/register/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
url: session_register_path(@session),
1717
programmes: @session.programmes,
1818
vaccination_statuses: Patient::VaccinationStatus.statuses.keys,
19-
register_statuses: @statuses,
19+
registration_statuses: @statuses,
2020
year_groups: @session.year_groups,
2121
) %>
2222
</div>

config/locales/status.en.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ en:
33
label:
44
consent: Consent status
55
patient_specific_direction: PSD status
6-
register: Registration status
6+
registration: Registration status
77
triage: Triage status
88
vaccination: Programme status
99
consent:
@@ -32,7 +32,7 @@ en:
3232
colour:
3333
added: green
3434
not_added: grey
35-
register:
35+
registration:
3636
label:
3737
attending: Attending session
3838
completed: Completed session

spec/forms/patient_search_form_spec.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
let(:vaccination_status) { nil }
3333
let(:programme_types) { nil }
3434
let(:q) { "query" }
35-
let(:register_status) { nil }
35+
let(:registration_status) { nil }
3636
let(:triage_status) { nil }
3737
let(:vaccine_criteria) { nil }
3838
let(:still_to_vaccinate) { nil }
@@ -53,7 +53,7 @@
5353
patient_specific_direction_status:,
5454
programme_types:,
5555
q:,
56-
register_status:,
56+
registration_status:,
5757
triage_status:,
5858
vaccine_criteria:,
5959
year_groups:
@@ -79,7 +79,7 @@
7979
let(:missing_nhs_number) { nil }
8080
let(:vaccination_status) { nil }
8181
let(:q) { nil }
82-
let(:register_status) { nil }
82+
let(:registration_status) { nil }
8383
let(:triage_status) { nil }
8484
let(:year_groups) { nil }
8585

@@ -129,7 +129,7 @@
129129
let(:missing_nhs_number) { nil }
130130
let(:vaccination_status) { nil }
131131
let(:q) { nil }
132-
let(:register_status) { nil }
132+
let(:registration_status) { nil }
133133
let(:triage_status) { nil }
134134
let(:year_groups) { nil }
135135

@@ -175,7 +175,7 @@
175175
let(:missing_nhs_number) { nil }
176176
let(:vaccination_status) { nil }
177177
let(:q) { nil }
178-
let(:register_status) { nil }
178+
let(:registration_status) { nil }
179179
let(:triage_status) { nil }
180180
let(:year_groups) { nil }
181181

@@ -231,7 +231,7 @@
231231
let(:vaccination_status) { nil }
232232
let(:programme_types) { programmes.map(&:type) }
233233
let(:q) { nil }
234-
let(:register_status) { nil }
234+
let(:registration_status) { nil }
235235
let(:triage_status) { nil }
236236
let(:year_groups) { nil }
237237

@@ -328,7 +328,7 @@
328328
let(:vaccination_status) { nil }
329329
let(:programme_types) { programmes.map(&:type) }
330330
let(:q) { nil }
331-
let(:register_status) { nil }
331+
let(:registration_status) { nil }
332332
let(:triage_status) { nil }
333333
let(:year_groups) { nil }
334334

@@ -361,7 +361,7 @@
361361
let(:vaccination_status) { "vaccinated" }
362362
let(:programme_types) { programmes.map(&:type) }
363363
let(:q) { nil }
364-
let(:register_status) { nil }
364+
let(:registration_status) { nil }
365365
let(:triage_status) { nil }
366366
let(:year_groups) { nil }
367367

@@ -386,7 +386,7 @@
386386
let(:missing_nhs_number) { nil }
387387
let(:vaccination_status) { nil }
388388
let(:q) { nil }
389-
let(:register_status) { "attending" }
389+
let(:registration_status) { "attending" }
390390
let(:triage_status) { nil }
391391
let(:year_groups) { nil }
392392

@@ -407,7 +407,7 @@
407407
let(:vaccination_status) { nil }
408408
let(:programme_types) { programmes.map(&:type) }
409409
let(:q) { nil }
410-
let(:register_status) { nil }
410+
let(:registration_status) { nil }
411411
let(:triage_status) { "required" }
412412
let(:year_groups) { nil }
413413

@@ -475,7 +475,7 @@
475475
let(:vaccination_status) { nil }
476476
let(:programme_types) { nil }
477477
let(:q) { nil }
478-
let(:register_status) { nil }
478+
let(:registration_status) { nil }
479479
let(:triage_status) { nil }
480480
let(:year_groups) { nil }
481481

@@ -519,7 +519,7 @@
519519
let(:vaccination_status) { nil }
520520
let(:programme_types) { programmes.map(&:type) }
521521
let(:q) { nil }
522-
let(:register_status) { nil }
522+
let(:registration_status) { nil }
523523
let(:triage_status) { nil }
524524
let(:vaccine_criteria) { "nasal" }
525525
let(:year_groups) { nil }
@@ -563,7 +563,7 @@
563563
let(:missing_nhs_number) { nil }
564564
let(:vaccination_status) { nil }
565565
let(:q) { nil }
566-
let(:register_status) { nil }
566+
let(:registration_status) { nil }
567567
let(:triage_status) { nil }
568568
let(:year_groups) { nil }
569569

@@ -636,7 +636,7 @@
636636
let(:vaccination_status) { nil }
637637
let(:programme_types) { nil }
638638
let(:q) { nil }
639-
let(:register_status) { nil }
639+
let(:registration_status) { nil }
640640
let(:triage_status) { nil }
641641
let(:year_groups) { nil }
642642
let(:still_to_vaccinate) { "1" }

0 commit comments

Comments
 (0)