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

[WIP] Add organ donor compensation #16

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7818fa5
First basic test
nigelcharman May 19, 2018
0d6a6f7
Added tax code and after tax amount
nigelcharman May 19, 2018
fbe6036
Commented out tax implications
nigelcharman May 19, 2018
cc92a5c
Initial test passing
nigelcharman May 19, 2018
090f12d
Tidy up
nigelcharman May 19, 2018
2cd9f23
Merge pull request #2 from OrganicCoders/tests
nigelcharman May 19, 2018
6800008
Changed to 52 week calculation
nigelcharman May 19, 2018
2995ce2
Merge branch 'tests'
nigelcharman May 19, 2018
0f810b5
Applied rounding, commented out unneeded code
nigelcharman May 19, 2018
b472181
Added subpart 1 5(3) compensation earnings disregarded
nigelcharman May 19, 2018
b2d7db2
Added self-employed earnings
nigelcharman May 19, 2018
dbbfcf6
Added kiwisaver
nigelcharman May 19, 2018
bc00352
Added reference to definition
nigelcharman May 20, 2018
36822d7
Added reference to definition
nigelcharman May 20, 2018
b958b43
Update live_organ_donor_compensation.py
allengeer May 20, 2018
e68ff34
Merge pull request #3 from allengeer/patch-1
nigelcharman May 20, 2018
0c7ee37
Removed commented out code
nigelcharman May 21, 2018
067d5cb
Added references to legislation
nigelcharman May 21, 2018
f138396
Fixed comments and removed kiwisaver_member variable
nigelcharman May 21, 2018
429becd
Merge branch 'master' of github.com:OrganicCoders/openfisca-aotearoa
nigelcharman May 21, 2018
2e507ed
Added docstring comment
nigelcharman May 21, 2018
82a8810
Fixed formatting so tests pass when using 'make test'
nigelcharman May 21, 2018
d78b98f
Added reference to KiwiSaver rate
nigelcharman May 21, 2018
2aaaf2b
Removed space at end of string
nigelcharman May 21, 2018
5fbe05f
Added definitions of 'number of weeks' and 'earnings as an employee'
nigelcharman May 23, 2018
64c5842
Updated references to definitions
nigelcharman May 23, 2018
74b15f3
Merge pull request #4 from OrganicCoders/data-definitions
nigelcharman May 23, 2018
21e69e5
Updated references to definitions on master branch
nigelcharman May 23, 2018
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
15 changes: 15 additions & 0 deletions openfisca_aotearoa/definitions/earnings_as_an_employee.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# DEFINITIONS: EARNINGS AS AN EMPLOYEE

**Term name:** EarningsAsAnEmployee

**UUID:** organiccoders/brk:/1234/ed84652e-8011-43dc-aeef-72e5ad3593f4

**Definition:** Earnings as an employee, in relation to any person and any tax year, means all PAYE income payments of the person for the tax year.

**Legislation:** Schedule 2/Part1/5 Compensation for Live Organ Donors Act 2016

**Refers to:** earnings as an employee has the meaning given by section 6(1) of the Accident Compensation Act 2001

**Narrower than:** ‘Earnings’

**Related:** ‘Employee’
15 changes: 15 additions & 0 deletions openfisca_aotearoa/definitions/number_of_weeks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# DEFINITIONS: NUMBER OF WEEKS

**Term name:** NumberOfWeeks

**UUID:** organiccoders/brk:/1234/12a0780a-b516-44f1-bdb7-6ec4b6c3e174

**Definition:** number of weeks is (a) the number of full weeks plus any part week (expressed as a portion of a week), if the period is 1 week or more; and (b) a part week (expressed as a portion of a week), if the period is less than 1 week

**Legislation:** Part 1, Section 4

**Narrower than:** http://purl.org/dc/terms/LocationPeriodOrJurisdiction

**Related:** PeriodOfTime (altLabel:Period)

**Note:** Time event (ref DCAT temporal purl.org/dc/terms/temporal) or CPSV ‘period of time’ An interval of time that is named or defined by its start and end dates. http://purl.org/dc/terms/PeriodOfTime
4 changes: 2 additions & 2 deletions openfisca_aotearoa/variables/live_organ_donor_compensation.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class sum_of_earnings_in_last_52_weeks(Variable):
value_type = float
entity = Person
label = u"Total earnings over last 52 weeks"
reference = "http://organiccoders.allengeer.com/brk-1234-abcdfcrg234356/"
reference = "https://github.com/OrganicCoders/openfisca-aotearoa/blob/master/openfisca_aotearoa/definitions/earnings_as_an_employee.md"
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not a stable URL: if the file gets renamed it would yield a 404. You can obtain a stable URL by navigating to this URL and pressing y on your keyboard 🙂

definition_period = YEAR


Expand All @@ -92,7 +92,7 @@ class earnings_period_in_weeks(Variable):
default_value = 52
entity = Person
label = u"The number of weeks over which earnings have been earned"
reference = "http://organiccoders.allengeer.com/definitions-number-of-weeks/"
reference = "https://github.com/OrganicCoders/openfisca-aotearoa/blob/master/openfisca_aotearoa/definitions/number_of_weeks.md"
definition_period = YEAR


Expand Down