From 1428a05c2ac9f1425496f83b426b4a0336938a0d Mon Sep 17 00:00:00 2001 From: Jacob Harris Date: Tue, 10 Mar 2026 16:43:47 -0400 Subject: [PATCH 1/3] Moving disabled veteran for HR1 to own variable --- .../veteran_disability_minimum.yaml | 14 ++++++++++ .../is_disabled_veteran.yaml | 26 +++++++++++++++++++ .../work_requirements/is_disabled_veteran.py | 20 ++++++++++++++ .../person/veteran_disability_rating.py | 11 ++++++++ 4 files changed, 71 insertions(+) create mode 100644 policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/veteran_disability_minimum.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.yaml create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.py create mode 100644 policyengine_us/variables/household/demographic/person/veteran_disability_rating.py diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/veteran_disability_minimum.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/veteran_disability_minimum.yaml new file mode 100644 index 00000000000..cdb428cddef --- /dev/null +++ b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/veteran_disability_minimum.yaml @@ -0,0 +1,14 @@ +description: The Department of Health and Human Services exempts Medicaid work requirement for veterans with an overall disability rating of 100 + +values: + 2027-01-01: 100 + +metadata: + unit: year + label: Veteran Disability Rating Minimum + period: year + reference: + - title: H.R.1 - One Big Beautiful Bill Act + href: https://www.congress.gov/bill/119th-congress/house-bill/1/text + - title: 38 U.S. Code ยง 1155 - Authority for schedule for rating disabilities + href: https://www.law.cornell.edu/uscode/text/38/1155 diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.yaml new file mode 100644 index 00000000000..5b68ff3195f --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.yaml @@ -0,0 +1,26 @@ +- name: Return false if is_veteran is not set + period: 2027 + input: + is_veteran: false + veteran_disability_rating: 100 + output: + is_disabled_veteran: false + + +- name: Return false if veteran_disability_rating < 100 + period: 2027 + input: + is_veteran: true + veteran_disability_rating: 90 + output: + is_disabled_veteran: false + + +- name: Return true if veteran and veteran_disability_rating >= 100 + period: 2027 + input: + is_veteran: true + veteran_disability_rating: 100 + output: + is_disabled_veteran: true + diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.py new file mode 100644 index 00000000000..57fc4840321 --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class is_disabled_veteran(Variable): + value_type = bool + entity = Person + label = "Eligible for Medicaid CE exemption for disabled veterans" + definition_period = YEAR + reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" + + def formula(person, period, parameters): + vet_disability_minimum: int = parameters(period).gov.hhs.medicaid.eligibility.work_requirements.veteran_disability_minimum + + is_veteran = person("is_veteran", period) + veteran_disability_rating = person( + "veteran_disability_rating", period + ) + + return is_veteran and veteran_disability_rating >= vet_disability_minimum + diff --git a/policyengine_us/variables/household/demographic/person/veteran_disability_rating.py b/policyengine_us/variables/household/demographic/person/veteran_disability_rating.py new file mode 100644 index 00000000000..6c1b39857e4 --- /dev/null +++ b/policyengine_us/variables/household/demographic/person/veteran_disability_rating.py @@ -0,0 +1,11 @@ +from policyengine_us.model_api import * + + +class veteran_disability_rating(Variable): + value_type = int + entity = Person + label = "The overall veteran disability rating for the individual" + definition_period = YEAR + default_value = 0 + reference = "https://www.law.cornell.edu/uscode/text/38/1155" + From 1e715e7bd0f087c08a5dcbf291ee91f3bfe0b044 Mon Sep 17 00:00:00 2001 From: Jacob Harris Date: Tue, 10 Mar 2026 16:57:02 -0400 Subject: [PATCH 2/3] Renaming to totally_disabled_veteran --- ...y_minimum.yaml => total_veteran_disability_minimum.yaml} | 0 ...sabled_veteran.yaml => is_totally_disabled_veteran.yaml} | 6 +++--- ...s_disabled_veteran.py => is_totally_disabled_veteran.py} | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/{veteran_disability_minimum.yaml => total_veteran_disability_minimum.yaml} (100%) rename policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/{is_disabled_veteran.yaml => is_totally_disabled_veteran.yaml} (79%) rename policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/{is_disabled_veteran.py => is_totally_disabled_veteran.py} (84%) diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/veteran_disability_minimum.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/total_veteran_disability_minimum.yaml similarity index 100% rename from policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/veteran_disability_minimum.yaml rename to policyengine_us/parameters/gov/hhs/medicaid/eligibility/work_requirements/total_veteran_disability_minimum.yaml diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_totally_disabled_veteran.yaml similarity index 79% rename from policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.yaml rename to policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_totally_disabled_veteran.yaml index 5b68ff3195f..a17832188e8 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_totally_disabled_veteran.yaml @@ -4,7 +4,7 @@ is_veteran: false veteran_disability_rating: 100 output: - is_disabled_veteran: false + is_totally_disabled_veteran: false - name: Return false if veteran_disability_rating < 100 @@ -13,7 +13,7 @@ is_veteran: true veteran_disability_rating: 90 output: - is_disabled_veteran: false + is_totally_disabled_veteran: false - name: Return true if veteran and veteran_disability_rating >= 100 @@ -22,5 +22,5 @@ is_veteran: true veteran_disability_rating: 100 output: - is_disabled_veteran: true + is_totally_disabled_veteran: true diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_totally_disabled_veteran.py similarity index 84% rename from policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.py rename to policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_totally_disabled_veteran.py index 57fc4840321..5849e5bbc5a 100644 --- a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled_veteran.py +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_totally_disabled_veteran.py @@ -1,7 +1,7 @@ from policyengine_us.model_api import * -class is_disabled_veteran(Variable): +class is_totally_disabled_veteran(Variable): value_type = bool entity = Person label = "Eligible for Medicaid CE exemption for disabled veterans" @@ -9,7 +9,7 @@ class is_disabled_veteran(Variable): reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" def formula(person, period, parameters): - vet_disability_minimum: int = parameters(period).gov.hhs.medicaid.eligibility.work_requirements.veteran_disability_minimum + vet_disability_minimum: int = parameters(period).gov.hhs.medicaid.eligibility.work_requirements.total_veteran_disability_minimum is_veteran = person("is_veteran", period) veteran_disability_rating = person( From 21e7b4b213a7519d22308f321077d2e83d5a2711 Mon Sep 17 00:00:00 2001 From: Jacob Harris Date: Thu, 12 Mar 2026 14:58:24 -0400 Subject: [PATCH 3/3] Adding an has_exemption variable for Medicaid work requirements and some supporting variables for medically frail --- ...s_medicaid_work_requirement_exemption.yaml | 20 +++++++ .../work_requirements/is_medically_frail.yaml | 52 +++++++++++++++++++ ...has_medicaid_work_requirement_exemption.py | 18 +++++++ .../work_requirements/has_adl_impairment.py | 11 ++++ .../has_disabling_mental_disorder.py | 11 ++++ ...as_serious_or_complex_medical_condition.py | 14 +++++ .../has_substance_use_disorder.py | 13 +++++ .../work_requirements/is_disabled.py | 2 + .../work_requirements/is_medically_frail.py | 27 ++++++++++ 9 files changed, 168 insertions(+) create mode 100644 policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/has_medicaid_work_requirement_exemption.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.yaml create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/has_medicaid_work_requirement_exemption.py create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_adl_impairment.py create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_disabling_mental_disorder.py create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_serious_or_complex_medical_condition.py create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_substance_use_disorder.py create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled.py create mode 100644 policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.py diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/has_medicaid_work_requirement_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/has_medicaid_work_requirement_exemption.yaml new file mode 100644 index 00000000000..3bfdfc28677 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/has_medicaid_work_requirement_exemption.yaml @@ -0,0 +1,20 @@ +- name: Return false if no conditions set + period: 2027 + output: + has_medicaid_work_requirement_exemption: false + +- name: Return true if is_totally_disabled_veteran + period: 2027 + input: + is_totally_disabled_veteran: true + output: + has_medicaid_work_requirement_exemption: true + +- name: Return true if is_medically_frail + period: 2027 + input: + is_medically_frail: true + output: + has_medicaid_work_requirement_exemption: true + + diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.yaml new file mode 100644 index 00000000000..e616ff38bbc --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.yaml @@ -0,0 +1,52 @@ +- name: Return false if no conditions set + period: 2027 + output: + is_medically_frail: false + + +- name: return true if blind + period: 2027 + input: + is_blind: true + output: + is_medically_frail: true + + +- name: return true if has disability as defined by SSI + period: 2027 + input: + is_ssi_disabled: true + output: + is_medically_frail: true + + +- name: return true if has substance_use_disorder + period: 2027 + input: + has_substance_use_disorder: true + output: + is_medically_frail: true + + +- name: return true if has_disabling_mental_disorder + period: 2027 + input: + has_disabling_mental_disorder: true + output: + is_medically_frail: true + + +- name: return true if has_adl_impairment + period: 2027 + input: + has_adl_impairment: true + output: + is_medically_frail: true + + +- name: return true if has_serious_or_complex_medical_condition + period: 2027 + input: + has_serious_or_complex_medical_condition: true + output: + is_medically_frail: true diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/has_medicaid_work_requirement_exemption.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/has_medicaid_work_requirement_exemption.py new file mode 100644 index 00000000000..3a47bab97a3 --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/has_medicaid_work_requirement_exemption.py @@ -0,0 +1,18 @@ +from policyengine_us.model_api import * + + +class has_medicaid_work_requirement_exemption(Variable): + value_type = bool + entity = Person + label = "Has an exemption for Medicaid work requirements" + definition_period = YEAR + reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" + + def formula(person, period, parameters): + is_totally_disabled_veteran = person("is_totally_disabled_veteran", period) + is_medically_frail = person("is_medically_frail", period) + + return ( + is_totally_disabled_veteran or + is_medically_frail + ) diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_adl_impairment.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_adl_impairment.py new file mode 100644 index 00000000000..a882c18d568 --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_adl_impairment.py @@ -0,0 +1,11 @@ +from policyengine_us.model_api import * + + +class has_adl_impairment(Variable): + # criteria not yet defined by CMS, so treating as simple boolean for now + value_type = bool + entity = Person + label = "Is unable to perform 1 or more Activities of Daily Living" + definition_period = YEAR + reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" + default_value = False diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_disabling_mental_disorder.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_disabling_mental_disorder.py new file mode 100644 index 00000000000..b299f733069 --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_disabling_mental_disorder.py @@ -0,0 +1,11 @@ +from policyengine_us.model_api import * + + +class has_disabling_mental_disorder(Variable): + # criteria not yet defined by CMS, so treating as simple boolean for now + value_type = bool + entity = Person + label = "Has a disabling mental health condition as defined for HR. 1" + definition_period = YEAR + reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" + default_value = False diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_serious_or_complex_medical_condition.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_serious_or_complex_medical_condition.py new file mode 100644 index 00000000000..57e7953afdc --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_serious_or_complex_medical_condition.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 + +from policyengine_us.model_api import * + + +class has_serious_or_complex_medical_condition(Variable): + # criteria not yet defined by CMS, so treating as simple boolean for now + value_type = bool + entity = Person + label = "Has a serious or complex medical condition" + definition_period = YEAR + reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" + default_value = False + diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_substance_use_disorder.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_substance_use_disorder.py new file mode 100644 index 00000000000..21bd668440c --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/has_substance_use_disorder.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +from policyengine_us.model_api import * + + +class has_substance_use_disorder(Variable): + # criteria not yet defined by CMS, so treating as simple boolean for now + value_type = bool + entity = Person + label = "Substance Use Disorder as a measure of medically frail" + definition_period = YEAR + reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" + default_value = False diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled.py new file mode 100644 index 00000000000..63f77b6be18 --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_disabled.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 + diff --git a/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.py b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.py new file mode 100644 index 00000000000..44da0cd2ef3 --- /dev/null +++ b/policyengine_us/variables/gov/hhs/medicaid/eligibility/work_requirements/is_medically_frail.py @@ -0,0 +1,27 @@ +from policyengine_us.model_api import * + + +class is_medically_frail(Variable): + value_type = bool + entity = Person + label = "The community engagement rules for Medicaid CE define a few different conditions for medical frailty or special needs" + definition_period = YEAR + reference = "https://www.congress.gov/bill/119th-congress/house-bill/1/text" + + def formula(person, period, parameters) -> bool: + is_blind: bool = person("is_blind", period) + is_ssi_disabled: bool = person("is_ssi_disabled", period) + has_substance_use_disorder: bool = person("has_substance_use_disorder", period) + has_disabling_mental_disorder: bool = person("has_disabling_mental_disorder", period) + has_adl_impairment: bool = person("has_adl_impairment", period) + has_serious_or_complex_medical_condition: bool = person("has_serious_or_complex_medical_condition", period) + + + return ( + is_blind or + is_ssi_disabled or + has_substance_use_disorder or + has_disabling_mental_disorder or + has_adl_impairment or + has_serious_or_complex_medical_condition + )