Skip to content

Add ssi_couple_computation_applies for Title XIX facility separation#8004

Open
hua7450 wants to merge 5 commits intoPolicyEngine:mainfrom
hua7450:fix-ssi-claim-is-joint-medical-facility
Open

Add ssi_couple_computation_applies for Title XIX facility separation#8004
hua7450 wants to merge 5 commits intoPolicyEngine:mainfrom
hua7450:fix-ssi-claim-is-joint-medical-facility

Conversation

@hua7450
Copy link
Copy Markdown
Collaborator

@hua7450 hua7450 commented Apr 15, 2026

Summary

Adds a new ssi_couple_computation_applies variable that implements 20 CFR 416.414's medical facility separation rules, without overloading ssi_claim_is_joint.

Closes #8003

Why a New Variable (Not Modifying ssi_claim_is_joint)

The issue originally proposed modifying ssi_claim_is_joint directly. However, ssi_claim_is_joint carries two meanings downstream:

  1. "Are both spouses SSI-eligible?" — used by state SSP programs (AK, MA, DE, CO) for claim type classification
  2. "Should federal SSI use couple computation?" — what 416.414(b)(3) affects

These diverge when one spouse enters a medical facility: both are still SSI-eligible, but federal SSI computes benefits separately. Overloading ssi_claim_is_joint to return false would misclassify state SSP claim types — e.g., Alaska's ak_ssp_claim_type would move a two-eligible-spouse couple onto the COUPLE_ONE_ELIGIBLE payment schedule.

Solution: ssi_claim_is_joint retains "both eligible" semantics. The new ssi_couple_computation_applies encodes the facility separation rule and is used only in federal SSI calculations.

Regulatory Authority

  • 20 CFR 416.414(b)(2): Both in facility → couple computation still applies ($60/month = $30 each)
  • 20 CFR 416.414(b)(3): One in facility → benefits computed separately; facility spouse gets $30, community spouse gets individual rate per §416.410
  • POMS SI 00501.154: Couple computation rules require living in the same household; "sharing a room in an institution is not living in the same household"

What Changed

File Change
ssi_couple_computation_applies.py (new) joint_claim & ~one_in_facility — FALSE when exactly one spouse is in a Title XIX facility
ssi_amount_if_eligible.py Uses new variable for base amount; removed redundant community spouse override
meets_ssi_resource_test.py Uses new variable for couple vs individual resource limits
ssi_pmv_amount.py Uses new variable for couple vs individual PMV
ssi_claim_is_joint.py Unchanged — reverted to original
State SSPs (AK, MA, DE, CO) Unchanged — still use ssi_claim_is_joint

Test Plan

5 new test cases in ssi_couple_computation_applies.yaml:

Case Scenario ssi_claim_is_joint ssi_couple_computation_applies
1 Eligible couple, neither in facility [true, true] [true, true]
2 One spouse enters Medicaid nursing home [true, true] [false, false]
3 Both spouses in medical facilities [true, true] [true, true]
4 Spouse in privately-funded facility (not Title XIX) [true, true] [true, true]
5 Only one spouse eligible, no facility [false, false] [false, false]
  • All 148 SSI tests pass
  • All 48 AK SSP tests pass
  • All 21 DE SSP tests pass
  • All 13 MA SSP tests pass
  • All 8 CO OAP tests pass

🤖 Generated with Claude Code

Per 20 CFR 416.414(b)(3) and POMS SI 00501.154, when either spouse
is in a medical treatment facility with Medicaid paying >50% of care,
couple computation rules do not apply — each is treated as a
separately eligible individual.

Closes PolicyEngine#8003

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.30%. Comparing base (7f3ec13) to head (67136d8).
⚠️ Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
...v/ssa/ssi/eligibility/income/ism/ssi_pmv_amount.py 0.00% 1 Missing ⚠️
...ssa/ssi/eligibility/income/ssi_countable_income.py 0.00% 1 Missing ⚠️
...us/variables/gov/ssa/ssi/ssi_amount_if_eligible.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              main    #8004       +/-   ##
============================================
- Coverage   100.00%   65.30%   -34.70%     
============================================
  Files            2        6        +4     
  Lines           46       98       +52     
============================================
+ Hits            46       64       +18     
- Misses           0       34       +34     
Flag Coverage Δ
unittests 65.30% <84.21%> (-34.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Per 20 CFR 416.414(b)(3), when one spouse is in a medical treatment
facility (Medicaid paying >50%), benefits are computed separately.
Per 416.414(b)(2), when both are in facility, couple computation
still applies ($60/month).

Introduces ssi_couple_computation_applies to encode this rule without
overloading ssi_claim_is_joint, which state SSPs rely on for
claim type classification (both-eligible vs one-eligible).

Federal consumers (ssi_amount_if_eligible, meets_ssi_resource_test,
ssi_pmv_amount) now use the new variable. State SSPs (AK, MA, DE, CO)
continue using ssi_claim_is_joint unchanged.

Closes PolicyEngine#8003

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hua7450 hua7450 changed the title Fix ssi_claim_is_joint to implement Title XIX couple separation Add ssi_couple_computation_applies for Title XIX facility separation Apr 15, 2026
hua7450 and others added 3 commits April 15, 2026 13:34
Per 20 CFR 416.414(b)(3), when one spouse is in a medical facility,
"each individual's own countable income" is used. Update the income
pipeline (ssi_marital_earned_income, ssi_marital_unearned_income,
ssi_countable_income) to use ssi_couple_computation_applies so
income pooling and halving also stop when the couple is separated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The resource test is an eligibility determination, not a benefit
computation. 20 CFR 416.414 only governs benefit amounts — the
couple resource limit ($3,000) still applies even when one spouse
is in a medical facility. Only benefit computation variables should
use ssi_couple_computation_applies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion

Add comments explaining that ssi_couple_computation_applies
intentionally does not change joint-claim status or spouse/individual
classification. POMS SI 02005.050 turns on temporary vs permanent
separation, which PolicyEngine does not model. The variable scopes
to the benefit-computation rule that 416.414(b) applies in either case.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hua7450 hua7450 requested a review from PavelMakarchuk April 15, 2026 18:29
@hua7450 hua7450 marked this pull request as ready for review April 15, 2026 22:01
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.

ssi_claim_is_joint does not implement Title XIX couple separation (20 CFR 416.1149)

1 participant