Skip to content

Add Medicaid waiver premium rules#8179

Open
daphnehanse11 wants to merge 6 commits intoPolicyEngine:mainfrom
daphnehanse11:codex/issue-8102-medicaid-premiums
Open

Add Medicaid waiver premium rules#8179
daphnehanse11 wants to merge 6 commits intoPolicyEngine:mainfrom
daphnehanse11:codex/issue-8102-medicaid-premiums

Conversation

@daphnehanse11
Copy link
Copy Markdown
Collaborator

Fixes #8102.

Summary

  • Adds Michigan Healthy Michigan Plan contribution variables and parameters, with current-law collection disabled after the MI Health Account ended in 2024.
  • Adds Montana HELP premium variables and parameters, with current-law collection disabled after premiums ceased on 2023-01-01.
  • Wires both state variables into the federal medicaid_premium aggregator and covers the SPM MOOP wrapper path.
  • Adds focused state, federal aggregator, SPM MOOP, and changelog coverage.

Sources

Tests

  • uv run --extra dev ruff format policyengine_us/variables/gov/hhs/medicaid/medicaid_premium.py policyengine_us/variables/gov/states/mi/mdhhs/healthy_michigan/is_mi_healthy_michigan_adult.py policyengine_us/variables/gov/states/mi/mdhhs/healthy_michigan/mi_healthy_michigan_contribution.py policyengine_us/variables/gov/states/mt/dphhs/help/is_mt_help_adult.py policyengine_us/variables/gov/states/mt/dphhs/help/mt_help_premium.py
  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/mi/mdhhs/healthy_michigan/mi_healthy_michigan_contribution.yaml policyengine_us/tests/policy/baseline/gov/states/mt/dphhs/help/mt_help_premium.yaml policyengine_us/tests/policy/baseline/gov/hhs/medicaid/medicaid_premium.yaml policyengine_us/tests/policy/baseline/household/income/spm_unit/spm_unit_medical_out_of_pocket_expenses.yaml -c policyengine_us
  • uv run pytest policyengine_us/tests/test_parameter_files.py -q
  • uv run --extra dev ruff check .

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #8179       +/-   ##
============================================
+ Coverage   86.04%   100.00%   +13.95%     
============================================
  Files           3         5        +2     
  Lines          43        68       +25     
  Branches        2         2               
============================================
+ Hits           37        68       +31     
+ Misses          6         0        -6     
Flag Coverage Δ
unittests 100.00% <100.00%> (+13.95%) ⬆️

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.

Copy link
Copy Markdown
Collaborator Author

Reviewed the PR diff and the cited MI/MT waiver materials before editing.

Findings I’m going to patch in a fresh worktree:

  • The MI/MT state adult helper variables currently only test the federal adult age range. That lets Healthy Michigan / HELP premiums apply to people who are not in the expansion adult category, including pregnant people, even though the cited materials exempt pregnant people and describe these rules as applying to the adult expansion population.
  • Montana’s lower premium threshold is modeled as income_level > 0.5, and the test expects a person exactly at 50% FPL to owe no premium. The Montana rule exempts people with MAGI under 50% FPL, so the boundary should include exactly 50% FPL.

Parameter metadata, references, annual/monthly period use, Medicaid premium aggregation, and SPM MOOP wiring otherwise looked structurally sound on this pass. I’m patching the above from a fresh detached worktree off origin/codex/issue-8102-medicaid-premiums.

@daphnehanse11
Copy link
Copy Markdown
Collaborator Author

Code-quality pass pushed in 6ee5913. I replaced boolean member-count checks with tax_unit.any(...), and made the premium formulas name medicaid_magi explicitly before applying the state rate. Focused Medicaid waiver premium/SPM tests pass locally: 16 passed.

@daphnehanse11 daphnehanse11 marked this pull request as ready for review April 29, 2026 21:38
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.

Rules-based Medicaid premiums: Section 1115 waivers and Working Disabled Buy-In

2 participants