Closed ndegwamartin closed 1 month ago
Thanks for raising this Martin, I discussed this internally today, it seems this was considered before and we wanted to keep the purge API straight forward and simple depending on the developer to ensure correct purging.
We provide the include & revInclude search APIs to get all referenced resources for a resource. Developer can use it and then provide the ids to the purge API - this will ensure all referenced resources are also purged.
Closing this.
This is a follow up on the ticket here - https://github.com/google/android-fhir/pull/2462#pullrequestreview-1979937455
Is your feature request related to a problem? Please describe. With the above implementation, what happens in case we purge a resource with forcePurge set to
true
but there is some resource reference in anotherLocalChange
- referential integrity broken e.g. when application does a purge of Patient(s) with given id(s) but not Observation(s) for that patient.We can either:-
Support reference resource recursive purging with another flag. Throw an exception when there are references which were not purged ?
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context More context here : https://github.com/google/android-fhir/pull/2462
Would you like to work on the issue? Please state if this issue should be assigned to you or who you think could help to solve this issue.