Skip to content

Commit

Permalink
Seniors Income Plan (SIP)
Browse files Browse the repository at this point in the history
Fixes PolicyEngine#269

Co-authored-by: PavelMakarchuk <PavelMakarchuk@users.noreply.github.com>
  • Loading branch information
Snownow0w and PavelMakarchuk committed May 10, 2023
1 parent e223b2d commit 7eefc23
Show file tree
Hide file tree
Showing 26 changed files with 99 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income where a senior becomes ineligible for SIP for Married Recipient who are both pensioners
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP income where a senior becomes ineligible for SIP for Married Recipient who are both pensioners
values:
2022-07-01: 620
2022-07-01: 7_440

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income for Married Recipient who are both pensioners
label: Saskatchewan Seniors Income Plan Client Living at Home CPP income for Married Recipient who are both pensioners
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income where a senior becomes ineligible for SIP for Married Recipient whose Spouse less than 60 years of age
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP income where a senior becomes ineligible for SIP for Married Recipient whose Spouse less than 60 years of age
values:
2022-07-01: 908
2022-07-01: 10_896

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income for Married Recipient whose spouse below age threshold
label: Saskatchewan Seniors Income Plan Client Living at Home CPP income for Married Recipient whose spouse below age threshold
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income where a senior becomes ineligible for SIP for Married Recipient whose Spouse Receiving Allowance
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP income where a senior becomes ineligible for SIP for Married Recipient whose Spouse Receiving Allowance
values:
2022-07-01: 760
2022-07-01: 9_120

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income for Married Recipient whose spouse is receiving allowance
label: Saskatchewan Seniors Income Plan Client Living at Home CPP income for Married Recipient whose spouse is receiving allowance
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income where a senior becomes ineligible for SIP for Single Pensioner
decription: Saskatchewan Seniors Income Plan Client Living at Home CPP income where a senior becomes ineligible for SIP for Single Pensioner
values:
2022-07-01: 380
2022-07-01: 4_560

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home CPP monthly income for Single Pensioner
label: Saskatchewan Seniors Income Plan Client Living at Home CPP income for Single Pensioner
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for Married Recipient who are both pensioners
decription: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for Married Recipient who are both pensioners
values:
2022-07-01: 295
2022-07-01: 3_540

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for Married Recipient who are both pensioners
label: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for Married Recipient who are both pensioners
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for Married Recipient whose Spouse less than 60 years of age
decription: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for Married Recipient whose Spouse less than 60 years of age
values:
2022-07-01: 330
2022-07-01: 3_960

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for married recipient whose spouse below age threshold
label: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for married recipient whose spouse below age threshold
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for Married Recipient whose Spouse Receiving Allowance
decription: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for Married Recipient whose Spouse Receiving Allowance
values:
2022-07-01: 330
2022-07-01: 3_960

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for married recipient whose spouse is receiving allowance
label: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for married recipient whose spouse is receiving allowance
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for Single Pensioner
decription: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for Single Pensioner
values:
2022-07-01: 330
2022-07-01: 3960

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living at Home Monthly Maximum SIP Benefit for Single Pensioner
label: Saskatchewan Seniors Income Plan Client Living at Home Maximum SIP Benefit for Single Pensioner
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income where a senior becomes ineligible for SIP for Married Recipient who are both pensioners
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income where a senior becomes ineligible for SIP for Married Recipient who are both pensioners
values:
2022-07-01: 620
2022-07-01: 7_440

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income for Married Recipient who are both pensioners
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income for Married Recipient who are both pensioners
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income where a senior becomes ineligible for SIP for Married Recipient whose Spouse less than 60 years of age
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income where a senior becomes ineligible for SIP for Married Recipient whose Spouse less than 60 years of age
values:
2022-07-01: 908
2022-07-01: 10_896

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income for Married Recipient whose spouse below age threshold
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income for Married Recipient whose spouse below age threshold
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income where a senior becomes ineligible for SIP for Married Recipient whose Spouse Receiving Allowance
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income where a senior becomes ineligible for SIP for Married Recipient whose Spouse Receiving Allowance
values:
2022-07-01: 760
2022-07-01: 9_120

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income for Married Recipient whose spouse is receiving allowance
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income for Married Recipient whose spouse is receiving allowance
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income where a senior becomes ineligible for SIP for Single Pensioner
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income where a senior becomes ineligible for SIP for Single Pensioner
values:
2022-07-01: 380
2022-07-01: 4_560

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP monthly income for Single Pensioner
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home CPP income for Single Pensioner
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for Married Recipient who are both pensioners
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for Married Recipient who are both pensioners
values:
2022-07-01: 50
2022-07-01: 600

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for Married Recipient who are both pensioners
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for Married Recipient who are both pensioners
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for Married Recipient whose Spouse less than 60 years of age
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for Married Recipient whose Spouse less than 60 years of age
values:
2022-07-01: 50
2022-07-01: 600

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for married recipient whose spouse below age threshold
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for married recipient whose spouse below age threshold
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for Married Recipient whose Spouse Receiving Allowance
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for Married Recipient whose Spouse Receiving Allowance
values:
2022-07-01: 50
2022-07-01: 600

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for married recipient whose spouse is receiving allowance
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for married recipient whose spouse is receiving allowance
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for Single Pensioner
decription: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for Single Pensioner
values:
2022-07-01: 50
2022-07-01: 600

metadata:
unit: currency_CAD
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Monthly Maximum SIP Benefit for Single Pensioner
label: Saskatchewan Seniors Income Plan Client Living in Special Care Home Maximum SIP Benefit for Single Pensioner
reference:
- title: Saskatchewan Seniors Income Plan
href: https://www.saskatchewan.ca/residents/family-and-social-support/seniors-services/financial-help-for-seniors
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class annual_taxable_income(Variable):
label = "Household Annual Taxable Income"
unit = CAD
definition_period = YEAR
defined_for = ProvinceCode.SK
defined_for = ProvinceCode.SK
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from policyengine_canada.model_api import *


class is_penioner(Variable):
value_type = bool
entity = Person
label = "Is client a penioner"
definition_period = YEAR
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ def formula(household, period, parameters):

eligibility = where(c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8, True, False)
return eligibility

#sk_seniors_income_plan_at_home.py:
#sk_seniors_income_plan_at_in_special_care_home.py:
#special_care_home.py:
#is_penioner.py: empty variable - person level
#recieve_allowance.py: empty variable
#sk_seniors_income_plan.py: add sk_seniors_income_plan_at_home.py + sk_seniors_income_plan_at_in_special_care_home.py:
#canada_pension_plan_payouts.py: empty variable
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from policyengine_canada.model_api import *


class (Variable):
value_type = bool
entity = Household
label = ""
definition_period = YEAR
defined_for = ProvinceCode.SK

def formula(household, period, parameters):
p = parameters(period).gov.provinces.sk.sip_benefit.max_amount
income = household("adjusted_family_net_income", period)
person = household.members
age = person("age", period)
special_care_home = person("special_care_home", period)
pensioner = person("is_pensioner", period)
filing_status = household("filing_status", period)
count_pensioners = household.sum(pensioner)
amount = select(
# Conditions.
[(filing_status == single) & (pensioner == true), (filing_status == married) & (count_pensioners == 2), children == 3, children > 3],
# Results.
[
p.single #need to add reduction & CPP eligibility,
p.two_children.calc(income),
p.three_children.calc(income),
p.four_or_more_children.calc(income),
],
default=0,
)
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ class spouse_age(Variable):
label = "Age"
documentation = "Spouse's Age in years since birth"
definition_period = YEAR
defined_for = ProvinceCode.SK
defined_for = ProvinceCode.SK

#dont need new varibale - use "age.py"

0 comments on commit 7eefc23

Please sign in to comment.