<commit_before>status :draft

## Q1
value_question :what_is_your_post_code? do

  calculate :calculator do
    calc = Calculators::PIPDates.new(responses.last)
    raise SmartAnswer::InvalidResponse unless calc.valid_postcode?
    calc
  end
  calculate :in_selected_area do
    calculator.in_selected_area?
  end

  next_node :are_you_getting_dla?
end

## Q2 
multiple_choice :are_you_getting_dla? do
  option :yes
  option :no

  next_node do |response|
    if response == 'yes'
      :does_dla_end_before_oct_2013?
    else
      if in_selected_area
        :result_1
      else
        :result_2
      end
    end
  end
end

## Q3
multiple_choice :does_dla_end_before_oct_2013? do
  option :yes
  option :no

  calculate :dla_continues do
    responses.last == 'no'
  end
  next_node :what_is_your_dob?
end

## Q4
date_question :what_is_your_dob? do
  from { Date.today - 120.years }
  to { Date.today }
  next_node do |response|
    calculator.dob = Date.parse(response)
    if calculator.in_group_65?
      :result_3
    elsif calculator.in_middle_group?
      if dla_continues
        :result_4
      else
        :result_5
      end<commit_msg>Change date range for pip dob question<commit_after>status :draft

## Q1
value_question :what_is_your_post_code? do

  calculate :calculator do
    calc = Calculators::PIPDates.new(responses.last)
    raise SmartAnswer::InvalidResponse unless calc.valid_postcode?
    calc
  end
  calculate :in_selected_area do
    calculator.in_selected_area?
  end

  next_node :are_you_getting_dla?
end

## Q2 
multiple_choice :are_you_getting_dla? do
  option :yes
  option :no

  next_node do |response|
    if response == 'yes'
      :does_dla_end_before_oct_2013?
    else
      if in_selected_area
        :result_1
      else
        :result_2
      end
    end
  end
end

## Q3
multiple_choice :does_dla_end_before_oct_2013? do
  option :yes
  option :no

  calculate :dla_continues do
    responses.last == 'no'
  end
  next_node :what_is_your_dob?
end

## Q4
date_question :what_is_your_dob? do
  from { Date.today - 100.years }
  to { Date.today }
  next_node do |response|
    calculator.dob = Date.parse(response)
    if calculator.in_group_65?
      :result_3
    elsif calculator.in_middle_group?
      if dla_continues
        :result_4
      else
        :result_5
      end
{'fraction_non_alphanumeric': 0.0695577501073422, 'fraction_numerical': 0.018892228424216402, 'mean_word_length': 3.0521739130434784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3924960', 'n_tokens_mistral': 880, 'n_tokens_neox': 843, 'n_words': 189}