Skip to content

Conversation

@daphnehanse11
Copy link
Collaborator

@daphnehanse11 daphnehanse11 commented Dec 23, 2025

Summary

Implements Emergency Medicaid eligibility for individuals who are ineligible for regular Medicaid due to immigration status but meet all other Medicaid eligibility requirements and have an emergency medical condition.

Closes #7003

Regulatory Authority

This implementation is based on:

  • 42 USC 1396b(v)(2) - Exception for emergency services for aliens
    • (v)(2)(A): Person is not otherwise eligible due to immigration status
    • (v)(2)(B): Person meets all applicable Medicaid eligibility requirements except immigration status
    • (v)(2)(C): Organ transplant procedures are excluded
  • 42 USC 1396b(v)(3) - Definition of emergency medical condition
  • 8 USC 1611(b)(1)(A) - Exception for emergency medical care from public benefits restrictions
  • 42 CFR 440.255 - Federal regulations on emergency services
  • 42 CFR 435.406 - Citizenship and noncitizen eligibility

Eligibility Requirements

Per the statute, Emergency Medicaid eligibility requires all three conditions:

  1. Immigration Status: Person is NOT eligible for regular Medicaid due to immigration status (uses existing is_medicaid_immigration_status_eligible variable)
  2. Medicaid Requirements: Person meets all other Medicaid eligibility requirements including income and categorical eligibility (uses existing medicaid_category variable)
  3. Emergency Condition: Person has an emergency medical condition as defined in 42 USC 1396b(v)(3)

Files Added

Parameters (5 files)

policyengine_us/parameters/gov/hhs/medicaid/emergency_medicaid/
├── index.yaml                        # Metadata (economy: false, household: false)
├── enabled.yaml                      # Program enabled from 1987
├── emergency_condition_definition.yaml  # Statutory definition criteria
├── organ_transplant_exclusion.yaml   # Organ transplant exclusion per (v)(2)(C)
└── uses_medicaid_income_thresholds.yaml  # Income threshold requirement

Variables (2 files)

policyengine_us/variables/gov/hhs/medicaid/emergency_medicaid/
├── has_emergency_medical_condition.py   # Input variable (boolean)
└── is_emergency_medicaid_eligible.py    # Eligibility calculation

Tests (3 files, 57 test cases)

policyengine_us/tests/policy/baseline/gov/hhs/medicaid/emergency_medicaid/
├── has_emergency_medical_condition.yaml  # 3 unit tests
├── is_emergency_medicaid_eligible.yaml   # 34 unit tests
└── integration.yaml                      # 20 integration tests

Test Coverage (57 tests)

Test Category Count Description
Unit tests - eligible cases 12 All immigration statuses and Medicaid categories
Unit tests - ineligible (regular Medicaid) 8 Citizens, LPRs, refugees, asylees
Unit tests - no emergency 2 Missing emergency condition
Unit tests - no Medicaid category 3 Income too high
Unit tests - edge cases 9 Pre-1987, condition combinations
Integration tests 20 Full pipeline with household structures
Input variable tests 3 has_emergency_medical_condition

Example Calculation

Scenario: Undocumented adult (age 35) with emergency medical condition and $18,000 income

  1. is_medicaid_immigration_status_eligible: false (undocumented)
  2. medicaid_category: ADULT (income < 138% FPL in expansion state)
  3. has_emergency_medical_condition: true

Result: is_emergency_medicaid_eligible = true

Formula: enabled & has_emergency & (medicaid_category != NONE) & ~immigration_eligible

Implementation Notes

  • Uses existing medicaid_category variable which handles all income/categorical eligibility checks
  • Uses existing is_medicaid_immigration_status_eligible variable for immigration status
  • has_emergency_medical_condition is an input variable (boolean) since emergency conditions are determined by medical providers, not calculated
  • Program enabled starting 1987 (OBRA '86 created Emergency Medicaid)
  • Parameters marked with economy: false and household: false since this is person-level eligibility

References

daphnehanse11 and others added 2 commits December 23, 2025 13:20
…lementation

Starting implementation of Emergency Medicaid for undocumented immigrants.
Documentation and parallel development will follow.

Closes PolicyEngine#7003
Implements federal Emergency Medicaid program per 42 USC 1396b(v), which
provides limited Medicaid coverage for emergency medical conditions to
individuals who would otherwise be eligible for Medicaid but for their
immigration status.

Key components:
- has_emergency_medical_condition: Input variable for emergency condition
- is_emergency_medicaid_eligible: Main eligibility determination
- Parameters for program configuration and statutory references

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9739e2f) to head (f847eff).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #7031       +/-   ##
============================================
+ Coverage   76.92%   100.00%   +23.07%     
============================================
  Files           1         2        +1     
  Lines          39        22       -17     
  Branches        4         0        -4     
============================================
- Hits           30        22        -8     
+ Misses          8         0        -8     
+ Partials        1         0        -1     
Flag Coverage Δ
unittests 100.00% <100.00%> (+23.07%) ⬆️

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.

@daphnehanse11
Copy link
Collaborator Author

daphnehanse11 commented Dec 23, 2025

not a repeat, this is different than coverage for undocumented immigrants specifically in IL. this is national emergency care

…tion comments

- Remove emergency_condition_definition.yaml (unused parameter file)
- Remove organ_transplant_exclusion.yaml (unused parameter file)
- Remove index.yaml from emergency_medicaid parameters
- Add documentation comments to has_emergency_medical_condition.py describing
  the emergency condition criteria from federal regulations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@daphnehanse11
Copy link
Collaborator Author

Fixes Applied

Review Comments Addressed

  • ✅ Deleted index.yaml - Unused metadata propagation file
  • ✅ Deleted organ_transplant_exclusion.yaml - Unused parameter file
  • ✅ Deleted emergency_condition_definition.yaml - Moved criteria to variable comments
  • ✅ Updated has_emergency_medical_condition.py - Added documentation comments describing emergency condition criteria per 42 USC 1396b(v)(3)

Verification

  • ✅ All 57 emergency_medicaid tests pass
  • ✅ Code formatted with black

Ready for re-review.

Copy link
Collaborator

@hua7450 hua7450 left a comment

Choose a reason for hiding this comment

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

Delete has_emergency_medical_condition.yaml, then lgtm

@hua7450 hua7450 marked this pull request as ready for review December 26, 2025 17:10
@PavelMakarchuk PavelMakarchuk merged commit 5236d9e into PolicyEngine:main Dec 26, 2025
10 checks passed
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.

Add Emergency medicaid for undocumented immigrants

3 participants