Skip to content

Commit

Permalink
Merge pull request #69 from digitalaotearoa/childcareassist
Browse files Browse the repository at this point in the history
Childcareassist
  • Loading branch information
verbman committed Aug 21, 2024
2 parents 923cd01 + 9c6d713 commit 93f14e1
Show file tree
Hide file tree
Showing 28 changed files with 2,164 additions and 229 deletions.
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Changelog

### 22.0.0 - [69](https://github.com/digitalaotearoa/openfisca-aotearoa/pull/64)

* Tax and benefit system evolution.
* Impacted periods: all.
* Impacted areas:
- `CONTRIBUTING.md`
- `Makefile`
- `variables/acts/social_security/childcare_assistance`
- `variables/regulation/social_security_regulation`
- `variables/demographics`
- `parameters/social_security/childcare_assistance`

* Breaking changes:
- `early_childcare_hours_participation_per_week` period changed from month to week
- `attending_school` period changed from month to week

* Added variables:
- `child_disability_allowance__payable`
- `childcare_subsidy__eligible`
- `childcare_subsidy__granted`
- `childcare_subsidy__receiving`
- `childcare_subsidy__hours_payable`
- `childcare_subsidy__caregiver_approved_activity`
- `childcare_subsidy__caregiver_approved_activity_hours`
- `childcare_subsidy__caregiver_serious_disability`
- `childcare_subsidy__caregiver_serious_disability_hours`
- `childcare_subsidy__caregiver_other_hours`
- `childcare_subsidy__caregiver_serious_disability_illness`
- `childcare_subsidy__caregiver_serious_disability_illness_hours_needed`
- `childcare_subsidy__no_other_caregiver`
- `childcare_subsidy__other_child_in_hospital_or_disability_allowance`
- `childcare_subsidy__other_caregiver_appproved_activity`
- `childcare_subsidy__engaged_in_approved_activity`
- `childcare_subsidy__shift_work`
- `childcare_subsidy__family_has_resident_child_under_5_not_in_school`
- `childcare_subsidy__resident_child_aged_5_intend_enrol_in_school`
- `childcare_subsidy__family_with_disability_allowance_child_under_6`
- `childcare_subsidy__child_under_5_not_in_school`
- `childcare_subsidy__child_aged_5_intend_enrol_in_school`
- `childcare_subsidy__child_meets_criteria_with_disability_allowance_under_6`
- `childcare_subsidy__child_meets_criteria`
- `childcare_subsidy__maximum`
- `childcare_subsidy__rate`
- `oscar_subsidy__granted`
- `social_security_regulation__household_income`

* Renamed variables:
- `will_be_enrolled_in_school` renamed to `intends_to_enroll_in_school` period changed from month to eternity
- `childcare_assistance__family_has_resident_child_under_5_not_in_school` renamed to `childcare_subsidy__family_has_resident_child_under_5_not_in_school`
- `childcare_assistance__resident_child_aged_5_will_be_enrolled_in_school` renamed to `childcare_subsidy__resident_child_aged_5_intend_enrol_in_school`
- `childcare_assistance__family_has_child_eligible_for_disability_allowance_child_under_6` renamed to `childcare_subsidy__family_with_disability_allowance_child_under_6`
- `childcare_assistance__eligible_childcare_subsidy` renamed to `childcare_subsidy__eligible`

### 21.1.1 - [64](https://github.com/digitalaotearoa/openfisca-aotearoa/pull/64)

* Technical improvement.
Expand Down
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class social_security__residential_requirement(variables.Variable):
- Note the two references (2018 and 1964). They link to the specific section of the act on legislation.govt.nz
- Note the descriptive label
- Note the naming convention as described in [Naming Variables](#namingvariables)
- Note the order is latest to oldest

### References

Expand Down Expand Up @@ -306,8 +307,24 @@ This project currently utilises one specific pattern however for benefit calcula
- `jobseeker_support__reduction` (float)
- `jobseeker_support__benefit` (float)

also

- `childcare_subsidy__rate` (float) for more simple "rate" type calculations
- `childcare_subsidy__maximum` when combining a rate and maximum amount on a subsidy.

i.e. the formula for `jobseeker_support__benefit` would be:

```python
jobseeker_support__entitled * min(jobseeker_support__base - jobseeker_support__reduction, jobseeker_support__cutoff)
```

Some subsidies have a seperate concept of payable to eligible, in those circumstances use the following format:

- `childcare_subsidy__payable` (true/false)

As eligibility or entitlement to a number of benefits is dependant on whether a person is currently granted or recieving another benefit the following pattern is used throughout the project to aid in those calculations

- `jobseeker_support__receiving` (generally utilised as an input that would be a result of the question "are you currently receiving the Jobseeker Benefit?")
- `sole_parent_support__granted` (generally utilised as an input that would be a result of the question "have you been granted Sole Parent Support?")

Note also the presence of `social_security__granted_main_benefit` which tests each of the `*__granted` variables for main benefits.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ lint:
pylint `git ls-files | grep "\.py$$"`
yamllint `git ls-files | grep "\.yaml$$"`

test: clean check-syntax-errors lint
test: clean check-syntax-errors lint qtest

qtest:
ifdef yaml
openfisca test -c openfisca_aotearoa openfisca_aotearoa/tests/$(yaml)
else
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
POST http://localhost:5000/calculate HTTP/1.1
content-type: application/json

{
"persons": {
"Mama": {
"social_security__ordinarily_resident_in_new_zealand" : {
"ETERNITY": "true"
},
"social_security__principal_caregiver": {
"2024-W30": "true"
},
"childcare_subsidy__caregiver_serious_disability_illness": {
"2024-W30": "false"
},
"childcare_subsidy__no_other_caregiver": {
"2024-W30": "true"
},
"childcare_subsidy__eligible" : {
"2024-W30": "true"
},
"childcare_subsidy__caregiver_approved_activity" : {
"2024-W30": null
},
"childcare_subsidy__hours_payable" : {
"2024-W30": null
},
"social_security__dependent_children" : {
"2024-W30": null
},
"childcare_subsidy__rate" : {
"2024-W30": null
},
"childcare_subsidy__maximum" : {
"2024-W30": null
}
},
"Tama": {
"social_security__dependent_child" : {
"2019-W02": true
},
"age" : {
"day:2024-07-22:7": "5"
},
"early_childcare_hours_participation_per_week" : {
"2024-W30": "3"
},
"intends_to_enroll_in_school" : {
"2024-W30": "false"
}
},
"Tamahine": {
"social_security__dependent_child" : {
"2019-W02": true
},
"age" : {
"day:2024-07-22:7": "5"
},
"early_childcare_hours_participation_per_week" : {
"2024-W30": "3"
},
"intends_to_enroll_in_school" : {
"2024-W30": "false"
}
}
},
"families": {
"Whanau_tahi": {
"principal": "Mama",
"children": [
"Tama", "Tamahine"
]
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: >
Total hours payable if caregiver is engaged in approved activity
reference: >
"Social Security Regulations 2018 https://www.legislation.govt.nz/regulation/public/2018/0202/latest/whole.html#LMS96313"
"Social Security Regulations 2018 alt https://ref.synco.pt/nz/ssar/171/en/?#P2-S6-s34-l1"
"Social Security (Childcare Assistance) Regulations 2004 https://www.legislation.govt.nz/regulation/public/2004/0268/latest/whole.html#DLM282549"
values:
"2018-11-26":
value: 50
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: >
Total hours payable if caregiver is not engaged in an approved activity and does not have a serious disability or illness
reference: >
"Social Security Regulations 2018 https://www.legislation.govt.nz/regulation/public/2018/0202/latest/whole.html#LMS96314"
"Social Security Regulations 2018 alt https://ref.synco.pt/nz/ssar/171/en/?#P2-S6-s35-l1"
"Social Security (Childcare Assistance) Regulations 2004 https://www.legislation.govt.nz/regulation/public/2004/0268/latest/whole.html#DLM282550"
values:
"2018-11-26":
value: 9
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: >
Total hours payable if caregiver has serious disability or illness
reference: >
"Social Security Regulations 2018 https://www.legislation.govt.nz/regulation/public/2018/0202/latest/whole.html#LMS96313"
"Social Security Regulations 2018 alt https://ref.synco.pt/nz/ssar/171/en/?#P2-S6-s34-l1"
"Social Security (Childcare Assistance) Regulations 2004 https://www.legislation.govt.nz/regulation/public/2004/0268/latest/whole.html#DLM282550"
values:
"2018-11-26":
value: 50
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
description: >
Minimum hours participating per week in approved early childcare (for clause 32, 34 and 35)
reference: >
"Social Security Regulations 2018 https://www.legislation.govt.nz/regulation/public/2018/0202/latest/whole.html#LMS96311"
"Social Security Regulations 2018 alt https://ref.synco.pt/nz/ssar/171/en/?#P2-S6-s32-p1"
"Social Security Regulations 2018 alt https://ref.synco.pt/nz/ssar/171/en/?#P2-S6-s34-l1-a"
"Social Security Regulations 2018 alt https://ref.synco.pt/nz/ssar/171/en/?#P2-S6-s35-l1-a"
"Social Security (Childcare Assistance) Regulations 2004 http://www.legislation.govt.nz/regulation/public/2004/0268/latest/whole.html#DLM282547"
values:
"2018-11-26":
value: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
description: >
MSD is satisfied that the principal caregiver... needs childcare for more than (this many) hours a week
reference: >
"Social Security Regulations 2018 https://www.legislation.govt.nz/regulation/public/2018/0202/latest/whole.html#LMS96313"
"Social Security Regulations 2018 alt https://ref.synco.pt/nz/ssar/171/en/?#P2-S6-s34-l1-b-ii"
values:
"2018-11-26":
value: 9
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
description: Childcare and Oscar Subsidies for one dependant child
metadata:
unit: currency (per hour)
type: single_amount
reference:
2018-11-26:
title: Social Security Regulations 2018 (as enacted)
href: https://www.legislation.govt.nz/regulation/public/2018/0202/14.0/LMS96977.html
2019-04-01:
title: Social Security Regulations 2018
href: https://www.legislation.govt.nz/regulation/public/2018/0202/20.0/whole.html#LMS96977
2020-04-01:
title: Social Security Regulations 2018
href: https://www.legislation.govt.nz/regulation/public/2018/0202/59.0/LMS96977.html
2021-04-01: # last year thresholds stayed fixed
title: Social Security Regulations 2018
href: https://www.legislation.govt.nz/regulation/public/2018/0202/91.0/LMS96977.html
2022-04-01:
title: Social Security Regulations 2018
href: https://www.legislation.govt.nz/regulation/public/2018/0202/112.0/LMS96977.html
2023-04-01:
title: Social Security Regulations 2018
href: https://www.legislation.govt.nz/regulation/public/2018/0202/139.0/LMS96977.html
2024-04-01:
title: Social Security Regulations 2018
href: https://www.legislation.govt.nz/regulation/public/2018/0202/165.0/LMS96977.html
brackets:
- amount:
2018-11-26:
value: 5.13
2019-04-01:
value: 5.22
2020-04-01:
value: 5.31
2021-04-01:
value: 5.37
2022-04-01:
value: 5.69
2023-04-01:
value: 6.10
2024-04-01:
value: 6.38
threshold:
2018-11-26:
value: 0
- amount:
2018-11-26:
value: 4.09
2019-04-01:
value: 4.16
2020-04-01:
value: 4.23
2021-04-01:
value: 4.28
2022-04-01:
value: 4.53
2023-04-01:
value: 4.86
2024-04-01:
value: 5.09
threshold:
2018-11-26:
value: 800
2022-04-01:
value: 838
2023-04-01:
value: 1009
2024-04-01:
value: 1062
- amount:
2018-11-26:
value: 2.86
2019-04-01:
value: 2.91
2020-04-01:
value: 2.96
2021-04-01:
value: 2.99
2022-04-01:
value: 3.17
2023-04-01:
value: 3.40
2024-04-01:
value: 3.56
threshold:
2018-11-26:
value: 1200
2022-04-01:
value: 1257
2023-04-01:
value: 1837
2024-04-01:
value: 1934
- amount:
2018-11-26:
value: 1.59
2019-04-01:
value: 1.62
2020-04-01:
value: 1.65
2021-04-01:
value: 1.67
2022-04-01:
value: 1.77
2023-04-01:
value: 1.90
2024-04-01:
value: 1.99
threshold:
2018-11-26:
value: 1300
2022-04-01:
value: 1361
2023-04-01:
value: 1990
2024-04-01:
value: 2095
- amount:
2018-11-26:
value: 0
threshold:
2018-11-26:
value: 1400
2022-04-01:
value: 1466
2023-04-01:
value: 2144
2024-04-01:
value: 2257
Loading

0 comments on commit 93f14e1

Please sign in to comment.