* household needs section change
* update enums
* fix specs
* spec fixes
* content updates to form
* fix failing spec
* remove hint text
* Update config/forms/2021_2022.json
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
"header":"Does anybody in the household have any links to the UK armed forces?",
"hint_text":"This excludes national service.<br><br>If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner.",
"type":"radio",
"check_answer_label":"Household links to UK armed forces",
"answer_options":{
"0":{
"value":"Yes, the person is a current or former regular"
},
"1":{
"value":"Yes, the person is a current or former reserve"
},
"2":{
"value":"Yes, the person is a spouse or civil partner of a UK armed forces member and has been bereaved or separated from them within the last 2 years"
},
"3":{
"value":"No"
},
"4":{
"value":"Person prefers not to say"
}
}
}
}
},
"armed_forces_member":{
"header":"",
"description":"",
"depends_on":[
{
"armedforces":"Yes, the person is a current or former regular"
}
],
"questions":{
"leftreg":{
"header":"Is the person still serving in the UK armed forces?",
"hint_text":"",
"type":"radio",
"check_answer_label":"Person still serving in UK armed forces",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No, they left up to and including 5 years ago"
},
"2":{
"value":"No, they left more than 5 years ago"
},
"3":{
"value":"Person prefers not to say"
}
}
}
}
},
"armed_forces_reservist":{
"header":"",
"description":"",
"depends_on":[
{
"armedforces":"Yes, the person is a current or former regular"
},
{
"armedforces":"Yes, the person is a current or former reserve"
}
],
"questions":{
"reservist":{
"header":"Was the person seriously injured or ill as a result of serving in the UK armed forces?",
"hint_text":"",
"type":"radio",
"check_answer_label":"Person seriously injured or ill as result of serving in UK armed forces",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No"
},
"2":{
"value":"Person prefers not to say"
}
}
}
}
},
"pregnancy":{
"header":"",
"description":"",
"questions":{
"preg_occ":{
"header":"Is anybody in the household pregnant?",
"hint_text":"",
"type":"radio",
"check_answer_label":"Anybody in household pregnant",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No"
},
"2":{
"value":"Tenant prefers not to say"
}
}
}
}
},
"accessibility_requirements":{
"header":"",
"description":"",
"questions":{
"accessibility_requirements":{
"header":"Does anybody in the household have any disabled access needs?",
"hint_text":"",
"type":"checkbox",
"check_answer_label":"Anybody in household with disabled access needs",
"answer_options":{
"housingneeds_a":{
"value":"Fully wheelchair accessible housing"
},
"housingneeds_b":{
"value":"Wheelchair access to essential rooms"
},
"housingneeds_c":{
"value":"Level access housing"
},
"housingneeds_f":{
"value":"Other disabled access needs"
},
"divider":{
"value":true
},
"housingneeds_g":{
"value":"No disabled access needs"
},
"housingneeds_h":{
"value":"Don’t know"
}
}
}
}
},
"medical_conditions":{
"header":"",
"description":"",
"questions":{
"illness":{
"header":"Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?",
"hint_text":"",
"type":"radio",
"check_answer_label":"Anybody in household with physical or mental health condition",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No"
},
"2":{
"value":"Tenant prefers not to say"
}
}
}
}
},
"condition_effects":{
"header":"",
"description":"",
"depends_on":[
{
"illness":"Yes"
}
],
"questions":{
"condition_effects":{
"header":"How is the person affected by their condition or illness?",
"hint_text":"Select all that apply.",
"type":"checkbox",
"check_answer_label":"How is person affected by condition or illness",
"answer_options":{
"illness_type_1":{
"value":"Vision",
"hint":"For example, blindness or partial sight."
},
"illness_type_2":{
"value":"Hearing",
"hint":"For example, deafness or partial hearing."
},
"illness_type_3":{
"value":"Mobility",
"hint":"For example, walking short distances or climbing stairs."
},
"illness_type_4":{
"value":"Dexterity",
"hint":"For example, lifting and carrying objects or using a keyboard."
},
"illness_type_5":{
"value":"Learning or understanding or concentrating"
},
"illness_type_6":{
"value":"Memory"
},
"illness_type_7":{
"value":"Mental health",
"hint":"For example, depression or anxiety."
},
"illness_type_8":{
"value":"Stamina or breathing or fatigue"
},
"illness_type_9":{
"value":"Socially or behaviourally",
"hint":"For example, associated with autism spectrum disorder (ASD) which includes Asperger’s or attention deficit hyperactivity disorder (ADHD)."
},
"illness_type_10":{
"value":"Other"
}
}
}
}
}
}
},
"household_situation":{
"household_situation":{
"label":"Household situation",
"label":"Household situation",
"depends_on":[
"depends_on":[
@ -3216,239 +3453,6 @@
]
]
}
}
}
}
},
"household_needs":{
"label":"Household needs",
"depends_on":[
{
"setup":"completed"
}
],
"pages":{
"armed_forces":{
"header":"Experience of the UK Armed Forces",
"description":"",
"questions":{
"armedforces":{
"header":"Is anyone in the household...",
"hint_text":"This excludes national service.",
"type":"radio",
"check_answer_label":"Armed Forces",
"answer_options":{
"0":{
"value":"A current or former regular in the UK Armed Forces (excluding National Service)"
},
"1":{
"value":"A current or former reserve in the UK Armed Forces (excluding National Service)"
},
"2":{
"value":"A spouse / civil partner of a UK Armed Forces member who has separated or been bereaved within the last 2 years"
},
"3":{
"value":"No"
},
"4":{
"value":"Tenant prefers not to say"
}
}
}
}
},
"armed_forces_member":{
"header":"Experience of the UK Armed Forces",
"description":"",
"depends_on":[
{
"armedforces":"A current or former regular in the UK Armed Forces (excluding National Service)"
}
],
"questions":{
"leftreg":{
"header":"Are they still serving?",
"hint_text":"",
"type":"radio",
"check_answer_label":"When did they leave the Armed Forces?",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No - they left up to 5 years ago"
},
"2":{
"value":"No - they left more than 5 years ago"
},
"3":{
"value":"Prefer not to say"
},
"divider":{
"value":true
}
}
},
"reservist":{
"header":"Were they seriously injured or ill as a result of their service?",
"hint_text":"",
"type":"radio",
"check_answer_label":"Has anyone in the household been seriously injured or ill as a result of their service in the armed forces?",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No"
},
"2":{
"value":"Prefer not to say"
},
"divider":{
"value":true
}
}
}
}
},
"medical_conditions":{
"header":"",
"description":"",
"questions":{
"illness":{
"header":"Does anyone in the household have any of the following that they expect to last for 12 months or more:<ul><li>Physical Condition</li><li>Mental Health Condition</li><li>Other Illness</li></ul>",
"hint_text":"",
"type":"radio",
"check_answer_label":"Physical, mental health or illness in the household",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No"
},
"2":{
"value":"Prefer not to say"
},
"divider":{
"value":true
}
}
}
}
},
"pregnancy":{
"header":"",
"description":"",
"questions":{
"preg_occ":{
"header":"Is anyone in the household pregnant?",
"hint_text":"",
"type":"radio",
"check_answer_label":"Pregnancy in the household",
"answer_options":{
"0":{
"value":"Yes"
},
"1":{
"value":"No"
},
"2":{
"value":"Prefer not to say"
},
"divider":{
"value":true
}
}
}
}
},
"accessibility_requirements":{
"header":"",
"description":"",
"questions":{
"accessibility_requirements":{
"header":"Are any of these affected by their condition or illness?",
"hint_text":"Select all that apply.",
"type":"checkbox",
"check_answer_label":"Disability requirements",
"answer_options":{
"housingneeds_a":{
"value":"Fully wheelchair accessible housing"
},
"housingneeds_b":{
"value":"Wheelchair access to essential rooms"
},
"housingneeds_c":{
"value":"Level access housing"
},
"housingneeds_f":{
"value":"Other disability requirements"
},
"housingneeds_g":{
"value":"No disability requirements"
},
"divider":{
"value":true
},
"housingneeds_h":{
"value":"Don’t know"
},
"accessibility_requirements_prefer_not_to_say":{
"value":"Prefer not to say"
}
}
}
}
},
"condition_effects":{
"header":"",
"description":"",
"questions":{
"condition_effects":{
"header":"Are any of these affected by their condition or illness?",
"hint_text":"Select all that apply.",
"type":"checkbox",
"check_answer_label":"Conditions or illnesses",
"answer_options":{
"illness_type_1":{
"value":"Vision",
"hint":"For example, blindness or partial sight."
},
"illness_type_2":{
"value":"Hearing",
"hint":"For example, deafness or partial hearing."
},
"illness_type_3":{
"value":"Mobility",
"hint":"For example, walking short distances or climbing stairs."
},
"illness_type_4":{
"value":"Dexterity",
"hint":"For example, lifting and carrying objects or using a keyboard."
},
"illness_type_8":{
"value":"Stamina or breathing or fatigue"
},
"illness_type_5":{
"value":"Learning or understanding or concentrating"
},
"illness_type_6":{
"value":"Memory"
},
"illness_type_7":{
"value":"Mental health",
"hint":"For example, depression, anxiety, schizophrenia or bipolar."
},
"illness_type_9":{
"value":"Socially or behaviourally",
"hint":"For example, associated with autism spectrum disorder (ASD) which includes Asperger’s or attention deficit hyperactivity disorder (ADHD)."
"header":"Does anybody in the household have any links to the UK armed forces?",
"hint_text":"This excludes national service",
"hint_text":"This excludes national service. If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner.",
"type":"radio",
"type":"radio",
"check_answer_label":"Armed Forces",
"check_answer_label":"Household links to UK armed forces",
"answer_options":{
"answer_options":{
"0":{
"0":{
"value":"A current or former regular in the UK Armed Forces (excluding National Service)"
"value":"Yes, the person is a current or former regular"
},
},
"1":{
"1":{
"value":"A current or former reserve in the UK Armed Forces (excluding National Service)"
"value":"Yes, the person is a current or former reserve"
},
},
"2":{
"2":{
"value":"A spouse / civil partner of a UK Armed Forces member who has separated or been bereaved within the last 2 years"
"value":"Yes, the tenant is a spouse or civil partner of a UK armed forces member and has been bereaved or separated from them within the last 2 years"
},
},
"3":{
"3":{
"value":"No"
"value":"No"
},
},
"4":{
"4":{
"value":"Tenant prefers not to say"
"value":"Person prefers not to say"
}
}
},
},
"conditional_for":{
"conditional_for":{
"leftreg":["A current or former regular in the UK Armed Forces (excluding National Service)"]
"leftreg":["Yes, the person is a current or former regular"]
@ -122,7 +122,7 @@ RSpec.describe Validations::HouseholdValidations do
end
end
it"validates that pregnancy cannot be prefer not to say"do
it"validates that pregnancy cannot be prefer not to say"do
record.preg_occ="Prefer not to say"
record.preg_occ="Tenant prefers not to say"
record.sex1="Male"
record.sex1="Male"
household_validator.validate_pregnancy(record)
household_validator.validate_pregnancy(record)
expect(record.errors["preg_occ"])
expect(record.errors["preg_occ"])
@ -244,7 +244,7 @@ RSpec.describe Validations::HouseholdValidations do
context"when the tenant prefers not to say if they were or are in the armed forces"do
context"when the tenant prefers not to say if they were or are in the armed forces"do
it"validates that injured in the armed forces is not yes"do
it"validates that injured in the armed forces is not yes"do
record.armedforces="Tenant prefers not to say"
record.armedforces="Person prefers not to say"
record.reservist="Yes"
record.reservist="Yes"
household_validator.validate_armed_forces(record)
household_validator.validate_armed_forces(record)
expect(record.errors["reservist"])
expect(record.errors["reservist"])
@ -254,7 +254,7 @@ RSpec.describe Validations::HouseholdValidations do
context"when the tenant was or is a regular member of the armed forces"do
context"when the tenant was or is a regular member of the armed forces"do
it"expects that injured in the armed forces can be yes"do
it"expects that injured in the armed forces can be yes"do
record.armedforces="A current or former regular in the UK Armed Forces (excluding National Service)"
record.armedforces="Yes, the person is a current or former regular"
record.reservist="Yes"
record.reservist="Yes"
household_validator.validate_armed_forces(record)
household_validator.validate_armed_forces(record)
expect(record.errors["reservist"]).tobe_empty
expect(record.errors["reservist"]).tobe_empty
@ -263,7 +263,7 @@ RSpec.describe Validations::HouseholdValidations do
context"when the tenant was or is a reserve member of the armed forces"do
context"when the tenant was or is a reserve member of the armed forces"do
it"expects that injured in the armed forces can be yes"do
it"expects that injured in the armed forces can be yes"do
record.armedforces="A current or former reserve in the UK Armed Forces (excluding National Service)"
record.armedforces="Yes, the person is a current or former reserve"
record.reservist="Yes"
record.reservist="Yes"
household_validator.validate_armed_forces(record)
household_validator.validate_armed_forces(record)
expect(record.errors["reservist"]).tobe_empty
expect(record.errors["reservist"]).tobe_empty
@ -272,7 +272,7 @@ RSpec.describe Validations::HouseholdValidations do
context"when the tenant's partner was or is a member of the armed forces"do
context"when the tenant's partner was or is a member of the armed forces"do
it"expects that injured in the armed forces can be yes"do
it"expects that injured in the armed forces can be yes"do
record.armedforces="A spouse / civil partner of a UK Armed Forces member who has separated or been bereaved within the last 2 years"
record.armedforces="Yes, the tenant is a spouse or civil partner of a UK armed forces member and has been bereaved or separated from them within the last 2 years"
record.reservist="Yes"
record.reservist="Yes"
household_validator.validate_armed_forces(record)
household_validator.validate_armed_forces(record)
expect(record.errors["reservist"]).tobe_empty
expect(record.errors["reservist"]).tobe_empty
@ -289,14 +289,14 @@ RSpec.describe Validations::HouseholdValidations do
end
end
it"expects that they served in the armed forces"do
it"expects that they served in the armed forces"do
record.armedforces="A current or former regular in the UK Armed Forces (excluding National Service)"
record.armedforces="Yes, the person is a current or former regular"
record.leftreg="Yes"
record.leftreg="Yes"
household_validator.validate_armed_forces(record)
household_validator.validate_armed_forces(record)
expect(record.errors["leftreg"]).tobe_empty
expect(record.errors["leftreg"]).tobe_empty
end
end
it"expects that they served in the armed forces and may have been injured"do
it"expects that they served in the armed forces and may have been injured"do
record.armedforces="A current or former regular in the UK Armed Forces (excluding National Service)"
record.armedforces="Yes, the person is a current or former regular"