diff --git a/changelog.d/ok-ssp-deeming-gross-wages-and-allocations.fixed.md b/changelog.d/ok-ssp-deeming-gross-wages-and-allocations.fixed.md new file mode 100644 index 00000000000..e9b423ec124 --- /dev/null +++ b/changelog.d/ok-ssp-deeming-gross-wages-and-allocations.fixed.md @@ -0,0 +1 @@ +Corrected Oklahoma State Supplemental Payments by counting rounded gross parental wages and excluding children who received public income-maintenance payments from the ineligible spouse’s child allocation. diff --git a/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/integration.yaml index f7934e0b239..c3d267ee353 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/integration.yaml @@ -884,3 +884,75 @@ # Combined: (3_467 - 498 - 85) / 2 = 1_442 + 297.17 = 1_739.17 > 1_532. # Allocating for the student too gave 1_193 + 297.17 = 1_490.17 and $40. ok_ssp: [0, 0, 0, 0] + +- name: A parent's cafeteria-plan deductions do not reduce Oklahoma wages + period: 2026-07 + absolute_error_margin: 0.01 + input: + people: + parent: + age: {"2026": 40} + person_id: {"2026": 1} + employment_income: {"2026": 33_612} + pre_tax_health_insurance_premiums: {"2026": 2_880} + claimant: + age: {"2026": 9} + person_id: {"2026": 2} + parent_1_id: {"2026": 1} + meets_ssi_disability_criteria: {"2026": true} + marital_units: + parent_unit: + members: [parent] + claimant_unit: + members: [claimant] + families: + family: + members: [parent, claimant] + households: + home: + members: [parent, claimant] + state_code: {"2026": OK} + output: + # Oklahoma deems (33_612 / 12 - 20 - 65) / 2 - 994 = 364. + ok_ssp_unearned_income_deemed_from_ineligible_parent: [0, 364] + # Federal SSI deems ((33_612 - 2_880) / 12 - 20 - 65) / 2 - 994 + # = 244. SSI pays 994 - (244 - 20) = 770. + ssi: [0, 770] + people: + claimant: + # Oklahoma counts 364 - 20 + 770 = 1_114, above 1_034. + ok_ssp_own_countable_income: 1_114 + ok_ssp: [0, 0] + +- name: A child receiving TANF gets no Oklahoma spousal allocation + period: 2026-07 + absolute_error_margin: 0.01 + input: + people: + claimant: + age: {"2026": 45} + meets_ssi_disability_criteria: {"2026": true} + spouse: + age: {"2026": 43} + employment_income: {"2026": 12_000} + child: + age: {"2026": 10} + ssi_receives_public_income_maintenance: {"2026": true} + marital_units: + couple: + members: [claimant, spouse] + child_unit: + members: [child] + families: + family: + members: [claimant, spouse, child] + households: + home: + members: [claimant, spouse, child] + state_code: {"2026": OK} + output: + ok_ssp_ineligible_child: [false, false, true] + # TANF bars the entire 498 allocation. Countable earnings rise by + # 498 / 2 = 249, from (1_000 - 498 - 85) / 2 to (1_000 - 85) / 2. + ok_ssp_spouse_child_allocation: [0, 0, 0] + ok_ssp: [40, 0, 0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/ok_ssp_spouse_child_allocation.yaml b/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/ok_ssp_spouse_child_allocation.yaml new file mode 100644 index 00000000000..c76be83f0c7 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/ok_ssp_spouse_child_allocation.yaml @@ -0,0 +1,49 @@ +- name: Bar allocation in the only month with a child-only TANF payment + period: 2026-07 + input: + people: + claimant: + age: {"2026": 45} + meets_ssi_disability_criteria: {"2026": true} + spouse: + age: {"2026": 43} + employment_income: {"2026": 12_000} + child: + age: {"2026": 10} + marital_units: + couple: {members: [claimant, spouse]} + child_unit: {members: [child]} + families: + family: {members: [claimant, spouse, child]} + households: + home: {members: [claimant, spouse, child], state_code: {"2026": OK}} + spm_units: + adults: {members: [claimant, spouse]} + child_only: + members: [child] + ok_tanf: {2026-07: 100, 2026-08: 0} + output: + # July: a $100 TANF payment bars the entire allocation. + # August: without TANF or other income the allocation is 498 - 0. + ok_ssp_spouse_child_allocation: + 2026-07: [0, 0, 0] + 2026-08: [498, 498, 498] + +- name: Bar child allocation before and after the 2022 OHCA revision + period: 2022-09 + input: + gov.states.ok.dhs.ssp.child_allocation: 420 # Fixture for the allocation. + people: + child: + ok_ssp_ineligible_child: {2022-09: true, 2022-10: true} + ssi_receives_public_income_maintenance: {"2022": true} + families: + family: {members: [child]} + households: + home: {members: [child], state_code: {"2022": OK}} + output: + # OHCA APA WF 21-28, p. 22 shows the receipt rule predates the revision. + # Receipt bars the entire $420 fixture allocation in both months. + ok_ssp_spouse_child_allocation: + 2022-09: [0] + 2022-10: [0] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/ok_ssp_unearned_income_deemed_from_ineligible_parent.yaml b/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/ok_ssp_unearned_income_deemed_from_ineligible_parent.yaml new file mode 100644 index 00000000000..d195590a17a --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ok/dhs/ssp/ok_ssp_unearned_income_deemed_from_ineligible_parent.yaml @@ -0,0 +1,87 @@ +- name: Round parental gross wages at fifty cents + period: 2026-07 + absolute_error_margin: 0.01 + input: + people: + parent: &parent + age: {"2026": 40} + person_id: {"2026": 1} + employment_income: {"2026": 33_618} + pre_tax_health_insurance_premiums: {"2026": 954} + claimant: &claimant + age: {"2026": 9} + person_id: {"2026": 2} + parent_1_id: {"2026": 1} + meets_ssi_disability_criteria: {"2026": true} + marital_units: &marital_units + adult: {members: [parent]} + child: {members: [claimant]} + families: &families + family: {members: [parent, claimant]} + households: &households + home: {members: [parent, claimant], state_code: {"2026": OK}} + output: + # Federal SSI uses (33_618 - 954) / 12 = 2_722 and deems + # (2_722 - 85) / 2 - 994 = 324.50. SSI pays 994 - (324.50 - 20). + ssi: [0, 689.50] + # Oklahoma rounds 33_618 / 12 = 2_801.50 to 2_802, then + # deems (2_802 - 85) / 2 - 994 = 364.50. + ok_ssp_unearned_income_deemed_from_ineligible_parent: [0, 364.50] + people: + claimant: + # 364.50 - 20 + 689.50 = 1_034, so 1_034 - 1_034 = 0. + ok_ssp_own_countable_income: 1_034 + ok_ssp: 0 + +- name: Honor a zero annual SSI earnings override + period: 2026-07 + input: + people: + parent: {<<: *parent, ssi_earned_income: {"2026": 0}} + claimant: *claimant + marital_units: *marital_units + families: *families + households: *households + output: + # The supplied earned income is 0 / 12, so no income is deemed. + ok_ssp_unearned_income_deemed_from_ineligible_parent: [0, 0] + +- name: Divide an explicit annual deemed income override by twelve + period: 2026-07 + input: + people: + parent: *parent + claimant: + <<: *claimant + ssi_unearned_income_deemed_from_ineligible_parent: {"2026": 240} + marital_units: *marital_units + families: *families + households: *households + output: + # 240 / 12 = 20. + ok_ssp_unearned_income_deemed_from_ineligible_parent: [0, 20] + +- name: Count parental gross wages before and after the 2022 OHCA revision + period: 2022-09 + input: + people: + parent: + age: {"2022": 40} + person_id: {"2022": 1} + employment_income: {"2022": 33_612} + pre_tax_health_insurance_premiums: {"2022": 2_880} + claimant: + age: {"2022": 9} + person_id: {"2022": 2} + parent_1_id: {"2022": 1} + meets_ssi_disability_criteria: {"2022": true} + marital_units: *marital_units + families: *families + households: + home: {members: [parent, claimant], state_code: {"2022": OK}} + output: + # OHCA APA WF 21-28, p. 9 shows the gross wage rule predates the revision. + # (33_612 / 12 - 85) / 2 - 841 = 517 each month. + ok_ssp_unearned_income_deemed_from_ineligible_parent: + 2022-09: [0, 517] + 2022-10: [0, 517] diff --git a/policyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_parent/_ssi_parental_deemed_income.py b/policyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_parent/_ssi_parental_deemed_income.py index be2f4491f96..ce2dcedbfdb 100644 --- a/policyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_parent/_ssi_parental_deemed_income.py +++ b/policyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_parent/_ssi_parental_deemed_income.py @@ -14,7 +14,7 @@ def ssi_parental_deemed_income( - person, period, parameters, allocations=None, recipients=None + person, period, parameters, allocations=None, recipients=None, *, earned_income=None ): """Income deemed to each eligible child from ineligible parents in a month. @@ -23,6 +23,7 @@ def ssi_parental_deemed_income( define an ineligible child more narrowly passes its own allocations, so its parental budget follows its rules while SSI's stays unchanged. `recipients` can replace the SSI recipient set for a state program. + `earned_income` lets a state supply its own monthly earnings per person. """ if recipients is None: immigration_status = person("immigration_status", period) @@ -44,7 +45,9 @@ def ssi_parental_deemed_income( spouse, spouse_files_elsewhere = _spouse_filing_elsewhere( person, period, ineligible_parent ) - earned = person("ssi_earned_income", period) + earned = ( + person("ssi_earned_income", period) if earned_income is None else earned_income + ) unearned = person("ssi_unearned_income", period) prereduction_parental_earned_income = eligible_child * tax_unit.sum( diff --git a/policyengine_us/variables/gov/states/ok/dhs/ssp/_ok_ssp_income.py b/policyengine_us/variables/gov/states/ok/dhs/ssp/_ok_ssp_income.py index bbff4771c12..440513c6222 100644 --- a/policyengine_us/variables/gov/states/ok/dhs/ssp/_ok_ssp_income.py +++ b/policyengine_us/variables/gov/states/ok/dhs/ssp/_ok_ssp_income.py @@ -36,9 +36,7 @@ def ok_ssp_income(person, period, parameters, *, combined): # (OAC 340:15-1-2, 340:15-1-6(b)(1)). # NOTE: it keeps the federal allocation amount (couple FBR minus # individual FBR, 497 in 2026); Appendix C-1 Schedule VIII.C lists 498, - # so a sibling's allocation can be $1 lower. It also uses SSI's earned - # income, which excludes the parents' pre-tax health premiums that - # 317:35-5-42(b)(9)(A) counts as wages. + # so a sibling's allocation can be $1 lower. unearned = unearned + person( "ok_ssp_unearned_income_deemed_from_ineligible_parent", period ) diff --git a/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_spouse_child_allocation.py b/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_spouse_child_allocation.py index d86a2569ead..315afed3eac 100644 --- a/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_spouse_child_allocation.py +++ b/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_spouse_child_allocation.py @@ -1,3 +1,5 @@ +from policyengine_core.data_storage.store_history import next_sequence_number + from policyengine_us.model_api import * @@ -8,6 +10,8 @@ class ok_ssp_spouse_child_allocation(Variable): definition_period = MONTH unit = USD reference = ( + # OAC 317:35-5-42(m)(2)(B) and (l)(2). + "https://www.oklahoma.gov/ohca/policies-and-rules/xpolicy/medical-assistance-for-adults-and-children-eligibility/eligibility-and-countable-income/countable-income-and-resources/determination-of-countable-income-for-individuals-categorically-.html", "https://www.law.cornell.edu/regulations/oklahoma/OAC-340-15-1-5", # OAC 340:15-1-2, as proposed in OKDHS circulation WF 22-15. "https://oklahoma.gov/content/dam/ok/en/okdhs/documents/okdhs-pdf-library/policy/proposed-policy/2022-perms/22-15%20Circulation.pdf#page=7", @@ -15,13 +19,28 @@ class ok_ssp_spouse_child_allocation(Variable): documentation = ( "The total allocation for the family's unmarried SSI-ineligible children " "who are not household heads and are younger than 18 (OAC 340:15-1-2). " - "Each allocation is reduced by the child's own income. Blended families " - "and children in a TANF case are not modeled separately." + "Each allocation is reduced by the child's own income. A child receiving " + "public income-maintenance payments gets no allocation. A supplied " + "monthly Oklahoma TANF payment for a child-only SPM unit establishes " + "receipt for the children in that unit for that month." ) def formula(person, period, parameters): p = parameters(period).gov.states.ok.dhs.ssp child = person("ok_ssp_ineligible_child", period) + receives_payment = person("ssi_receives_public_income_maintenance", period) + # Use reported TANF payments to establish receipt. A unit with adults + # and children does not identify which members are on the grant. + simulation = person.simulation + holder = simulation.get_holder("ok_tanf") + # A branch can supply the first payment after this budget is cached. + holder._record_store(period, next_sequence_number()) + if has_input_for_period(simulation, "ok_tanf", period): + child_only = person.spm_unit.all(person("is_child", period.this_year)) + receives_payment = receives_payment | ( + child_only & (person.spm_unit("ok_tanf", period) > 0) + ) + child = child & ~receives_payment child_income = max_(person("ssi_earned_income", period), 0) + max_( person("ssi_unearned_income", period), 0 ) diff --git a/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_unearned_income_deemed_from_ineligible_parent.py b/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_unearned_income_deemed_from_ineligible_parent.py index 85954b159e0..41888feb954 100644 --- a/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_unearned_income_deemed_from_ineligible_parent.py +++ b/policyengine_us/variables/gov/states/ok/dhs/ssp/ok_ssp_unearned_income_deemed_from_ineligible_parent.py @@ -15,13 +15,16 @@ class ok_ssp_unearned_income_deemed_from_ineligible_parent(Variable): definition_period = MONTH defined_for = StateCode.OK reference = ( + # OAC 317:35-5-42(b)(9)(A), (i) and (n)(1). + "https://www.oklahoma.gov/ohca/policies-and-rules/xpolicy/medical-assistance-for-adults-and-children-eligibility/eligibility-and-countable-income/countable-income-and-resources/determination-of-countable-income-for-individuals-categorically-.html", "https://www.law.cornell.edu/regulations/oklahoma/OAC-340-15-1-6", # OAC 340:15-1-2, as proposed in OKDHS circulation WF 22-15. "https://oklahoma.gov/content/dam/ok/en/okdhs/documents/okdhs-pdf-library/policy/proposed-policy/2022-perms/22-15%20Circulation.pdf#page=7", ) documentation = ( "SSI's monthly parental deeming, with the ineligible-child " - "allocation limited to children younger than 18 (OAC 340:15-1-2)." + "allocation limited to children younger than 18 (OAC 340:15-1-2) " + "and monthly gross wages rounded before exclusions." ) def formula(person, period, parameters): @@ -36,4 +39,16 @@ def formula(person, period, parameters): allocations = person( "ssi_ineligible_child_allocation_monthly", period ) * person("ok_ssp_ineligible_child", period) - return ssi_parental_deemed_income(person, period, parameters, allocations) + earned_income = None + if annual_input(person, period, "ssi_earned_income") is None: + # OAC 317:35-5-42(b)(9)(A) and (i) round monthly gross wages + # before exclusions and before pooling earnings across parents. + wages = person("employment_income", period) + sources = parameters(period).gov.ssa.ssi.income.sources.earned + other_sources = [ + source for source in sources if source != "employment_income" + ] + earned_income = np.floor(wages + 0.5) + add(person, period, other_sources) + return ssi_parental_deemed_income( + person, period, parameters, allocations, earned_income=earned_income + )