Rapu Ture - Exploring the Rules

Residential requirements for certain benefits

Social Security Boolean MONTH Person Formula Included used 4 times

Value type Boolean . Default value false Entity person


How is this calculated?

To calculate this variable, the following input is used


Where is this used?

This variable is referred to by these other variables in their own calculations


Formulas

This is the formula used to calculate the value of social_security__meets_residential_requirements_for_certain_benefits

0001-01-01

This formula is used for scenarios from the date 0001-01-01 onwards. More info on formulas

def formula(persons, period, parameters):
    # (a) is a New Zealand citizen, or is a person who holds a residence
    # class visa under the Immigration Act 2009
    is_citizen_or_resident = persons('is_citizen_or_resident', period)

    # (b) is ordinarily resident in New Zealand when he or she first
    # applies for the benefit; and
    ordinarily_lives_in_nz = persons(
        'social_security__is_ordinarily_resident_in_new_zealand', period)

    # (c) except in the case of a person who is recognised as a refugee or
    #     a protected person in New Zealand under
    #     the Immigration Act 2009, has resided continuously in New Zealand
    #     for a period of at least 2 years at any one time,
    is_refugee_or_protected = \
        persons('immigration__is_recognised_refugee', period) \
        + persons('immigration__is_protected_person', period)

    enough_years_in_nz = persons(
        'social_security__has_resided_continuously_in_nz_for_a_period_of_at_least_2_years_at_any_one_time',
        period)

    return (is_citizen_or_resident * ordinarily_lives_in_nz) \
        + (is_refugee_or_protected * enough_years_in_nz)

Scenarios calculating this variables