From 5f8c7748b1f3c840a308e6d53153a1b2805b01cb Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 13 Nov 2026 19:07:17 -0500 Subject: [PATCH 1/4] Zero Medicaid federal share for state-funded immigrant coverage medicaid_federal_share treated anyone who passed is_medicaid_immigration_status_eligible as federally matched. That variable also counts state-funded coverage (California's state-funded Medi-Cal, states flagged in the undocumented immigrant parameter), and is_medicaid_eligible adds California FFYP and Illinois HBI without any immigration test. So undocumented, DACA and five-year-bar enrollees got the 90% expansion FMAP or the regular FMAP. 42 U.S.C. 1396b(v)(1) bars Title XIX payment for anyone who fails the federal immigration test, apart from emergency services ((v)(2)) and the lawfully residing option ((v)(4), already in the federal test). The formula now uses is_federal_medicaid_immigration_status_eligible and gives no federal share to any enrollee without a federally matched route, which generalizes the existing Rhode Island postpartum case. Co-Authored-By: Claude Opus 5.5 --- ...dicaid-state-funded-federal-share.fixed.md | 1 + .../costs/medicaid_federal_share.yaml | 161 ++++++++++++++++++ .../medicaid/costs/medicaid_federal_share.py | 36 ++-- 3 files changed, 187 insertions(+), 11 deletions(-) create mode 100644 changelog.d/fix-medicaid-state-funded-federal-share.fixed.md diff --git a/changelog.d/fix-medicaid-state-funded-federal-share.fixed.md b/changelog.d/fix-medicaid-state-funded-federal-share.fixed.md new file mode 100644 index 00000000000..2deffa4cb46 --- /dev/null +++ b/changelog.d/fix-medicaid-state-funded-federal-share.fixed.md @@ -0,0 +1 @@ +Medicaid federal share is now zero for enrollees who fail the federal immigration test and reach Medicaid only through state-funded coverage, such as California's state-funded Medi-Cal, Illinois Health Benefits for Immigrants and states that cover undocumented immigrants. diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml index ee57b302434..c417ac98dfe 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml @@ -282,3 +282,164 @@ medicaid_category: [ADULT, ADULT, PREGNANT, SSI_RECIPIENT] medicaid_enrolled: [true, true, true, true] medicaid_federal_share: [0.9, 0.9, 0.5501, 0.5501] + +# 42 U.S.C. 1396b(v)(1) bars Title XIX payment for anyone who fails the federal +# immigration test, apart from emergency services under (v)(2) and the lawfully +# residing children and pregnant people option under (v)(4). California covers +# undocumented, DACA and TPS residents and former foster youth regardless of +# immigration status, and uses state funds where federal participation is +# unavailable (Cal. Welf. & Inst. Code § 14007.8(a), (b)(3) and (f)(2)). +# Former foster youth who pass the federal test are in the Title XIX former +# foster care group (42 CFR 435.150) and keep a match, as does a TPS child +# under California's lawfully residing election. FY2025 FMAP: CA 50%. +# https://www.law.cornell.edu/uscode/text/42/1396b#v +# https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=14007.8.&lawCode=WIC +# https://www.ecfr.gov/current/title-42/section-435.150 +- name: California state-funded Medi-Cal and former foster youth coverage get no federal share without federal immigration status. + period: 2025 + input: + people: + person1: + # Undocumented adult covered by state-funded full-scope Medi-Cal. + age: 30 + immigration_status: UNDOCUMENTED + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + medicaid_cost: 1_000 + person2: + # Lawful permanent resident within the five-year bar, reached only + # through the Former Foster Youth Program. + age: 22 + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 2 + was_in_foster_care: true + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person3: + # DACA is not lawfully residing for the (v)(4) option. + age: 10 + immigration_status: DACA + medicaid_category: OLDER_CHILD + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person4: + age: 30 + immigration_status: CITIZEN + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + medicaid_cost: 1_000 + person5: + age: 22 + immigration_status: CITIZEN + was_in_foster_care: true + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person6: + age: 10 + immigration_status: TPS + medicaid_category: OLDER_CHILD + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + households: + household: + members: [person1, person2, person3, person4, person5, person6] + state_code: CA + output: + is_federal_medicaid_immigration_status_eligible: [false, false, false, true, true, true] + ca_ffyp_eligible: [false, true, false, false, true, false] + medicaid_enrolled: [true, true, true, true, true, true] + medicaid_federal_share: [0, 0, 0, 0.9, 0.9, 0.5] + medicaid_federal_cost: [0, 0, 0, 900, 0, 0] + medicaid_state_cost: [1_000, 0, 0, 100, 0, 0] + +# Illinois Health Benefits for Immigrants covers noncitizens who are not +# eligible for Medicaid because of their immigration status (305 ILCS +# 5/12-4.35); HFS calls HBIS and the related programs state-funded. HBIA +# (ages 42 to 64) ended July 1, 2025, so this uses 2025, read at January 1. +# A citizen and a lawful permanent resident past the five-year bar keep the +# expansion FMAP. +# https://www.ilga.gov/Documents/legislation/ilcs/documents/030500050K12-4.35.htm +# https://hfs.illinois.gov/medicalclients/healthbenefitsforimmigrants.html +- name: Illinois Health Benefits for Immigrants enrollees get no federal share, while federally eligible adults keep the expansion FMAP. + period: 2025 + input: + people: + person1: + age: 50 + immigration_status: UNDOCUMENTED + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person2: + age: 10 + immigration_status: UNDOCUMENTED + medicaid_category: OLDER_CHILD + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person3: + age: 50 + immigration_status: CITIZEN + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person4: + age: 50 + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 10 + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + households: + household: + members: [person1, person2, person3, person4] + state_code: IL + output: + il_hbi_eligible: [true, true, false, false] + medicaid_enrolled: [true, true, true, true] + medicaid_federal_share: [0, 0, 0.9, 0.9] + +# The District covers undocumented residents through locally funded coverage, +# and 42 U.S.C. 1396b(v)(1) bars a Title XIX match for it. A citizen keeps the +# expansion FMAP. +# https://www.law.cornell.edu/uscode/text/42/1396b#v +- name: An undocumented adult covered through state-funded coverage gets no federal share. + period: 2025 + input: + people: + person1: + age: 30 + immigration_status: UNDOCUMENTED + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person2: + age: 30 + immigration_status: CITIZEN + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + households: + household: + members: [person1, person2] + state_code: DC + output: + is_medicaid_immigration_status_eligible: [true, true] + is_federal_medicaid_immigration_status_eligible: [false, true] + medicaid_enrolled: [true, true] + medicaid_federal_share: [0, 0.9] diff --git a/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py b/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py index b9bf95ca8d5..a84ef943214 100644 --- a/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py +++ b/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py @@ -9,19 +9,32 @@ class medicaid_federal_share(Variable): "Federal medical assistance percentage applied to this enrollee's " "Medicaid expenditures. Uses the ACA expansion FMAP for expansion " "adults (42 U.S.C. 1396d(y)) and the state's regular FMAP for all " - "other enrollment groups (42 U.S.C. 1396d(b)). Rhode Island's " - "postpartum continuation receives no Title XIX match unless the " - "pregnancy was covered by Medicaid and the enrollee meets Medicaid " - "immigration requirements: RIte Start serves people not eligible " + "other enrollment groups (42 U.S.C. 1396d(b)). Title XIX pays only " + "for an enrollee in a Medicaid group who meets the federal " + "immigration test, which includes the lawfully residing option for " + "children and pregnant people (42 U.S.C. 1396b(v)(1) and (4)). Every " + "other enrollee reaches Medicaid only through state-funded coverage " + "and gets no federal share. That coverage includes state coverage " + "regardless of immigration status (California's state-funded " + "Medi-Cal, former foster youth coverage included, and states that " + "cover undocumented immigrants) and Illinois Health Benefits for " + "Immigrants. It also includes Rhode Island's postpartum continuation " + "outside the pregnancy group: RIte Start serves people not eligible " "under Title XIX or XXI, and CHIP and FCEP pregnancies are Title XXI " "coverage. An enrollee who also meets a federally matched group keeps " - "that group's match. Separate Title XXI health services " - "initiative funding is not included here." + "that group's match. Title XIX matches emergency services for " + "enrollees who fail the immigration test (42 U.S.C. 1396b(v)(2)), but " + "per-enrollee cost is not split by service, so that match is not " + "included. Separate Title XXI health services initiative funding is " + "not included either." ) unit = "/1" definition_period = YEAR reference = ( "https://www.law.cornell.edu/uscode/text/42/1396d", + "https://www.law.cornell.edu/uscode/text/42/1396b#v", + "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=14007.8.&lawCode=WIC", + "https://www.ilga.gov/Documents/legislation/ilcs/documents/030500050K12-4.35.htm", "https://webserver.rilegislature.gov/Statutes/TITLE42/42-12.3/42-12.3-3.htm", "https://www.medicaid.gov/medicaid/spa/downloads/RI-22-0024.pdf#page=7", "https://www.medicaid.gov/CHIP/Downloads/RI-22-0026.pdf#page=2", @@ -34,13 +47,14 @@ def formula(person, period, parameters): regular_fmap = p.fmap[state] category = person("medicaid_category", period) categories = category.possible_values + # 42 U.S.C. 1396b(v)(1) bars Title XIX payment for an enrollee who + # fails the federal immigration test, apart from emergency services. + # is_medicaid_immigration_status_eligible also counts state-funded + # coverage, so the federal test is used here. federally_matched_route = (category != categories.NONE) & person( - "is_medicaid_immigration_status_eligible", period - ) - no_federal_medicaid_match = ( - person("ri_medicaid_state_funded_postpartum_eligible", period) - & ~federally_matched_route + "is_federal_medicaid_immigration_status_eligible", period ) + no_federal_medicaid_match = ~federally_matched_route return select( [ no_federal_medicaid_match, From d10e54134ad07ed5ee7646183472a0ebfc5edaec Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 14 Nov 2026 19:40:47 -0500 Subject: [PATCH 2/4] Add property test for Medicaid federal share invariants For generated enrollees across states, immigration statuses, categories and years, the federal share is 0 whenever the federal immigration test fails or the category is NONE, is the regular FMAP for other categories, and federal plus state cost equals medicaid_cost. The test fails on the previous formula, which matched state-funded enrollees. Co-Authored-By: Claude Opus 5.5 --- .../test_medicaid_federal_share_invariants.py | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 policyengine_us/tests/test_medicaid_federal_share_invariants.py diff --git a/policyengine_us/tests/test_medicaid_federal_share_invariants.py b/policyengine_us/tests/test_medicaid_federal_share_invariants.py new file mode 100644 index 00000000000..b37137a9884 --- /dev/null +++ b/policyengine_us/tests/test_medicaid_federal_share_invariants.py @@ -0,0 +1,127 @@ +"""Property tests: Medicaid federal share for enrollees without federal status. + +42 U.S.C. 1396b(v)(1) bars Title XIX payment for medical assistance to anyone +who fails the federal immigration test, apart from emergency services under +(v)(2) and the lawfully residing children and pregnant people option under +(v)(4). is_federal_medicaid_immigration_status_eligible applies that test, +including (v)(4); is_medicaid_immigration_status_eligible also counts +state-funded coverage. https://www.law.cornell.edu/uscode/text/42/1396b#v + +For every generated person: + +1. medicaid_federal_share is between 0 and 1. +2. An enrollee who fails the federal immigration test, or whose Medicaid + category is NONE, gets 0, whichever route enrolled them (state coverage + regardless of immigration status, California FFYP, Illinois HBI or Rhode + Island's postpartum continuation). +3. An enrollee who passes the test in any category other than NONE or ADULT + gets the state's regular FMAP. An ADULT gets the regular or the expansion + FMAP. +4. An enrollee's federal and state costs add up to medicaid_cost, and a + person who is not enrolled has no federal share or cost. + +Each case is its own household, so states vary within one simulation. +""" + +import numpy as np +from hypothesis import given, settings, strategies as st + +from policyengine_us import Simulation + +STATES = ["CA", "IL", "DC", "NY", "OR", "MA", "RI", "TX", "FL", "WA"] +STATUSES = [ + "CITIZEN", + "LEGAL_PERMANENT_RESIDENT", + "REFUGEE", + "ASYLEE", + "DEPORTATION_WITHHELD", + "CUBAN_HAITIAN_ENTRANT", + "CONDITIONAL_ENTRANT", + "PAROLED_ONE_YEAR", + "UNDOCUMENTED", + "DACA", + "TPS", +] +CATEGORIES = [ + "INFANT", + "YOUNG_CHILD", + "OLDER_CHILD", + "YOUNG_ADULT", + "ADULT", + "PARENT", + "PREGNANT", + "SSI_RECIPIENT", + "SENIOR_OR_DISABLED", + "NONE", + "MEDICALLY_NEEDY", + "WORKING_DISABLED_BUY_IN", + "SECTION_1115_MEC_ADULT", +] + +case = st.tuples( + st.sampled_from(STATES), + st.sampled_from(STATUSES), + st.sampled_from([0, 5, 10, 17, 19, 22, 30, 45, 50, 64, 67]), + st.sampled_from(CATEGORIES), + st.sampled_from([0, 2, 6, 20]), + st.booleans(), + st.sampled_from([0, 0.5, 1, 1.38, 2, 4]), + st.booleans(), + st.integers(0, 20_000), +) + + +def situation(cases, year): + people, households = {}, {} + for index, spec in enumerate(cases): + state, status, age, category, years, foster, income, takes_up, cost = spec + name = f"person{index}" + people[name] = { + "age": {year: age}, + "immigration_status": {year: status}, + "years_since_us_entry": {year: years}, + "was_in_foster_care": {year: foster}, + "medicaid_category": {year: category}, + "medicaid_household_size": {year: 1}, + "medicaid_income_level": {year: income}, + "takes_up_medicaid_if_eligible": {year: takes_up}, + "medicaid_cost": {year: cost}, + } + households[f"household{index}"] = { + "members": [name], + "state_code": {year: state}, + } + return {"people": people, "households": households} + + +@settings(max_examples=8, deadline=None, derandomize=True) +@given( + st.sampled_from([2024, 2025, 2026, 2027]), + st.lists(case, min_size=1, max_size=40), +) +def test_federal_share_follows_federal_immigration_status(year, cases): + sim = Simulation(situation=situation(cases, year)) + share = sim.calculate("medicaid_federal_share", year) + enrolled = sim.calculate("medicaid_enrolled", year) + federal_status = sim.calculate( + "is_federal_medicaid_immigration_status_eligible", year + ) + category = sim.calculate("medicaid_category", year).decode_to_str() + cost = sim.calculate("medicaid_cost", year) + federal_cost = sim.calculate("medicaid_federal_cost", year) + state_cost = sim.calculate("medicaid_state_cost", year) + p = sim.tax_benefit_system.parameters(f"{year}-01-01").gov.hhs.medicaid + regular = np.array([p.cost_share.fmap[spec[0]] for spec in cases]) + expansion = p.cost_share.expansion_fmap + + assert np.all((share >= 0) & (share <= 1)) + matched = enrolled & federal_status & (category != "NONE") + assert np.all(share[~matched] == 0) + other = matched & (category != "ADULT") + assert np.allclose(share[other], regular[other]) + adult = matched & (category == "ADULT") + assert np.all( + np.isclose(share[adult], regular[adult]) | np.isclose(share[adult], expansion) + ) + assert np.allclose(federal_cost[enrolled] + state_cost[enrolled], cost[enrolled]) + assert np.all(federal_cost[~enrolled] == 0) From 6f21b53488145b848daf76ac555559c6f3088245 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 15 Nov 2026 09:49:34 -0500 Subject: [PATCH 3/4] Exempt military-connected noncitizens from the Medicaid five-year bar The federal Medicaid immigration test now gates the federal share, so it needs the 8 U.S.C. 1613(b)(2) exemption for qualified noncitizens who are veterans, on active duty, or their spouses or dependent children. It reuses is_snap_alien_military_connected, which implements the same exemption. Also cite 42 U.S.C. 1396b(v)(1), (4) and (5) and 8 U.S.C. 1611 and 1613 for their separate limits instead of attributing all of them to (v)(1). Co-Authored-By: Claude Opus 5.5 --- ...dicaid-state-funded-federal-share.fixed.md | 2 +- .../costs/medicaid_federal_share.yaml | 77 ++++++++++++++++++- ..._medicaid_immigration_status_eligible.yaml | 37 +++++++++ .../test_medicaid_federal_share_invariants.py | 14 ++-- .../medicaid/costs/medicaid_federal_share.py | 24 ++++-- ...al_medicaid_immigration_status_eligible.py | 22 +++++- 6 files changed, 157 insertions(+), 19 deletions(-) diff --git a/changelog.d/fix-medicaid-state-funded-federal-share.fixed.md b/changelog.d/fix-medicaid-state-funded-federal-share.fixed.md index 2deffa4cb46..cb2057518f6 100644 --- a/changelog.d/fix-medicaid-state-funded-federal-share.fixed.md +++ b/changelog.d/fix-medicaid-state-funded-federal-share.fixed.md @@ -1 +1 @@ -Medicaid federal share is now zero for enrollees who fail the federal immigration test and reach Medicaid only through state-funded coverage, such as California's state-funded Medi-Cal, Illinois Health Benefits for Immigrants and states that cover undocumented immigrants. +Medicaid federal share is now zero for enrollees who fail the federal immigration test and reach Medicaid only through state-funded coverage, such as California's state-funded Medi-Cal, Illinois Health Benefits for Immigrants and states that cover undocumented immigrants. The federal Medicaid immigration test now exempts qualified noncitizens who are veterans, on active duty, or their spouses or dependent children from the five-year bar. diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml index c417ac98dfe..8e9c5e05bb4 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/costs/medicaid_federal_share.yaml @@ -283,9 +283,10 @@ medicaid_enrolled: [true, true, true, true] medicaid_federal_share: [0.9, 0.9, 0.5501, 0.5501] -# 42 U.S.C. 1396b(v)(1) bars Title XIX payment for anyone who fails the federal -# immigration test, apart from emergency services under (v)(2) and the lawfully -# residing children and pregnant people option under (v)(4). California covers +# Title XIX pays for noncitizens only within 42 U.S.C. 1396b(v)(1) and (5) and +# the qualified-noncitizen rules and five-year bar of 8 U.S.C. 1611 and 1613, +# apart from emergency services under (v)(2) and the lawfully residing children +# and pregnant people option under (v)(4). California covers # undocumented, DACA and TPS residents and former foster youth regardless of # immigration status, and uses state funds where federal participation is # unavailable (Cal. Welf. & Inst. Code § 14007.8(a), (b)(3) and (f)(2)). @@ -293,6 +294,7 @@ # foster care group (42 CFR 435.150) and keep a match, as does a TPS child # under California's lawfully residing election. FY2025 FMAP: CA 50%. # https://www.law.cornell.edu/uscode/text/42/1396b#v +# https://www.law.cornell.edu/uscode/text/8/1613 # https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=14007.8.&lawCode=WIC # https://www.ecfr.gov/current/title-42/section-435.150 - name: California state-funded Medi-Cal and former foster youth coverage get no federal share without federal immigration status. @@ -443,3 +445,72 @@ is_federal_medicaid_immigration_status_eligible: [false, true] medicaid_enrolled: [true, true] medicaid_federal_share: [0, 0.9] + +# 8 U.S.C. 1613(b)(2) exempts a qualified noncitizen on active duty, a veteran, +# and their spouse from the five-year bar, and 8 U.S.C. 1612(b)(2)(C) protects +# their Medicaid eligibility. They meet the federal test and keep the match. A +# permanent resident inside the bar without that connection reaches Medicaid +# only through Illinois Health Benefits for Immigrants and gets no federal +# share. Expansion adults get the 90% expansion FMAP. +# https://www.law.cornell.edu/uscode/text/8/1613#b_2 +# https://www.law.cornell.edu/uscode/text/8/1612#b_2_C +- name: Military-connected permanent residents inside the five-year bar keep the federal share in Illinois. + period: 2024 + input: + people: + person1: + age: 50 + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 3 + is_military: true + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person2: + age: 50 + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 3 + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person3: + age: 50 + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 3 + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + person4: + age: 50 + immigration_status: CITIZEN + is_veteran: true + medicaid_category: ADULT + medicaid_household_size: 1 + medicaid_income_level: 1 + takes_up_medicaid_if_eligible: true + marital_units: + marital_unit1: + members: [person1] + marital_unit2: + members: [person2] + marital_unit3: + members: [person3, person4] + tax_units: + tax_unit1: + members: [person1] + tax_unit2: + members: [person2] + tax_unit3: + members: [person3, person4] + households: + household: + members: [person1, person2, person3, person4] + state_code: IL + output: + is_federal_medicaid_immigration_status_eligible: [true, false, true, true] + il_hbi_eligible: [false, true, false, false] + medicaid_enrolled: [true, true, true, true] + medicaid_federal_share: [0.9, 0, 0.9, 0.9] diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml index f1e11a9f544..ea99d7cb727 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml @@ -147,3 +147,40 @@ state_code: TX output: is_medicaid_immigration_status_eligible: false + +- name: Case 19, recent permanent resident on active duty in Texas is exempt from the five-year bar. + period: 2025 + input: + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 2 + is_military: true + age: 30 + state_code: TX + output: + # 8 U.S.C. 1613(b)(2)(B) and 1612(b)(2)(C) + is_federal_medicaid_immigration_status_eligible: true + is_medicaid_immigration_status_eligible: true + +- name: Case 20, recent permanent resident veteran in Texas is exempt from the five-year bar. + period: 2025 + input: + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 2 + is_veteran: true + age: 30 + state_code: TX + output: + # 8 U.S.C. 1613(b)(2)(A) + is_federal_medicaid_immigration_status_eligible: true + is_medicaid_immigration_status_eligible: true + +- name: Case 21, temporary protected status adult on active duty in Texas is not eligible, since the military exemption applies only to qualified noncitizens. + period: 2025 + input: + immigration_status: TPS + is_military: true + age: 30 + state_code: TX + output: + is_federal_medicaid_immigration_status_eligible: false + is_medicaid_immigration_status_eligible: false diff --git a/policyengine_us/tests/test_medicaid_federal_share_invariants.py b/policyengine_us/tests/test_medicaid_federal_share_invariants.py index b37137a9884..8816fdb0796 100644 --- a/policyengine_us/tests/test_medicaid_federal_share_invariants.py +++ b/policyengine_us/tests/test_medicaid_federal_share_invariants.py @@ -1,11 +1,13 @@ """Property tests: Medicaid federal share for enrollees without federal status. -42 U.S.C. 1396b(v)(1) bars Title XIX payment for medical assistance to anyone -who fails the federal immigration test, apart from emergency services under -(v)(2) and the lawfully residing children and pregnant people option under -(v)(4). is_federal_medicaid_immigration_status_eligible applies that test, -including (v)(4); is_medicaid_immigration_status_eligible also counts -state-funded coverage. https://www.law.cornell.edu/uscode/text/42/1396b#v +Title XIX pays for medical assistance to noncitizens only within 42 U.S.C. +1396b(v)(1) and (5) and the qualified-noncitizen rules and five-year bar of +8 U.S.C. 1611 and 1613, apart from emergency services under (v)(2) and the +lawfully residing children and pregnant people option under (v)(4). +is_federal_medicaid_immigration_status_eligible applies that test, including +(v)(4); is_medicaid_immigration_status_eligible also counts state-funded +coverage. https://www.law.cornell.edu/uscode/text/42/1396b#v and +https://www.law.cornell.edu/uscode/text/8/1613 For every generated person: diff --git a/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py b/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py index a84ef943214..a22e9b0595d 100644 --- a/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py +++ b/policyengine_us/variables/gov/hhs/medicaid/costs/medicaid_federal_share.py @@ -11,8 +11,16 @@ class medicaid_federal_share(Variable): "adults (42 U.S.C. 1396d(y)) and the state's regular FMAP for all " "other enrollment groups (42 U.S.C. 1396d(b)). Title XIX pays only " "for an enrollee in a Medicaid group who meets the federal " - "immigration test, which includes the lawfully residing option for " - "children and pregnant people (42 U.S.C. 1396b(v)(1) and (4)). Every " + "immigration test. 42 U.S.C. 1396b(v)(1) bars payment for " + "noncitizens who are neither permanent residents nor permanently " + "residing under color of law. 8 U.S.C. 1611 and 1613 limit federal " + "benefits to qualified noncitizens and bar most of them for five " + "years after entry, with exemptions that include veterans, active " + "duty members and their families. From October 1, 2026, 42 U.S.C. " + "1396b(v)(5) limits payment to citizens, permanent residents, Cuban " + "and Haitian entrants and Compact of Free Association migrants. The " + "lawfully residing option for children and pregnant people (42 " + "U.S.C. 1396b(v)(4)) is an exception to these limits. Every " "other enrollee reaches Medicaid only through state-funded coverage " "and gets no federal share. That coverage includes state coverage " "regardless of immigration status (California's state-funded " @@ -33,6 +41,8 @@ class medicaid_federal_share(Variable): reference = ( "https://www.law.cornell.edu/uscode/text/42/1396d", "https://www.law.cornell.edu/uscode/text/42/1396b#v", + "https://www.law.cornell.edu/uscode/text/8/1611", + "https://www.law.cornell.edu/uscode/text/8/1613", "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=14007.8.&lawCode=WIC", "https://www.ilga.gov/Documents/legislation/ilcs/documents/030500050K12-4.35.htm", "https://webserver.rilegislature.gov/Statutes/TITLE42/42-12.3/42-12.3-3.htm", @@ -47,10 +57,12 @@ def formula(person, period, parameters): regular_fmap = p.fmap[state] category = person("medicaid_category", period) categories = category.possible_values - # 42 U.S.C. 1396b(v)(1) bars Title XIX payment for an enrollee who - # fails the federal immigration test, apart from emergency services. - # is_medicaid_immigration_status_eligible also counts state-funded - # coverage, so the federal test is used here. + # Title XIX pays for a noncitizen only within 42 U.S.C. 1396b(v)(1) + # and (5) and 8 U.S.C. 1611 and 1613, apart from emergency services + # under (v)(2) and the lawfully residing option under (v)(4). + # is_federal_medicaid_immigration_status_eligible applies those + # limits, (v)(4) included; is_medicaid_immigration_status_eligible + # also counts state-funded coverage. federally_matched_route = (category != categories.NONE) & person( "is_federal_medicaid_immigration_status_eligible", period ) diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py index 7318f57acf5..2b67dfb8080 100644 --- a/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py @@ -9,8 +9,17 @@ class is_federal_medicaid_immigration_status_eligible(Variable): "Whether a person's immigration status allows federally funded Medicaid: " "a citizen, a qualified noncitizen who is exempt from or past the " "five-year bar, or a lawfully residing child or pregnant person in a " - "state that takes the option in 42 U.S.C. 1396b(v)(4). State-funded " - "coverage is left to is_medicaid_immigration_status_eligible. " + "state that takes the option in 42 U.S.C. 1396b(v)(4). The bar " + "exemptions include qualified noncitizens with a military connection: " + "veterans, active duty members and their spouses and dependent " + "children (8 U.S.C. 1613(b)(2)), whose Medicaid eligibility 8 U.S.C. " + "1612(b)(2)(C) also protects. That test uses " + "is_snap_alien_military_connected, which implements the same " + "exemption. The statute sets no ages for a dependent child, so the " + "ages come from the SNAP regulation (7 CFR 273.4(a)(6)(ii)(G)); " + "that variable's documentation lists the proxies and their limits. " + "State-funded coverage is left to " + "is_medicaid_immigration_status_eligible. " "Because this variable is YEAR-defined, the status list dated " "2026-10-01 is read at January 1, so the 42 U.S.C. 1396b(v)(5) " "narrowing that starts October 1, 2026 applies in the model only from " @@ -23,6 +32,8 @@ class is_federal_medicaid_immigration_status_eligible(Variable): "https://www.law.cornell.edu/uscode/text/42/1396b#v", "https://www.law.cornell.edu/uscode/text/42/1396b#v_4_A", "https://www.law.cornell.edu/uscode/text/8/1641", + "https://www.law.cornell.edu/uscode/text/8/1612#b_2_C", + "https://www.law.cornell.edu/uscode/text/8/1613#b_2", "https://uscode.house.gov/view.xhtml?req=granuleid:USC-prelim-title8-section1613&num=0&edition=prelim", ) @@ -40,8 +51,13 @@ def formula(person, period, parameters): ) years_since_entry = person("years_since_us_entry", period.this_year) past_five_year_bar = years_since_entry >= p.five_year_bar_years + # 8 USC 1613(b)(2) exempts veterans, active duty members and their + # spouses and dependent children from the five-year bar, the same + # exemption SNAP applies. + military_connected = person("is_snap_alien_military_connected", period) federally_eligible_status = citizen | ( - eligible_immigration_status & (bar_exempt_status | past_five_year_bar) + eligible_immigration_status + & (bar_exempt_status | past_five_year_bar | military_connected) ) # 42 USC 1396b(v)(4) lets states cover lawfully residing children and # pregnant individuals without the qualified-alien limit or five-year bar. From 27f6c36ea2ff2269676336f26e2745ff54246b04 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 15 Nov 2026 10:49:49 -0500 Subject: [PATCH 4/4] Test the military exemption after the October 2026 narrowing and for children Adds 2027 cases (a permanent resident on active duty passes, a refugee on active duty fails) and an Alabama dependent-child case. Notes in the SNAP military variable and parameters that Medicaid, the Medicare Savings Programs and Nevada LIHEAP share them, and says the dependent-child ages are borrowed from SNAP since federal Medicaid law sets none. Co-Authored-By: Claude Opus 5.5 --- .../military/child_age_threshold.yaml | 3 + .../military/student_age_threshold.yaml | 3 + ..._medicaid_immigration_status_eligible.yaml | 69 +++++++++++++++++++ ...al_medicaid_immigration_status_eligible.py | 7 +- .../is_snap_alien_military_connected.py | 6 +- 5 files changed, 84 insertions(+), 4 deletions(-) diff --git a/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/child_age_threshold.yaml b/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/child_age_threshold.yaml index 213783be83b..503ff28c0a5 100644 --- a/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/child_age_threshold.yaml +++ b/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/child_age_threshold.yaml @@ -6,6 +6,9 @@ description: The Department of Agriculture excludes military-connected dependent # 65 FR 70134 (November 21, 2000), effective January 20, 2001, and now at # 7 CFR 273.4(a)(6)(ii)(G)(3). Children under this age are also exempt under # 7 CFR 273.4(a)(6)(ii)(J). +# is_snap_alien_military_connected reads this parameter, and Medicaid, the +# Medicare Savings Programs and Nevada LIHEAP use that variable too, so a +# change here also changes them. Federal Medicaid law sets no ages. values: 2001-01-20: 18 diff --git a/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/student_age_threshold.yaml b/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/student_age_threshold.yaml index 85a1f2b758b..8ce18738933 100644 --- a/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/student_age_threshold.yaml +++ b/policyengine_us/parameters/gov/usda/snap/eligibility/waiting_period/exceptions/military/student_age_threshold.yaml @@ -5,6 +5,9 @@ description: The Department of Agriculture excludes military-connected full-time # they come from the regulation, first adopted as 7 CFR 273.4(a)(5)(ii)(G)(3) # by the final rule at 65 FR 70134 (November 21, 2000), effective January 20, # 2001, and now at 7 CFR 273.4(a)(6)(ii)(G)(3). +# is_snap_alien_military_connected reads this parameter, and Medicaid, the +# Medicare Savings Programs and Nevada LIHEAP use that variable too, so a +# change here also changes them. Federal Medicaid law sets no ages. values: 2001-01-20: 22 diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml index ea99d7cb727..247d0bb635c 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml @@ -184,3 +184,72 @@ output: is_federal_medicaid_immigration_status_eligible: false is_medicaid_immigration_status_eligible: false + +- name: Case 22, recent permanent resident on active duty in Texas stays exempt from the five-year bar after the October 2026 narrowing. + period: 2027 + input: + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 2 + is_military: true + age: 30 + state_code: TX + output: + # 42 U.S.C. 1396b(v)(5)(B)(ii) keeps permanent residents; 8 U.S.C. + # 1613(b)(2)(B) still lifts their five-year bar. + is_federal_medicaid_immigration_status_eligible: true + +- name: Case 23, refugee on active duty in Texas fails the federal test after the October 2026 narrowing. + period: 2027 + input: + immigration_status: REFUGEE + years_since_us_entry: 0 + is_military: true + age: 30 + state_code: TX + output: + # 42 U.S.C. 1396b(v)(5) drops refugees; the military exemption only lifts + # the five-year bar and cannot restore the status. + is_federal_medicaid_immigration_status_eligible: false + +- name: Case 24, dependent child of an active duty parent in Alabama is exempt from the five-year bar until the dependent-child ages run out. + period: 2025 + input: + people: + person1: + age: 40 + immigration_status: CITIZEN + is_military: true + is_tax_unit_head: true + person2: + age: 10 + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 2 + is_tax_unit_dependent: true + is_tax_unit_spouse: false + person3: + age: 19 + immigration_status: LEGAL_PERMANENT_RESIDENT + years_since_us_entry: 2 + is_tax_unit_dependent: true + is_tax_unit_spouse: false + marital_units: + marital_unit1: + members: [person1] + marital_unit2: + members: [person2] + marital_unit3: + members: [person3] + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AL + output: + # 8 U.S.C. 1613(b)(2)(C). Alabama does not elect the lawfully residing + # option, so the 10-year-old passes only through the military exemption. + # The 19-year-old is not a full-time student or disabled, so is past the + # dependent-child ages the model borrows from 7 CFR 273.4(a)(6)(ii)(G)(3). + is_snap_alien_military_connected: [true, true, false] + is_federal_medicaid_immigration_status_eligible: [true, true, false] diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py index 2b67dfb8080..b4cc611e77c 100644 --- a/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/is_federal_medicaid_immigration_status_eligible.py @@ -15,9 +15,10 @@ class is_federal_medicaid_immigration_status_eligible(Variable): "children (8 U.S.C. 1613(b)(2)), whose Medicaid eligibility 8 U.S.C. " "1612(b)(2)(C) also protects. That test uses " "is_snap_alien_military_connected, which implements the same " - "exemption. The statute sets no ages for a dependent child, so the " - "ages come from the SNAP regulation (7 CFR 273.4(a)(6)(ii)(G)); " - "that variable's documentation lists the proxies and their limits. " + "exemption. Federal Medicaid law sets no ages for a dependent child, " + "so the model borrows SNAP's (7 CFR 273.4(a)(6)(ii)(G)(3): under 18, " + "a full-time student under 22, or disabled); that variable's " + "documentation lists the proxies and their limits. " "State-funded coverage is left to " "is_medicaid_immigration_status_eligible. " "Because this variable is YEAR-defined, the status list dated " diff --git a/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/is_snap_alien_military_connected.py b/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/is_snap_alien_military_connected.py index d66c21f46a9..2eab5b59b6e 100644 --- a/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/is_snap_alien_military_connected.py +++ b/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/is_snap_alien_military_connected.py @@ -34,7 +34,11 @@ class is_snap_alien_military_connected(Variable): "under-applies the waiting period. Not modeled: the unremarried " "surviving spouse of a deceased veteran and the child of a deceased " "veteran who was dependent at the veteran's death. Set this variable " - "directly to override the proxies." + "directly to override the proxies. 8 U.S.C. 1613(b)(2) gives the same " + "exemption for other federal means-tested benefits, so " + "is_federal_medicaid_immigration_status_eligible (Medicaid and the " + "Medicare Savings Programs) and Nevada LIHEAP also use this variable; " + "an override, or a change to its parameters, changes them too." ) definition_period = YEAR reference = (