Repository: PolicyEngine/policyengine-canada (language: python)

Issue:
Nova Scotia Disability amount 
Reference :
https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1 


Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb..21337ecb3 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    added:
+    - Nova Scotia disability amount.
diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/disability_amount/base.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/disability_amount/base.yaml
new file mode 100644
index 000000000..5bab98200
--- /dev/null
+++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/disability_amount/base.yaml
@@ -0,0 +1,16 @@
+description: Nova Scotia provides the following base disability amount.
+
+values: 
+  2022-01-01: 7_341
+metadata:
+  unit: currency-CAD
+  period: year
+  label: Nova Scotia disability amount base
+  reference: 
+  - title: 2022 Nova Scotia Personal Tax Credits Return - TD1NS
+    href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1
+  - title: T2201 Disability Tax Credit Certificate and relevant information
+    href: https://www.canada.ca/en/revenue-agency/services/forms-publications/forms/t2201.html
+  - title: Income Tax Act 
+    # The income tax act does not specify the disability amount
+    href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=44
diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/non_refundable.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/non_refundable.yaml
index 324031879..99ac1e31f 100644
--- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/non_refundable.yaml
+++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/non_refundable.yaml
@@ -1,6 +1,9 @@
-description: Non-refundable tax credits in Nova Scotia.
+description: Nova Scotia provides the following non-refundable tax credits.
 values:
   2022-01-01:
     - ns_poverty_reduction_credit
+    - ns_disability_amount
 metadata:
-  unit: program
+  unit: list
+  period: year
+  label: Nova Scotia non-refundable tax credits
diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_disability_amount.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_disability_amount.py
new file mode 100644
index 000000000..ae30f466e
--- /dev/null
+++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/credits/ns_disability_amount.py
@@ -0,0 +1,18 @@
+from policyengine_canada.model_api import *
+
+
+class ns_disability_amount(Variable):
+    value_type = float
+    unit = CAD
+    entity = Person
+    label = "Nova Scotia Disability Amount"
+    definition_period = YEAR
+    defined_for = ProvinceCode.NS
+    reference = "https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1"
+
+    def formula(person, period, parameters):
+        p = parameters(
+            period
+        ).gov.provinces.ns.tax.income.credits.disability_amount
+        is_disabled = person("is_disabled", period)
+        return p.base * is_disabled


Test patch:
diff --git a/policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_disability_amount.yaml b/policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_disability_amount.yaml
new file mode 100644
index 000000000..648d93771
--- /dev/null
+++ b/policyengine_canada/tests/gov/provinces/ns/tax/income/credits/ns_disability_amount.yaml
@@ -0,0 +1,15 @@
+- name: Person is disabled
+  period: 2023
+  input:
+    province_code: NS
+    is_disabled: true
+  output:
+    ns_disability_amount: 7_341
+
+- name: Person is not disabled
+  period: 2023
+  input:
+    province_code: NS
+    is_disabled: false
+  output:
+    ns_disability_amount: 0