diff --git a/changelog.d/1069.md b/changelog.d/1069.md new file mode 100644 index 000000000..8f6a7c324 --- /dev/null +++ b/changelog.d/1069.md @@ -0,0 +1 @@ +- Add `pip_dl_points` and `pip_m_points` person-level inputs and points-threshold parameters under `gov.dwp.pip.{daily_living,mobility}.points_thresholds`, and derive `pip_dl_category` and `pip_m_category` from points when the category is not provided as input. diff --git a/policyengine_uk/parameters/gov/dwp/pip/daily_living/points_thresholds/enhanced.yaml b/policyengine_uk/parameters/gov/dwp/pip/daily_living/points_thresholds/enhanced.yaml new file mode 100644 index 000000000..a8d19f63b --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/pip/daily_living/points_thresholds/enhanced.yaml @@ -0,0 +1,9 @@ +description: A claimant scoring at least this many points across the Schedule 1 Part 2 daily living activities qualifies for the enhanced rate of the PIP daily living component. +values: + 2013-04-08: 12 +metadata: + unit: integer + label: PIP daily living enhanced rate points threshold + reference: + - title: Social Security (Personal Independence Payment) Regulations 2013, reg. 5(2)(b) + href: https://www.legislation.gov.uk/uksi/2013/377/regulation/5 diff --git a/policyengine_uk/parameters/gov/dwp/pip/daily_living/points_thresholds/standard.yaml b/policyengine_uk/parameters/gov/dwp/pip/daily_living/points_thresholds/standard.yaml new file mode 100644 index 000000000..48b235092 --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/pip/daily_living/points_thresholds/standard.yaml @@ -0,0 +1,11 @@ +description: A claimant scoring at least this many points across the Schedule 1 Part 2 daily living activities qualifies for the standard rate of the PIP daily living component. +values: + 2013-04-08: 8 +metadata: + unit: integer + label: PIP daily living standard rate points threshold + reference: + - title: Social Security (Personal Independence Payment) Regulations 2013, reg. 5(2)(a) + href: https://www.legislation.gov.uk/uksi/2013/377/regulation/5 + - title: PIP assessment guide for assessment providers — Part 2 (Daily Living) + href: https://www.gov.uk/government/publications/personal-independence-payment-assessment-guide-for-assessment-providers diff --git a/policyengine_uk/parameters/gov/dwp/pip/mobility/points_thresholds/enhanced.yaml b/policyengine_uk/parameters/gov/dwp/pip/mobility/points_thresholds/enhanced.yaml new file mode 100644 index 000000000..44562a518 --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/pip/mobility/points_thresholds/enhanced.yaml @@ -0,0 +1,9 @@ +description: A claimant scoring at least this many points across the Schedule 1 Part 3 mobility activities qualifies for the enhanced rate of the PIP mobility component. +values: + 2013-04-08: 12 +metadata: + unit: integer + label: PIP mobility enhanced rate points threshold + reference: + - title: Social Security (Personal Independence Payment) Regulations 2013, reg. 6(2)(b) + href: https://www.legislation.gov.uk/uksi/2013/377/regulation/6 diff --git a/policyengine_uk/parameters/gov/dwp/pip/mobility/points_thresholds/standard.yaml b/policyengine_uk/parameters/gov/dwp/pip/mobility/points_thresholds/standard.yaml new file mode 100644 index 000000000..d8c1274fc --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/pip/mobility/points_thresholds/standard.yaml @@ -0,0 +1,9 @@ +description: A claimant scoring at least this many points across the Schedule 1 Part 3 mobility activities qualifies for the standard rate of the PIP mobility component. +values: + 2013-04-08: 8 +metadata: + unit: integer + label: PIP mobility standard rate points threshold + reference: + - title: Social Security (Personal Independence Payment) Regulations 2013, reg. 6(2)(a) + href: https://www.legislation.gov.uk/uksi/2013/377/regulation/6 diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pip_points.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pip_points.yaml new file mode 100644 index 000000000..777e0cd47 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pip_points.yaml @@ -0,0 +1,73 @@ +- name: PIP daily living — zero points yields no award + period: 2025 + input: + pip_dl_points: 0 + pip_m_points: 0 + output: + pip_dl_category: NONE + pip_m_category: NONE + pip_dl: 0 + pip_m: 0 + +- name: PIP daily living — 7 points is below the standard threshold + period: 2025 + input: + pip_dl_points: 7 + output: + pip_dl_category: NONE + pip_dl: 0 + +- name: PIP daily living — 8 points hits the standard threshold + period: 2025 + absolute_error_margin: 0.05 + input: + pip_dl_points: 8 + output: + pip_dl_category: STANDARD + pip_dl: 3842.28 + +- name: PIP daily living — 11 points stays at standard + period: 2025 + absolute_error_margin: 0.05 + input: + pip_dl_points: 11 + output: + pip_dl_category: STANDARD + pip_dl: 3842.28 + +- name: PIP daily living — 12 points hits the enhanced threshold + period: 2025 + absolute_error_margin: 0.05 + input: + pip_dl_points: 12 + output: + pip_dl_category: ENHANCED + pip_dl: 5740.80 + +- name: PIP mobility — 8 points hits the standard threshold + period: 2025 + absolute_error_margin: 0.05 + input: + pip_m_points: 8 + output: + pip_m_category: STANDARD + pip_m: 1517.88 + +- name: PIP mobility — 12 points hits the enhanced threshold + period: 2025 + absolute_error_margin: 0.05 + input: + pip_m_points: 12 + output: + pip_m_category: ENHANCED + pip_m: 4006.08 + +- name: PIP — input category overrides points-derived category + period: 2025 + absolute_error_margin: 0.05 + input: + pip_dl_points: 0 + pip_dl_category: ENHANCED + output: + pip_dl_category: ENHANCED + pip_dl: 5740.80 diff --git a/policyengine_uk/variables/input/pip_dl_category.py b/policyengine_uk/variables/input/pip_dl_category.py index 45a933e78..7b74298a8 100644 --- a/policyengine_uk/variables/input/pip_dl_category.py +++ b/policyengine_uk/variables/input/pip_dl_category.py @@ -4,9 +4,25 @@ class pip_dl_category(Variable): label = "PIP (daily living) category" - documentation = "If you receive the daily living component of the Personal Independence Payment, you will be in one of the following categories: Standard or Enhanced. If not, select None. Survey reported amounts should be converted to this category in the data pipeline." + documentation = "If you receive the daily living component of the Personal Independence Payment, you will be in one of the following categories: Standard or Enhanced. If not, select None. Survey reported amounts should be converted to this category in the data pipeline. When not provided as input, the category is derived from `pip_dl_points` against the points thresholds in `gov.dwp.pip.daily_living.points_thresholds`." entity = Person definition_period = YEAR value_type = Enum possible_values = PIPCategory default_value = PIPCategory.NONE + + def formula(person, period, parameters): + points = person("pip_dl_points", period) + thresholds = parameters(period).gov.dwp.pip.daily_living.points_thresholds + return select( + [ + points >= thresholds.enhanced, + points >= thresholds.standard, + points < thresholds.standard, + ], + [ + PIPCategory.ENHANCED, + PIPCategory.STANDARD, + PIPCategory.NONE, + ], + ) diff --git a/policyengine_uk/variables/input/pip_dl_points.py b/policyengine_uk/variables/input/pip_dl_points.py new file mode 100644 index 000000000..d05830015 --- /dev/null +++ b/policyengine_uk/variables/input/pip_dl_points.py @@ -0,0 +1,10 @@ +from policyengine_uk.model_api import * + + +class pip_dl_points(Variable): + label = "PIP daily living points" + documentation = "Total descriptor points scored across the ten Schedule 1 Part 2 daily living activities. Used to derive `pip_dl_category` when the category is not provided as input." + entity = Person + definition_period = YEAR + value_type = int + default_value = 0 diff --git a/policyengine_uk/variables/input/pip_m_category.py b/policyengine_uk/variables/input/pip_m_category.py index e523d95ef..ae3749601 100644 --- a/policyengine_uk/variables/input/pip_m_category.py +++ b/policyengine_uk/variables/input/pip_m_category.py @@ -4,9 +4,25 @@ class pip_m_category(Variable): label = "PIP (mobility) category" - documentation = "If you receive the mobility component of the Personal Independence Payment, you will be in one of the following categories: Standard or Enhanced. If not, select None. Survey reported amounts should be converted to this category in the data pipeline." + documentation = "If you receive the mobility component of the Personal Independence Payment, you will be in one of the following categories: Standard or Enhanced. If not, select None. Survey reported amounts should be converted to this category in the data pipeline. When not provided as input, the category is derived from `pip_m_points` against the points thresholds in `gov.dwp.pip.mobility.points_thresholds`." entity = Person definition_period = YEAR value_type = Enum possible_values = PIPCategory default_value = PIPCategory.NONE + + def formula(person, period, parameters): + points = person("pip_m_points", period) + thresholds = parameters(period).gov.dwp.pip.mobility.points_thresholds + return select( + [ + points >= thresholds.enhanced, + points >= thresholds.standard, + points < thresholds.standard, + ], + [ + PIPCategory.ENHANCED, + PIPCategory.STANDARD, + PIPCategory.NONE, + ], + ) diff --git a/policyengine_uk/variables/input/pip_m_points.py b/policyengine_uk/variables/input/pip_m_points.py new file mode 100644 index 000000000..022670718 --- /dev/null +++ b/policyengine_uk/variables/input/pip_m_points.py @@ -0,0 +1,10 @@ +from policyengine_uk.model_api import * + + +class pip_m_points(Variable): + label = "PIP mobility points" + documentation = "Total descriptor points scored across the two Schedule 1 Part 3 mobility activities. Used to derive `pip_m_category` when the category is not provided as input." + entity = Person + definition_period = YEAR + value_type = int + default_value = 0