-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ajout de la mutuelle rhone alpes
- Loading branch information
1 parent
a00bf42
commit 2de7d02
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
openfisca_france_local/regions/auvergne_rhone_alpes/auvergne_mutuelle_communale.py
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,21 @@ | ||
from openfisca_france.model.base import Variable, MONTH, not_, Famille | ||
from openfisca_france.model.caracteristiques_socio_demographiques.logement \ | ||
import TypesCodeInseeRegion | ||
|
||
class auvergne_mutuelle_communale(Variable): | ||
value_type = bool | ||
entity = Famille | ||
definition_period = MONTH | ||
label = "Mutuelle communale de la région Auvergne Rhône Alpes" | ||
reference = [ | ||
"https://www.auvergnerhonealpes.fr/particuliers/mutuelleetudiants" | ||
] | ||
|
||
def formula(famille, period): | ||
region = famille.demandeur.menage('region', period) | ||
eligibilite_residentielle = ( | ||
region == TypesCodeInseeRegion.auvergne_rhone_alpes) | ||
css_participation_forfaitaire = famille('css_participation_forfaitaire', period) | ||
cmu_c = famille('cmu_c', period) | ||
eligibilite_css_cmu_c = (css_participation_forfaitaire > 0) | cmu_c | ||
return eligibilite_residentielle * not_(eligibilite_css_cmu_c) |
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
8 changes: 8 additions & 0 deletions
8
tests/regions/auvergne-rhone-alpes/auvergne_mutuelle_communale.yml
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,8 @@ | ||
- name: "Éligibilité à la mutuelle communale de la région Auvergne-Rhône-Alpes" | ||
period: 2024-10 | ||
input: | ||
depcom: ["69400","34172", "34172", "68400", "68400"] | ||
css_participation_forfaitaire_montant: [0, 0, 20, 25, 30] | ||
cmu_c: [False, True, False, False, False] | ||
output: | ||
auvergne_mutuelle_communale: [True, False, False, False, False] |