Skip to content

Commit

Permalink
fix: modélisation montpellier_mutuelle_communale
Browse files Browse the repository at this point in the history
  • Loading branch information
Shamzic committed Oct 3, 2024
1 parent a7770dd commit f68d71e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class montpellier_mutuelle_communale(Variable):

def formula(famille, period):
eligibilite_residentielle = famille.demandeur.menage('montpellier_eligibilite_residence', period)
css_participation_forfaitaire = famille('css_participation_forfaitaire_montant', period)
eligibilite_css = css_participation_forfaitaire > 0
return eligibilite_residentielle & not_(eligibilite_css)
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)
7 changes: 4 additions & 3 deletions tests/communes/montpellier/montpellier_mutuelle_communale.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
- name: "Égibilité à la mutuelle communale de Montpellier"
period: 2024-10
input:
depcom: ["34172", "34172", "68400", "68400"]
css_participation_forfaitaire_montant: [0, 20, 25, 30]
depcom: ["34172","34172", "34172", "68400", "68400"]
css_participation_forfaitaire_montant: [0, 0, 20, 25, 30]
cmu_c: [False, True, False, False, False]
output:
montpellier_mutuelle_communale: [True, False, False, False]
montpellier_mutuelle_communale: [True, False, False, False, False]

0 comments on commit f68d71e

Please sign in to comment.