-
Notifications
You must be signed in to change notification settings - Fork 201
Fix Medicaid category assignment order - mandatory before optional #7272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Medicaid category assignment order - mandatory before optional #7272
Conversation
Federal Medicaid eligibility rules require specific category evaluation order: 1. SSI recipients (42 CFR 435.120-138) - "mega-mandatory" non-MAGI pathway with automatic Medicaid eligibility in most states 2. Children: infants, young children, older children (42 CFR 435.118) 3. Pregnant women (42 CFR 435.116) - evaluated before parents per California MAGI hierarchy guidance 4. Parents/caretaker relatives (42 CFR 435.110) 5. Young adults 19-20 - optional state coverage 6. Adult expansion (42 CFR 435.119) - requires "not otherwise eligible for mandatory coverage", so evaluated last among mandatory groups 7. Optional aged/blind/disabled pathway (non-SSI) Changes: - Move SSI_RECIPIENT to first position (mega-mandatory) - Move PREGNANT before PARENT per state hierarchy guidance - Move YOUNG_ADULT after mandatory groups (it's optional) - Add comprehensive regulatory citations in comments - Update test expected values for correct category assignments Fixes PolicyEngine#7267 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
71b1563 to
793dca3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7272 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 16 1 -15
Lines 228 25 -203
Branches 1 0 -1
==========================================
- Hits 228 25 -203
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:
|
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting questions
policyengine_us/variables/gov/hhs/medicaid/eligibility/categories/medicaid_category.py
Outdated
Show resolved
Hide resolved
policyengine_us/variables/gov/hhs/medicaid/eligibility/categories/medicaid_category.py
Outdated
Show resolved
Hide resolved
policyengine_us/variables/gov/hhs/medicaid/eligibility/categories/medicaid_category.py
Outdated
Show resolved
Hide resolved
📋 Review Summary✅ Strengths
🔍 Issues FoundMinor Documentation Issues (Agree with @PavelMakarchuk's review)
📊 Validation Results
📝 Regulatory VerificationThe PR correctly implements the federal hierarchy per 42 CFR 435.119, which states individuals must be "not otherwise eligible for and enrolled for mandatory coverage under a State's Medicaid State plan" before qualifying under the Adult group. This establishes the hierarchy:
🚀 RecommendationAddress the minor documentation suggestions from @PavelMakarchuk's review, then this PR is ready to merge. |
- Remove 'Order matters:' prefix from comment - Replace California MAGI Hierarchy reference with federal 42 CFR Part 435 Subpart B - Remove 'mega-mandatory' informal term Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
medicaid_categoryformula to evaluate mandatory groups (parent, pregnant, SSI) before optional expansion groupsTest plan
Fixes #7267
🤖 Generated with Claude Code