Skip to content

Commit 3014e9c

Browse files
baogorekclaude
andcommitted
Remove wic_nutritional_risk_imputed, make is_wic_at_nutritional_risk data-read
Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 76e4039 commit 3014e9c

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

policyengine_us/tests/policy/baseline/gov/usda/wic/is_wic_at_nutritional_risk.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# Nutritional risk is a health assessment per 42 U.S.C. § 1786(b)(8).
2-
# In individual simulation, draw defaults to 0, so all persons in a
3-
# WIC-eligible category are assessed at nutritional risk (0 < rate).
4-
# In microsimulation, risk is assigned probabilistically by category.
1+
# Nutritional risk is resolved in the data package for microsimulation.
2+
# In individual simulation, default_value = True so all persons are assumed
3+
# at nutritional risk. NONE-category adults still get True, but is_wic_eligible
4+
# gates on demographic eligibility (category != NONE), so it's benign.
55

6-
- name: Case 1, infant at nutritional risk (draw=0, INFANT rate=0.95).
6+
- name: Case 1, infant at nutritional risk (default True).
77
period: 2024-01
88
input:
99
age: 0
1010
output:
1111
is_wic_at_nutritional_risk: true
1212

13-
- name: Case 2, child at nutritional risk (draw=0, CHILD rate=0.752).
13+
- name: Case 2, child at nutritional risk (default True).
1414
period: 2024-01
1515
input:
1616
age: 3
1717
output:
1818
is_wic_at_nutritional_risk: true
1919

20-
- name: Case 3, non-WIC adult not at nutritional risk (NONE rate=0).
20+
- name: Case 3, non-WIC adult (default True, benign — gated by is_wic_eligible).
2121
period: 2024-01
2222
input:
2323
age: 35
2424
output:
25-
is_wic_at_nutritional_risk: false
25+
is_wic_at_nutritional_risk: true
2626

2727
- name: Case 4, person receiving WIC is at nutritional risk.
2828
period: 2024-01

policyengine_us/variables/gov/usda/wic/is_wic_at_nutritional_risk.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,4 @@ class is_wic_at_nutritional_risk(Variable):
88
documentation = "Assessed as being at nutritional risk for the Special Supplemental Nutrition Program for Women, Infants and Children (WIC)"
99
label = "At nutritional risk for WIC"
1010
reference = "https://www.law.cornell.edu/uscode/text/42/1786#b_8"
11-
12-
def formula(person, period, parameters):
13-
wic_reported = person("receives_wic", period)
14-
imputed_risk = person("wic_nutritional_risk_imputed", period)
15-
category = person("wic_category", period)
16-
has_wic_category = category != category.possible_values.NONE
17-
return wic_reported | (imputed_risk & has_wic_category)
11+
default_value = True

policyengine_us/variables/gov/usda/wic/wic_nutritional_risk_imputed.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)