Éligibilité : Rattrapage de dates de fin incorrectes de l’API Particulier#5339
Merged
Conversation
7200868 to
361e0a3
Compare
celine-m-s
approved these changes
Jan 7, 2025
Contributor
ed05755 to
3bc9bbd
Compare
Member
Author
|
Sur un backup d’il y a quelques jours: |
The API particulier computed the dateFin with dateDebut + 3 months.
That’s very misleading, as a person who has been a beneficiary since
2009-06-01 would have:
```json
{
"statut": "beneficiaire",
"dateDebut": "2009-06-01",
"dateFin": "2009-09-01",
}
```
However, the `statut` means the person is beneficiary **today**.
The API recently evolved to always set `dateFin` to `null` to avoid
suggesting the end date is known and in the past.
Fix about 11,000 incorrect records, by using `certified_at`: if the API
response for `statut` was "beneficiaire", that person was beneficiary on
the day the API was queried.
The example from above comes from the production environment and is an
example of bad data.
3bc9bbd to
3ed98bd
Compare
Member
Author
|
Il y a donc pas mal de rattrapage à faire, ce qui est logique : on comptait une |
Contributor
|
Merci pour la moulinette ! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Pourquoi ?
L’API particulier calculait le champ
dateFinavec la formule :dateDebut + 3 mois. Cette information est très déroutante, car une personne bénéficiaire depuis 2009-06-01 aurait comme réponse:{ "statut": "beneficiaire", "dateDebut": "2009-06-01", "dateFin": "2009-09-01", }Cependant, le
statutindique que cette personne est bénéficiaire aujourd’hui, malgré ladateFin(qui est erronée).L’API vient d’évoluer pour toujours définir
dateFin=nullafin de limiter les mauvaises interprétations. #5337Correction d’environ 11 000 diagnostics, en utilisant la date d’appel à l’API pour le calcul de la date de fin de certification.
L’exemple ci-dessus provient de données actuellement en production.