From eee0ac9b4942c2c166020fc0be490d560eacf180 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 1 Dec 2026 07:36:43 +0000 Subject: [PATCH] Charge Tennessee child care bills to children in care Co-Authored-By: GPT-6.2 Sol --- ...tn-ccap-bill-for-children-in-care.fixed.md | 1 + .../gov/states/tn/dhs/ccap/tn_ccap.yaml | 95 ++++++++++++++++++- .../tn/dhs/ccap/tn_child_care_subsidies.yaml | 73 ++++++++++++++ .../gov/states/tn/dhs/ccap/tn_ccap.py | 27 +++++- 4 files changed, 191 insertions(+), 5 deletions(-) create mode 100644 changelog.d/tn-ccap-bill-for-children-in-care.fixed.md diff --git a/changelog.d/tn-ccap-bill-for-children-in-care.fixed.md b/changelog.d/tn-ccap-bill-for-children-in-care.fixed.md new file mode 100644 index 00000000000..8662d347ad7 --- /dev/null +++ b/changelog.d/tn-ccap-bill-for-children-in-care.fixed.md @@ -0,0 +1 @@ +Fix Tennessee child care assistance so a sibling without paid care no longer reduces reimbursement for a child in care. diff --git a/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_ccap.yaml b/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_ccap.yaml index 456177c172e..d6a069b9108 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_ccap.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_ccap.yaml @@ -1,7 +1,7 @@ # tn_ccap: SPMUnit, float (USD), MONTH # Benefit = min(monthly pre-subsidy childcare expenses, annualized max weekly # benefit) - copay, floored at 0. Only computed when tn_ccap_eligible. -# All cases: family of 2 (parent + preschooler age 4), Davidson County (Top Tier), +# Cases 1–8: family of 2 (parent + preschooler age 4), Davidson County (Top Tier), # child care center, state rate, full-time. Max weekly = 208; annualized monthly # max = 208 * 52 / 12 = 901.33. Currency output, margin 0.01. @@ -227,6 +227,8 @@ tn_ccap_copay: 0 # benefit = min(1_000, 0) - 0 = 0 tn_ccap: 0 + # No care all year means $0 * 12 months. + tn_child_care_subsidies: {2026: 0} - name: Case 8, benefit is zero before reimbursement rates take effect. period: 2024-01 @@ -254,3 +256,94 @@ county_str: DAVIDSON_COUNTY_TN output: tn_ccap: 0 + +- name: Case 9, a sibling without paid care leaves the Families First award whole. + period: 2026-01 + absolute_error_margin: 0.01 + input: &one_child_in_care + people: &families_first_people + parent: + age: 30 + employment_income_before_lsr: 0 + child: &attending_child + age: 4 + immigration_status: CITIZEN + childcare_hours_per_week: 35 + tn_ccap_max_weekly_benefit: 200 + sibling: + age: 3 + immigration_status: CITIZEN + childcare_hours_per_week: 0 + spm_units: + spm_unit: &families_first_unit + members: &family_members [parent, child, sibling] + meets_ccdf_activity_test: true + is_tanf_enrolled: true + spm_unit_pre_subsidy_childcare_expenses: 6_000 + households: + household: + members: *family_members + state_code: TN + county_str: DAVIDSON_COUNTY_TN + output: + tn_ccap_max_weekly_benefit: [0, 200, 0] + tn_ccap_copay: 0 + # One provider's charge is $6,000 / 12 = $500, below $200 * 52 / 12. + tn_ccap: 500 + +- name: Case 10, the full provider charge remains subject to the weekly cap. + period: 2026-01 + absolute_error_margin: 0.01 + input: + <<: *one_child_in_care + spm_units: + spm_unit: + <<: *families_first_unit + spm_unit_pre_subsidy_childcare_expenses: 12_000 + output: + # The $12,000 / 12 = $1,000 provider charge is capped at $200 * 52 / 12. + tn_ccap: 866.67 + +- name: Case 11, an explicit bill for the child in care keeps its full value. + period: 2026-01 + absolute_error_margin: 0.01 + input: + <<: *one_child_in_care + people: + <<: *families_first_people + child: + <<: *attending_child + pre_subsidy_childcare_expenses: 6_000 + spm_units: + spm_unit: + <<: *families_first_unit + spm_unit_pre_subsidy_childcare_expenses: 0 + output: + # The child's own $6,000 / 12 = $500 charge is below $200 * 52 / 12. + tn_ccap: 500 + +- name: Case 12, two children in care share the bill even if one has a zero rate. + period: 2026-01 + absolute_error_margin: 0.01 + input: + people: + <<: *families_first_people + older_child: + age: 14 + immigration_status: CITIZEN + childcare_hours_per_day: 2 + spm_units: + spm_unit: + <<: *families_first_unit + members: &mixed_family_members [parent, child, sibling, older_child] + spm_unit_pre_subsidy_childcare_expenses: 12_000 + households: + household: + members: *mixed_family_members + state_code: TN + county_str: DAVIDSON_COUNTY_TN + output: + tn_ccap_max_weekly_benefit: [0, 200, 0, 0] + # Each attending child's share is $12,000 / 12 / 2 = $500. + # The older child's rate is zero and the other provider's full $500 is paid. + tn_ccap: 500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_child_care_subsidies.yaml b/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_child_care_subsidies.yaml index 57a67e6346b..cf386b95508 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_child_care_subsidies.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/tn/dhs/ccap/tn_child_care_subsidies.yaml @@ -89,3 +89,76 @@ output: tn_child_care_subsidies: 0 child_care_subsidies: 0 + +- name: Case 4, Families First pays a single provider charge below the cap. + period: 2026 + absolute_error_margin: 0.01 + input: &one_provider + people: &one_provider_people + parent: + age: 30 + employment_income_before_lsr: 0 + child: + age: 4 + immigration_status: CITIZEN + childcare_hours_per_week: 35 + tn_ccap_max_weekly_benefit: + {2026-01: 200, 2026-02: 200, 2026-03: 200, 2026-04: 200, + 2026-05: 200, 2026-06: 200, 2026-07: 200, 2026-08: 200, + 2026-09: 200, 2026-10: 200, 2026-11: 200, 2026-12: 200} + spm_units: + spm_unit: &one_provider_unit + members: [parent, child] + spm_unit_pre_subsidy_childcare_expenses: 6_000 + meets_ccdf_activity_test: true + is_tanf_enrolled: + {2026-01: true, 2026-02: true, 2026-03: true, 2026-04: true, + 2026-05: true, 2026-06: true, 2026-07: true, 2026-08: true, + 2026-09: true, 2026-10: true, 2026-11: true, 2026-12: true} + households: + household: &one_provider_home + members: [parent, child] + state_code: TN + county_str: DAVIDSON_COUNTY_TN + output: + # The $6,000 / 12 = $500 monthly charge is below $200 * 52 / 12. + # The annual award is $500 * 12 = $6,000. + tn_ccap: {2026-01: 500} + tn_child_care_subsidies: 6_000 + +- name: Case 5, a sibling without paid care leaves the annual charge covered. + period: 2026 + absolute_error_margin: 0.01 + input: &provider_and_sibling + <<: *one_provider + people: + <<: *one_provider_people + sibling: + age: 3 + immigration_status: CITIZEN + childcare_hours_per_week: 0 + spm_units: + spm_unit: &siblings_unit + <<: *one_provider_unit + members: &siblings_members [parent, child, sibling] + households: + household: + <<: *one_provider_home + members: *siblings_members + output: + # One provider still charges $500 per month, so $500 * 12 = $6,000. + tn_child_care_subsidies: 6_000 + +- name: Case 6, the weekly cap limits the full annual provider charge. + period: 2026 + absolute_error_margin: 0.01 + input: + <<: *provider_and_sibling + spm_units: + spm_unit: + <<: *siblings_unit + spm_unit_pre_subsidy_childcare_expenses: 12_000 + output: + # The $1,000 monthly charge exceeds $200 * 52 / 12. + # The annual award is $200 * 52 = $10,400. + tn_child_care_subsidies: 10_400 diff --git a/policyengine_us/variables/gov/states/tn/dhs/ccap/tn_ccap.py b/policyengine_us/variables/gov/states/tn/dhs/ccap/tn_ccap.py index e36dc3f1cee..60bc0aa4b65 100644 --- a/policyengine_us/variables/gov/states/tn/dhs/ccap/tn_ccap.py +++ b/policyengine_us/variables/gov/states/tn/dhs/ccap/tn_ccap.py @@ -8,7 +8,10 @@ class tn_ccap(Variable): label = "Tennessee CCAP benefit amount" definition_period = MONTH defined_for = "tn_ccap_eligible" - reference = "https://www.tn.gov/content/dam/tn/human-services/documents/Reimbursement_Rate_Chart_1.1.26.pdf" + reference = ( + "https://publications.tnsosfiles.com/rules/1240/1240-01/1240-01-54.20170308.pdf#page=1", + "https://www.tn.gov/content/dam/tn/human-services/documents/Reimbursement_Rate_Chart_1.1.26.pdf", + ) def formula(spm_unit, period, parameters): p = parameters(period).gov.states.tn.dhs.ccap @@ -24,10 +27,26 @@ def formula(spm_unit, period, parameters): person = spm_unit.members max_weekly_benefit = person("tn_ccap_max_weekly_benefit", period) max_monthly_benefit = max_weekly_benefit * (WEEKS_IN_YEAR / MONTHS_IN_YEAR) - # Per-child share of the family's childcare expenses. Ineligible - # children draw a zero rate through tn_ccap_max_weekly_benefit's - # defined_for, so they contribute nothing. + year = period.this_year + # Children can qualify through age 18 under the special eligibility rules. + is_child = person("is_child", year) | person("tn_ccap_eligible_child", period) + in_care = is_child & ( + (person("childcare_hours_per_week", year) > 0) + | (person("childcare_hours_per_day", year) > 0) + | (person("childcare_attending_days_per_month", year) > 0) + | (person("childcare_days_per_week", year) > 0) + ) + + # Children in care keep their own charges and split the other shares. child_expenses = person("pre_subsidy_childcare_expenses", period) + children_in_care = spm_unit.sum(in_care) + other_expenses = spm_unit.sum(where(in_care, 0, child_expenses)) + extra_share = spm_unit.project(other_expenses / max_(children_in_care, 1)) + allocated_expenses = where(in_care, child_expenses + extra_share, 0) + child_expenses = where( + spm_unit.project(children_in_care > 0), allocated_expenses, child_expenses + ) + # Reimbursement is the lesser of the provider charge and the state rate, # less the parent copay. capped_expenses = spm_unit.sum(min_(child_expenses, max_monthly_benefit))