Repository navigation
Count blind people and use the individual or couple in the Medicaid medically needy test - #10370
Conversation
Count blind people under the medically needy disabled group (42 CFR 435.322), and sum medically needy income and resources over the individual or married couple, choosing the couple limits from the marital unit (42 CFR 435.602). Fixes PolicyEngine#10366 Fixes PolicyEngine#10367 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A blind or disabled child's resource test now adds the resources SSI deems from ineligible parents (20 CFR 416.1202(b)), as countable income already includes their deemed income. The variable cites 42 CFR 435.602, 435.831 and 435.845. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Program Review
PR #10370, "Count blind people and use the individual or couple in the Medicaid medically needy test" (hua7450). Round 1, full review.
IDs: C = critical, SA = should address, G = suggestion.
Paths: CAT = is_in_medicaid_medically_needy_category.py and ELIG = is_medically_needy_for_medicaid.py, both in policyengine_us/variables/gov/hhs/medicaid/eligibility/categories/medically_needy/. CAT.yaml and ELIG.yaml are the matching test files. Line numbers refer to the reviewed head. PDF links use file page numbers. Dollar figures are Massachusetts 2026: $522 / $650 a month (individual / couple), $2,000 / $3,000 in resources.
Source Documents
- Reviewed head SHA: 5434a6c
- Mode: full
- Scope: 5 files (+201/-8) against merge base
9ee14cdb43: 2 formulas, 2 test files, 1 changelog fragment. No parameters. - Regulations (eCFR, as of 2026-10-23): 42 CFR 435.301(b)(2), 435.322, 435.530, 435.602(a)(2)(i), 435.831(d), 435.845(a), also 435.324 and 435.811; 20 CFR 416.1163, 416.1202(b), also 416.1165 and 416.1205.
- PDF: CMS implementation guide, Handling of Excess Income (Spenddown) #page 2-3.
- PDF: Tennessee plan page TN-21-0010, spenddown (page 1, read as an image).
- PDF: Massachusetts SPA MA-11-006, Supplement 3 to Attachment 2.6-A (page 4, read as an image).
- Other: 130 CMR 520.002(A)(1); the KFF survey that the
disabledparameter cites;CLAUDE.md:143; PRs #10240, #10374, #10375, #10394; issues #10000, #10478.
Branch Status
- 4 commits ahead and 19 behind
main. No commit onmainsince the merge base touches the two formulas. - CI: 22 pass, 1 fail, 3 skipped.
Baseline tests / Full Suite - Baseline (states-shard-2)was cancelled at the 60-minute limit with 0 test failures. Its 6 finished batches passed but ran 4-6x slower than on other runs that day; the same shard passed in 20-30 minutes on 5 other runs. Locally, the 8 unfinished batches pass 3,267 of 3,267 at the head. A slow runner caused it, not the PR. Re-run the shard before merge. - #10374 edits the same formula and moves the income limit into
medicaid_medically_needy_income_limit, which also usesmarital_unit.nb_persons() == 2. The formula merges cleanly in either order. #10374 and #10240 append cases to the same test files, so the PR that merges later keeps both blocks and renumbers. Draft #10394 edits the sameCAT:20line (G4).
What the PR gets right
- Blind people.
CAT:20countsis_blindoris_ssi_disabled. 435.301(b)(2) lists "(iv) Blind" beside "(v) Disabled", and 435.530 uses the SSI blindness definition, which has no SGA test. A blind worker with $36,000 of earnings and $30,000 of medical expenses is medically needy at the head, not onmain. KFF counts blindness as a disability, so thedisabledflag is a fair source. - Individual or couple.
ELIG:43-45sums over the marital unit. 435.602(a)(2)(i): "Except for a spouse of an individual or a parent for a child who is under age 21 or blind or disabled, the agency must not consider income and resources of any relative". A dependent parent no longer pools with the filer (Case 3), and separate filers are tested together (Case 4). This matches the optional pathway and #10374. - No double count.
ssi_countable_incomeis 0 for a person who is not SSI-eligible, and each member of an eligible couple carries half (policyengine_us/variables/gov/ssa/ssi/eligibility/income/ssi_countable_income.py:79-85). - Deemed parental resources.
ELIG:37-39follows 20 CFR 416.1202(b): Cases 5 and 6 deem 17,000 and 0. - Housekeeping. The four new eCFR anchors resolve and support the rules. The changelog and formatting are correct. The test comments and the PR body figures check out.
Critical (Must Fix)
C1. A parent's medical expenses no longer reduce a disabled child's countable income.
- Where:
ELIG:30reads only the person's own expenses,ELIG:35-36says "Parents' medical expenses are not deducted for the child.", andELIG:44sums over the child's one-person marital unit.ELIG:21cites 435.831(d). - Evidence: 42 CFR 435.831(d): "the agency must deduct from income medical expenses incurred by the individual or family or financially responsible relatives". Under 435.602(a)(2)(i) a parent is responsible "for a child who is under age 21 or blind or disabled". The CMS guide: expenses "include expenses incurred by other members of the family and financially responsible relatives" (#page=2). Tennessee's plan page repeats 435.831(d) (#page=1). The Massachusetts plan page limits expenses by date and fee, not by whose they are (#page=4).
- Probe: parents with $40,000 wages each, parent 1 with $8,000 of medical expenses; an SSI-disabled child of 10 with
ssi_countable_income21,358 and $10,000 of expenses.maingives[false, false, true], the head[false, false, false], the fix below[false, false, true]. By the rule, 21,358 - (10,000 + 8,000) = 3,358 <= 6,264: the child is eligible. - Why this severity: a regulatory mismatch, and a test proves the flip. It is a regression, because the tax-unit sum on
maindeducted the parents' expenses. "Must deduct" leaves no modeling choice, so the Limitations note does not save it. The 2024 microdata have no medically needy children under 18, so only household results change. - Fix: delete "Parents' medical expenses are not deducted for the child." at
ELIG:35-36, and replaceELIG:44with:
# 42 CFR 435.831(d) deducts expenses of financially responsible
# relatives. For a child these are the ineligible parents whose
# income SSI deems (20 CFR 416.1165); split their expenses among the
# eligible children as the deemed income is split, so that an
# expense is deducted once.
tax_unit = person.tax_unit
eligible_child = is_aged_blind_or_disabled & person("is_child", period)
parental_expenses = tax_unit.sum(
medical_expenses * person("is_ssi_ineligible_parent", period)
)
eligible_children = tax_unit.sum(eligible_child)
parental_expense_share = where(
eligible_child, parental_expenses / max_(eligible_children, 1), 0
)
income = marital_unit.sum(
personal_income - medical_expenses - parental_expense_share
)It finds parents and children as ssi_unearned_income_deemed_from_ineligible_parent does. The split among siblings is a modeling choice; the full amount per child is the other option. With the fix, 17 medically needy cases, 774 Medicaid and partner healthcare cases, and 1,153 other Medicaid-reading cases pass. If a caller omits marital units, the parents' expenses are deducted twice (G1). Remove the third Limitations bullet, and append this case (it fails at the head):
- name: Case 9, a parent's medical expenses reduce a disabled child's countable income.
period: 2026
input:
people:
person1:
age: 40
is_tax_unit_head: true
is_parent: true
employment_income_before_lsr: 40_000
ssi_countable_resources: 1_200
medicaid_medically_needy_medical_expenses: 8_000
person2:
age: 38
is_tax_unit_spouse: true
is_parent: true
employment_income_before_lsr: 40_000
ssi_countable_resources: 1_200
person3:
age: 10
is_tax_unit_dependent: true
is_ssi_disabled: true
ssi_countable_income: 21_358
medicaid_medically_needy_medical_expenses: 10_000
is_optional_senior_or_disabled_for_medicaid: false
tax_units:
tax_unit:
members: [person1, person2, person3]
marital_units:
marital_unit1:
members: [person1, person2]
marital_unit2:
members: [person3]
households:
household:
members: [person1, person2, person3]
state_code: MA
output:
# 42 CFR 435.831(d): 21,358 - (10,000 own + 8,000 parent's) = 3,358
# <= 522 x 12 = 6,264. Resources: nothing deemed (2,400 < 3,000).
is_medically_needy_for_medicaid: [false, false, true]Should Address
SA1. is_in_medicaid_medically_needy_category has no reference.
- Where:
CAT:4-9. The PR changes the variable's legal basis but cites 42 CFR 435.322 and 435.324 only in a comment (CAT:17-19). - Evidence:
CLAUDE.md:143: "Always cite specific regulation sections in variable reference and documentation". 435.301(b)(2) lists "(iv) Blind (§§ 435.322, 435.330 and 435.340)" and "(v) Disabled (§§ 435.324, 435.330, and 435.340)". - Why this severity: the gap predates the PR and the comment names the right sections, so it is not critical. But the PR edits this legal basis, so the reference belongs here.
- Fix (passes at the head; insert after
CAT:9; the KFF URL is thedisabledparameter's):
reference = (
"https://www.ecfr.gov/current/title-42/section-435.301#p-435.301(b)(2)",
"https://www.ecfr.gov/current/title-42/section-435.322",
"https://www.ecfr.gov/current/title-42/section-435.324",
"https://www.kff.org/report-section/medicaid-financial-eligibility-for-seniors-and-people-with-disabilities-findings-from-a-50-state-survey-appendix-tables/",
)SA2. No test separates the individual limit from the couple limit.
- Where:
ELIG:48(is_joint = marital_unit.nb_persons() == 2). Net income is above both limits in Case 4 and below both in Cases 3, 5 and 6. - Evidence: on a package copy, three wrong flags pass all 14 medically needy cases: the pre-PR
person.tax_unit("tax_unit_is_joint", period), "couple if the tax unit has 2 or more people", and "always individual". Cases 7 and 8 catch all three. - Why this severity: a missing edge case for a tested variable. The couple flag is half of the #10367 fix.
- Fix (both pass at the head and with the C1 fix):
- name: Case 7, married couple filing separately qualifies on the couple limit when combined net income is between the two limits.
period: 2026
input:
people:
person1:
age: 68
ssi_countable_income: 10_000
medicaid_medically_needy_medical_expenses: 6_500
ssi_countable_resources: 1_000
is_optional_senior_or_disabled_for_medicaid: false
person2:
age: 66
ssi_countable_income: 10_000
medicaid_medically_needy_medical_expenses: 6_500
ssi_countable_resources: 1_000
is_optional_senior_or_disabled_for_medicaid: false
tax_units:
tax_unit1:
members: [person1]
tax_unit2:
members: [person2]
marital_units:
marital_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: MA
output:
# 2 x (10,000 - 6,500) = 7,000: above 6,264, at or below 7,800.
is_medically_needy_for_medicaid: [true, true]
- name: Case 8, disabled child in a joint tax unit is tested against the individual limit.
period: 2026
input:
people:
person1:
age: 40
is_tax_unit_head: true
is_parent: true
employment_income_before_lsr: 40_000
ssi_countable_resources: 1_200
person2:
age: 38
is_tax_unit_spouse: true
is_parent: true
employment_income_before_lsr: 40_000
ssi_countable_resources: 1_200
person3:
age: 10
is_tax_unit_dependent: true
is_ssi_disabled: true
ssi_countable_income: 21_358
medicaid_medically_needy_medical_expenses: 15_000
is_optional_senior_or_disabled_for_medicaid: false
tax_units:
tax_unit:
members: [person1, person2, person3]
marital_units:
marital_unit1:
members: [person1, person2]
marital_unit2:
members: [person3]
households:
household:
members: [person1, person2, person3]
state_code: MA
output:
# 21,358 - 15,000 = 6,358 > 6,264 (the couple limit 7,800 would pass).
is_medically_needy_for_medicaid: [false, false, false]Suggestions
G1. Correct the Limitations text on omitted marital units.
- Where: the first Limitations bullet; behavior at
ELIG:43-48. - Evidence: without marital units, Core builds one unit for every person in the situation, across households. An SSI-disabled parent with a spouse and two children is eligible on
mainand ineligible at the head (4-person unit, individual limit: 6,500 > 6,264); with marital units given, both are eligible. Two unrelated aged people in two households are summed (10,160 > 7,800). - Why a suggestion: with the inputs the law requires, the head is correct. #10000 fixes the default, the optional pathway and #10374 behave the same, and microdata supply marital units.
- Fix (body only): "When a caller omits marital units, Core puts every person in the situation into one marital unit, across households (#10000 changes this). A situation of exactly two people gets the couple limits and a larger one the individual limits. Partner API fixtures omit marital units, but none has an aged, blind or disabled member in a medically needy state."
G2. The couple limit applies even when SSI deems no spouse income.
- Where:
ELIG:48withELIG:50-59. - Evidence: 20 CFR 416.1163(d)(1): below the couple-minus-individual benefit gap "there is no income to deem", and SSI uses the individual rate. 130 CMR 520.002(A)(1) instead counts "the total countable-income amount and countable assets of the individual and the spouse who are living together" against the couple standard. The head applies the couple limit to own income only. An aged person with $20,000 of Social Security and $13,000 of expenses, whose spouse earns $4,800: separate filers are ineligible on
main(6,760 > 6,264) and eligible at the head; joint filers are eligible on both. - Why a suggestion:
maindoes the same for joint filers, and the PR documents the couple-limit half. The monthly gap is up to $391 (New York; Massachusetts $128; 0 in 7 states). - Fix: open a follow-up issue (couple limit only when SSI deeming applies, or full spouse income in couple-budget states), and say in the body that spouse income below the deeming threshold is not counted.
G3. Rename the local is_joint to is_couple.
ELIG:48now means a two-person marital unit; the optional pathway usesis_couple. Rename it in whichever of this PR and #10374 merges second.
G4. Name #10394 in the PR body.
- Draft #10394 changes
CAT:20to add blind people for North Dakota only (N.D.A.C. 75-02-02.1-05(3)(e)) and adds areferencetoCAT. This PR makes that clause redundant, and the two conflict on the line.
G5. Add an end-to-end blind case.
ELIG.yamlCases 1-2 take the category as an input, so no case computes it on the way to eligibility. Optional, becauseCAT.yamlCase 1 pins the change. Append toELIG.yaml(passes at the head):
- name: Case 10, blind adult under 65 who is not SSI-disabled qualifies after spenddown.
period: 2026
input:
age: 40
is_blind: true
is_adult_for_medicaid: false
is_optional_senior_or_disabled_for_medicaid: false
ssi_countable_income: 12_000
medicaid_medically_needy_medical_expenses: 6_000
ssi_countable_resources: 1_000
state_code: MA
output:
# 12,000 - 6,000 = 6,000 <= 6,264; resources 1,000 <= 2,000.
is_in_medicaid_medically_needy_category: true
is_medically_needy_for_medicaid: trueG6. Report the measured population effect.
- The body says the effect "has not been measured". On the 2024 populace data, weighted medically needy eligibility goes from 402,535 to 386,285. One Georgia record (11,510) gains through blindness. Losses are people whose tax unit pooled a non-spouse relative's expenses or assets; the Connecticut and Michigan records were checked and are correct under 435.602.
- Data note:
is_blindcomes from CPSPEDISEYE("blind or serious difficulty seeing even when wearing glasses"), wider than the SSI test. A data-side issue, not this PR's.
Investigated and cleared
- Blind gate.
is_ssi_aged_blind_disabled(ELIG:28) already includesis_blind, so only the category needed the change. - January read (
ELIG:38): same value as the annual read for annual inputs. - Existing expectations. No existing YAML result changes in any suite that ran.
- Partner contract tests. None edited; "Household API Partners" passed; the partner healthcare folder passes 70 of 70 read-only.
axiom:line. rulespec-us#1931 exists and is open. Process note only.
Out of scope / follow-up
policyengine_us/variables/gov/hhs/medicaid/eligibility/categories/is_209b_ssi_recipient_income_eligible_for_medicaid.py:28-32also omits the parents' expenses for a child. Apply the C1 approach in a follow-up.- Documented in the body: SSI allocation gates on deemed resources (#10478); parental resources only under 18; the optional pathway's asset test omits deemed parental resources.
Validation Summary
| Check | Result |
|---|---|
| CI | 22 pass, 1 fail (states-shard-2 timeout, 0 test failures, not the PR), 3 skipped. Re-run before merge |
| Local tests | Changed files 11/11; medically needy folder 14/14; gov/hhs/medicaid 701/701; shard-2 gap 3,267/3,267 |
| Partner contract tests | None edited; read-only healthcare folder 70/70 |
| Regulatory | Blind group and marital unit correct; parents' expenses dropped (C1) |
| References | 4 new eCFR anchors correct; CAT has none (SA1) |
| Mutation | 3 wrong couple flags survive (SA2); Cases 7-8 catch them |
| Fixes | C1, SA1, SA2 fixes pass: 17, 774 and 1,153 cases |
| Microsimulation | 402,535 to 386,285 weighted medically needy; no children under 18 |
| Branch | 4 ahead / 19 behind; overlaps #10374, #10240, #10394 |
Review Severity: REQUEST_CHANGES
One critical item (C1) and two should-address items (SA1, SA2) are open.
Next Steps
To auto-fix issues: run the fix-pr workflow for this PR.
- Fix C1: change
ELIG:35-36andELIG:44, add Case 9, and remove the third Limitations bullet. - Add the
referencetoCAT(SA1) and Cases 7-8 toELIG.yaml(SA2). - Take the suggestions that you agree with. G1, G4 and G6 are body edits; G2 needs an issue.
- Run
make format, then the medically needy folder andgov/hhs/medicaid. - Re-run the failed
states-shard-2job before merge (a new push also starts a full run). - If #10240 or #10374 merges first, keep both test blocks and renumber.
…needy 42 CFR 435.831(d) deducts expenses of financially responsible relatives. A disabled child's countable income now subtracts an equal share of the ineligible parents' medical expenses, split as SSI splits deemed income. Adds the category variable's references and Cases 7-10 (couple versus individual limit, the parent's expenses, and a blind adult end to end). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. Round-1 changes are in
The formula still merges cleanly with #10374 in either order. Two test files have end-of-file conflicts with it (both blocks are kept; the PR that merges second renumbers). TheAxiomFoundation/rulespec-us#1931 now describes this head: parents' expenses deducted, and two companion cases added for the parent's expenses and the couple limit. No tests were run locally; I checked each new expected value by hand. |
Brings in main's CI fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Program Review
PR #10370, "Count blind people and use the individual or couple in the Medicaid medically needy test" (hua7450). Round 2, incremental review of 5434a6c..9890e56.
IDs: C = critical, SA = should address, G = suggestion. New items continue the numbering after the highest prior ID in each class.
Paths: CAT = is_in_medicaid_medically_needy_category.py and ELIG = is_medically_needy_for_medicaid.py, both in policyengine_us/variables/gov/hhs/medicaid/eligibility/categories/medically_needy/. CAT.yaml and ELIG.yaml are the matching test files. Line numbers refer to the reviewed head. Dollar figures are Massachusetts 2026: $522 / $650 a month (6,264 / 7,800 a year), $2,000 / $3,000 in resources.
Source Documents
- Reviewed head SHA: 9890e56
- Mode: incremental (round 2)
- Scope: one fix commit,
857cb94a22, and two merges ofmain(d70717ef5e,9890e56683). The fix commit changes 4 files:ELIG:31-35(comment),ELIG:43-59(parental expense share),CAT:10-15(newreference),ELIG.yamlCases 7-10 (+128 lines), and the changelog fragment. The merges bring no change to PR-scope files. The PR body was rewritten for G1, G2, G4 and G6. - Regulations (eCFR, fetched 2026-10-29): 42 CFR 435.301(b)(2), 435.322, 435.324, 435.831(d); 20 CFR 416.1165(e)(2).
- Other: the KFF 50-state survey URL (now redirects with HTTP 200 to the survey's main page); issues #10507, #10508; PRs #10374, #10240, #10394; TheAxiomFoundation/rulespec-us#1931.
Branch Status
- 7 commits ahead and 34 behind
main. None of the 34 newermaincommits touchesgov/hhs/medicaidorgov/ssa/ssi. One touchesss_aime.py, which is not related. - CI at the head: 33 of 33 pass.
Baseline tests / Full Suite - Baseline (states-shard-2)passed in 35 minutes. The round-1 re-run note is resolved. - #10374, #10240 and draft #10394 are still open. #10374 rewrites the income-limit lines at
ELIG:63-69and names its flagis_couple. Its new multi-person cases give two-person marital units, so they agree with this PR's couple flag. #10374 and #10240 append cases toELIG.yaml(and #10374 toCAT.yaml), so the PR that merges later keeps both blocks and renumbers. #10394 editsCAT:26.
Round 1 items
| ID | Status | Evidence |
|---|---|---|
| C1 | RESOLVED | ELIG:43-59 is the suggested block, word for word. The "not deducted" sentence is gone from ELIG:31-35. ELIG.yaml Case 9 (line 279) passes: 21,358 - (10,000 + 8,000) = 3,358 <= 6,264; parents hold 2,400 < 3,000, so nothing is deemed. A mutation that sets the share to 0 fails Case 9. The third Limitations bullet is replaced by a bullet that names the equal split as a modeling choice. 42 CFR 435.831(d) supports the rule ("medical expenses incurred by the individual or family or financially responsible relatives"), and 20 CFR 416.1165(e)(2) supports the equal split by analogy ("we divide the parental income to be deemed equally among those eligible children"). |
| SA1 | RESOLVED | CAT:10-15 holds the four entries. 435.301(b)(2) lists "(iv) Blind (§§ 435.322, 435.330 and 435.340)" and "(v) Disabled (§§ 435.324, ...)". 435.322 covers blind individuals who meet 435.530 and subpart I. The KFF URL is the one in categories/disabled.yaml:9. |
| SA2 | RESOLVED | Cases 7 (line 208) and 8 (line 240) are in ELIG.yaml and pass. Case 7: 2 x (10,000 - 6,500) = 7,000, above 6,264 and at or below 7,800; resources 2,000 <= 3,000. Case 8: 21,358 - 15,000 = 6,358 > 6,264. A mutation back to tax_unit_is_joint fails both cases. |
| G1 | RESOLVED | The first Limitations bullet uses the suggested wording. It also says that the parents' expenses would then count twice for a child. That is correct: in one large marital unit, the child's sum holds the parents' own expenses and the child's share. |
| G2 | RESOLVED | #10507 is open. It cites 416.1163(d)(1) and 130 CMR 520.002(A)(1), gives the example, and proposes a state budgeting-method parameter. The second Limitations bullet says that spouse income below the deeming threshold is not counted. |
| G3 | DECLINED (accepted) | The author keeps is_joint because #10374 rewrites ELIG:63-69 and introduces is_couple there. A rename here would add a conflict for no behavior change. The body asks the PR that merges second to rename it. The reason holds. |
| G4 | RESOLVED | The body names draft #10394, its North Dakota clause, and the shared line in CAT. |
| G5 | RESOLVED | Case 10 (line 320) computes the category for a blind 40-year-old and passes: 12,000 - 6,000 = 6,000 <= 6,264; 1,000 <= 2,000. |
| G6 | RESOLVED | The body gives 402,535 to 386,285, the Georgia record (11,510), the Connecticut and Michigan checks, no medically needy children under 18, and the PEDISEYE note. The C1 change does not alter these figures, because the data have no medically needy children. |
Round-1 out-of-scope item: the 209(b) spenddown gap is DEFERRED to #10508, which proposes the same parental_expense_share approach. Accepted.
New findings
Critical
None.
Should address
None.
Suggestions
G7. No test covers the split of a parent's expenses among two or more eligible children.
- Where:
ELIG:53-56(parental_expenses / max_(eligible_children, 1)). - Evidence: every new case has one eligible child. On a package copy, the mutation "full amount for each child" (
parental_expenseswithout the division) passes all 11ELIG.yamlcases. - Why a suggestion: the split is a documented modeling choice (third Limitations bullet), and it follows 416.1165(e)(2). The code came from the round-1 review. A test only pins that choice.
- Fix (passes at the head; fails under the mutation). Append to
ELIG.yaml:
- name: Case 11, two disabled children split a parent's medical expenses equally.
period: 2026
input:
people:
person1:
age: 40
is_tax_unit_head: true
is_parent: true
employment_income_before_lsr: 40_000
ssi_countable_resources: 1_200
medicaid_medically_needy_medical_expenses: 8_000
person2:
age: 38
is_tax_unit_spouse: true
is_parent: true
employment_income_before_lsr: 40_000
ssi_countable_resources: 1_200
person3:
age: 10
is_tax_unit_dependent: true
is_ssi_disabled: true
ssi_countable_income: 12_000
medicaid_medically_needy_medical_expenses: 2_000
is_optional_senior_or_disabled_for_medicaid: false
person4:
age: 8
is_tax_unit_dependent: true
is_ssi_disabled: true
ssi_countable_income: 12_000
medicaid_medically_needy_medical_expenses: 1_500
is_optional_senior_or_disabled_for_medicaid: false
tax_units:
tax_unit:
members: [person1, person2, person3, person4]
marital_units:
marital_unit1:
members: [person1, person2]
marital_unit2:
members: [person3]
marital_unit3:
members: [person4]
households:
household:
members: [person1, person2, person3, person4]
state_code: MA
output:
# Each child gets 8,000 / 2 = 4,000 of the parent's expenses.
# person3: 12,000 - 2,000 - 4,000 = 6,000 <= 6,264.
# person4: 12,000 - 1,500 - 4,000 = 6,500 > 6,264.
# Resources: nothing deemed (2,400 < 3,000).
is_medically_needy_for_medicaid: [false, false, true, false]If #10374 or #10240 merges first, renumber the case.
Investigated and cleared
- Parent mask.
is_ssi_ineligible_parentexcludes the child, so a child's own expenses are not deducted twice. Case 8 catches a mutation that drops the mask (21,358 - 15,000 - 15,000 < 6,264). - Divide by zero.
max_(eligible_children, 1)keeps the divisor at 1 or more, andwheregives 0 to anyone who is not an eligible child. - Adult in the share. A mutation that drops
is_childfromeligible_childsurvives. It only matters for an aged, blind or disabled adult who shares a tax unit with an ineligible parent and an eligible child. The head matchesssi_unearned_income_deemed_from_ineligible_parent, so the code is right; this is not a finding. - Partner contract tests. None edited. "Household API Partners" passed at the head.
axiom:line. rulespec-us#1931 is open and was updated with the author's response. Process note only.
Tests run
policyengine-core test .../medically_needy -c policyengine_usat SNAPSHOT: 18 of 18 pass (CAT.yaml4,ELIG.yaml11,medicaid_medically_needy_medical_expenses.yaml3).- Hand checks of Cases 7-10 against the Massachusetts parameters (
limit/income/individual.yaml:50-51522,couple.yaml:50-51650,limit/assets/*.yaml:50-512,000 and 3,000): all four expected values are correct. - Mutations on a package copy,
ELIG.yamlonly:- share set to 0: Case 9 fails.
- no ineligible-parent mask: Case 8 fails.
tax_unit_is_jointcouple flag: Cases 7 and 8 fail.- full amount for each child: all pass (G7).
is_childdropped fromeligible_child: all pass (cleared above).
- Proposed Case 11: passes at the head and fails under the "full amount for each child" mutation.
- CI at the head: 33 of 33 pass.
Verdict
APPROVE: C1, SA1 and SA2 are resolved, and CI is green. G7 (a two-child test for the expense split) is optional.
…SSP immigration mask, new cases - C1: md_paa_imputed_federal_ssi reduces the couple rate by one third in another person's household (20 CFR 416.1131; POMS SI 01320.400 B.1.e); md_paa Cases 14-16 - SA1: medically needy Case 13 (a noncitizen dependent parent's pension does not count against the head), now that #10370 is on main - SA2: the CA state supplement leaves out a member who fails SSI's noncitizen test, except a spouse in an SSI couple computation; Case 12; Case 11 and the CAPI mixed-couple case restated - SA3: MSP Case 6 and SC OSS Case 8 - G1/G2/G7: MD PAA comment, Case 11 note on the public income-maintenance exclusion, KY SSP gate aligned Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #10366
Closes #10367
What and why
Two formula fixes in the Medicaid medically needy pathway.
is_in_medicaid_medically_needy_categorycheckedis_ssi_disabledbut neveris_blind, so a blind adult under 65 who is not SSI-disabled could not qualifyis_blindcounts under the existingdisabledflagtax_unit_is_jointBlind under the disabled flag. The
disabledparameter cites KFF's 50-state survey, whose medically needy column covers "seniors and people with disabilities" and counts blindness as a disability. KFF never reports blind coverage separately, so this PR adds noblindparameter.Marital unit. Non-MAGI Medicaid counts only the income and resources of a spouse, or of a parent for a child.
ssi_countable_incomealready carries a child's deemed parental income, an ineligible spouse's deemed income, and each half of an eligible couple's combined income. A child's marital unit holds only the child, so the formula addsssi_resources_deemed_from_ineligible_parent(the January value of the parents' resources above SSI's $2,000 or $3,000 allowance) to the child's own resources. 42 CFR 435.831(d) also deducts medical expenses of "financially responsible relatives", so a child's countable income is reduced by the medical expenses of the tax unit's ineligible parents (is_ssi_ineligible_parent), split equally among the eligible children as SSI splits deemed parental income (parental_expense_share). The optional aged, blind and disabled pathway already sums over the marital unit in the same way (is_optional_senior_or_disabled_income_eligible,medicaid_optional_senior_or_disabled_income_limit).The couple flag keeps its name,
is_joint, so that the income-limit lines stay untouched. #10374 (closes #10357 and #10358) rewrites those lines, andgit merge-filemerges the formula cleanly in either order with the same result. Whichever of the two merges second should rename the localis_jointtois_couple, as the optional pathway names it; doing it here first would conflict with #10374's rewrite.Examples
Massachusetts, 2026: $522 / $650 a month and $2,000 / $3,000 in resources.
mainMicrosimulation effect
is_blindcomes from CPSPEDISEYE, which is wider than the SSI blindness test (a data-side note).Relation to #10240 and #10374
A local review of #10240 flagged the tax-unit sum (once that PR counts noncitizens' income, an aged dependent's pension removes the filer's eligibility). This PR fixes it, so #10240 need not.
#10240, #10374 and this PR each append cases to
is_medically_needy_for_medicaid.yamlstarting at Case 3, so whichever merges later gets a conflict at the end of that file and renumbers its cases. #10374 also appends a case (disabled adults in AR, IA, IL, ND and NJ) tois_in_medicaid_medically_needy_category.yaml, where this PR adds Cases 1-2: a second end-of-file conflict, resolved by keeping both sides. The conflict is placement and numbering only: #10374 leaves the Massachusetts limits and the Texas flags unchanged, so this PR's expected values hold in either order. The formula itself merges cleanly with #10374 in either order.Draft #10394 adds blind people to the medically needy category for North Dakota only (N.D.A.C. 75-02-02.1-05(3)(e)) and adds a
referenceto the same variable. This PR'sis_blindclause makes that North Dakota clause redundant, and the two edit the same line ofis_in_medicaid_medically_needy_category.py.Limitations
is_jointuses the couple limits whenever the person is married and living with their spouse, whether or not the spouse is aged, blind or disabled. This matches the optional pathway. A spouse's income below SSI's deeming threshold (20 CFR 416.1163(d)) is not counted, yet the couple limit still applies; Medicaid medically needy: the couple limit applies even when SSI deems no spouse income #10507 tracks this.ssi_resources_deemed_from_ineligible_parent). A child gets none when their own countable resources exceed SSI's $2,000 individual limit, when they fail SSI's immigration test (is_ssi_resource_deeming_child), or whenssi_resource_deeming_child_is_ineligibleis set. In states whose medically needy individual limit is above $2,000 this undercounts resources for some children; Medicaid medically needy: count a child's deemed parental resources without SSI's own-resource and immigration gates #10478 proposes a Medicaid amount without those gates. The amount is the January value, and SSI's division among several eligible children (POMS SI 01330.200 B) applies.Tests
is_in_medicaid_medically_needy_category.yaml: a blind adult in Massachusetts (in the group) and in Texas, which has no disabled group (not in a group).is_medically_needy_for_medicaid.yaml: the filer with a dependent parent (Case 3) and the couple filing separately (Case 4), both examples above. Cases 5 and 6: a disabled child of 10 whose married parents hold $20,000 (17,000 deemed > 2,000: ineligible) or $2,400 (nothing deemed: eligible). Case 7: a couple whose combined net income (7,000) is between the individual and couple limits. Case 8: a disabled child in a joint tax unit tested against the individual limit (6,358 > 6,264). Case 9: a parent's $8,000 of medical expenses brings the child to 3,358 <= 6,264. Case 10: a blind adult computed end to end through the category.tests/policy/baseline/partners/**) are unaffected; their multi-person aged and disabled cases are in Texas, which has no medically needy aged or disabled group.Test plan
make format(ruff)changelog.d/axiom: TheAxiomFoundation/rulespec-us#1931 queued
🤖 Generated with Claude Code