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
479 stars 258 forks source link

Issues faced while uploading images as part of the QuestionnaireResponse in low Bandwidth setting #2100

Open joiskash opened 1 year ago

joiskash commented 1 year ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like Change the getQuestionnaireResponse API to return the QuestionnaireResponse and Binary blobs / file URIs for large Media resources captured as part of data capture.

Describe alternatives you've considered We are currently extracting the Base64 String from the QuestionnaireResponse and saving it to file.

Additional context This is also related to point 2 in issue https://github.com/google/android-fhir/issues/1483

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.

AdityaKBhadragond14 commented 1 year ago

So, the current issue is that if we want to get the base64 data from the questionnaire response we have to know the "linkId" for the item with the base64 data and iterate to it and then get the data.

To eliminate this iteration of finding the item with the "linkId" for the base64 data we can think of the following two solutions:

  1. change the getQuestionnaireResponse API to return the QuestionnaireResponse and the blob.
  2. save the base64 data to a file and return the file uri with the getQuestionnaireResponse API call.

But there can be one issue with the second approach is that the getQuestionnaireResponse API call will return a fixed uri which cannot be customized and it might limit the application to use the fixed uri and not modify it according to its use.

joiskash commented 1 year ago

@FikriMilano @omarismail94 @jingtang10 do you have any opinion on what approach is better or worse?

FikriMilano commented 1 year ago

This was discussed before w @jingtang10 and @aditya-07, can you check this ticket? https://github.com/google/android-fhir/issues/1858