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
465 stars 246 forks source link

refactor - Move Search Logic from Search.execute() to FhirEngine.search() #2540

Open itstanany opened 1 month ago

itstanany commented 1 month ago

Describe the Issue

Would you like to work on the issue? Y

jingtang10 commented 2 weeks ago

thanks for raising this - i actually think it might be cleaner to move the whole thing to the search pacakge... i see a future where the data access (CRUD), search, and sync APIs live in different packages.

can you see how that'll look like?

jingtang10 commented 6 days ago

I commented here: https://github.com/google/android-fhir/pull/2541#issuecomment-2180505722

the search

https://github.com/itstanany/android-fhir/blob/601ebe18cd3b3d663fb4396dcf8058c60875c3eb/engine/src/main/java/com/google/android/fhir/FhirEngine.kt#L117

and count

https://github.com/itstanany/android-fhir/blob/601ebe18cd3b3d663fb4396dcf8058c60875c3eb/engine/src/main/java/com/google/android/fhir/FhirEngine.kt#L160

apis are defined in the com.google.android.fhir package. I think it might make more sense for them to be moved to the com.google.android.fhir.search package