Skip to content

Reworking HR1 Medicaid Rules#7752

Draft
harrisj wants to merge 7 commits into
PolicyEngine:mainfrom
harrisj:add-hr1-medicaid-rules
Draft

Reworking HR1 Medicaid Rules#7752
harrisj wants to merge 7 commits into
PolicyEngine:mainfrom
harrisj:add-hr1-medicaid-rules

Conversation

@harrisj

@harrisj harrisj commented Mar 11, 2026

Copy link
Copy Markdown

See #7751 for details, but this is a plan to revise some of the code for HR1 Medicaid work requirements to better match what CMS is providing as its provisional rules

@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.67%. Comparing base (752fae4) to head (52f2822).
⚠️ Report is 283 commits behind head on main.

Files with missing lines Patch % Lines
...ligibility/work_requirements/is_medically_frail.py 53.33% 7 Missing ⚠️
...y/work_requirements/is_totally_disabled_veteran.py 66.66% 4 Missing ⚠️
...ork_requirements/medicaid_work_income_threshold.py 66.66% 4 Missing ⚠️
...ibility/has_medicaid_work_requirement_exemption.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              main    #7752       +/-   ##
============================================
- Coverage   100.00%   70.67%   -29.33%     
============================================
  Files            2     3918     +3916     
  Lines           13    56491    +56478     
  Branches         0      270      +270     
============================================
+ Hits            13    39925    +39912     
- Misses           0    16565    +16565     
- Partials         0        1        +1     
Flag Coverage Δ
unittests 70.67% <80.00%> (-29.33%) ⬇️

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.

harrisj added 2 commits March 27, 2026 15:51
Adding logic to pass work requirements based on community engagement.
For now, these are simple variables, but may later be changed into
computed variables.
The law involves checking for conditions in a month, but this might
be too granular to do in the policy engine. Tests currently failing
for this reason.

@daphnehanse11 daphnehanse11 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: several work-requirement formulas use Python or with PolicyEngine arrays instead of vectorized bitwise operators. For example, medicaid_work_requirement_eligible returns has_exemption or has_ce, has_medicaid_work_requirement_ce returns enrolled_half_time or passed_hours or passed_income, and has_medicaid_work_requirement_exemption chains the exemption flags with or. This raises ValueError: The truth value of an array with more than one element is ambiguous in multi-person simulations. Repro on this branch with two people in 2027-03: has_medicaid_work_requirement_ce, medicaid_work_requirement_eligible, and yearly is_medicaid_eligible all raise that error. Please replace these with parenthesized vectorized expressions using |.

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.

2 participants