Skip to content

Disability benefits: PIP/DLA/AA/Carer's tests and documentation#77

Open
vahid-ahmadi wants to merge 1 commit into
mainfrom
vahid/disability-benefits
Open

Disability benefits: PIP/DLA/AA/Carer's tests and documentation#77
vahid-ahmadi wants to merge 1 commit into
mainfrom
vahid/disability-benefits

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

Addresses #44.

Background

When investigating issue #44, the core disability-benefit modelling was found to already be implemented on main:

  • Amount functions (src/variables/benefits.rs): pip_daily_living_amount, pip_mobility_amount, dla_care_amount, dla_mobility_amount, attendance_allowance_amount — each computes weekly rate × 52 from FRS rate-band flags, preserving any FRS-recorded amount.
  • Carer's Allowance (calculate_carers_allowance): flat weekly rate × 52 with the net-earnings earnings test (SS (CA) Regs 2002 reg.8).
  • Disability premiums (disability_premiums_weekly): DP / EDP / SDP / Carer Premium feeding IS/HB/ESA/JSA applicable amounts.
  • Passporting: UC LCWRA element (PIP DL / DLA care mid-high / ESA support proxy), UC carer element, UC disabled child element, and benefit-cap exemption for PIP/DLA/AA/CA recipients.
  • Parameters: PipParams, DlaParams, AaParams, DisabilityPremiumParams, IncomeRelatedBenefitParams structs in src/parameters/mod.rs with 2025/26 weekly rates set in parameters/2025_26.yaml (annualised ×52 per codebase convention).
  • Disability benefit amounts surface into net income via passthrough_benefitstotal_benefits → household net income.

Scope (this PR)

This PR completes the issue by adding the coverage and documentation that were missing:

  • Unit tests for the disability/carer amount functions in src/variables/benefits.rs:
    • Enhanced PIP both components → expected annual amount (110.40 + 77.05) × 52
    • Standard PIP daily living only (no mobility)
    • FRS recorded-amount preservation overrides rate-band computation
    • DLA highest-care + higher-mobility for an under-16
    • Higher-rate Attendance Allowance
    • Carer's Allowance earnings-test cliff-edge boundary (full CA just below the £151/wk disregard; withdrawn above it)
  • LEGISLATIVE_REFERENCE.md §13A documenting PIP/DLA/AA/Carer's Allowance rates, eligibility, the CA earnings test, and passporting into UC/legacy means-tested benefits.
  • Changelog fragment.

Remaining

  • Carer's Allowance / LCWRA new-claimant modelling: CA receipt is gated on FRS-reported receipt plus the earnings test rather than computed from caring hours × care-recipient eligibility (the ca_min_hours_caring / ca_care_recipient_min_age parameters are loaded but not yet enforced, since the FRS cannot reliably link carer to care recipient). Similarly the LCWRA flag is a PIP/DLA/ESA proxy rather than a modelled Work Capability Assessment outcome.
  • Transitional protection for legacy→UC and DLA→PIP migration is not modelled.

Tests

cargo build and cargo test pass — 196 tests, 0 failures.

🤖 Generated with Claude Code

The PIP/DLA/Attendance Allowance amount functions, Carer's Allowance
(with earnings test), disability premiums, and passporting into UC/legacy
means-tested benefits are already implemented in src/variables/benefits.rs
with parameters wired in src/parameters/mod.rs and parameters/2025_26.yaml.

This change rounds out issue #44 by adding the missing focused coverage and
documentation:
- Unit tests for the disability/carer amount functions: enhanced PIP (both
  components -> expected annual amount), standard PIP daily living, FRS
  recorded-amount preservation, DLA care + mobility for under-16s, higher-rate
  Attendance Allowance, and the Carer's Allowance earnings-test cliff-edge
  boundary (SS (CA) Regs 2002 reg.8).
- New LEGISLATIVE_REFERENCE.md section 13A documenting PIP/DLA/AA/Carer's
  Allowance rates, eligibility, the CA earnings test, and passporting.
- Changelog fragment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant