From 6a1f828db1337c02c2bf570cde3f9587a3246721 Mon Sep 17 00:00:00 2001 From: Katherine Langford Date: Fri, 9 Jan 2026 14:37:04 +0000 Subject: [PATCH] CLDC-4177: Create new sex-at-birth question --- .../questions/sex_registered_at_birth1.rb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app/models/form/sales/questions/sex_registered_at_birth1.rb diff --git a/app/models/form/sales/questions/sex_registered_at_birth1.rb b/app/models/form/sales/questions/sex_registered_at_birth1.rb new file mode 100644 index 000000000..fb00fa65e --- /dev/null +++ b/app/models/form/sales/questions/sex_registered_at_birth1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class Form::Sales::Questions::SexRegisteredAtBirth1 < Form::Question + def initialize(id, hsh, page) + super + @id = "sexRAB1" + @type = "radio" + @check_answers_card_number = 1 + @answer_options = ANSWER_OPTIONS + @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] + end + + ANSWER_OPTIONS = { + "F" => { "value" => "Female" }, + "M" => { "value" => "Male" }, + "divider" => { "value" => true }, + "R" => { "value" => "Tenant prefers not to say" }, + }.freeze + + QUESTION_NUMBER_FROM_YEAR = { 2026 => 32 }.freeze +end