Skip to content
Draft
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/fixed/8186.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use the number of current pregnancies when increasing WIC family size for pregnant applicants.
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@
is_pregnant: false
output:
wic_fpg: 12_880

- name: Case 7, twin pregnancy increases family size by two.
period: 2021-01
absolute_error_margin: 0.1
input:
spm_unit_size: 1
current_pregnancies: 2
output:
wic_fpg: 1_830
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@
state_code: GU
output:
wic_income_limit: 39_128

- name: Twin pregnancy increases the WIC income unit by two.
period: 2026-01
input:
people:
person1:
age: 30
current_pregnancies: 2
spm_units:
spm_unit:
members: [person1]
output:
wic_income_limit: 49_303
13 changes: 9 additions & 4 deletions policyengine_us/variables/gov/usda/wic/wic_fpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@ class wic_fpg(Variable):
value_type = float
entity = SPMUnit
definition_period = MONTH
documentation = "Federal poverty guideline for WIC, with family size incremented by one for pregnant women"
documentation = "Federal poverty guideline for WIC, with family size incremented by the number of embryos or fetuses for pregnant applicants"
label = "Pregnancy-adjusted poverty line for WIC"
reference = "https://www.law.cornell.edu/uscode/text/42/1786#d_2_D"
reference = [
"https://www.law.cornell.edu/uscode/text/42/1786#d_2_D",
"https://www.law.cornell.edu/cfr/text/7/246.7#d_2_vii",
]
unit = USD

def formula(spm_unit, period, parameters):
pregnant = spm_unit.any(spm_unit.members("is_pregnant", period))
current_pregnancies = spm_unit.sum(
spm_unit.members("current_pregnancies", period.this_year)
)
# The system divides annual variables by 12 automatically when bringing them down to a month.
# The normal FPG is an annual variable, so the system divides it by 12 by default.
normal_fpg = spm_unit("spm_unit_fpg", period)
state_group = spm_unit.household("state_group_str", period)
additional = parameters(period).gov.hhs.fpg.additional_person[state_group]
annual_pregnant_addition = additional * pregnant
annual_pregnant_addition = additional * current_pregnancies
# The additional amount is based on a yearly parameter, so we need to manually divide it by 12.
monthly_pregnant_addition = annual_pregnant_addition / MONTHS_IN_YEAR
return normal_fpg + monthly_pregnant_addition
7 changes: 5 additions & 2 deletions policyengine_us/variables/gov/usda/wic/wic_income_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ class wic_income_limit(Variable):
documentation = "Annual income limit for WIC direct income eligibility"
reference = [
"https://www.law.cornell.edu/uscode/text/42/1786#d_2_A_i",
"https://www.law.cornell.edu/cfr/text/7/246.7#d_2_vii",
"https://www.fns.usda.gov/wic/income-eligibility-guidelines-2025-26",
]

def formula(spm_unit, period, parameters):
spm_unit_size = spm_unit("spm_unit_size", period.this_year)
pregnant = spm_unit.any(spm_unit.members("is_pregnant", period))
wic_unit_size = spm_unit_size + pregnant
current_pregnancies = spm_unit.sum(
spm_unit.members("current_pregnancies", period.this_year)
)
wic_unit_size = spm_unit_size + current_pregnancies

state_group = spm_unit.household("state_group_str", period.this_year)
wic_state_group = np.where(
Expand Down
Loading