google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
463 stars 241 forks source link

Update the purge API to accept a list of resource IDs #2462

Closed ndegwamartin closed 1 month ago

ndegwamartin commented 2 months ago

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2439

Description

  1. Overloaded the FhirEngine.purge and modified Database.purge since has access modifier internal which is reused by the FhirEngine overloads.
  2. In the implementation of Database.purge, wrapped the processing of the resource ids list in a transaction. Either they all pass or it fails.

Alternative(s) considered Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type Feature

Screenshots (if applicable) N/A

Checklist

vorburger commented 2 months ago

@ndegwamartin Thank You for requesting a review from me!

As I only "volunteer" and do not "work for" this project, unfortunately I do not have the "free cycles" to help here.

I trust that some of my colleagues who are working on this project will review this.

Thank You for your understanding!

ndegwamartin commented 1 month ago

@MJ1998 ticket created there https://github.com/google/android-fhir/issues/2510

ndegwamartin commented 1 month ago

@MJ1998 when you get a chance please assist in merging this

MJ1998 commented 1 month ago

Done