-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fiabilisation des bases ressources des aides CMU-c et ACS – Intégration de la ressource « Rente d’accident du travail » #1070
Conversation
mtifarine
commented
Aug 14, 2018
•
edited
Loading
edited
- Évolution du système socio-fiscal.
- Périodes concernées : toutes.
- Zones impactées :
- revenus/remplacement/rente_accident_travail
- prestations/minima_sociaux/cmu
- Détails :
- Intégration de la ressource rente d'accident du travail dans le calcul des aides en santé CMU-c et ACS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour cette PR.
Il me semble que des références supplémentaires sont nécessaires.
value_type = float | ||
entity = Individu | ||
label = u"montant mensuel de la rente d’accident du travail" | ||
reference = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Une référence pour cette formule me parait nécessaire.
Il est possible que des valeurs utilisées dans la formule doivent passer en paramètre de la législation.
@@ -204,6 +204,7 @@ def formula(famille, period, parameters): | |||
class cmu_base_ressources_individu(Variable): | |||
value_type = float | |||
label = u"Base de ressources de l'individu prise en compte pour l'éligibilité à la CMU-C / ACS" | |||
reference = u"https://www.legifrance.gouv.fr/affichCodeArticle.do?cidTexte=LEGITEXT000006073189&idArticle=LEGIARTI000006745374&dateTexte=&categorieLien=cid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour l'ajout de cette référence.
Cela dit, je pense qu'il faudrait principalement utiliser les articles R861-2 du code la Sécurité Sociale et suivants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci @mtifarine pour ces modifications. J'ai fait de nouveaux commentaires.
@frtomas et @jmdallais pensez-vous qu'il est possible de faire ce que j'ai suggéré, ie. que vous fassiez des revues de code entre vous avant de faire une demande de revue à la communauté ?
value_type = float | ||
entity = Individu | ||
label = u"montant mensuel de la rente d’accident du travail" | ||
reference = u"https://www.legifrance.gouv.fr/affichCode.do?idSectionTA=LEGISCTA000006172216&cidTexte=LEGITEXT000006073189" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sauf erreur de ma part cette référence ne présente pas le calcul de la rente AT.
@@ -204,6 +204,11 @@ def formula(famille, period, parameters): | |||
class cmu_base_ressources_individu(Variable): | |||
value_type = float | |||
label = u"Base de ressources de l'individu prise en compte pour l'éligibilité à la CMU-C / ACS" | |||
reference = [ | |||
u"https://www.legifrance.gouv.fr/affichCodeArticle.do?cidTexte=LEGITEXT000006073189&idArticle=LEGIARTI000006745374&dateTexte=&categorieLien=cid", | |||
u"https: // www.legifrance.gouv.fr / affichCode.do?idArticle = LEGIARTI000018052382 & idSectionTA = LEGISCTA000018052449 & cidTexte = LEGITEXT000006073189 & dateTexte = 20180817" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cette seconde référence n'est pas exploitable en l'état (espaces à divers endroits).
@guillet nous allons nous efforcer de prendre le temps de faire une première review de notre coté sur les nouvelles branches avant de créer les PR associées afin de limiter les aller retours. |
Super @frtomas. N'hésitez pas à utiliser GitHub pour les revues de votre côté si ça vous sert. |
Bonjour @guillett , |
Merci @JenniferTelep, je pense que la bonne référence est Article R434-1 et suivant du code de la sécurité sociale, c'est dans
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai fait quelques remarques.
tests/formulas/rente_at.yaml
Outdated
individus: | ||
- id: "parent1" | ||
age: 36 | ||
taux_accident_travail: 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cette valeur est un taux donc en pourcentage.
def formula_2018_01_01(individu, period, parameters): | ||
rente_at = parameters(period).cotsoc | ||
|
||
taux_incapacite = individu('taux_accident_travail', period) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taux_incapacite
est en pourcentage donc pas mal de valeurs doivent être /100
.
definition_period = MONTH | ||
|
||
def formula_2018_01_01(individu, period, parameters): | ||
rente_at = parameters(period).cotsoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rente_at = parameters(period).cotsoc.rente_at
permettrait d'éviter les formulations qui apparaissent plus bas comme par exemple rente_at.rente_at.salaire_compte_integrale
.
@@ -0,0 +1,6 @@ | |||
description: Salaire minimum des rentes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne vois pas d'usage de cette variable.
@@ -0,0 +1,6 @@ | |||
description: salaire prise en compte integrale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi avoir mis ces variables dans cotsoc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aussi, je pense qu'une variable pourrait être créée pour rente_accident_travail_salaire
avec pour références
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense que pour l'évaluation du salaire net à utiliser dans le calcul de la rente, il est pertinent d'utiliser un barème dans OpenFisca. L'article R434-28 du CSS décrit un barème.
salaire = ...
P = parameters.rente_accident_travail # Par exemple
salaire_net_base = max_(P.salaire_minimum, salaire_net)
return P.salaire_minimum * P.salaire_net.bareme.apply(salaire_net_base/P.salaire_minimum)
où le barème est décrit avec les piliers de tranches suivants [0, 2, 8] et les taux [1, 1/3, 0] selon R434-28
@@ -0,0 +1,6 @@ | |||
description: Salaire minimum des rentes | |||
reference: openfisca |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Une référence intéressante pourrait être
Alinéa 1 de l'article L434-16 du code de la Sécurité Sociale accessible à la page suivante
https://www.legifrance.gouv.fr/affichCodeArticle.do?cidTexte=LEGITEXT000006073189&idArticle=LEGIARTI000006743072&dateTexte=&categorieLien=cid
reference: openfisca | ||
unit: currency | ||
values: | ||
2018-01-01: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour la revalorisation de 2016, la référence est https://www.legifrance.gouv.fr/eli/decret/2016/4/1/AFSS1605622D/jo/article_3
setup.py
Outdated
@@ -7,7 +7,7 @@ | |||
|
|||
setup( | |||
name = 'OpenFisca-France', | |||
version = '22.7.1', | |||
version = '22.7.2', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense qu'une telle évolution correspond plutôt à une montée de version mineur (0.y.0) plutôt que patch (0.0.z).
class rente_accident_travail(Variable): | ||
value_type = float | ||
entity = Individu | ||
label = u"montant mensuel de la rente d’accident du travail" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L'usage met une majuscule à la première lettre du label.
rente_at = parameters(period).cotsoc | ||
|
||
taux_incapacite = individu('taux_accident_travail', period) | ||
taux_rente_accident_travail = select([taux_incapacite < 10, taux_incapacite < 50, taux_incapacite >= 50], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans la même veine que mon commentaire sur l'ajout d'un barème pour le calcul du salaire net, un barème pourrait être utilisé pour le taux de la rente. Par exemple :
taux_accident_travail = ...
P = parameters.accident_travail.rente # Par exemple
taux = P.taux.bareme.apply(taux_accident_travail)
return where(
[taux_accident_travail < P.taux.minimum],
[0], default = taux
)
ou les paramètres sont
- P.taux.minimum = 0
- P.taux.barème = taux : 0, 0.5 et valeurs : [0.5, 1.5]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merci @guillett pour ces remarques, possible une documentation sur comment ajouter un barème, je trouve pas ça dans Openfisca.
et voici l'erreur que j'ai: 'MarginalRateTaxScale' object has no attribute 'applay'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Un exemple de barème
https://github.com/openfisca/openfisca-france/blob/master/openfisca_france/parameters/impot_revenu/bareme.yaml
Oups ce n'est pas apply
mais calc
qu'il faut utiliser. cf
https://fr.openfisca.org/legislation/ir_brut?q=ir
Cette PR contient deux sujets distincts à prioriser.
Je propose que le calcul de la rente (2) fasse partie d'une seconde passe pour aller plus vite sur 1. |
@guillett d'après le point téléphonique fait ce jour, voici les modifications apportées sur ce PR, où je n'ai gardé que la partie de l'intégration de la rent_at dans la base de ressources de la CMUC et de l'ACS. |
CHANGELOG.md
Outdated
@@ -1,5 +1,16 @@ | |||
# Changelog | |||
|
|||
## 22.7.2 [#1070](https://github.com/openfisca/openfisca-france/pull/1070) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La version est 22.8.0
CHANGELOG.md
Outdated
* Zones impactées : | ||
- model/revenus/remplacement/rente_accident_travail | ||
- model/prestations/minima_sociaux/cmu | ||
- parameters/cotsoc/rente_at/salaire_min_rente |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Les zones impactées sont généralement référencées avec des guillemets, de la façon suivante :
* Zones impactées :
- `revenus/remplacement/rente_accident_travail`
- `prestations/minima_sociaux/cmu`
- `parameters/cotsoc/rente_at/salaire_min_rente`
CHANGELOG.md
Outdated
- model/prestations/minima_sociaux/cmu | ||
- parameters/cotsoc/rente_at/salaire_min_rente | ||
* Détails : | ||
- Intégration de la ressource rente AT dans le calcul des aides en santé CMU-c et ACS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AT pourrait être clarifié par accident du travail
@@ -204,6 +204,7 @@ def formula(famille, period, parameters): | |||
class cmu_base_ressources_individu(Variable): | |||
value_type = float | |||
label = u"Base de ressources de l'individu prise en compte pour l'éligibilité à la CMU-C / ACS" | |||
reference = u"https://www.legifrance.gouv.fr/affichCodeArticle.do?cidTexte=LEGITEXT000006073189&idArticle=LEGIARTI000006745374&dateTexte=&categorieLien=cid", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auriez-vous une référence réglementaire qui détaillent les ressources prises en compte ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bonjour @guillett
Voici la repense de @JenniferTelep concernant la référence réglementaire qui détaillent les ressources de CMU:
Articles du code de la sécurité sociale:
Article R861-8: "Les ressources prises en compte pour la détermination du droit au bénéfice de la protection complémentaire en matière de santé comprennent [...] l'ensemble des ressources nettes"
"https://www.legifrance.gouv.fr/affichCodeArticle.do;jsessionid=DEA53FDC793298CE041862E42D999E84.tplgfr43s_1?idArticle=LEGIARTI000034424885&cidTexte=LEGITEXT000006073189&dateTexte=20180829&categorieLien=id&oldAction="
Ressources à exclure: article R861-10
"https://www.legifrance.gouv.fr/affichCodeArticle.do;jsessionid=DEA53FDC793298CE041862E42D999E84.tplgfr43s_1?idArticle=LEGIARTI000030055485&cidTexte=LEGITEXT000006073189&dateTexte=20180829&categorieLien=id&oldAction=&nbResultRech="
Par ailleurs, une circulaire ministérielle a fait le point sur la notion de ressources prises en compte, certains versements devant en être exclus (crédit d'impôt, prime pour l'emploi, frais professionnels, remboursement de biens provenant par exemple d'un contrat d'assurance)
Circ. DSS/2A, no 2002-110, 22 févr. 2002 : "https://www.cmu.fr/fichier-utilisateur/fichiers/CIRCULAIRE_%20DSS_2A%20_2002-110%20du%2022%20f%C3%A9vrier%202002%20relative%20a%20la%20notion%20de%20ressources.pdf"
Enfin, dans le cerfa pour la demande de CMUC, la rente AT figure bien (page 5, 5e type de ressource): http://www.cmu.fr/fichier-utilisateur/fichiers/Formulaire_CMUC_s3711_MAJ_2018.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super !
Ma proposition de modification :
reference = [
u"Article R861-8 du code de la Sécurité Sociale",
u"https://www.legifrance.gouv.fr/affichCodeArticle.do;jsessionid=DEA53FDC793298CE041862E42D999E84.tplgfr43s_1?idArticle=LEGIARTI000034424885&cidTexte=LEGITEXT000006073189&dateTexte=20180829&categorieLien=id&oldAction=",
u"Article R861-10 du code de la Sécurité Sociale pour les ressources exclues",
u"https://www.legifrance.gouv.fr/affichCodeArticle.do;jsessionid=DEA53FDC793298CE041862E42D999E84.tplgfr43s_1?idArticle=LEGIARTI000030055485&cidTexte=LEGITEXT000006073189&dateTexte=20180829&categorieLien=id&oldAction=&nbResultRech=",
u"Circulaire N°DSS/2A/2002/110 du 22 février 2002 relative à la notion de ressources à prendre en compte pour l'appréciation du droit à la protection complémentaire en matière de santé",
u"http://circulaire.legifrance.gouv.fr/pdf/2009/04/cir_6430.pdf"
]
setup.py
Outdated
@@ -7,7 +7,7 @@ | |||
|
|||
setup( | |||
name = 'OpenFisca-France', | |||
version = '22.7.1', | |||
version = '22.8.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il me semble que la version est 22.8.0.
c0b2d5d
to
3581cea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@mtifarine et @frtomas, je vous laisse faire un rebase pour renommer les commits et je merge ensuite.
C'est OK pour vous ?
d37d3ec
to
fcd8f23
Compare
fcd8f23
to
a998aa0
Compare
C'est bon @guillett , le rebase a été fait. |