diff --git a/changelog.d/hi-oss-deeming-minimum-rounding-and-income-cutoff.fixed.md b/changelog.d/hi-oss-deeming-minimum-rounding-and-income-cutoff.fixed.md new file mode 100644 index 00000000000..892fdb80e81 --- /dev/null +++ b/changelog.d/hi-oss-deeming-minimum-rounding-and-income-cutoff.fixed.md @@ -0,0 +1 @@ +Use federal spousal deeming, cent rounding, and the minimum payment for Hawaii Optional State Supplementation. End income eligibility at the combined federal and state benefit ceiling. diff --git a/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/hi_oss.yaml b/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/hi_oss.yaml index df7954fe676..67e80c6e3d4 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/hi_oss.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/hi_oss.yaml @@ -203,3 +203,97 @@ output: hi_oss_couple_rate_applies: [false, false] hi_oss: [784, 892] + +- name: Positive community care payment below one dollar receives the minimum. + period: 2026-01 + input: + state_code: HI + age: 70 + hi_oss_care_facility_type: COMMUNITY_CARE + employment_income: 44_760 + output: + # Countable income is ($44,760 / 12 - $85) / 2 = $1,822.50. + # $994 + $829 - $1,822.50 = $0.50, raised to $1. + hi_oss: 1 + +- name: Community care payment with a third decimal digit rounds up to cents. + period: 2026-01 + input: + state_code: HI + age: 70 + hi_oss_care_facility_type: COMMUNITY_CARE + employment_income: 44_520.12 + output: + # ($44,520.12 / 12 - $85) / 2 = $1,812.505. + # $994 + $829 - $1,812.505 = $10.495, rounded up to $10.50. + hi_oss: 10.50 + +- name: Community care claimant qualifies under both spousal deeming calculations. + period: 2026-10 + input: + people: + claimant: + age: + 2026: 70 + is_tax_unit_head: + 2026: true + social_security: + 2026: 15_840 + hi_oss_care_facility_type: COMMUNITY_CARE + spouse: + age: + 2026: 45 + is_tax_unit_spouse: + 2026: true + marital_units: + couple: + members: [claimant, spouse] + tax_units: + couple: + members: [claimant, spouse] + households: + household: + members: [claimant, spouse] + state_code: + 2026: HI + axes: + - - name: employment_income + period: 2026 + index: 1 + min: 27_180 + max: 53_244 + count: 2 + output: + # Own countable income is $15,840 / 12 - $20 = $1,300. + # Deemed earnings are ($27,180 / 12 - $65) / 2 = $1,100 and + # ($53,244 / 12 - $65) / 2 = $2,186. + # The individual calculation leaves $994 + $829 - $1,300 = $523. + # The couple calculation leaves $1,491 + $1,995 - $2,400 = $1,086 + # or $1,491 + $1,995 - $3,486 = $0. Pay the lesser amount. + hi_oss: [523, 0, 0, 0] + hi_oss_eligible: [true, false, false, false] + ssi_countable_income_monthly: [2_400, 0, 3_486, 0] + +- name: Federal take-up gates community care payment. + period: 2026-01 + input: + state_code: HI + age: 70 + hi_oss_care_facility_type: COMMUNITY_CARE + takes_up_ssi_if_eligible: false + output: + # $0 in countable income gives a full $829 award before applying take-up. + hi_oss: 0 + hi_oss_eligible: true + +- name: The community care minimum also applies in 2025. + period: 2025-01 + input: + state_code: HI + age: 70 + hi_oss_care_facility_type: COMMUNITY_CARE + employment_income: 43_032 + output: + # ($43,032 / 12 - $85) / 2 = $1,750.50. + # $967 + $784 - $1,750.50 = $0.50, raised to $1. + hi_oss: 1 diff --git a/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/integration.yaml index 978f678aced..779bf9ae28d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/hi/dhs/oss/integration.yaml @@ -198,7 +198,7 @@ ssi: 0 # Excess: $1,780 - $967 = $813 # $813 > $784 supplement → $0 - hi_oss_eligible: true + hi_oss_eligible: false hi_oss: 0 - name: Case 8, Medicaid institution individual with low Social Security. @@ -291,3 +291,120 @@ ssi: 334 hi_oss_eligible: true hi_oss: 759.9 + +- name: Community care eligibility ends at the individual combined income ceiling. + period: 2026-01 + input: + person: + age: 70 + hi_oss_care_facility_type: COMMUNITY_CARE + household: + members: [person] + state_code: HI + axes: + - - name: social_security + period: 2026 + min: 22_104 + max: 22_128 + count: 3 + output: + # After the $20 exclusion, $1,842, $1,843 and $1,844 per month + # give $1,822, $1,823 and $1,824 against the $994 + $829 ceiling. + hi_oss_eligible: [true, false, false] + hi_oss: [1, 0, 0] + +- name: Community care couple eligibility ends at the joint combined income ceiling. + period: 2026-01 + input: + people: + claimant: + age: 70 + is_tax_unit_head: true + hi_oss_care_facility_type: COMMUNITY_CARE + spouse: + age: 68 + is_tax_unit_spouse: true + hi_oss_care_facility_type: COMMUNITY_CARE + marital_units: + couple: + members: [claimant, spouse] + tax_units: + couple: + members: [claimant, spouse] + households: + household: + members: [claimant, spouse] + state_code: HI + axes: + - - name: social_security + period: 2026 + min: 42_060 + max: 42_084 + count: 3 + output: + # $3,505, $3,506 and $3,507 per month less $20 give $3,485, + # $3,486 and $3,487 against the $1,491 + $1,995 ceiling. + # At $3,485, the $1 joint remainder splits into $0.50 per spouse, + # raised to $1 for each spouse. + hi_oss_eligible: [true, true, false, false, false, false] + hi_oss: [1, 1, 0, 0, 0, 0] + +- name: Medicaid facility individual eligibility uses the full federal rate. + period: 2026-01 + input: + person: + age: 70 + ssi_lives_in_medical_treatment_facility: true + ssi_medicaid_pays_majority_of_care: true + household: + members: [person] + state_code: HI + axes: + - - name: social_security + period: 2026 + min: 12_696 + max: 12_720 + count: 3 + output: + # $1,058, $1,059 and $1,060 per month less $20 give $1,038, + # $1,039 and $1,040 against the $994 + $45 eligibility ceiling. + # All three exceed the $30 + $45 payment limit. + hi_oss_eligible: [true, false, false] + hi_oss: [0, 0, 0] + +- name: Medicaid facility couple eligibility uses the full joint federal rate. + period: 2026-01 + input: + people: + claimant: + age: 70 + is_tax_unit_head: true + ssi_lives_in_medical_treatment_facility: true + ssi_medicaid_pays_majority_of_care: true + spouse: + age: 68 + is_tax_unit_spouse: true + ssi_lives_in_medical_treatment_facility: true + ssi_medicaid_pays_majority_of_care: true + marital_units: + couple: + members: [claimant, spouse] + tax_units: + couple: + members: [claimant, spouse] + households: + household: + members: [claimant, spouse] + state_code: HI + axes: + - - name: social_security + period: 2026 + min: 19_200 + max: 19_224 + count: 3 + output: + # $1,600, $1,601 and $1,602 per month less $20 give $1,580, + # $1,581 and $1,582 against the $1,491 + $90 eligibility ceiling. + # All three exceed the $60 + $90 payment limit. + hi_oss_eligible: [true, true, false, false, false, false] + hi_oss: [0, 0, 0, 0, 0, 0] diff --git a/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss.py b/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss.py index c78c4dc55a0..a211a386c2e 100644 --- a/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss.py +++ b/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss.py @@ -1,4 +1,7 @@ from policyengine_us.model_api import * +from policyengine_us.variables.gov.ssa.ssi._ssi_state_supplement import ( + ssi_state_supplement, +) class hi_oss(Variable): @@ -11,14 +14,21 @@ class hi_oss(Variable): reference = ( "https://secure.ssa.gov/apps10/poms.nsf/lnx/0501415200SF", "https://secure.ssa.gov/POMS.NSF/lnx/0501415057", + "https://secure.ssa.gov/apps10/poms.nsf/lnx/0501415058#e", + "https://www.ecfr.gov/current/title-20/chapter-III/part-416/subpart-T/section-416.2025", + "https://www.ecfr.gov/current/title-20/chapter-III/part-416/subpart-T/section-416.2020", + "https://secure.ssa.gov/apps10/poms.nsf/lnx/0502001010", ) def formula(person, period, parameters): - # Per POMS SI 02005.001: when federal SSI is payable, the - # full state supplement applies. When countable income - # exceeds the FBR, the excess reduces the supplement - # dollar-for-dollar ("state supplement only" case). - payment_standard = person("hi_oss_payment_amount", period) - uncapped_ssi = person("uncapped_ssi", period) - income_excess = max_(0, -uncapped_ssi) - return max_(0, payment_standard - income_excess) + arrangement = person("hi_oss_living_arrangement", period) + rates = parameters(period).gov.states.hi.dhs.oss.payment + return ssi_state_supplement( + person, + period, + parameters, + rates.individual.amount[arrangement], + rates.couple.amount[arrangement], + federal_payment_rules=True, + joint=person("hi_oss_couple_rate_applies", period), + ) diff --git a/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss_eligible.py b/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss_eligible.py index 9220993c78c..a0bd4e5707a 100644 --- a/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss_eligible.py +++ b/policyengine_us/variables/gov/states/hi/dhs/oss/hi_oss_eligible.py @@ -1,9 +1,18 @@ from policyengine_us.model_api import * +from policyengine_us.variables.gov.ssa.ssi._ssi_living_arrangement_amount import ( + ssi_living_arrangement_amount, +) from policyengine_us.variables.gov.states.hi.dhs.oss.hi_oss_living_arrangement import ( HIOSSLivingArrangement, ) +def _below_income_ceiling(income, ceiling): + # Countable income at the ceiling can land one step lower in float32. + cutoff = np.nextafter(ceiling.astype(income.dtype), -np.inf) + return income < cutoff + + class hi_oss_eligible(Variable): value_type = bool entity = Person @@ -13,15 +22,62 @@ class hi_oss_eligible(Variable): reference = ( "https://secure.ssa.gov/apps10/poms.nsf/lnx/0501415200SF", "https://secure.ssa.gov/POMS.NSF/lnx/0501415057", + "https://secure.ssa.gov/apps10/poms.nsf/lnx/0502005001", + "https://secure.ssa.gov/apps10/poms.nsf/lnx/0501320430", ) def formula(person, period, parameters): - # Per POMS SI 01401.001, "state supplement only" cases have - # countable income above the FBR but below the combined - # payment level. They receive $0 federal SSI but still - # qualify for a reduced state supplement. Eligibility is - # therefore categorical (is_ssi_eligible), not ssi > 0. is_eligible = person("is_ssi_eligible", period) - living_arrangement = person("hi_oss_living_arrangement", period) - in_qualifying_facility = living_arrangement != HIOSSLivingArrangement.NONE - return is_eligible & in_qualifying_facility + arrangement = person("hi_oss_living_arrangement", period) + in_qualifying_facility = arrangement != HIOSSLivingArrangement.NONE + in_medicaid_facility = ( + arrangement == HIOSSLivingArrangement.MEDICAID_INSTITUTION + ) + + countable = person("ssi_countable_income_monthly", period) + deeming = person("is_ssi_spousal_deeming_applies_monthly", period) + joint = person("hi_oss_couple_rate_applies", period) + federal = parameters(period).gov.ssa.ssi.amount + rates = parameters(period).gov.states.hi.dhs.oss.payment + individual_rate = rates.individual.amount[arrangement] + couple_rate = rates.couple.amount[arrangement] + + # A Medicaid facility limits payment while eligibility uses the full FBR. + federal_rate = where( + in_medicaid_facility, + where( + deeming, + federal.couple, + where(joint, federal.couple / 2, federal.individual), + ), + person("ssi_amount_if_eligible", period), + ) + supplement_rate = where( + deeming, + max_(individual_rate, couple_rate), + person("hi_oss_payment_amount", period), + ) + below_ceiling = _below_income_ceiling(countable, federal_rate + supplement_rate) + + # Deeming also requires eligibility on the claimant's own income. + own_income = max_( + countable + - person("ssi_income_deemed_from_ineligible_spouse_monthly", period), + 0, + ) + own_federal_rate = where( + in_medicaid_facility, + federal.individual, + ssi_living_arrangement_amount( + person, period, parameters, federal.individual + ), + ) + below_own_ceiling = _below_income_ceiling( + own_income, own_federal_rate + individual_rate + ) + return ( + is_eligible + & in_qualifying_facility + & below_ceiling + & (~deeming | below_own_ceiling) + )