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 expense credit #493

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ docs/_build/
**/*.ipynb_checkpoints/
**/*.h5
**/iframe_figures/
.DS_Store
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved
.DS_Store
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a changelog_entry

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog_entry.yaml
changelog.yaml

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Yukon multiplies the net income by the following rate under the medical expense credit.

metadata:
period: year
unit: /1
label: Yukon medical expense credit rate
reference:
- title: Yukon 2022 non-refundable tax credits medical expenses
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=2
- title: Yukon 2023 non-refundable tax credits medical expenses
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-23e.pdf#page=2

values:
2022-01-01: 0.03
2023-01-01: 0.03

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- name: Yukon medical expense credit net income below reduction cap 2022
period: 2022
input:
people:
p1:
individual_net_income: 10_000
households:
household:
members: [p1]
province_code: YT
output:
yt_medical_expense_credit: 300 # 10_000 * 0.03

- name: Yukon medical expense credit zero net income 2022
period: 2022
input:
people:
p1:
individual_net_income: 0
households:
household:
members: [p1]
province_code: YT
output:
yt_medical_expense_credit: 0

- name: Yukon medical expense credit net income below reduction cap 2023
period: 2023
input:
people:
p1:
individual_net_income: 20_000
households:
household:
members: [p1]
province_code: YT
output:
yt_medical_expense_credit: 600 # 20_000 * 0.03
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from policyengine_canada.model_api import *


class yt_medical_expense_credit(Variable):
value_type = float
entity = Person
label = "Yukon medical expenses"
definition_period = YEAR
defined_for = ProvinceCode.YT
reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-23e.pdf" # page 23

def formula(person, period, parameters):
income = person("individual_net_income", period)
p = parameters(period).gov.provinces.yt.medical
income_fraction = income * p.rate
return min_(income_fraction, p.reduction_cap)