Skip to content

Commit

Permalink
California CAPI (Cash Assistance Program for Immigrants)
Browse files Browse the repository at this point in the history
Fixes #5416
  • Loading branch information
PavelMakarchuk committed Dec 27, 2024
1 parent d76e9bb commit fdd96f7
Show file tree
Hide file tree
Showing 21 changed files with 353 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides an CAPI amount for dependents below this age threshold.
metadata:
unit: year
period: year
label: California CAPI aged or disabled age threshold
reference:
- title: California Eligibility and Assistance Standards Chapter 49-025 (.1)
href: https://www.cdss.ca.gov/Portals/9/CAPI/CAPI_Regulations-Accessible.pdf#page=19
values:
1991-01-01: 65
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI amount to two eligible aged or disabled married filers.
metadata:
unit: currency-USD
period: month
label: California CAPI aged or disabled allowance married amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (d)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 1_167
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI amount to aged or disabled single filers.
metadata:
unit: currency-USD
period: month
label: California CAPI aged or disabled allowance single amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (c)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 630
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI food allowance for married adults whose living arrangements prevents them from preparing their own meals.
metadata:
unit: currency-USD
period: month
label: California CAPI food allowance married amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (e)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 136
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI food allowance for single adults whose living arrangements prevents them from preparing their own meals.
metadata:
unit: currency-USD
period: month
label: California CAPI food allowance single amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (e)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 68
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI allowance for filers receiving care in a medical facility.
metadata:
unit: currency-USD
period: month
label: California CAPI medical care facility allowance amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (h)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 42 # $30 + $12
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI allowance for filers in a nonmedical out-of-home care facility.
metadata:
unit: currency-USD
period: month
label: California CAPI out-of-home care allowance amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (g)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 709
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI amount to married filers with one blind member who are both eligible.
metadata:
unit: currency-USD
period: month
label: California CAPI blind allowance married one blind amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (b)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 1_295
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI amount to married filers with two blind members who are both eligible.
metadata:
unit: currency-USD
period: month
label: California CAPI blind allowance married two blind amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (a)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 1_372
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI amount to single filers who are blind.
metadata:
unit: currency-USD
period: month
label: California CAPI blind allowance single amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (a)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 704
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides an CAPI amount for dependents below this age threshold.
metadata:
unit: year
period: year
label: California CAPI dependent age limit
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (f)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 18
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: California provides the following CAPI amount for eligible dependents.
metadata:
unit: currency-USD
period: month
label: California CAPI dependent amount
reference:
- title: California Welfare and Institutions Code Division 9, Part 3, Chapter 3, Article 5, Section 12200 (f)
href: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=WIC&sectionNum=12200
values:
1991-01-01: 499
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
- name: Single blind parent with non eligible dependent child
period: 2024
input:
people:
person1:
age: 30
is_tax_unit_head: true
is_blind: true
person2:
age: 4
is_tax_unit_dependent: true
spm_units:
spm_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: CA
output:
ca_state_supplement_payment_standard: 8_448

- name: Married household with one blind and one disabled person, with a disabled dependent child, no food preparation and spouse in out of home care
period: 2024-01
input:
people:
person1:
age: 65
is_tax_unit_head: true
is_blind: true
person2:
age: 66
is_tax_unit_spouse: true
is_disabled: true
ca_in_out_of_home_care_facility: true
person3:
age: 17
is_tax_unit_dependent: true
is_disabled: true
spm_units:
spm_unit:
members: [person1, person2, person3]
spm_unit_is_married: true
households:
household:
members: [person1, person2, person3]
state_code: CA
living_arrangements_allow_for_food_preparation: true
output:
ca_state_supplement_payment_standard: 2_503
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from policyengine_us.model_api import *


class ca_in_medical_care_facility(Variable):
value_type = bool
entity = Person
label = "Is in a California medical care facility"
definition_period = YEAR
defined_for = StateCode.CA
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from policyengine_us.model_api import *


class ca_in_out_of_home_care_facility(Variable):
value_type = bool
entity = Person
label = "Is in a California nonmedical out of home care facility"
definition_period = YEAR
defined_for = StateCode.CA
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from policyengine_us.model_api import *


class ca_capi_eligible_person(Variable):
value_type = bool
entity = Person
label = "California CAPI eligible person"
definition_period = YEAR
defined_for = StateCode.CA
reference = "https://www.cdss.ca.gov/Portals/9/CAPI/CAPI_Regulations-Accessible.pdf"

def formula(person, period, parameters):
aged_blind_disabled = person("is_ssi_aged_blind_disabled", period)
is_ssi_eligible_spouse = person("is_ssi_eligible_spouse", period)
immigration_status = person("immigration_status", period)
is_citizen = (
immigration_status == immigration_status.possible_values.CITIZEN
)

return aged_blind_disabled & ~is_ssi_eligible_spouse & ~is_citizen
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from policyengine_us.model_api import *


class ca_capi_income_eligible(Variable):
value_type = bool
entity = SPMUnit
label = "California CAPI income eligible"
definition_period = MONTH
defined_for = StateCode.CA
reference = "https://www.cdss.ca.gov/Portals/9/CAPI/CAPI_Regulations-Accessible.pdf"

def formula(spm_unit, period, parameters):
payment_standard = add(
spm_unit,
period,
["ssi_amount_if_eligible", "ca_state_supplement_payment_standard"],
)
countable_income = add(spm_unit, period, ["ssi_countable_income"])
return payment_standard > countable_income
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
from policyengine_us.model_api import *


class ca_state_supplement_payment_standard(Variable):
value_type = float
entity = SPMUnit
label = "California CAPI payment standard"
unit = USD
definition_period = MONTH
defined_for = StateCode.CA
reference = "https://www.cdss.ca.gov/Portals/9/CAPI/CAPI_Regulations-Accessible.pdf"

def formula(spm_unit, period, parameters):
p = parameters(
period
).gov.states.ca.cdss.state_supplement.payment_standard
person = spm_unit.members
head = person("is_tax_unit_head", period)
spouse = person("is_tax_unit_spouse", period)
head_or_spouse = head | spouse
# Blind amount
blind = person("is_blind", period) * head_or_spouse
blind_count = spm_unit.sum(blind)
is_married = spm_unit("spm_unit_is_married", period)
blind_married_amount = select(
[blind_count >= 2, blind_count == 1],
[p.blind.married.two_blind, p.blind.married.one_blind],
default=0,
)
blind_amount = where(is_married, blind_married_amount, p.blind.single)
# Aged or disabled amount
is_disabled = person("is_disabled", period)
age = person("monthly_age", period)
is_aged = age >= p.aged_or_disabled.age_threshold
aged_or_disabled = is_aged | is_disabled
aged_disabled_count = spm_unit.sum(aged_or_disabled)
aged_disabled_amount = select(
[
(aged_disabled_count >= 2) & (is_married == 1),
aged_disabled_count == 1,
],
[
p.aged_or_disabled.amount.married,
p.aged_or_disabled.amount.single,
],
default=0,
)
# Food allowance amount
living_arrangements_allow_for_food_preparation = spm_unit.household(
"living_arrangements_allow_for_food_preparation", period
)
food_allowance_amount_eligible = (
~living_arrangements_allow_for_food_preparation & aged_or_disabled
)
food_allowance_amount_eligible_count = spm_unit.sum(
food_allowance_amount_eligible
)
food_allowance_amount = where(
is_married,
food_allowance_amount_eligible_count * p.allowance.food.married,
food_allowance_amount_eligible_count * p.allowance.food.single,
)
# Dependent amount
dependent = person("is_tax_unit_dependent", period)
dependent_age_eligible = age < p.dependent.age_limit
dependent_count = spm_unit.sum(
dependent & dependent_age_eligible & (is_disabled | blind)
)
dependent_amount = dependent_count * p.dependent.amount
# Medical care facility amount
is_in_medical_care_facility = person(
"ca_in_medical_care_facility", period
)
medical_care_facility_count = spm_unit.sum(is_in_medical_care_facility)
medical_care_facility_amount = (
medical_care_facility_count * p.allowance.medical_care_facility
)
# Out of home care facility amount
is_in_out_of_home_care_facility = person(
"ca_in_out_of_home_care_facility", period
)
out_of_home_care_facility_count = spm_unit.sum(
is_in_out_of_home_care_facility
)
out_of_home_care_facility_amount = (
out_of_home_care_facility_count * p.allowance.out_of_home_care
)
# Total amount
return (
max_(blind_amount, aged_disabled_amount)
+ food_allowance_amount
+ dependent_amount
+ medical_care_facility_amount
+ out_of_home_care_facility_amount
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from policyengine_us.model_api import *


class living_arrangements_allow_for_food_preparation(Variable):
value_type = bool
entity = Household
label = "Living arrangements allow for food preparation"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from policyengine_us.model_api import *


class spm_unit_is_married(Variable):
value_type = bool
entity = SPMUnit
label = "SPM unit is married"
documentation = "Whether the adults in this SPM unit are married."
definition_period = YEAR

def formula(spm_unit, period, parameters):
# If any tax unit is a married filer, assume the family is.
person = spm_unit.members
filing_status = person.tax_unit("filing_status", period)
filing_status_type = filing_status.possible_values
person_is_married = is_in(
person.tax_unit("filing_status", period),
[
filing_status_type.JOINT,
filing_status_type.SEPARATE,
],
)
return spm_unit.any(person_is_married)

0 comments on commit fdd96f7

Please sign in to comment.