android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Improve processing base64 encoded attachment

Open FikriMilano opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. When submitting, SDC cannot process a QuestionnaireResponse with base64 encoded attachment with a big enough answer. A 2 MB image could crash the app because it's Out of Memory (OOM).

Another scenario, tried to submit a ~100 KB file, it works but takes ~10 seconds to process.

Describe the solution you'd like Summary from SDK call discussion, we can put the base64 encoded file into one of the mentioned FHIR resource below, and append the link into the Attachment Url.

  • Binary resource Heavy load on the database, because files may be large. May not be feasible for super large files e.g. video.

  • DocumentReference resource Can be located outside of database, which reduce the heavy load on the database. May need another endpoint to sync files into server.

Describe alternatives you've considered N/A

Additional context N/A

Would you like to work on the issue? Limited bandwidth, feel free to assign someone

FikriMilano avatar Feb 10 '23 08:02 FikriMilano

cc @f-odhiambo @dubdabasoduba

FikriMilano avatar Feb 10 '23 08:02 FikriMilano