PolicyEngine / PolicyEngine/policyengine-us

Medicare eligibility: add the ESRD and ALS routes; document the SSDI-months input

Open
#9,396 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
162
Forks
212
Avg merge
3d 3h
Merged PRs (30d)
97

Description

## Summary

`is_medicare_eligible` models two routes: age 65 or older, and `social_security_disability > 0` with `months_receiving_social_security_disability >= 24` (42 USC 426(a)(1) and 426(b)(2)(A)). The statute has two more under-65 routes the formula omits:

- End-stage renal disease (42 USC 426-1): entitlement after a waiting period tied to dialysis or transplant, with no 24-month requirement.
- ALS (42 USC 426(h)): the 24-month waiting period is waived.

Neither route has an input today. Suggested shape: `has_esrd` and `has_als` boolean inputs (default false), OR'd into `is_medicare_eligible`, with the SSDI-months route unchanged.

Two related notes from PolicyBench's audit of its frozen references (PolicyEngine/policybench#164):

- `months_receiving_social_security_disability` is an integer input that no microdata build carries, so the disability route never fires in simulation; the certified builds record a year of SSDI receipt for 3,190 persons with no duration. Documenting the input's default and its interaction with year-round SSDI receipt (a zero-months default is an incoherent description of a year-round recipient) would help downstream users.
- The disability-wiring audit in #9330 covers SSI, SNAP, Medicaid and HUD; Medicare is not on its list.

Contributor guide

Open the contributing guide

Research direction

Start by locating the is_medicare_eligible formula and the declarations for its existing age, social_security_disability, and months_receiving_social_security_disability inputs. Review the cited Medicare routes and existing eligibility tests, then add coverage for ESRD, ALS, and the SSDI-months documentation; done means the new boolean inputs and documented defaults produce the specified eligibility outcomes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.