From 11d14a4d9eed3f5fbecbb830c91b9c8b7bb1be94 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Fri, 16 Jun 2023 15:08:44 +0100 Subject: [PATCH] CLDC-2341: Trigger retirement validations after all relevant questions on lettings forms (#1690) --- ...lead_tenant_over_retirement_value_check.rb | 1 - ...ead_tenant_under_retirement_value_check.rb | 1 - .../person_over_retirement_value_check.rb | 1 - .../person_under_retirement_value_check.rb | 1 - .../subsections/household_characteristics.rb | 56 +++++++++++++------ ...person_over_retirement_value_check_spec.rb | 8 --- ...erson_under_retirement_value_check_spec.rb | 8 --- .../household_characteristics_spec.rb | 56 +++++++++++++------ 8 files changed, 80 insertions(+), 52 deletions(-) diff --git a/app/models/form/lettings/pages/lead_tenant_over_retirement_value_check.rb b/app/models/form/lettings/pages/lead_tenant_over_retirement_value_check.rb index ca6183f3c..9d21e21a8 100644 --- a/app/models/form/lettings/pages/lead_tenant_over_retirement_value_check.rb +++ b/app/models/form/lettings/pages/lead_tenant_over_retirement_value_check.rb @@ -1,7 +1,6 @@ class Form::Lettings::Pages::LeadTenantOverRetirementValueCheck < ::Form::Page def initialize(id, hsh, subsection) super - @id = "lead_tenant_over_retirement_value_check" @depends_on = [{ "person_1_not_retired_over_soft_max_age?" => true }] @title_text = { "translation" => "soft_validations.retirement.max.title", diff --git a/app/models/form/lettings/pages/lead_tenant_under_retirement_value_check.rb b/app/models/form/lettings/pages/lead_tenant_under_retirement_value_check.rb index b7ab02900..0c7a3ed2e 100644 --- a/app/models/form/lettings/pages/lead_tenant_under_retirement_value_check.rb +++ b/app/models/form/lettings/pages/lead_tenant_under_retirement_value_check.rb @@ -1,7 +1,6 @@ class Form::Lettings::Pages::LeadTenantUnderRetirementValueCheck < ::Form::Page def initialize(id, hsh, subsection) super - @id = "lead_tenant_under_retirement_value_check" @depends_on = [{ "person_1_retired_under_soft_min_age?" => true }] @title_text = { "translation" => "soft_validations.retirement.min.title", diff --git a/app/models/form/lettings/pages/person_over_retirement_value_check.rb b/app/models/form/lettings/pages/person_over_retirement_value_check.rb index b13a52ed5..550ae0373 100644 --- a/app/models/form/lettings/pages/person_over_retirement_value_check.rb +++ b/app/models/form/lettings/pages/person_over_retirement_value_check.rb @@ -1,7 +1,6 @@ class Form::Lettings::Pages::PersonOverRetirementValueCheck < ::Form::Page def initialize(id, hsh, subsection, person_index:) super(id, hsh, subsection) - @id = "person_#{person_index}_over_retirement_value_check" @depends_on = [{ "person_#{person_index}_not_retired_over_soft_max_age?" => true }] @title_text = { "translation" => "soft_validations.retirement.max.title", diff --git a/app/models/form/lettings/pages/person_under_retirement_value_check.rb b/app/models/form/lettings/pages/person_under_retirement_value_check.rb index 9f7540f56..ab9c81beb 100644 --- a/app/models/form/lettings/pages/person_under_retirement_value_check.rb +++ b/app/models/form/lettings/pages/person_under_retirement_value_check.rb @@ -1,7 +1,6 @@ class Form::Lettings::Pages::PersonUnderRetirementValueCheck < ::Form::Page def initialize(id, hsh, subsection, person_index:) super(id, hsh, subsection) - @id = "person_#{person_index}_under_retirement_value_check" @depends_on = [{ "person_#{person_index}_retired_under_soft_min_age?" => true }] @title_text = { "translation" => "soft_validations.retirement.min.title", diff --git a/app/models/form/lettings/subsections/household_characteristics.rb b/app/models/form/lettings/subsections/household_characteristics.rb index 9fc6948bd..bb8533c12 100644 --- a/app/models/form/lettings/subsections/household_characteristics.rb +++ b/app/models/form/lettings/subsections/household_characteristics.rb @@ -15,9 +15,12 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection Form::Lettings::Pages::LeadTenantAge.new(nil, nil, self), Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadAgeValueCheck.new(nil, nil, self), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadAgeValueCheck.new(nil, nil, self), + Form::Lettings::Pages::LeadTenantUnderRetirementValueCheck.new("age_lead_tenant_under_retirement_value_check", nil, self), + Form::Lettings::Pages::LeadTenantOverRetirementValueCheck.new("age_lead_tenant_over_retirement_value_check", nil, self), Form::Lettings::Pages::LeadTenantGenderIdentity.new(nil, nil, self), Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadValueCheck.new(nil, nil, self), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadValueCheck.new(nil, nil, self), + Form::Lettings::Pages::LeadTenantOverRetirementValueCheck.new("gender_lead_tenant_over_retirement_value_check", nil, self), Form::Lettings::Pages::LeadTenantEthnicGroup.new(nil, nil, self), Form::Lettings::Pages::LeadTenantEthnicBackgroundArab.new(nil, nil, self), Form::Lettings::Pages::LeadTenantEthnicBackgroundAsian.new(nil, nil, self), @@ -26,8 +29,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection Form::Lettings::Pages::LeadTenantEthnicBackgroundWhite.new(nil, nil, self), Form::Lettings::Pages::LeadTenantNationality.new(nil, nil, self), Form::Lettings::Pages::LeadTenantWorkingSituation.new(nil, nil, self), - Form::Lettings::Pages::LeadTenantUnderRetirementValueCheck.new(nil, nil, self), - Form::Lettings::Pages::LeadTenantOverRetirementValueCheck.new(nil, nil, self), + Form::Lettings::Pages::LeadTenantUnderRetirementValueCheck.new("working_situation_lead_tenant_under_retirement_value_check", nil, self), + Form::Lettings::Pages::LeadTenantOverRetirementValueCheck.new("working_situation_lead_tenant_over_retirement_value_check", nil, self), Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 2), Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 2), Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 2, person_type: "child"), @@ -36,13 +39,16 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection person_index: 2), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self, person_index: 2), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_2_under_retirement_value_check", nil, self, person_index: 2), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_2_over_retirement_value_check", nil, self, person_index: 2), Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 2), Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 2), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 2), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("gender_2_over_retirement_value_check", nil, self, person_index: 2), Form::Lettings::Pages::PersonWorkingSituation.new(nil, nil, self, person_index: 2), - Form::Lettings::Pages::PersonUnderRetirementValueCheck.new(nil, nil, self, person_index: 2), - Form::Lettings::Pages::PersonOverRetirementValueCheck.new(nil, nil, self, person_index: 2), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("working_situation_2_under_retirement_value_check", nil, self, person_index: 2), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_2_over_retirement_value_check", nil, self, person_index: 2), Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 3), Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 3), Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 3, person_type: "child"), @@ -51,13 +57,16 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection person_index: 3), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self, person_index: 3), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_3_under_retirement_value_check", nil, self, person_index: 3), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_3_over_retirement_value_check", nil, self, person_index: 3), Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 3), Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 3), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 3), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("gender_3_over_retirement_value_check", nil, self, person_index: 3), Form::Lettings::Pages::PersonWorkingSituation.new(nil, nil, self, person_index: 3), - Form::Lettings::Pages::PersonUnderRetirementValueCheck.new(nil, nil, self, person_index: 3), - Form::Lettings::Pages::PersonOverRetirementValueCheck.new(nil, nil, self, person_index: 3), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("working_situation_3_under_retirement_value_check", nil, self, person_index: 3), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_3_over_retirement_value_check", nil, self, person_index: 3), Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 4), Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 4), Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 4, person_type: "child"), @@ -66,13 +75,16 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection person_index: 4), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self, person_index: 4), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_4_under_retirement_value_check", nil, self, person_index: 4), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_4_over_retirement_value_check", nil, self, person_index: 4), Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 4), Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 4), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 4), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("gender_4_over_retirement_value_check", nil, self, person_index: 4), Form::Lettings::Pages::PersonWorkingSituation.new(nil, nil, self, person_index: 4), - Form::Lettings::Pages::PersonUnderRetirementValueCheck.new(nil, nil, self, person_index: 4), - Form::Lettings::Pages::PersonOverRetirementValueCheck.new(nil, nil, self, person_index: 4), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("working_situation_4_under_retirement_value_check", nil, self, person_index: 4), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_4_over_retirement_value_check", nil, self, person_index: 4), Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 5), Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 5), Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 5, person_type: "child"), @@ -81,13 +93,16 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection person_index: 5), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self, person_index: 5), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_5_under_retirement_value_check", nil, self, person_index: 5), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_5_over_retirement_value_check", nil, self, person_index: 5), Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 5), Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 5), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 5), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("gender_5_over_retirement_value_check", nil, self, person_index: 5), Form::Lettings::Pages::PersonWorkingSituation.new(nil, nil, self, person_index: 5), - Form::Lettings::Pages::PersonUnderRetirementValueCheck.new(nil, nil, self, person_index: 5), - Form::Lettings::Pages::PersonOverRetirementValueCheck.new(nil, nil, self, person_index: 5), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("working_situation_5_under_retirement_value_check", nil, self, person_index: 5), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_5_over_retirement_value_check", nil, self, person_index: 5), Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 6), Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 6), Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 6, person_type: "child"), @@ -96,13 +111,16 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection person_index: 6), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self, person_index: 6), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_6_under_retirement_value_check", nil, self, person_index: 6), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_6_over_retirement_value_check", nil, self, person_index: 6), Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 6), Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 6), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 6), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("gender_6_over_retirement_value_check", nil, self, person_index: 6), Form::Lettings::Pages::PersonWorkingSituation.new(nil, nil, self, person_index: 6), - Form::Lettings::Pages::PersonUnderRetirementValueCheck.new(nil, nil, self, person_index: 6), - Form::Lettings::Pages::PersonOverRetirementValueCheck.new(nil, nil, self, person_index: 6), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("working_situation_6_under_retirement_value_check", nil, self, person_index: 6), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_6_over_retirement_value_check", nil, self, person_index: 6), Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 7), Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 7), Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 7, person_type: "child"), @@ -111,13 +129,16 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection person_index: 7), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self, person_index: 7), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_7_under_retirement_value_check", nil, self, person_index: 7), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_7_over_retirement_value_check", nil, self, person_index: 7), Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 7), Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 7), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 7), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("gender_7_over_retirement_value_check", nil, self, person_index: 7), Form::Lettings::Pages::PersonWorkingSituation.new(nil, nil, self, person_index: 7), - Form::Lettings::Pages::PersonUnderRetirementValueCheck.new(nil, nil, self, person_index: 7), - Form::Lettings::Pages::PersonOverRetirementValueCheck.new(nil, nil, self, person_index: 7), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("working_situation_7_under_retirement_value_check", nil, self, person_index: 7), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_7_over_retirement_value_check", nil, self, person_index: 7), Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 8), Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 8), Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 8, person_type: "child"), @@ -126,13 +147,16 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection person_index: 8), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self, person_index: 8), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_8_under_retirement_value_check", nil, self, person_index: 8), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_8_over_retirement_value_check", nil, self, person_index: 8), Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 8), Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 8), Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 8), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("gender_8_over_retirement_value_check", nil, self, person_index: 8), Form::Lettings::Pages::PersonWorkingSituation.new(nil, nil, self, person_index: 8), - Form::Lettings::Pages::PersonUnderRetirementValueCheck.new(nil, nil, self, person_index: 8), - Form::Lettings::Pages::PersonOverRetirementValueCheck.new(nil, nil, self, person_index: 8), + Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("working_situation_8_under_retirement_value_check", nil, self, person_index: 8), + Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_8_over_retirement_value_check", nil, self, person_index: 8), ].compact end end diff --git a/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb b/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb index 45587b4fb..865a01f61 100644 --- a/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb +++ b/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb @@ -24,10 +24,6 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod end context "with person 2" do - it "has the correct id" do - expect(page.id).to eq("person_2_over_retirement_value_check") - end - it "has correct depends_on" do expect(page.depends_on).to eq( [{ "person_2_not_retired_over_soft_max_age?" => true }], @@ -69,10 +65,6 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod context "with person 3" do let(:person_index) { 3 } - it "has the correct id" do - expect(page.id).to eq("person_3_over_retirement_value_check") - end - it "has correct depends_on" do expect(page.depends_on).to eq( [{ "person_3_not_retired_over_soft_max_age?" => true }], diff --git a/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb b/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb index 929009ce7..58fbcf33d 100644 --- a/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb +++ b/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb @@ -24,10 +24,6 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo end context "with person 2" do - it "has the correct id" do - expect(page.id).to eq("person_2_under_retirement_value_check") - end - it "has correct depends_on" do expect(page.depends_on).to eq( [{ "person_2_retired_under_soft_min_age?" => true }], @@ -55,10 +51,6 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo context "with person 3" do let(:person_index) { 3 } - it "has the correct id" do - expect(page.id).to eq("person_3_under_retirement_value_check") - end - it "has correct depends_on" do expect(page.depends_on).to eq( [{ "person_3_retired_under_soft_min_age?" => true }], diff --git a/spec/models/form/lettings/subsections/household_characteristics_spec.rb b/spec/models/form/lettings/subsections/household_characteristics_spec.rb index d0d55b8bf..4586d5592 100644 --- a/spec/models/form/lettings/subsections/household_characteristics_spec.rb +++ b/spec/models/form/lettings/subsections/household_characteristics_spec.rb @@ -21,9 +21,12 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod lead_tenant_age no_females_pregnant_household_lead_age_value_check females_in_soft_age_range_in_pregnant_household_lead_age_value_check + age_lead_tenant_under_retirement_value_check + age_lead_tenant_over_retirement_value_check lead_tenant_gender_identity no_females_pregnant_household_lead_value_check females_in_soft_age_range_in_pregnant_household_lead_value_check + gender_lead_tenant_over_retirement_value_check lead_tenant_ethnic_group lead_tenant_ethnic_background_arab lead_tenant_ethnic_background_asian @@ -32,92 +35,113 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod lead_tenant_ethnic_background_white lead_tenant_nationality lead_tenant_working_situation - lead_tenant_under_retirement_value_check - lead_tenant_over_retirement_value_check + working_situation_lead_tenant_under_retirement_value_check + working_situation_lead_tenant_over_retirement_value_check person_2_known person_2_relationship_to_lead person_2_age_child person_2_age_non_child no_females_pregnant_household_person_2_age_value_check females_in_soft_age_range_in_pregnant_household_person_2_age_value_check + age_2_under_retirement_value_check + age_2_over_retirement_value_check person_2_gender_identity no_females_pregnant_household_person_2_value_check females_in_soft_age_range_in_pregnant_household_person_2_value_check + gender_2_over_retirement_value_check person_2_working_situation - person_2_under_retirement_value_check - person_2_over_retirement_value_check + working_situation_2_under_retirement_value_check + working_situation_2_over_retirement_value_check person_3_known person_3_relationship_to_lead person_3_age_child person_3_age_non_child no_females_pregnant_household_person_3_age_value_check females_in_soft_age_range_in_pregnant_household_person_3_age_value_check + age_3_under_retirement_value_check + age_3_over_retirement_value_check person_3_gender_identity no_females_pregnant_household_person_3_value_check females_in_soft_age_range_in_pregnant_household_person_3_value_check + gender_3_over_retirement_value_check person_3_working_situation - person_3_under_retirement_value_check - person_3_over_retirement_value_check + working_situation_3_under_retirement_value_check + working_situation_3_over_retirement_value_check person_4_known person_4_relationship_to_lead person_4_age_child person_4_age_non_child no_females_pregnant_household_person_4_age_value_check females_in_soft_age_range_in_pregnant_household_person_4_age_value_check + age_4_under_retirement_value_check + age_4_over_retirement_value_check person_4_gender_identity no_females_pregnant_household_person_4_value_check females_in_soft_age_range_in_pregnant_household_person_4_value_check + gender_4_over_retirement_value_check person_4_working_situation - person_4_under_retirement_value_check - person_4_over_retirement_value_check + working_situation_4_under_retirement_value_check + working_situation_4_over_retirement_value_check person_5_known person_5_relationship_to_lead person_5_age_child person_5_age_non_child no_females_pregnant_household_person_5_age_value_check females_in_soft_age_range_in_pregnant_household_person_5_age_value_check + age_5_under_retirement_value_check + age_5_over_retirement_value_check person_5_gender_identity no_females_pregnant_household_person_5_value_check females_in_soft_age_range_in_pregnant_household_person_5_value_check + gender_5_over_retirement_value_check person_5_working_situation - person_5_under_retirement_value_check - person_5_over_retirement_value_check + working_situation_5_under_retirement_value_check + working_situation_5_over_retirement_value_check person_6_known person_6_relationship_to_lead person_6_age_child person_6_age_non_child no_females_pregnant_household_person_6_age_value_check females_in_soft_age_range_in_pregnant_household_person_6_age_value_check + age_6_under_retirement_value_check + age_6_over_retirement_value_check person_6_gender_identity no_females_pregnant_household_person_6_value_check females_in_soft_age_range_in_pregnant_household_person_6_value_check + gender_6_over_retirement_value_check person_6_working_situation - person_6_under_retirement_value_check - person_6_over_retirement_value_check + working_situation_6_under_retirement_value_check + working_situation_6_over_retirement_value_check person_7_known person_7_relationship_to_lead person_7_age_child person_7_age_non_child no_females_pregnant_household_person_7_age_value_check females_in_soft_age_range_in_pregnant_household_person_7_age_value_check + age_7_under_retirement_value_check + age_7_over_retirement_value_check person_7_gender_identity no_females_pregnant_household_person_7_value_check females_in_soft_age_range_in_pregnant_household_person_7_value_check + gender_7_over_retirement_value_check person_7_working_situation - person_7_under_retirement_value_check - person_7_over_retirement_value_check + working_situation_7_under_retirement_value_check + working_situation_7_over_retirement_value_check person_8_known person_8_relationship_to_lead person_8_age_child person_8_age_non_child no_females_pregnant_household_person_8_age_value_check females_in_soft_age_range_in_pregnant_household_person_8_age_value_check + age_8_under_retirement_value_check + age_8_over_retirement_value_check person_8_gender_identity no_females_pregnant_household_person_8_value_check females_in_soft_age_range_in_pregnant_household_person_8_value_check + gender_8_over_retirement_value_check person_8_working_situation - person_8_under_retirement_value_check - person_8_over_retirement_value_check + working_situation_8_under_retirement_value_check + working_situation_8_over_retirement_value_check ], ) end