Rapu Ture - Exploring the Rules

is eligible for Community Services Card

Social Security Boolean MONTH Person Formula Included used 1 time

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__eligible_for_community_services_card

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):
    # The applicant
    resident_or_citizen = persons('is_citizen_or_resident', period)
    in_nz = persons('social_security__is_ordinarily_resident_in_new_zealand', period)
    # NOTE: using the age at the start of the month
    # Age changes on a DAY, but this calculation only has a granularity of MONTH
    age_requirement = persons('age', period.start) >= parameters(
        period).entitlements.social_security.community_services_card.age_threshold
    low_income = persons(
        'community_services_card__below_income_threshold', period)
    dependent_children = persons(
        'social_security__has_dependant_child', period)
    is_fulltime_student = persons(
        'social_security__is_fulltime_student', period)
    received_superannuation = persons(
        'social_security__received_superannuation', period)
    eligible_for_wff = persons(
        'family_scheme__qualifies_for_working_for_families', period)
    childs_benefit = \
        persons('social_security__received_orphans_benefit', period) +\
        persons('social_security__received_unsupported_childs_benefit', period) +\
        persons('social_security__received_child_disability_allowance', period)

    return \
        persons('social_security__received_income_tested_benefit', period.this_year) +\
        persons('social_security__received_residential_care_subsidy', period) +\
        persons('veterans_support__received_veterans_pension', period) +\
        persons('veterans_support__received_weekly_income_compensation', period) +\
        persons('veterans_support__received_weekly_compensation', period) +\
        childs_benefit +\
        (received_superannuation * low_income) +\
        (is_fulltime_student * low_income) +\
        (dependent_children * low_income * (resident_or_citizen + eligible_for_wff)) +\
        not_(dependent_children) * low_income * \
        resident_or_citizen * age_requirement * in_nz