diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index be15cc1b3..9fbb6fc63 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -9,12 +9,7 @@ class FormController < ApplicationController responses_for_page = responses_for_page(@page) if @case_log.update(responses_for_page) session[:errors] = nil - if is_referrer_check_answers? && !@case_log.form.next_page(@page, @case_log).to_s.include?("value_check") - redirect_to(send("case_log_#{@case_log.form.subsection_for_page(@page).id}_check_answers_path", @case_log)) - else - redirect_path = @case_log.form.next_page_redirect_path(@page, @case_log) - redirect_to(send(redirect_path, @case_log)) - end + redirect_to(successful_redirect_path) else redirect_path = "case_log_#{@page.id}_path" session[:errors] = @case_log.errors.to_json @@ -108,4 +103,20 @@ private referrer = request.headers["HTTP_REFERER"].presence || "" referrer.present? && CGI.parse(referrer.split("?")[-1]).present? && CGI.parse(referrer.split("?")[-1])["referrer"][0] == "check_answers" end + + def successful_redirect_path + if is_referrer_check_answers? + page_ids = @case_log.form.subsection_for_page(@page).pages.map(&:id) + page_index = page_ids.index(@page.id) + next_page = @case_log.form.next_page(@page, @case_log) + previous_page = @case_log.form.previous_page(page_ids, page_index, @case_log) + if next_page.to_s.include?("value_check") || next_page == previous_page + return "/logs/#{@case_log.id}/#{next_page.dasherize}?referrer=check_answers" + else + return send("case_log_#{@case_log.form.subsection_for_page(@page).id}_check_answers_path", @case_log) + end + end + redirect_path = @case_log.form.next_page_redirect_path(@page, @case_log) + send(redirect_path, @case_log) + end end diff --git a/app/models/validations/household_validations.rb b/app/models/validations/household_validations.rb index 1ff8f3ed1..618e16e7b 100644 --- a/app/models/validations/household_validations.rb +++ b/app/models/validations/household_validations.rb @@ -36,7 +36,7 @@ module Validations::HouseholdValidations end def validate_pregnancy(record) - if (record.has_pregnancy? || record.pregnancy_refused?) && !women_of_child_bearing_age_in_household(record) + if (record.has_pregnancy? || record.pregnancy_refused?) && women_in_household(record) && !women_of_child_bearing_age_in_household(record) record.errors.add :preg_occ, I18n.t("validations.household.preg_occ.no_female") end end @@ -136,7 +136,13 @@ private (1..8).any? do |n| next if record["sex#{n}"].nil? || record["age#{n}"].nil? - (record["sex#{n}"]) == "F" && record["age#{n}"] >= 16 && record["age#{n}"] <= 50 + (record["sex#{n}"]) == "F" && record["age#{n}"] >= 11 && record["age#{n}"] <= 65 + end + end + + def women_in_household(record) + (1..8).any? do |n| + record["sex#{n}"] == "F" end end diff --git a/app/models/validations/soft_validations.rb b/app/models/validations/soft_validations.rb index 08b2fde60..c86b43974 100644 --- a/app/models/validations/soft_validations.rb +++ b/app/models/validations/soft_validations.rb @@ -48,8 +48,40 @@ module Validations::SoftValidations end end + def no_females_in_a_pregnant_household? + !females_in_the_household? && all_tenants_age_and_gender_information_completed? && preg_occ == 1 + end + + def female_in_pregnant_household_in_soft_validation_range? + all_tenants_age_and_gender_information_completed? && (females_in_age_range(11, 15) || females_in_age_range(51, 65)) && !females_in_age_range(16, 50) && preg_occ == 1 + end + + def all_tenants_age_and_gender_information_completed? + (1..hhmemb).all? do |n| + public_send("sex#{n}").present? && public_send("age#{n}").present? && details_known_or_lead_tenant?(n) && public_send("age#{n}_known").present? && public_send("age#{n}_known").zero? + end + end + private + def details_known_or_lead_tenant?(tenant_number) + return true if tenant_number == 1 + + public_send("details_known_#{tenant_number}").zero? + end + + def females_in_age_range(min, max) + (1..hhmemb).any? do |n| + public_send("sex#{n}") == "F" && public_send("age#{n}").present? && public_send("age#{n}").between?(min, max) + end + end + + def females_in_the_household? + (1..hhmemb).any? do |n| + public_send("sex#{n}") == "F" || public_send("sex#{n}").nil? + end + end + def tenant_is_retired?(economic_status) economic_status == 5 end diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 5b5954d3f..5cdf80c80 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -92,9 +92,7 @@ } }, "conditional_for": { - "irproduct_other": [ - 5 - ] + "irproduct_other": [5] } }, "irproduct_other": { @@ -163,9 +161,7 @@ } }, "conditional_for": { - "postcode_full": [ - 1 - ] + "postcode_full": [1] }, "hidden_in_check_answers": true }, @@ -911,9 +907,7 @@ } }, "conditional_for": { - "mrcdate": [ - 1 - ] + "mrcdate": [1] } }, "mrcdate": { @@ -991,9 +985,7 @@ } }, "conditional_for": { - "tenancyother": [ - 3 - ] + "tenancyother": [3] } }, "tenancyother": { @@ -1035,9 +1027,7 @@ } }, "conditional_for": { - "tenancyother": [ - 3 - ] + "tenancyother": [3] } }, "tenancyother": { @@ -1158,6 +1148,88 @@ } } }, + "no_females_pregnant_household_lead_hhmemb_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_lead_hhmemb_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "lead_tenant_age": { "header": "", "description": "", @@ -1175,15 +1247,10 @@ } }, "conditional_for": { - "age1": [ - 0 - ] + "age1": [0] }, "hidden_in_check_answers": { - "depends_on": [ - { "age1_known": 0 }, - { "age1_known": 1 } - ] + "depends_on": [{ "age1_known": 0 }, { "age1_known": 1 }] } }, "age1": { @@ -1203,6 +1270,88 @@ } } }, + "no_females_pregnant_household_lead_age_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_lead_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "lead_tenant_gender_identity": { "header": "", "description": "", @@ -1232,6 +1381,88 @@ } } }, + "no_females_pregnant_household_lead_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_lead_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "lead_tenant_ethnic_group": { "header": "", "description": "", @@ -1533,24 +1764,28 @@ "depends_on": [{ "person_1_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_1", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_1", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1560,37 +1795,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "lead_tenant_over_retirement_value_check": { - "depends_on": [{ "person_1_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_1_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_1", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_1", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1600,10 +1841,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -1704,15 +1945,10 @@ } }, "conditional_for": { - "age2": [ - 0 - ] + "age2": [0] }, "hidden_in_check_answers": { - "depends_on": [ - { "age2_known": 0 }, - { "age2_known": 1 } - ] + "depends_on": [{ "age2_known": 0 }, { "age2_known": 1 }] } }, "age2": { @@ -1737,14 +1973,99 @@ } ] }, - "person_2_gender_identity": { - "header": "", - "description": "", + "no_females_pregnant_household_person_2_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age2_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, "questions": { - "sex2": { - "check_answer_label": "Person 2’s gender identity", - "header": "Which of these best describes person 2’s gender identity?", - "hint_text": "", + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_2_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age2_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "person_2_gender_identity": { + "header": "", + "description": "", + "questions": { + "sex2": { + "check_answer_label": "Person 2’s gender identity", + "header": "Which of these best describes person 2’s gender identity?", + "hint_text": "", "type": "radio", "answer_options": { "F": { @@ -1771,6 +2092,94 @@ } ] }, + "no_females_pregnant_household_person_2_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_2": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_2_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_2": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_2_working_situation": { "header": "", "description": "", @@ -1839,24 +2248,28 @@ "depends_on": [{ "person_2_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_2", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_2", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1866,37 +2279,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_2_over_retirement_value_check": { - "depends_on": [{ "person_2_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_2_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_2", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_2", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1906,10 +2325,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2007,15 +2426,10 @@ } }, "conditional_for": { - "age3": [ - 0 - ] + "age3": [0] }, "hidden_in_check_answers": { - "depends_on": [ - { "age3_known": 0 }, - { "age3_known": 1 } - ] + "depends_on": [{ "age3_known": 0 }, { "age3_known": 1 }] } }, "age3": { @@ -2040,6 +2454,91 @@ } ] }, + "no_females_pregnant_household_person_3_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age3_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_3_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age3_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_3_gender_identity": { "header": "", "description": "", @@ -2074,15 +2573,103 @@ } ] }, - "person_3_working_situation": { - "header": "", - "description": "", + "no_females_pregnant_household_person_3_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_3": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, "questions": { - "ecstat3": { - "check_answer_label": "Person 3’s working situation", - "header": "Which of these best describes person 3’s working situation?", - "hint_text": "", - "type": "radio", + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_3_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_3": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "person_3_working_situation": { + "header": "", + "description": "", + "questions": { + "ecstat3": { + "check_answer_label": "Person 3’s working situation", + "header": "Which of these best describes person 3’s working situation?", + "hint_text": "", + "type": "radio", "answer_options": { "2": { "value": "Part-time – Less than 30 hours" @@ -2142,24 +2729,28 @@ "depends_on": [{ "person_3_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_3", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_3", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2169,37 +2760,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_3_over_retirement_value_check": { - "depends_on": [{ "person_3_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_3_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_3", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_3", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2209,10 +2806,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2307,15 +2904,10 @@ } }, "conditional_for": { - "age4": [ - 0 - ] + "age4": [0] }, "hidden_in_check_answers": { - "depends_on": [ - { "age4_known": 0 }, - { "age4_known": 1 } - ] + "depends_on": [{ "age4_known": 0 }, { "age4_known": 1 }] } }, "age4": { @@ -2340,6 +2932,91 @@ } ] }, + "no_females_pregnant_household_person_4_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age4_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_4_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age4_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_4_gender_identity": { "header": "", "description": "", @@ -2374,6 +3051,94 @@ } ] }, + "no_females_pregnant_household_person_4_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_4": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_4_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_4": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_4_working_situation": { "header": "", "description": "", @@ -2442,24 +3207,28 @@ "depends_on": [{ "person_4_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_4", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_4", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2469,50 +3238,56 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_4_over_retirement_value_check": { - "depends_on": [{ "person_4_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_4_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_4", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] - }, - "questions": { - "retirement_value_check": { - "check_answer_label": "Retirement age soft validation", - "hidden_in_check_answers": true, + "arguments": [ + { + "key": "plural_gender_for_person_4", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] + }, + "questions": { + "retirement_value_check": { + "check_answer_label": "Retirement age soft validation", + "hidden_in_check_answers": true, "header": "Are you sure this person isn’t retired?", "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2604,15 +3379,10 @@ } }, "conditional_for": { - "age5": [ - 0 - ] + "age5": [0] }, "hidden_in_check_answers": { - "depends_on": [ - { "age5_known": 0 }, - { "age5_known": 1 } - ] + "depends_on": [{ "age5_known": 0 }, { "age5_known": 1 }] } }, "age5": { @@ -2637,6 +3407,91 @@ } ] }, + "no_females_pregnant_household_person_5_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age5_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_5_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age5_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_5_gender_identity": { "header": "", "description": "", @@ -2671,6 +3526,94 @@ } ] }, + "no_females_pregnant_household_person_5_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_5": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_5_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_5": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_5_working_situation": { "header": "", "description": "", @@ -2739,24 +3682,28 @@ "depends_on": [{ "person_5_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_5", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_5", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2766,37 +3713,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_5_over_retirement_value_check": { - "depends_on": [{ "person_5_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_5_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_5", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_5", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2806,10 +3759,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2898,15 +3851,10 @@ } }, "conditional_for": { - "age6": [ - 0 - ] + "age6": [0] }, "hidden_in_check_answers": { - "depends_on": [ - { "age6_known": 0 }, - { "age6_known": 1 } - ] + "depends_on": [{ "age6_known": 0 }, { "age6_known": 1 }] } }, "age6": { @@ -2931,6 +3879,91 @@ } ] }, + "no_females_pregnant_household_person_6_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age6_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_6_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age6_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_6_gender_identity": { "header": "", "description": "", @@ -2965,9 +3998,97 @@ } ] }, - "person_6_working_situation": { - "header": "", - "description": "", + "no_females_pregnant_household_person_6_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_6": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_6_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_6": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "person_6_working_situation": { + "header": "", + "description": "", "questions": { "ecstat6": { "check_answer_label": "Person 6’s working situation", @@ -3033,24 +4154,28 @@ "depends_on": [{ "person_6_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_6", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_6", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3060,37 +4185,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_6_over_retirement_value_check": { - "depends_on": [{ "person_6_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_6_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_6", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_6", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3100,10 +4231,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -3189,15 +4320,10 @@ } }, "conditional_for": { - "age7": [ - 0 - ] + "age7": [0] }, "hidden_in_check_answers": { - "depends_on": [ - { "age7_known": 0 }, - { "age7_known": 1 } - ] + "depends_on": [{ "age7_known": 0 }, { "age7_known": 1 }] } }, "age7": { @@ -3222,6 +4348,91 @@ } ] }, + "no_females_pregnant_household_person_7_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age7_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_7_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age7_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_7_gender_identity": { "header": "", "description": "", @@ -3256,6 +4467,94 @@ } ] }, + "no_females_pregnant_household_person_7_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_7": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_7_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_7": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_7_working_situation": { "header": "", "description": "", @@ -3324,24 +4623,28 @@ "depends_on": [{ "person_7_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_7", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_7", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3351,37 +4654,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_7_over_retirement_value_check": { - "depends_on": [{ "person_7_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_7_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_7", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_7", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3391,10 +4700,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -3452,22 +4761,133 @@ "value": "Person prefers not to say" } } - } + } + }, + "depends_on": [ + { + "details_known_8": 0 + } + ] + }, + "person_8_age": { + "header": "", + "description": "", + "questions": { + "age8_known": { + "header": "Do you know person 8’s age?", + "hint_text": "", + "type": "radio", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + }, + "conditional_for": { + "age8": [0] + }, + "hidden_in_check_answers": { + "depends_on": [{ "age8_known": 0 }, { "age8_known": 1 }] + } + }, + "age8": { + "header": "Age", + "check_answer_label": "Person 8’s age", + "type": "numeric", + "min": 0, + "max": 120, + "step": 1, + "width": 2, + "inferred_check_answers_value": { + "condition": { + "age8_known": 1 + }, + "value": "Not known" + } + } + }, + "depends_on": [ + { + "details_known_8": 0 + } + ] + }, + "no_females_pregnant_household_person_8_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age8_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_8_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age8_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] }, - "depends_on": [ - { - "details_known_8": 0 - } - ] - }, - "person_8_age": { - "header": "", - "description": "", "questions": { - "age8_known": { - "header": "Do you know person 8’s age?", - "hint_text": "", - "type": "radio", + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", "answer_options": { "0": { "value": "Yes" @@ -3475,40 +4895,9 @@ "1": { "value": "No" } - }, - "conditional_for": { - "age8": [ - 0 - ] - }, - "hidden_in_check_answers": { - "depends_on": [ - { "age8_known": 0 }, - { "age8_known": 1 } - ] - } - }, - "age8": { - "header": "Age", - "check_answer_label": "Person 8’s age", - "type": "numeric", - "min": 0, - "max": 120, - "step": 1, - "width": 2, - "inferred_check_answers_value": { - "condition": { - "age8_known": 1 - }, - "value": "Not known" } } - }, - "depends_on": [ - { - "details_known_8": 0 - } - ] + } }, "person_8_gender_identity": { "header": "", @@ -3544,6 +4933,94 @@ } ] }, + "no_females_pregnant_household_person_8_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_8": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_8_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_8": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_8_working_situation": { "header": "", "description": "", @@ -3612,24 +5089,28 @@ "depends_on": [{ "person_8_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_8", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_8", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3639,37 +5120,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_8_over_retirement_value_check": { - "depends_on": [{ "person_8_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_8_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_8", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_8", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3679,10 +5166,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -3824,6 +5311,88 @@ } } }, + "no_females_pregnant_household_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "access_needs": { "header": "", "description": "", @@ -4154,9 +5723,7 @@ } }, "conditional_for": { - "reasonother": [ - 20 - ] + "reasonother": [20] } }, "reasonother": { @@ -4392,9 +5959,7 @@ } }, "conditional_for": { - "ppostcode_full": [ - 1 - ] + "ppostcode_full": [1] }, "hidden_in_check_answers": { "depends_on": [ @@ -4447,9 +6012,7 @@ } }, "conditional_for": { - "prevloc": [ - 1 - ] + "prevloc": [1] } }, "prevloc": { @@ -5284,15 +6847,18 @@ "title_text": "soft_validations.net_income.title_text", "informative_text": { "translation": "soft_validations.net_income.hint_text", - "arguments": [{ - "key": "ecstat1", - "label": true, - "i18n_template": "ecstat1" - }, - {"key": "earnings", - "label": true, - "i18n_template": "earnings" - }] + "arguments": [ + { + "key": "ecstat1", + "label": true, + "i18n_template": "ecstat1" + }, + { + "key": "earnings", + "label": true, + "i18n_template": "earnings" + } + ] }, "questions": { "net_income_value_check": { @@ -5467,9 +7033,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5564,9 +7128,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5611,9 +7173,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5658,9 +7218,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5701,12 +7259,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5720,12 +7273,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5739,12 +7287,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5758,12 +7301,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5779,12 +7317,7 @@ "suffix": " every week", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -5924,12 +7457,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5943,12 +7471,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5962,12 +7485,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5981,12 +7499,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6002,12 +7515,7 @@ "suffix": " every 2 weeks", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -6047,12 +7555,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6066,12 +7569,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6085,12 +7583,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6104,12 +7597,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6125,12 +7613,7 @@ "suffix": " every 4 weeks", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -6170,12 +7653,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6189,12 +7667,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6208,12 +7681,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6227,12 +7695,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6248,12 +7711,7 @@ "suffix": " every month", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -6284,22 +7742,22 @@ "informative_text": { "translation": "soft_validations.rent.min.hint_text", "arguments": [ - { - "key": "la", - "label": true, - "i18n_template": "la" - }, - { - "key": "soft_min_for_period", - "label": false, - "i18n_template": "soft_min_for_period" - }, - { - "key":"brent", - "label": true, - "i18n_template": "brent" - } - ] + { + "key": "la", + "label": true, + "i18n_template": "la" + }, + { + "key": "soft_min_for_period", + "label": false, + "i18n_template": "soft_min_for_period" + }, + { + "key": "brent", + "label": true, + "i18n_template": "brent" + } + ] }, "questions": { "rent_value_check": { @@ -6328,13 +7786,13 @@ "label": true, "i18n_template": "la" }, - { + { "key": "soft_max_for_period", "label": false, "i18n_template": "soft_max_for_period" }, { - "key":"brent", + "key": "brent", "label": true, "i18n_template": "brent" } diff --git a/config/forms/2022_2023.json b/config/forms/2022_2023.json index ef7b49077..bd18826c8 100644 --- a/config/forms/2022_2023.json +++ b/config/forms/2022_2023.json @@ -92,9 +92,7 @@ } }, "conditional_for": { - "irproduct_other": [ - 5 - ] + "irproduct_other": [5] } }, "irproduct_other": { @@ -163,9 +161,7 @@ } }, "conditional_for": { - "postcode_full": [ - 1 - ] + "postcode_full": [1] }, "hidden_in_check_answers": true }, @@ -911,9 +907,7 @@ } }, "conditional_for": { - "mrcdate": [ - 1 - ] + "mrcdate": [1] } }, "mrcdate": { @@ -1020,9 +1014,7 @@ } }, "conditional_for": { - "tenancyother": [ - 3 - ] + "tenancyother": [3] } }, "tenancyother": { @@ -1067,9 +1059,7 @@ } }, "conditional_for": { - "tenancyother": [ - 3 - ] + "tenancyother": [3] } }, "tenancyother": { @@ -1193,6 +1183,88 @@ } } }, + "no_females_pregnant_household_lead_hhmemb_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_lead_hhmemb_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "lead_tenant_age": { "header": "", "description": "", @@ -1210,9 +1282,7 @@ } }, "conditional_for": { - "age1": [ - 0 - ] + "age1": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -1242,6 +1312,88 @@ } } }, + "no_females_pregnant_household_lead_age_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_lead_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "lead_tenant_gender_identity": { "header": "", "description": "", @@ -1271,6 +1423,88 @@ } } }, + "no_females_pregnant_household_lead_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_lead_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "lead_tenant_ethnic_group": { "header": "", "description": "", @@ -1536,24 +1770,28 @@ "depends_on": [{ "person_1_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_1", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_1", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1563,37 +1801,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "lead_tenant_over_retirement_value_check": { - "depends_on": [{ "person_1_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_1_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_1", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_1", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_1", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_1", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1603,10 +1847,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -1707,9 +1951,7 @@ } }, "conditional_for": { - "age2": [ - 0 - ] + "age2": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -1744,40 +1986,213 @@ } ] }, - "person_2_gender_identity": { - "header": "", - "description": "", + "no_females_pregnant_household_person_2_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age2_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, "questions": { - "sex2": { - "check_answer_label": "Person 2’s gender identity", - "header": "Which of these best describes person 2’s gender identity?", - "hint_text": "", - "type": "radio", + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", "answer_options": { - "F": { - "value": "Female" - }, - "M": { - "value": "Male" - }, - "X": { - "value": "Non-binary" - }, - "divider": { - "value": true + "0": { + "value": "Yes" }, - "R": { - "value": "Person prefers not to say" + "1": { + "value": "No" } } } - }, + } + }, + "females_in_soft_age_range_in_pregnant_household_person_2_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age2_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "person_2_gender_identity": { + "header": "", + "description": "", + "questions": { + "sex2": { + "check_answer_label": "Person 2’s gender identity", + "header": "Which of these best describes person 2’s gender identity?", + "hint_text": "", + "type": "radio", + "answer_options": { + "F": { + "value": "Female" + }, + "M": { + "value": "Male" + }, + "X": { + "value": "Non-binary" + }, + "divider": { + "value": true + }, + "R": { + "value": "Person prefers not to say" + } + } + } + }, "depends_on": [ { "details_known_2": 0 } ] }, + "no_females_pregnant_household_person_2_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_2": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_2_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_2": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_2_working_situation": { "header": "", "description": "", @@ -1849,24 +2264,28 @@ "depends_on": [{ "person_2_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_2", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_2", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1876,37 +2295,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_2_over_retirement_value_check": { - "depends_on": [{ "person_2_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_2_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_2", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_2", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_2", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_2", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -1916,10 +2341,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2017,9 +2442,7 @@ } }, "conditional_for": { - "age3": [ - 0 - ] + "age3": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -2054,6 +2477,91 @@ } ] }, + "no_females_pregnant_household_person_3_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age3_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_3_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age3_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_3_gender_identity": { "header": "", "description": "", @@ -2088,6 +2596,94 @@ } ] }, + "no_females_pregnant_household_person_3_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_3": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_3_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_3": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_3_working_situation": { "header": "", "description": "", @@ -2159,24 +2755,28 @@ "depends_on": [{ "person_3_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_3", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_3", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2186,37 +2786,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_3_over_retirement_value_check": { - "depends_on": [{ "person_3_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_3_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_3", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_3", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_3", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_3", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2226,10 +2832,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2324,9 +2930,7 @@ } }, "conditional_for": { - "age4": [ - 0 - ] + "age4": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -2361,6 +2965,91 @@ } ] }, + "no_females_pregnant_household_person_4_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age4_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_4_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age4_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_4_gender_identity": { "header": "", "description": "", @@ -2388,12 +3077,100 @@ } } } - }, - "depends_on": [ - { - "details_known_4": 0 - } - ] + }, + "depends_on": [ + { + "details_known_4": 0 + } + ] + }, + "no_females_pregnant_household_person_4_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_4": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_4_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_4": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } }, "person_4_working_situation": { "header": "", @@ -2466,24 +3243,28 @@ "depends_on": [{ "person_4_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_4", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_4", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2493,37 +3274,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_4_over_retirement_value_check": { - "depends_on": [{ "person_4_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_4_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_4", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_4", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_4", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_4", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2533,10 +3320,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2628,9 +3415,7 @@ } }, "conditional_for": { - "age5": [ - 0 - ] + "age5": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -2665,6 +3450,91 @@ } ] }, + "no_females_pregnant_household_person_5_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age5_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_5_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age5_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_5_gender_identity": { "header": "", "description": "", @@ -2699,6 +3569,94 @@ } ] }, + "no_females_pregnant_household_person_5_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_5": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_5_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_5": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_5_working_situation": { "header": "", "description": "", @@ -2770,24 +3728,28 @@ "depends_on": [{ "person_5_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_5", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_5", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2797,37 +3759,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_5_over_retirement_value_check": { - "depends_on": [{ "person_5_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_5_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_5", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_5", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_5", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_5", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -2837,10 +3805,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -2929,9 +3897,7 @@ } }, "conditional_for": { - "age6": [ - 0 - ] + "age6": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -2964,7 +3930,92 @@ { "details_known_6": 0 } - ] + ] + }, + "no_females_pregnant_household_person_6_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age6_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_6_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age6_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } }, "person_6_gender_identity": { "header": "", @@ -3000,6 +4051,94 @@ } ] }, + "no_females_pregnant_household_person_6_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_6": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_6_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_6": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_6_working_situation": { "header": "", "description": "", @@ -3071,24 +4210,28 @@ "depends_on": [{ "person_6_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_6", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_6", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3098,37 +4241,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_6_over_retirement_value_check": { - "depends_on": [{ "person_6_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_6_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_6", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_6", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_6", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_6", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3138,10 +4287,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -3227,9 +4376,7 @@ } }, "conditional_for": { - "age7": [ - 0 - ] + "age7": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -3264,6 +4411,91 @@ } ] }, + "no_females_pregnant_household_person_7_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age7_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_7_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age7_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_7_gender_identity": { "header": "", "description": "", @@ -3298,6 +4530,94 @@ } ] }, + "no_females_pregnant_household_person_7_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_7": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_7_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_7": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_7_working_situation": { "header": "", "description": "", @@ -3369,24 +4689,28 @@ "depends_on": [{ "person_7_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_7", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_7", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3396,37 +4720,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_7_over_retirement_value_check": { - "depends_on": [{ "person_7_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_7_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_7", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_7", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_7", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_7", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3436,10 +4766,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -3522,9 +4852,7 @@ } }, "conditional_for": { - "age8": [ - 0 - ] + "age8": [0] }, "hidden_in_check_answers": { "depends_on": [ @@ -3559,6 +4887,91 @@ } ] }, + "no_females_pregnant_household_person_8_age_value_check": { + "depends_on": [ + { "no_females_in_a_pregnant_household?": true, "age8_known": 0 } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_8_age_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "age8_known": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_8_gender_identity": { "header": "", "description": "", @@ -3593,6 +5006,94 @@ } ] }, + "no_females_pregnant_household_person_8_value_check": { + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true, + "details_known_8": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_person_8_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true, + "details_known_8": 0 + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "person_8_working_situation": { "header": "", "description": "", @@ -3664,24 +5165,28 @@ "depends_on": [{ "person_8_retired_under_soft_min_age?": true }], "title_text": { "translation": "soft_validations.retirement.min.title", - "arguments": [{ - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.min.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_8", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_8", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3691,37 +5196,43 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } } }, "person_8_over_retirement_value_check": { - "depends_on": [{ "person_8_not_retired_over_soft_max_age?": true }], + "depends_on": [ + { "person_8_not_retired_over_soft_max_age?": true } + ], "title_text": { "translation": "soft_validations.retirement.max.title", - "arguments": [{ - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "informative_text": { "translation": "soft_validations.retirement.max.hint_text", - "arguments": [{ - "key": "plural_gender_for_person_8", - "label": false, - "i18n_template": "gender" - }, - { - "key": "retirement_age_for_person_8", - "label": false, - "i18n_template": "age" - }] + "arguments": [ + { + "key": "plural_gender_for_person_8", + "label": false, + "i18n_template": "gender" + }, + { + "key": "retirement_age_for_person_8", + "label": false, + "i18n_template": "age" + } + ] }, "questions": { "retirement_value_check": { @@ -3731,10 +5242,10 @@ "type": "interruption_screen", "answer_options": { "0": { - "value":"Yes" + "value": "Yes" }, "1": { - "value":"No" + "value": "No" } } } @@ -3876,6 +5387,88 @@ } } }, + "no_females_pregnant_household_value_check": { + "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.no_females", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, + "females_in_soft_age_range_in_pregnant_household_value_check": { + "depends_on": [ + { + "female_in_pregnant_household_in_soft_validation_range?": true + } + ], + "title_text": { + "translation": "soft_validations.pregnancy.title", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "informative_text": { + "translation": "soft_validations.pregnancy.females_not_in_soft_age_range", + "arguments": [ + { + "key": "sex1", + "label": true, + "i18n_template": "sex1" + } + ] + }, + "questions": { + "pregnancy_value_check": { + "check_answer_label": "Pregnancy soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this is correct?", + "type": "interruption_screen", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" + } + } + } + } + }, "access_needs": { "header": "", "description": "", @@ -4206,9 +5799,7 @@ } }, "conditional_for": { - "reasonother": [ - 20 - ] + "reasonother": [20] } }, "reasonother": { @@ -4404,9 +5995,7 @@ } }, "conditional_for": { - "ppostcode_full": [ - 1 - ] + "ppostcode_full": [1] }, "hidden_in_check_answers": { "depends_on": [ @@ -4467,9 +6056,7 @@ } }, "conditional_for": { - "prevloc": [ - 1 - ] + "prevloc": [1] } }, "prevloc": { @@ -5304,15 +6891,18 @@ "title_text": "soft_validations.net_income.title_text", "informative_text": { "translation": "soft_validations.net_income.hint_text", - "arguments": [{ - "key": "ecstat1", - "label": true, - "i18n_template": "ecstat1" - }, - {"key": "earnings", - "label": true, - "i18n_template": "earnings" - }] + "arguments": [ + { + "key": "ecstat1", + "label": true, + "i18n_template": "ecstat1" + }, + { + "key": "earnings", + "label": true, + "i18n_template": "earnings" + } + ] }, "questions": { "net_income_value_check": { @@ -5484,9 +7074,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5581,9 +7169,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5628,9 +7214,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5675,9 +7259,7 @@ } }, "conditional_for": { - "chcharge": [ - 1 - ] + "chcharge": [1] } }, "chcharge": { @@ -5718,12 +7300,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5737,12 +7314,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5756,12 +7328,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5775,12 +7342,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5796,12 +7358,7 @@ "suffix": " every week", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -5941,12 +7498,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5960,12 +7512,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5979,12 +7526,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -5998,12 +7540,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6019,12 +7556,7 @@ "suffix": " every 2 weeks", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -6064,12 +7596,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6083,12 +7610,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6102,12 +7624,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6121,12 +7638,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6142,12 +7654,7 @@ "suffix": " every 4 weeks", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -6187,12 +7694,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6206,12 +7708,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6225,12 +7722,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6244,12 +7736,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -6265,12 +7752,7 @@ "suffix": " every month", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -6301,22 +7783,22 @@ "informative_text": { "translation": "soft_validations.rent.min.hint_text", "arguments": [ - { - "key": "la", - "label": true, - "i18n_template": "la" - }, - { - "key": "soft_min_for_period", - "label": false, - "i18n_template": "soft_min_for_period" - }, - { - "key":"brent", - "label": true, - "i18n_template": "brent" - } - ] + { + "key": "la", + "label": true, + "i18n_template": "la" + }, + { + "key": "soft_min_for_period", + "label": false, + "i18n_template": "soft_min_for_period" + }, + { + "key": "brent", + "label": true, + "i18n_template": "brent" + } + ] }, "questions": { "rent_value_check": { @@ -6351,11 +7833,11 @@ "i18n_template": "soft_max_for_period" }, { - "key":"brent", + "key": "brent", "label": true, "i18n_template": "brent" - } - ] + } + ] }, "questions": { "rent_value_check": { diff --git a/config/locales/en.yml b/config/locales/en.yml index 367a11658..32d82808a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -157,7 +157,7 @@ en: question_required: "You must answer whether the person is still serving in the UK armed forces as you told us they’re a current or former regular" question_not_required: "You cannot answer whether the person is still serving in the UK armed forces as you told us they’re not a current or former regular" preg_occ: - no_female: "You must answer ‘no’ as there are no females aged 16-50 in the household" + no_female: "You must answer ‘no’ as there are no female tenants aged 11-65 in the household" age: retired_male: "Male tenant who is retired must be 65 or over" retired_female: "Female tenant who is retired must be 60 or over" @@ -227,7 +227,6 @@ en: not_joint: "This cannot be a joint tenancy as you've told us there's only one person in the household" joint_more_than_one_member: "There must be more than one person in the household as you've told us this is a joint tenancy" - declaration: missing: "You must show the DLUHC privacy notice to the tenant before you can submit this log." @@ -241,9 +240,9 @@ en: message: "Net income is higher than expected based on the lead tenant’s working situation. Are you sure this is correct?" rent: min: - hint_text: "
The minimum rent for this type of property in %{la} is £%{soft_min_for_period}.
" + hint_text: 'The minimum rent for this type of property in %{la} is £%{soft_min_for_period}.
' max: - hint_text: "The maximum rent for this type of property in %{la} is £%{soft_max_for_period}.
" + hint_text: 'The maximum rent for this type of property in %{la} is £%{soft_max_for_period}.
' retirement: min: title: "You told us this person is under %{age} and retired" @@ -251,6 +250,10 @@ en: max: title: "You told us this person is %{age} or over and not retired" hint_text: "The minimum expected retirement age for %{gender} in England is %{age}." + pregnancy: + title: "You told us somebody in the household is pregnant" + no_females: "You also told us there are no female tenants living at the property." + females_not_in_soft_age_range: "You also told us that any female tenants living at the property are in the following age ranges: