-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #671 from Gary-Community-Ventures/dev
12/13/2024
- Loading branch information
Showing
12 changed files
with
91 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
from .nc_aca.calculator import ACASubsidiesNC | ||
from .medicaid.emergency_medicaid.calculator import EmergencyMedicaid | ||
from .sun_bucks.calculator import SunBucks | ||
|
||
from ..calc import ProgramCalculator | ||
|
||
nc_calculators: dict[str, type[ProgramCalculator]] = { | ||
"nc_aca": ACASubsidiesNC, | ||
"nc_emergency_medicaid": EmergencyMedicaid, | ||
"sunbucks": SunBucks, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from programs.programs.calc import MemberEligibility, ProgramCalculator, Eligibility | ||
import programs.programs.messages as messages | ||
|
||
|
||
class SunBucks(ProgramCalculator): | ||
member_amount = 1440 | ||
min_age = 7 | ||
max_age = 16 | ||
fpl_percent = 1.85 | ||
dependencies = ["age", "insurance", "income_amount", "income_frequency", "household_size"] | ||
|
||
def household_eligible(self, e: Eligibility): | ||
# Income | ||
fpl = self.program.fpl | ||
income_limit = int(self.fpl_percent * fpl.get_limit(self.screen.household_size)) | ||
gross_income = int(self.screen.calc_gross_income("yearly", ["all"])) | ||
|
||
# Must not have the following benefits | ||
e.condition(not self.screen.has_benefit("snap"), messages.must_not_have_benefit("snap")) | ||
e.condition(not self.screen.has_benefit("tanf"), messages.must_not_have_benefit("tanf")) | ||
e.condition(not self.screen.has_benefit("medicaid"), messages.must_not_have_benefit("medicaid")) | ||
|
||
e.condition(gross_income < income_limit, messages.income(gross_income, income_limit)) | ||
|
||
def member_eligible(self, e: MemberEligibility): | ||
member = e.member | ||
|
||
# age eligibility | ||
e.condition(SunBucks.min_age <= member.age <= SunBucks.max_age) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.15 on 2024-12-03 18:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("screener", "0088_alter_screen_white_label"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="screen", | ||
name="has_sunbucks", | ||
field=models.BooleanField(blank=True, default=False, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 4.2.15 on 2024-12-13 17:26 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("screener", "0089_screen_has_sunbucks"), | ||
("screener", "0089_whitelabel_cms_method"), | ||
] | ||
|
||
operations = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters