Skip to content

Support Medicaid MAGI claimant links#8698

Draft
daphnehanse11 wants to merge 2 commits into
PolicyEngine:mainfrom
daphnehanse11:codex/8676-medicaid-claimant-links
Draft

Support Medicaid MAGI claimant links#8698
daphnehanse11 wants to merge 2 commits into
PolicyEngine:mainfrom
daphnehanse11:codex/8676-medicaid-claimant-links

Conversation

@daphnehanse11

Copy link
Copy Markdown
Collaborator

Summary

Fixes #8676.

This PR adds optional Medicaid MAGI claimant tax unit links so PE-US can represent dependents claimed by a tax unit outside their current modeled tax unit when data provide the link. When the claimant link is missing or does not match a modeled tax unit, PE-US keeps the existing conservative non-filer fallback.

Regulatory Authority

  • 42 CFR 435.603(f)(2): Medicaid MAGI household rules for individuals expected to be claimed as tax dependents.
  • 42 CFR 435.603(f)(3): non-filer household rules and dependent exceptions.

Changes

  • Adds medicaid_claiming_tax_unit_id as an optional person-level input.
  • Adds medicaid_has_known_claiming_tax_unit to validate that the claimant ID maps to a modeled tax unit.
  • Routes Medicaid household size and income through the claimant tax household when the claimant is known.
  • Includes externally claimed dependents in the claimant tax household.
  • Adds medicaid_uses_missing_claimant_fallback and medicaid_missing_claimant_fallback_person_count diagnostics.
  • Preserves non-filer fallback for claimed-elsewhere dependents without a known claimant link.

Requirements Coverage

Requirement Coverage
Known outside claimant tax unit Case 7
Unknown claimant fallback Cases 3 and 8
Non-custodial-parent exception Case 9
No-dependent case Case 10
Missing-claimant diagnostics Cases 3, 7, 8, and 9

Validation

  • .venv/bin/ruff format .
  • .venv/bin/ruff check .
  • .venv/bin/policyengine-core test policyengine_us/tests/policy/baseline/gov/hhs/medicaid/income -c policyengine_us

Known Failing Tests

None.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fa285ae) to head (8d174bb).
⚠️ Report is 420 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #8698    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            5         9     +4     
  Lines           62       162   +100     
  Branches         0         2     +2     
==========================================
+ Hits            62       162   +100     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

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.

Support claimant links for Medicaid MAGI household rules

1 participant