Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/medicare-immigration-test.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Apply immigration tests to Medicare (42 U.S.C. 1395o(a)(2), 42 U.S.C. 1395mmm and 8 U.S.C. 1611(b)(3)) and to Medicare Savings Programs (42 U.S.C. 1396b(v), 8 U.S.C. 1611(a) and 1613(a)), so undocumented people no longer get either and, from 2027, only citizens, permanent residents and Cuban and Haitian entrants can get Medicare.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
description: The United States limits eligibility to these immigration statuses under the Medicare program.

# 42 USC 1395mmm(a) limits Medicare to citizens and nationals, permanent residents,
# Cuban and Haitian entrants, and Compact of Free Association residents. Nationals
# and Compact residents have no immigration_status value.
# 42 USC 1395mmm(b)(1) applies that limit on January 4, 2027 to people already
# entitled or enrolled on July 4, 2025. A YEAR variable reads parameters at January 1,
# so the list is dated January 1, 2027; a January 4 date would not apply until 2028.
# 42 USC 1395mmm(a) bars new entrants from July 4, 2025 at once. No input records
# enrollment on July 4, 2025, so the model treats everyone as grandfathered through
# 2026, which overstates eligibility for those new entrants.
# The earlier list is the lawful presence limit in 8 USC 1611(b)(3), applied backward
# to the start of Medicare as an approximation.
values:
1966-01-01:
- CITIZEN
- LEGAL_PERMANENT_RESIDENT
- REFUGEE
- ASYLEE
- DEPORTATION_WITHHELD
- CUBAN_HAITIAN_ENTRANT
- CONDITIONAL_ENTRANT
- PAROLED_ONE_YEAR
- DACA
- TPS

2027-01-01:
- CITIZEN
- LEGAL_PERMANENT_RESIDENT
- CUBAN_HAITIAN_ENTRANT

metadata:
unit: list
period: year
label: Medicare eligible immigration statuses
reference:
- title: 42 U.S. Code § 1395mmm - Limiting Medicare coverage of certain individuals
href: https://www.law.cornell.edu/uscode/text/42/1395mmm
- title: "Public Law 119-21, section 71201 #page 249-250"
href: https://www.govinfo.gov/content/pkg/PLAW-119publ21/pdf/PLAW-119publ21.pdf#page=249
- title: 8 U.S. Code § 1611(b)(3)
href: https://www.law.cornell.edu/uscode/text/8/1611#b_3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: The United States requires lawful permanent residents without Part A entitlement to have this many years of continuous residence to enroll in Medicare at the eligibility age.
metadata:
period: year
unit: year
label: Medicare permanent resident years of continuous residence
reference:
- title: 42 U.S. Code § 1395o(a)(2)
href: https://www.law.cornell.edu/uscode/text/42/1395o#a
values:
1966-01-01: 5
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@ metadata:
reference:
- title: Medicare.gov - Part A costs
href: https://www.cms.gov/newsroom/fact-sheets/2026-medicare-parts-b-premiums-deductibles
- title: 42 U.S. Code § 426(a) - Entitlement to hospital insurance benefits
href: https://www.law.cornell.edu/uscode/text/42/426
- title: 42 U.S. Code § 414(a) - Fully insured individual (no more than 40 quarters of coverage required)
href: https://www.law.cornell.edu/uscode/text/42/414
# 40 is the ceiling under 42 USC 414(a), which requires one quarter for each year after
# 1950 and before the year a person reaches 62, and at least 6, so people reaching 62
# before 1991 needed fewer. It is applied backward to 1966 as an approximation.
values:
2000-01-01: 40
1966-01-01: 40
Original file line number Diff line number Diff line change
Expand Up @@ -495,3 +495,20 @@
has_qualifying_non_marketplace_health_coverage_at_interview: [true]
pays_aca_premium: [false]
is_aca_ptc_eligible: [false]

# 42 U.S.C. 1395o(a)(2): a permanent resident of two years without Part A can't enroll
# in Medicare at 70, so Medicare doesn't block the credit. The five-year bar in
# 8 U.S.C. 1613(a) also rules out Medicaid.
# $30,000 / 2025 individual FPL of $15,650 = 1.91, inside the 1.00 to 4.00 income range.
- name: Permanent resident barred from Medicare at age 70 qualifies for ACA PTC
period: 2026
input:
age: 70
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 2
medicare_quarters_of_coverage: 0
taxable_private_pension_income: 30_000
state_code: TX
output:
is_medicare_eligible: false
is_aca_ptc_eligible: true
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,27 @@
gross_medicare_part_b_premium: 3_000
output:
medicare_cost: 14_751 # $17,751 spending - $3,000 Part B premium

- name: unit test 7 - undocumented person is not enrolled and has no cost
period: 2026
absolute_error_margin: 0.01
input:
age: 70
immigration_status: UNDOCUMENTED
pension_income: 10_000
state_code: TX
output:
medicare_cost: 0

- name: unit test 8 - person with temporary protected status, premium-free Part A
period: 2026
absolute_error_margin: 0.01
input:
age: 70
immigration_status: TPS
medicare_quarters_of_coverage: 40
pension_income: 10_000
state_code: TX
output:
# $18,983 spending - $2,434.80 Part B premium ($202.90 * 12) (2026)
medicare_cost: 16_548.2
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,27 @@
medicare_enrolled: true
output:
medicare_enrolled: true

# 8 U.S.C. 1611(b)(3) limits Medicare benefits to noncitizens lawfully present.
- name: Undocumented person aged 65 or older is not enrolled.
period: 2026
input:
age: 70
immigration_status: UNDOCUMENTED
pension_income: 10_000
state_code: TX
output:
medicare_enrolled: false

# Allowed in 2026 because the model treats everyone as grandfathered under
# 42 U.S.C. 1395mmm(b)(1) through 2026.
- name: Person with temporary protected status and Part A work history is enrolled.
period: 2026
input:
age: 70
immigration_status: TPS
medicare_quarters_of_coverage: 40
pension_income: 10_000
state_code: TX
output:
medicare_enrolled: true
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,165 @@
months_receiving_social_security_disability: 24
output:
is_medicare_eligible: true

# 8 U.S.C. 1611(b)(3) limits Medicare benefits to noncitizens lawfully present.
- name: is_medicare_eligible unit test 5
period: 2026
input:
age: 70
immigration_status: UNDOCUMENTED
output:
is_medicare_eligible: false

# 42 U.S.C. 1395o(a)(2): a permanent resident of five years may enroll at 65
# without Part A entitlement, and one of fewer than five years may not.
- name: is_medicare_eligible unit test 6
period: 2026
input:
age: 70
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 5
medicare_quarters_of_coverage: 0
output:
is_medicare_eligible: true

- name: is_medicare_eligible unit test 7
period: 2026
input:
age: 70
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 4
medicare_quarters_of_coverage: 0
output:
is_medicare_eligible: false

# 42 U.S.C. 1395o(a)(1): entitlement to Part A opens Part B to anyone with an allowed
# status, so the five-year rule doesn't apply. A permanent resident stays allowed from
# 2027 under 42 U.S.C. 1395mmm(a)(2).
- name: is_medicare_eligible unit test 8
period: 2026
input:
age: 70
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 4
medicare_quarters_of_coverage: 40
output:
is_medicare_eligible: true

# Temporary protected status is allowed in 2026 only because the model treats everyone
# as grandfathered under 42 U.S.C. 1395mmm(b)(1) through 2026. Unit test 14 covers 2027.
- name: is_medicare_eligible unit test 9
period: 2026
input:
age: 70
immigration_status: TPS
medicare_quarters_of_coverage: 40
output:
is_medicare_eligible: true

- name: is_medicare_eligible unit test 10
period: 2026
input:
age: 70
immigration_status: TPS
medicare_quarters_of_coverage: 39
output:
is_medicare_eligible: false

# A citizen without enough quarters can still buy Part A and enroll in Part B.
- name: is_medicare_eligible unit test 11
period: 2026
input:
age: 70
medicare_quarters_of_coverage: 0
output:
is_medicare_eligible: true

# The SSDI route also needs an allowed status. Temporary protected status is allowed in
# 2026 only because the model treats everyone as grandfathered under 42 U.S.C.
# 1395mmm(b)(1) through 2026. Unit test 16 covers 2027.
- name: is_medicare_eligible unit test 12
period: 2026
input:
age: 50
immigration_status: TPS
social_security_disability: 12_000
months_receiving_social_security_disability: 24
output:
is_medicare_eligible: true

- name: is_medicare_eligible unit test 13
period: 2026
input:
age: 50
immigration_status: UNDOCUMENTED
social_security_disability: 12_000
months_receiving_social_security_disability: 24
output:
is_medicare_eligible: false

# 42 U.S.C. 1395mmm(a) limits Medicare from 2027 to citizens and nationals, permanent
# residents, Cuban and Haitian entrants, and Compact of Free Association residents.
# Part A work history doesn't open Medicare to anyone else.
- name: is_medicare_eligible unit test 14
period: 2027
input:
age: 70
immigration_status: TPS
medicare_quarters_of_coverage: 40
output:
is_medicare_eligible: false

- name: is_medicare_eligible unit test 15
period: 2027
input:
age: 70
immigration_status: REFUGEE
medicare_quarters_of_coverage: 40
output:
is_medicare_eligible: false

# 42 U.S.C. 1395mmm(a) applies to the SSDI route as well.
- name: is_medicare_eligible unit test 16
period: 2027
input:
age: 50
immigration_status: TPS
social_security_disability: 12_000
months_receiving_social_security_disability: 24
output:
is_medicare_eligible: false

# 42 U.S.C. 1395mmm(a)(3) keeps Cuban and Haitian entrants, and entitlement to Part A
# opens Part B under 42 U.S.C. 1395o(a)(1).
- name: is_medicare_eligible unit test 17
period: 2027
input:
age: 70
immigration_status: CUBAN_HAITIAN_ENTRANT
medicare_quarters_of_coverage: 40
output:
is_medicare_eligible: true

# 42 U.S.C. 1395o(a)(2): without Part A, only a citizen or a permanent resident of five
# years may enroll at 65, so an allowed status isn't enough on its own.
- name: is_medicare_eligible unit test 18
period: 2027
input:
age: 70
immigration_status: CUBAN_HAITIAN_ENTRANT
medicare_quarters_of_coverage: 0
output:
is_medicare_eligible: false

# 42 U.S.C. 1395mmm(a)(2) keeps permanent residents, and entitlement to Part A opens
# Part B under 42 U.S.C. 1395o(a)(1) inside the five years.
- name: is_medicare_eligible unit test 19
period: 2027
input:
age: 70
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 2
medicare_quarters_of_coverage: 40
output:
is_medicare_eligible: true
Loading
Loading