diff --git a/changelog.d/2914.fixed.md b/changelog.d/2914.fixed.md new file mode 100644 index 0000000000..2f61c12e99 --- /dev/null +++ b/changelog.d/2914.fixed.md @@ -0,0 +1 @@ +Recognize supplied current limited capability for work or for work and work-related activity in extended childcare entitlement, while retaining the separate specified-benefit routes. diff --git a/docs/book/usage/simulations.md b/docs/book/usage/simulations.md index ac11a0337a..7f0921a1a9 100644 --- a/docs/book/usage/simulations.md +++ b/docs/book/usage/simulations.md @@ -143,6 +143,40 @@ the model uses the rate in force on 30 April for the whole labelled year. This change does not introduce a pay-reference-period calculation or alter the dated rate parameters. +## Extended childcare capability inputs + +For the extended childcare capability route under the rules effective from +1 December 2022, supply either `uc_limited_capability_for_work` (LCW) or +`uc_limited_capability_for_WRA` (LCWRA) as true for the person and modelled year. +These inputs record a current determination or statutory treated-as status +under [Universal Credit regulation 39](https://www.legislation.gov.uk/uksi/2013/376/regulation/39) +or [regulation 40](https://www.legislation.gov.uk/uksi/2013/376/regulation/40). +For example: + +```python +"parent": { + "uc_limited_capability_for_work": {2026: True}, +} +``` + +The childcare reader accepts a supplied true value for either status, including +LCWRA when the supplied LCW value is false. Callers must supply current status +for each modelled year. Calculated or cached capability flags, model-stored +values and values the engine carries from another year do not count as supplied +current status. Disability Living Allowance, Personal Independence Payment and +disability proxy flags do not establish these capability inputs. + +When neither status is supplied as true for that year, the capability route +returns false as a conservative missing-input convention. Missing status does +not establish that the person lacks the legal status. Current entitlement to +Employment and Support Allowance (ESA) can qualify through the separate +[specified-benefit route](https://www.legislation.gov.uk/uksi/2022/1134/regulation/11A). +An ended ESA award alone does not establish continuing capability status; +supply that status explicitly to use the capability route after an award ends. +This contract applies to the childcare reader; global Universal Credit +capability defaults and the pre-December-2022 childcare list retain their +existing behaviour. + ## Simulating policy scenarios To test policy changes, create a scenario and apply it to your simulation. This example shows what happens when we increase Universal Credit's standard allowance for single people over 25 from the current rate to £500 per month: diff --git a/docs/engineering/skills/dataset-sources.md b/docs/engineering/skills/dataset-sources.md index f9d7a2419d..820c493061 100644 --- a/docs/engineering/skills/dataset-sources.md +++ b/docs/engineering/skills/dataset-sources.md @@ -150,6 +150,29 @@ advance apprenticeship tenure, so a producer or caller must supply changed classifications for later years rather than rely on a carried input to expire automatically. +## Extended childcare capability status + +For the childcare capability route under the rules effective from 1 December +2022, producers must supply current `uc_limited_capability_for_work` or +`uc_limited_capability_for_WRA` person values for each modelled year. A true +value records a legal determination or statutory treated-as status under +Universal Credit regulations 39 or 40. Disability-benefit receipt and an ESA +support-component default do not establish that fact. See the +[calculator input contract](../../book/usage/simulations.md#extended-childcare-capability-inputs). + +The childcare-specific reader accepts only genuinely supplied current-year +true values. It rejects calculated or cached flags, model-stored values and +values the engine carries from another year. With neither status supplied as +true, the capability route defaults to false; missing data does not establish +that a person lacks the legal status. This change adds no status imputation or +dataset migration and does not establish prevalence in existing releases. + +Current ESA entitlement retains its separate specified-benefit route. An ended +ESA report alone does not establish continuing capability status; producers +must supply that status explicitly to use the capability route. This contract +does not change global Universal Credit defaults or the pre-December-2022 +childcare list. + ## ISA balances and subscriptions Producers can export per-person `cash_isa_balance` and diff --git a/policyengine_uk/parameters/gov/dfe/extended_childcare_entitlement/disability_criteria.yaml b/policyengine_uk/parameters/gov/dfe/extended_childcare_entitlement/disability_criteria.yaml index a4d7eedbfa..546d9e59d1 100644 --- a/policyengine_uk/parameters/gov/dfe/extended_childcare_entitlement/disability_criteria.yaml +++ b/policyengine_uk/parameters/gov/dfe/extended_childcare_entitlement/disability_criteria.yaml @@ -30,7 +30,8 @@ values: # member of the benefit unit with an award of their own is not the parent or # partner, so their award does not count. 2022-12-01: - - uc_limited_capability_for_WRA # 14(4)(b)(i)-(ii): limited capability for work, or for work and work-related activity + # 14(4)(b)(i)-(ii): LCW includes LCWRA; require supplied current status. + - extended_childcare_entitlement_limited_capability_for_work - is_entitled_to_carer_benefit # 11A(1)(a)-(b): carer's allowance, or carer's assistance under the Social Security (Scotland) Act 2018 s.28 - receives_uc_carer_element # 11A(1)(c): the carer element under UC Regs reg 29, on an award (reg 14(5)(a) as made: "an award of universal credit [...] that includes the carer element") - receives_limited_capability_for_work_credits # 11A(1)(d): credits for incapacity for work or limited capability for work diff --git a/policyengine_uk/tests/policy/baseline/gov/dfe/extended_childcare_entitlement/extended_childcare_entitlement_lcw.yaml b/policyengine_uk/tests/policy/baseline/gov/dfe/extended_childcare_entitlement/extended_childcare_entitlement_lcw.yaml new file mode 100644 index 0000000000..bba9dd7e74 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dfe/extended_childcare_entitlement/extended_childcare_entitlement_lcw.yaml @@ -0,0 +1,885 @@ +# SI 2022/1134 regs 14(4)(b)(i)-(ii) and 15(4)(a)-(b) separately admit +# LCW and LCWRA. The LCW-only parent can occupy either adult position. +# Modern role cases use 2025, after SI 2023/276's 30 March 2023 amendment. +# https://www.legislation.gov.uk/uksi/2022/1134/regulation/14 +# https://www.legislation.gov.uk/uksi/2022/1134/regulation/15 +# The earner receives 20,000 / 4 = 5,000 per quarter, above the reg 18 +# minimum of 10 x 16 x 13 = 2,080, with ANI below 100,000. +# Other listed benefits/credits are absent. Booleans have no error margin. +# Calendar2022 samples30April2022: SI2016/1257reg9(1)(b)(viii)'s LCWRA list. +# Calendar2023 samples30April2023, after both 1December2022 and30March2023. +# These annual controls do not assert a monthly/December entitlement. +# https://www.legislation.gov.uk/uksi/2016/1257/regulation/9/made + +- name: Case 1, LCW-only first parent qualifies with a working partner in 2025. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - true + - false + - false + extended_childcare_entitlement_work_condition: + - true + - true + - false + extended_childcare_entitlement_eligible: true +- name: Case 2, LCW-only second parent qualifies with a working partner in 2025. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - true + - false + extended_childcare_entitlement_work_condition: + - true + - true + - false + extended_childcare_entitlement_eligible: true +- name: Case 3, an ended ESA award with supplied current LCW qualifies in 2025. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + is_disabled_for_benefits: true + esa_income_reported: 3000 + esa_income_report_closed: true + esa_includes_support_component: false + uc_limited_capability_for_work: true + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - true + - false + extended_childcare_entitlement_work_condition: + - true + - true + - false + extended_childcare_entitlement_eligible: true + has_own_esa_award: + - false + - true + - false + uc_limited_capability_for_work: + - false + - true + - false + uc_limited_capability_for_WRA: + - false + - false + - false + claimant_or_partner_esa_income: + - 0 + - 0 + - 0 + esa_income: 0 +- name: Case 4, LCWRA remains sufficient with a working partner in 2025. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: true + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - true + - false + extended_childcare_entitlement_work_condition: + - true + - true + - false + extended_childcare_entitlement_eligible: true +- name: Case 5, neither capability flag nor a specified benefit qualifies the nonworker. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - false + - false + extended_childcare_entitlement_work_condition: + - true + - false + - false + extended_childcare_entitlement_eligible: false +- name: Case 6, LCW alone cannot replace a partner meeting the income conditions. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 20000 + adjusted_net_income: 120000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - true + - false + - false + extended_childcare_entitlement_work_condition: + - false + - false + - false + extended_childcare_entitlement_eligible: false +- name: Case 7, a lone LCW-only parent cannot use the working-partner exception. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - true + - false + extended_childcare_entitlement_work_condition: + - false + - false + extended_childcare_entitlement_eligible: false +- name: Case 8, calendar 2022 retains the historical LCWRA-only capability criterion. + period: 2022 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - false + - false + extended_childcare_entitlement_work_condition: + - true + - false + - false + extended_childcare_entitlement_eligible: false +- name: Case 9, calendar 2022 retains eligibility through LCWRA and a working partner. + period: 2022 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: true + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - true + - false + extended_childcare_entitlement_work_condition: + - true + - true + - false + extended_childcare_entitlement_eligible: true +- name: Case 10, model year 2023 uses the post-commencement LCW criterion. + period: 2023 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: true + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 20000 + adjusted_net_income: 20000 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: + age: 4 + benunits: + benunit: + members: + - person1 + - person2 + - person3 + would_claim_extended_childcare: true + households: + household: + members: + - person1 + - person2 + - person3 + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - true + - false + - false + extended_childcare_entitlement_work_condition: + - true + - true + - false + extended_childcare_entitlement_eligible: true + +# SI 2022/1134 reg 4 adopts UC regs 39/40: determined or treated-as status. +# PIP/DLA receipt and ended ESA reports do not supply that current-status fact. +# Missing status uses the childcare input default below; it is legally unknown. +# Both capability inputs must be absent from ALL people in missing-status cases: +# Core otherwise fills omitted people with false in a supplied full-person array. +- name: Case 11, PIP and a disability proxy do not supply current capability status. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20_000 + adjusted_net_income: 20_000 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + is_disabled_for_benefits: true + pip: 1_000 + dla: 0 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: {age: 4} + benunits: + benunit: + members: [person1, person2, person3] + would_claim_extended_childcare: true + claimant_or_partner_esa_income: 0 + households: + household: + members: [person1, person2, person3] + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - false + - false + extended_childcare_entitlement_eligible: false + +- name: Case 12, DLA and a disability proxy do not supply current capability status. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20_000 + adjusted_net_income: 20_000 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + is_disabled_for_benefits: true + pip: 0 + dla: 1_000 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: {age: 4} + benunits: + benunit: + members: [person1, person2, person3] + would_claim_extended_childcare: true + claimant_or_partner_esa_income: 0 + households: + household: + members: [person1, person2, person3] + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - false + - false + extended_childcare_entitlement_eligible: false + +- name: Case 13, an ended ESA report does not supply current capability status. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20_000 + adjusted_net_income: 20_000 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + is_disabled_for_benefits: true + esa_income_reported: 3_000 + esa_income_report_closed: true + esa_includes_support_component: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: {age: 4} + benunits: + benunit: + members: [person1, person2, person3] + would_claim_extended_childcare: true + claimant_or_partner_esa_income: 0 + households: + household: + members: [person1, person2, person3] + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - false + - false + extended_childcare_entitlement_eligible: false + +- name: Case 14, explicit false capability status is not replaced by a disability proxy. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20_000 + adjusted_net_income: 20_000 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + is_disabled_for_benefits: true + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: false + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: {age: 4} + benunits: + benunit: + members: [person1, person2, person3] + would_claim_extended_childcare: true + claimant_or_partner_esa_income: 0 + households: + household: + members: [person1, person2, person3] + country: ENGLAND + output: + extended_childcare_entitlement_eligible: false + +# Regs 14(4)(b)(ii) and 15(4)(b) admit LCWRA independently of the LCW input. +- name: Case 15, supplied current LCWRA qualifies even when LCW is supplied false. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20_000 + adjusted_net_income: 20_000 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + uc_limited_capability_for_work: false + uc_limited_capability_for_WRA: true + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person3: {age: 4} + benunits: + benunit: + members: [person1, person2, person3] + would_claim_extended_childcare: true + claimant_or_partner_esa_income: 0 + households: + household: + members: [person1, person2, person3] + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - true + - false + extended_childcare_entitlement_eligible: true + +# Reg 11A(1)(e) admits current ESA through its separate specified-benefit route. +- name: Case 16, current contributory ESA qualifies without supplied capability status. + period: 2025 + input: + people: + person1: + age: 40 + is_parent: true + employment_income: 20_000 + adjusted_net_income: 20_000 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 0 + incapacity_benefit: 0 + sda: 0 + person2: + age: 38 + is_parent: true + employment_income: 0 + adjusted_net_income: 0 + minimum_wage: 10 + is_entitled_to_carer_benefit: false + receives_uc_carer_element: false + receives_limited_capability_for_work_credits: false + esa_contrib: 3_000 + incapacity_benefit: 0 + sda: 0 + person3: {age: 4} + benunits: + benunit: + members: [person1, person2, person3] + would_claim_extended_childcare: true + claimant_or_partner_esa_income: 0 + households: + household: + members: [person1, person2, person3] + country: ENGLAND + output: + extended_childcare_entitlement_limited_capability_for_work: + - false + - false + - false + extended_childcare_entitlement_limited_capability_or_specified_benefit: + - false + - true + - false + extended_childcare_entitlement_eligible: true diff --git a/policyengine_uk/tests/test_extended_childcare_capability_inputs.py b/policyengine_uk/tests/test_extended_childcare_capability_inputs.py new file mode 100644 index 0000000000..65aa0ffbea --- /dev/null +++ b/policyengine_uk/tests/test_extended_childcare_capability_inputs.py @@ -0,0 +1,133 @@ +"""Childcare requires supplied current capability status, including treated-as status. + +SI 2022/1134 reg 4 adopts UC Regulations 2013 regs 39/40. Childcare regs +14(4)(b)(i)-(ii) and 15(4)(a)-(b) admit either status with a working partner. +The childcare input contract accepts a status supplied for the requested year; +a disability proxy, calculated cache or earlier year's input does not supply it. +Missing status uses a conservative model default and remains legally unknown. +""" + +import pytest +from policyengine_core.periods import period + +from policyengine_uk import Simulation +from policyengine_uk.utils.supplied_inputs import is_supplied_input + +pytestmark = pytest.mark.usefixtures("cloned_uk_tax_benefit_system") + +YEAR = 2025 +LCW = "uc_limited_capability_for_work" +LCWRA = "uc_limited_capability_for_WRA" +ELIGIBLE = "extended_childcare_entitlement_eligible" + + +def proxy_family(years=(YEAR,)): + """An England child aged 4, a working parent, and a nonworking PIP recipient. + + At the supplied minimum wage, quarterly earnings of 5,000 exceed the + reg 18 minimum of 16 * 10 * 13 = 2,080. Every specified benefit is absent. + Omit both capability inputs from every person, so the situation builder + cannot create supplied false arrays that mask the nonworker's fallback. + """ + + def annual(value): + return {year: value for year in years} + + absent_benefits = { + name: annual(value) + for name, value in { + "is_entitled_to_carer_benefit": False, + "receives_uc_carer_element": False, + "receives_limited_capability_for_work_credits": False, + "esa_contrib": 0, + "incapacity_benefit": 0, + "sda": 0, + }.items() + } + members = ["person1", "person2", "person3"] + return Simulation( + situation={ + "people": { + "person1": { + "age": annual(40), + "is_parent": annual(True), + "employment_income": annual(20_000), + "adjusted_net_income": annual(20_000), + "minimum_wage": annual(10), + **absent_benefits, + }, + "person2": { + "age": annual(38), + "is_parent": annual(True), + "employment_income": annual(0), + "adjusted_net_income": annual(0), + "minimum_wage": annual(10), + "is_disabled_for_benefits": annual(True), + "pip": annual(1_000), + "dla": annual(0), + **absent_benefits, + }, + "person3": {"age": annual(4)}, + }, + "benunits": { + "benunit": { + "members": members, + "would_claim_extended_childcare": annual(True), + "claimant_or_partner_esa_income": annual(0), + } + }, + "households": { + "household": {"members": members, "country": annual("ENGLAND")} + }, + } + ) + + +def test_warmed_uc_capability_defaults_do_not_supply_childcare_status(): + """Warming the unchanged global disability fallbacks cannot establish status.""" + simulation = proxy_family() + person = simulation.populations["person"] + for capability in (LCWRA, LCW): + value = simulation.calculate(capability, YEAR) + assert value.tolist() == [False, True, False] + assert not is_supplied_input(person, capability, period(YEAR), value) + + assert simulation.calculate(ELIGIBLE, YEAR).tolist() == [False] + + +@pytest.mark.parametrize("capability", [LCW, LCWRA]) +def test_equal_capability_values_qualify_only_when_supplied(capability): + """An entered current determination can equal a proxy without sharing its source.""" + simulation = proxy_family() + person = simulation.populations["person"] + derived = simulation.calculate(capability, YEAR).copy() + assert derived.tolist() == [False, True, False] + assert not is_supplied_input(person, capability, period(YEAR), derived) + assert simulation.calculate(ELIGIBLE, YEAR).tolist() == [False] + + # The caller now supplies the same values as current determined/treated-as + # status. Public set_input records the changed source, despite equal values. + simulation.set_input(capability, YEAR, derived) + supplied = simulation.calculate(capability, YEAR) + assert supplied.tolist() == derived.tolist() + assert is_supplied_input(person, capability, period(YEAR), supplied) + assert simulation.calculate(ELIGIBLE, YEAR).tolist() == [True] + + +def test_previous_year_status_does_not_supply_current_year_status(): + """An annual status input needs renewal even while the global proxy stays true.""" + next_year = YEAR + 1 + simulation = proxy_family(years=(YEAR, next_year)) + simulation.set_input(LCW, YEAR, [False, True, False]) + person = simulation.populations["person"] + assert simulation.calculate(ELIGIBLE, YEAR).tolist() == [True] + + current_value = simulation.calculate(LCW, next_year) + assert current_value.tolist() == [False, True, False] + assert not is_supplied_input(person, LCW, period(next_year), current_value) + assert simulation.calculate(ELIGIBLE, next_year).tolist() == [False] + + simulation.set_input(LCW, next_year, [False, True, False]) + current_value = simulation.calculate(LCW, next_year) + assert is_supplied_input(person, LCW, period(next_year), current_value) + assert simulation.calculate(ELIGIBLE, next_year).tolist() == [True] diff --git a/policyengine_uk/variables/gov/dfe/extended_childcare_entitlement/conditions/extended_childcare_entitlement_limited_capability_for_work.py b/policyengine_uk/variables/gov/dfe/extended_childcare_entitlement/conditions/extended_childcare_entitlement_limited_capability_for_work.py new file mode 100644 index 0000000000..75223fd131 --- /dev/null +++ b/policyengine_uk/variables/gov/dfe/extended_childcare_entitlement/conditions/extended_childcare_entitlement_limited_capability_for_work.py @@ -0,0 +1,27 @@ +from policyengine_uk.model_api import * +from policyengine_uk.utils.supplied_inputs import is_supplied_input + + +class extended_childcare_entitlement_limited_capability_for_work(Variable): + value_type = bool + entity = Person + label = "Supplied current limited capability for work for extended childcare" + definition_period = YEAR + reference = ( + "https://www.legislation.gov.uk/uksi/2022/1134/regulation/4", + "https://www.legislation.gov.uk/uksi/2022/1134/regulation/14", + "https://www.legislation.gov.uk/uksi/2022/1134/regulation/15", + "https://www.legislation.gov.uk/uksi/2013/376/regulation/39", + "https://www.legislation.gov.uk/uksi/2013/376/regulation/40", + ) + + def formula(person, period, parameters): + lcw = person("uc_limited_capability_for_work", period) + lcwra = person("uc_limited_capability_for_WRA", period) + return ( + lcw + & is_supplied_input(person, "uc_limited_capability_for_work", period, lcw) + ) | ( + lcwra + & is_supplied_input(person, "uc_limited_capability_for_WRA", period, lcwra) + )