Model Basic Health Program as separate coverage (fixes #8112)#8127
Merged
Model Basic Health Program as separate coverage (fixes #8112)#8127
Conversation
(1) BHP had no explicit income floor — the ~medicaid_eligible guard alone only works in Medicaid-expansion states. Adding a non-expansion state to active_states would have swept sub-133% FPL citizens into BHP incorrectly. Added an explicit income_floor parameter (1.33 = 133% FPL per 42 USC 18051(b)(2)(B)). (2) Variable is YEAR-defined but parameter cutovers used sub-annual dates (NY 2015-04-01, OR 2024-07-01, NY expansion 2024-04-01), so they never triggered in annual simulations. Moved cutovers to Jan 1 of the first full BHP year for each state (NY 2016, OR 2025, NY expansion 2025; MN 2015 and DC 2026 were already Jan 1). Added 5 regression YAML tests covering: the 133% FPL floor, the NY 2016 first-full-year, the OR 2024 not-yet-active case, the NY 2025 250% FPL expansion, and the NY 2024 at-230% FPL boundary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8127 +/- ##
============================================
+ Coverage 85.36% 100.00% +14.63%
============================================
Files 3 4 +1
Lines 41 57 +16
Branches 2 0 -2
============================================
+ Hits 35 57 +22
+ Misses 6 0 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/adult/income_limit.yaml # policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/parent/income_limit.yaml # policyengine_us/variables/gov/aca/eligibility/is_aca_ptc_eligible.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebased + review-fixed replacement for #8116 (daphnehanse11's original fork PR — fork PRs can't run CI here, so repushed to upstream).
Summary
gov/hhs/basic_health_program/coverage modeling (statutory 133–200% FPL, with NY's 250% FPL expansion). Active states: MN (2015), NY (2016+), OR (2025+), DC (2026+).is_basic_health_program_eligiblepeople from ACA PTC eligibility, so simulatedaca_ptczeros out for Essential Plan / MinnesotaCare / OHP Bridge / Healthy DC Plan enrollees. This is the upstream fix that closes the NY per-state ACA calibration gap seen in policyengine-us-data integration tests.Review-driven fixes on top of #8116
Codex review caught two bugs on the original PR which are fixed in this version:
~medicaid_eligiblealone, which only works in Medicaid-expansion states. Adding TX (non-expansion) toactive_stateswould have qualified sub-133% FPL adults as BHP-eligible. Added explicitincome_floor = 1.33parameter per 42 USC §18051(b)(2)(B).falsewhen they should returntrue. Moved effective dates to Jan 1 of the first full BHP year for each state.Added 5 YAML regression tests covering the floor, the NY 2016 first-full-year, the OR 2024 not-yet-active case, the NY 2025 250% FPL expansion boundary, and the NY 2024 at-230% FPL boundary.
Credits
Original implementation: @daphnehanse11 in #8116 (issue #8112). This PR preserves the original three commits from that branch, adds one review-fix commit, and pushes to upstream so CI can run.
Test plan
uv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/hhs/basic_health_program --batches 1→ 11 passeduv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/hhs/medicaid --batches 1→ 167 passeduv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/aca/eligibility --batches 1→ 57 passedmake format/ruff checkcleantest_aca_calibrationshould drop NY from 511% to <100% errorFixes #8112. Supersedes #8116.
🤖 Generated with Claude Code