Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yukon Medical Expenses Credit #349

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Yukon Medical Expenses
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Yukon allows for the following maximum amount under the medical expense credit.
values:
2022-01-01: 2_479
metadata:
unit: currency-CAD
label: Yukon Medical Expenses
reference:
- title: Yukon Tax-Medical Expenses
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Yukon provides the following percentage of the total medical expenses as a tax credit.
values:
2022-01-01: 0.03
metadata:
unit: /1
label: Yukon Medical Expenses Applicable Rate
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
reference:
- title: Yukon Tax-Medical Expenses
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
members: [c1, c2]
province_code: QC
output:
qc_sa_married_both_eligible: 1
qc_sa_married_both_eligible: 1
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
members: [c1, c2]
province_code: QC
output:
qc_sa_married_one_eligible: 1
qc_sa_married_one_eligible: 1
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- name: Zero Medeical Expenses of Net Income over Maximum Amount
period: 2022
input:
province_code: YT
household_medical_expenses: 0
household_net_income: 10_000_000_000
output:
yt_medical_expenses: 0

- name: Zero Medeical Expenses of Net Income below Maximum Amount
period: 2022
input:
province_code: YT
household_medical_expenses: 0
household_net_income: 100
output:
yt_medical_expenses: 0

- name: Medeical Expenses of Net Income below Maximum Amount
period: 2022
input:
province_code: YT
household_medical_expenses: 10_000
household_net_income: 100
output:
yt_medical_expenses: 9_997

- name: Medeical Expenses of Net Income over Maximum Amount
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
period: 2022
input:
province_code: YT
household_medical_expenses: 4_000
household_net_income: 10_000_000_000
output:
yt_medical_expenses: 1_521



sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
- name: Tax Income Below 50_197
period: 2023
input:
province_code: YT
yt_taxable_income: 0
output:
yt_tax_taxable_income: 0

- name: Tax Income Between 50_197 and 100_392
period: 2023
input:
province_code: YT
yt_taxable_income: 60_000
output:
yt_tax_taxable_income: 4_094.88

- name: Tax Income Between 100_392 and 155_625
period: 2023
input:
province_code: YT
yt_taxable_income: 110_000
output:
yt_tax_taxable_income: 8777.432

- name: Tax Income Between 155_625 and 500_000
period: 2023
input:
province_code: YT
yt_taxable_income: 200_000
output:
yt_tax_taxable_income: 19_430.56

- name: Tax Income Above 500_000
period: 2023
input:
province_code: YT
yt_taxable_income: 600_000
output:
yt_tax_taxable_income: 147_830.56

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from policyengine_canada.model_api import *


class yt_medical_expenses(Variable):
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
value_type = float
entity = Household
label = "Yukon Medical Expenses"
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
definition_period = YEAR
defined_for = ProvinceCode.YT

def formula(household, period, parameters):
p = parameters(
period
).gov.provinces.yt.tax.income.credits.medical_expenses

claimed_medical_expenses = household(
"household_medical_expenses", period
)
net_income = household("household_net_income", period)
medical_expenses_rate = p.rate
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved

applicable_amount = min_(
p.max_amount, net_income * medical_expenses_rate
)

total_amount = claimed_medical_expenses - applicable_amount
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
return max_(claimed_medical_expenses - applicable_amount, 0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from policyengine_canada.model_api import *
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved


class yt_tax_taxable_income(Variable):
value_type = float
entity = Person
label = "Yukon income tax"
unit = CAD
definition_period = YEAR
reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf"
defined_for = ProvinceCode.YT

def formula(person, period, parameters):
income = person("yt_taxable_income", period)
p = parameters(period).gov.provinces.yt.tax.income.rate
return p.calc(income)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from policyengine_canada.model_api import *


class household_medical_expenses(Variable):
sqw0418 marked this conversation as resolved.
Show resolved Hide resolved
value_type = float
entity = Household
label = "Household medical expenses"
unit = CAD
definition_period = YEAR
Loading