Skip to content

Commit a0822b6

Browse files
Merge pull request #7166 from hua7450/hua7450/issue7165
Fix code bug in Illinois HBWD income
2 parents b938ca5 + 8649b3a commit a0822b6

File tree

8 files changed

+348
-11
lines changed

8 files changed

+348
-11
lines changed

changelog_entry.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- bump: patch
2+
changes:
3+
fixed:
4+
- Fix IL HBWD earned income exemptions to apply only to disabled/blind persons.
5+
added:
6+
- Add is_blind to IL HBWD disability eligibility check.

policyengine_us/parameters/gov/states/il/hfs/hbwd/eligibility/income/sources/earned.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ values:
33
2022-04-01:
44
- employment_income
55
- self_employment_income
6+
- rental_income
67

78
metadata:
89
unit: list

policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_income_eligible.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
period: 2024-01
33
input:
44
state_code: IL
5+
is_disabled: true
56
employment_income: 36_000 # $3,000/month
67
social_security: 12_000 # $1,000/month
78
output:
@@ -11,6 +12,7 @@
1112
period: 2024-01
1213
input:
1314
state_code: IL
15+
is_disabled: true
1416
employment_income: 52_716 # $4,393/month
1517
output:
1618
il_hbwd_income_eligible: true
@@ -19,7 +21,31 @@
1921
period: 2024-01
2022
input:
2123
state_code: IL
24+
is_disabled: true
2225
employment_income: 60_000 # $5,000/month
2326
output:
2427
il_hbwd_income_eligible: true
2528
# Gross $5,000, after expenses and exemptions becomes eligible
29+
30+
- name: Case 4, income too high even with exemptions.
31+
period: 2024-01
32+
input:
33+
state_code: IL
34+
is_disabled: true
35+
employment_income: 72_000 # $6,000/month
36+
output:
37+
il_hbwd_income_eligible: false
38+
# 350% FPL for single (2024) = ~$4,393/month
39+
# Gross $6,000, even after exemptions exceeds limit
40+
41+
- name: Case 5, not disabled so no exemptions and income too high.
42+
period: 2024-01
43+
input:
44+
state_code: IL
45+
is_disabled: false
46+
employment_income: 60_000 # $5,000/month
47+
output:
48+
il_hbwd_income_eligible: false
49+
# Non-disabled person uses gross income (no exemptions)
50+
# Gross $5,000 > limit $4,393 → NOT eligible
51+
# (Same income as Case 3, but without exemptions)
Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,292 @@
1+
# Test HBWD earned income exemption handling
2+
# Per § 120.510(i), exemptions apply only to disabled/blind persons.
3+
# Non-disabled/non-blind persons use gross income (no exemptions).
4+
# If spouse is disabled/blind, they also get exemptions.
5+
6+
# Test 1: Disabled worker gets earned income exemptions
7+
- name: Case 1, disabled worker gets earned income exemptions.
8+
period: 2025-01
9+
absolute_error_margin: 0.5
10+
input:
11+
age: 49
12+
is_disabled: true
13+
is_blind: false
14+
il_aabd_gross_earned_income: 125
15+
il_aabd_expense_exemption_person: 0
16+
il_aabd_gross_unearned_income: 0
17+
state_code: IL
18+
output:
19+
# Disabled worker gets exemptions: 125 - 25(flat) - 20 - 30(50% of 60) = 50
20+
il_hbwd_countable_earned_income: 50
21+
22+
# Test 2: Non-disabled, non-blind person uses gross income (no exemptions)
23+
- name: Case 2, non-disabled person uses gross income.
24+
period: 2025-01
25+
absolute_error_margin: 0.5
26+
input:
27+
age: 47
28+
is_disabled: false
29+
is_blind: false
30+
il_aabd_gross_earned_income: 125
31+
il_aabd_expense_exemption_person: 0
32+
il_aabd_gross_unearned_income: 0
33+
state_code: IL
34+
output:
35+
# Non-disabled, non-blind person: uses il_hbwd_gross_earned_income (not set here, so 0)
36+
# In real scenarios, employment_income flows to il_hbwd_gross_earned_income
37+
il_hbwd_countable_earned_income: 0
38+
39+
# Test 3: Scenario 15 - Married couple over income limit correctly shows ineligible
40+
# person1: Age 49, disabled, $4,500/month wages ($54,000/year)
41+
# person2: Age 47, NOT disabled/blind, $2,500/month wages ($30,000/year)
42+
# Combined gross income: $7,000/month
43+
# 350% FPL for 2 people = $6,168.75/month
44+
- name: Case 3, married couple over income limit correctly shows ineligible.
45+
period: 2025-01
46+
absolute_error_margin: 0.3
47+
input:
48+
people:
49+
person1:
50+
age: 49
51+
is_disabled: true
52+
employment_income: 54_000 # $4,500/month * 12
53+
person2:
54+
age: 47
55+
is_disabled: false
56+
employment_income: 30_000 # $2,500/month * 12
57+
spm_units:
58+
spm_unit:
59+
members: [person1, person2]
60+
households:
61+
household:
62+
members: [person1, person2]
63+
state_code: IL
64+
output:
65+
# person1 (disabled): gets exemptions
66+
# person2 (not disabled/blind): uses gross income (no exemptions)
67+
# Combined countable $6,323 > limit $6,168.75 → NOT eligible
68+
il_hbwd_countable_income: 6_323
69+
il_hbwd_income_eligible: [false, false]
70+
il_hbwd_eligible: [false, false]
71+
il_hbwd_person: [0, 0]
72+
73+
# Test 4: Single disabled worker - eligible
74+
- name: Case 4, single disabled worker eligible.
75+
period: 2025-01
76+
absolute_error_margin: 0.3
77+
input:
78+
people:
79+
person1:
80+
age: 35
81+
is_disabled: true
82+
employment_income: 24_000 # $2,000/month * 12
83+
spm_units:
84+
spm_unit:
85+
members: [person1]
86+
households:
87+
household:
88+
members: [person1]
89+
state_code: IL
90+
output:
91+
# Single person: 350% FPL = $5,285/month (2025)
92+
# Countable income after exemptions < limit → eligible
93+
il_hbwd_income_eligible: [true]
94+
il_hbwd_eligible: [true]
95+
96+
# Test 5: Single disabled worker - over income limit
97+
- name: Case 5, single disabled worker over income limit.
98+
period: 2025-01
99+
absolute_error_margin: 0.3
100+
input:
101+
people:
102+
person1:
103+
age: 40
104+
is_disabled: true
105+
employment_income: 72_000 # $6,000/month * 12
106+
spm_units:
107+
spm_unit:
108+
members: [person1]
109+
households:
110+
household:
111+
members: [person1]
112+
state_code: IL
113+
output:
114+
# Single person: 350% FPL = $5,285/month
115+
# Countable income > limit → NOT eligible
116+
il_hbwd_income_eligible: [false]
117+
il_hbwd_eligible: [false]
118+
119+
# Test 6: Blind worker (not disabled) - gets blind exemptions
120+
- name: Case 6, blind worker gets exemptions.
121+
period: 2025-01
122+
absolute_error_margin: 0.3
123+
input:
124+
people:
125+
person1:
126+
age: 45
127+
is_disabled: false
128+
is_blind: true
129+
employment_income: 36_000 # $3,000/month * 12
130+
spm_units:
131+
spm_unit:
132+
members: [person1]
133+
households:
134+
household:
135+
members: [person1]
136+
state_code: IL
137+
output:
138+
# Blind worker is disability eligible and gets more generous exemptions
139+
il_hbwd_disability_eligible: [true]
140+
il_hbwd_income_eligible: [true]
141+
il_hbwd_eligible: [true]
142+
143+
# Test 7: Married couple - both disabled - both get exemptions
144+
- name: Case 7, married couple both disabled.
145+
period: 2025-01
146+
absolute_error_margin: 0.3
147+
input:
148+
people:
149+
person1:
150+
age: 50
151+
is_disabled: true
152+
employment_income: 36_000 # $3,000/month * 12
153+
person2:
154+
age: 48
155+
is_disabled: true
156+
employment_income: 24_000 # $2,000/month * 12
157+
spm_units:
158+
spm_unit:
159+
members: [person1, person2]
160+
households:
161+
household:
162+
members: [person1, person2]
163+
state_code: IL
164+
output:
165+
# Both disabled, both get exemptions
166+
# Combined gross $5,000/month, after exemptions < limit
167+
il_hbwd_income_eligible: [true, true]
168+
il_hbwd_eligible: [true, true]
169+
170+
# Test 8: Disabled worker under age 16 - not age eligible
171+
- name: Case 8, disabled worker under age 16.
172+
period: 2025-01
173+
absolute_error_margin: 0.3
174+
input:
175+
people:
176+
person1:
177+
age: 15
178+
is_disabled: true
179+
employment_income: 12_000 # $1,000/month * 12
180+
spm_units:
181+
spm_unit:
182+
members: [person1]
183+
households:
184+
household:
185+
members: [person1]
186+
state_code: IL
187+
output:
188+
# Under 16 - not age eligible for HBWD
189+
il_hbwd_age_eligible: [false]
190+
il_hbwd_eligible: [false]
191+
192+
# Test 9: Disabled worker over age 64 - not age eligible
193+
- name: Case 9, disabled worker over age 64.
194+
period: 2025-01
195+
absolute_error_margin: 0.3
196+
input:
197+
people:
198+
person1:
199+
age: 65
200+
is_disabled: true
201+
employment_income: 24_000 # $2,000/month * 12
202+
spm_units:
203+
spm_unit:
204+
members: [person1]
205+
households:
206+
household:
207+
members: [person1]
208+
state_code: IL
209+
output:
210+
# Over 64 - not age eligible for HBWD
211+
il_hbwd_age_eligible: [false]
212+
il_hbwd_eligible: [false]
213+
214+
# Test 10: Family with disabled parent and children
215+
- name: Case 10, disabled parent with two children.
216+
period: 2025-01
217+
absolute_error_margin: 0.3
218+
input:
219+
people:
220+
person1:
221+
age: 38
222+
is_disabled: true
223+
employment_income: 48_000 # $4,000/month * 12
224+
person2:
225+
age: 12
226+
is_disabled: false
227+
person3:
228+
age: 8
229+
is_disabled: false
230+
spm_units:
231+
spm_unit:
232+
members: [person1, person2, person3]
233+
households:
234+
household:
235+
members: [person1, person2, person3]
236+
state_code: IL
237+
output:
238+
# 3-person household: 350% FPL = $7,455/month
239+
# Only person1 (disabled parent) can be HBWD eligible
240+
# Children not disabled, not age eligible
241+
il_hbwd_eligible: [true, false, false]
242+
243+
# Test 11: Non-disabled, non-blind worker - not eligible
244+
- name: Case 11, non-disabled worker not eligible.
245+
period: 2025-01
246+
absolute_error_margin: 0.3
247+
input:
248+
people:
249+
person1:
250+
age: 30
251+
is_disabled: false
252+
is_blind: false
253+
employment_income: 24_000 # $2,000/month * 12
254+
spm_units:
255+
spm_unit:
256+
members: [person1]
257+
households:
258+
household:
259+
members: [person1]
260+
state_code: IL
261+
output:
262+
# Not disabled or blind - not disability eligible
263+
il_hbwd_disability_eligible: [false]
264+
il_hbwd_eligible: [false]
265+
266+
# Test 12: Married couple at income threshold
267+
- name: Case 12, married couple at income threshold.
268+
period: 2025-01
269+
absolute_error_margin: 0.3
270+
input:
271+
people:
272+
person1:
273+
age: 55
274+
is_disabled: true
275+
employment_income: 48_000 # $4,000/month * 12
276+
person2:
277+
age: 52
278+
is_disabled: false
279+
employment_income: 24_000 # $2,000/month * 12
280+
spm_units:
281+
spm_unit:
282+
members: [person1, person2]
283+
households:
284+
household:
285+
members: [person1, person2]
286+
state_code: IL
287+
output:
288+
# Combined gross $6,000/month
289+
# person1 (disabled) gets exemptions, person2 (not disabled/blind) uses gross
290+
# Combined countable should be just under limit
291+
il_hbwd_income_eligible: [true, true]
292+
il_hbwd_eligible: [true, false] # person2 not disabled/blind

policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/integration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@
143143
input:
144144
state_code: IL
145145
age: 55
146-
is_disabled: false
146+
is_disabled: true # SSDI recipients are disabled
147147
social_security_disability: 18_000 # $1,500/month SSDI
148148
employment_income: 12_000 # $1,000/month part-time
149149
spm_unit_cash_assets: 5_000
150150
output:
151151
il_hbwd_age_eligible: true
152-
il_hbwd_disability_eligible: true # Via SSDI receipt
152+
il_hbwd_disability_eligible: true
153153
il_hbwd_employment_eligible: true
154154
il_hbwd_income_eligible: true
155155
il_hbwd_asset_eligible: true

policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_disability_eligible.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ def formula(person, period, parameters):
1818
# rules related to earned income do not apply" - so we use is_disabled
1919
# (medical definition) instead of is_ssi_disabled (which includes SGA test).
2020
# See: https://il.db101.org/il/programs/health_coverage/how_health/program2b.htm
21+
# SSA recognizes blindness as a category of disability (SSI has Aged, Blind, Disabled).
2122
is_disabled = person("is_disabled", period.this_year)
23+
is_blind = person("is_blind", period)
2224
# Or currently receiving SSDI
2325
receives_ssdi = person("social_security_disability", period) > 0
24-
return is_disabled | receives_ssdi
26+
return is_disabled | is_blind | receives_ssdi

0 commit comments

Comments
 (0)