Adding a photo to forms + bypassing device photo album?

Hi all! We are exploring a new use case and have two questions.

Use case: We’re exploring having health workers take photos of standard Ministry of Health clinical forms so that the CHT has a digital copy of key forms and the paper can be stored within the paper docket (MOH requirement). Two related questions:

  • Got any advice for us on creating a Form that has some standard questions and a spot where health workers can take a photo of a paper form? Curious if there any other groups who have explored a similar use case and if there are any issues we should think ahead about (re: things like legibility of photos or file sizes). I recall a cool demo of uploading photos of rapid malaria tests, and imagine there are many others!

  • Based on MOH requirements, our CHT instance is fully online and we are not using the CHT app (we can’t store data on device). We will use tablets and the web version of CHT. Is it possible to bypass the device photo album and uploaded directly into CHT?

Thanks all! @cliff (FYI)

2 Likes

Hi @Beth

Thanks for this question.
As far as I can tell, the image upload widget should allow to use the phone camera. Have you tried adding an upload field?
We have an example form in our e2e tests: https://github.com/medic/cht-core/blob/master/tests/page-objects/default/enketo/photo-upload.wdio.page.js#L8

Let me know if this works for you.

1 Like

thanks @diana ,

i have tried the uploadfield and it works

However our goal is This photo should not be stored in the Tablet device’s photo album. Ideally we take a photo and it just uploads directly so that no patient information is stored on the device. It’s unclear if this is possible

hello @diana i see this feature allows the taking of photos though not sure how its affected ie accessing the user’s camera

Hi @cliff

Sorry for the late reply.
That feature only works when CHT-Android is used. As far as I’m aware, CHT-Android does store the image on the device. Additionally, the image will still be stored as part of the CHT data anyway.

I know @Jennifer_Quesada had been working last on image compression when uploading with CHT-Android. Jenni, do you recall whether the image upload widget saves photos in the Android gallery or not?

1 Like

Hi @cliff and @diana,

We refactored this for CHT Android v1. When that upload widget is used to take pictures, the picture is stored in the phone as a temporary file inside CHT data, then the picture is converted to a Base64 string and saved in the CHT instance’s database (CouchDB) when the form is submitted. Lastly, the picture is deleted from the phone by using the deleteOnExit method from Android.

1 Like

Thanks @Jennifer_Quesada

To further clarify, @cliff , you would need to use the CHT in an Android wrapper (cht-android) application that is at least v1 in order to gain access to this feature.

1 Like

thanks @Jennifer_Quesada for this insight

hello @diana

if we are to wrap cht in an android wrapper , can we still be able to run this on a tablet ?

Hi @cliff

If this is an Android tablet, you should be able to install the app as normal. I believe we have lots of users using CHT on tablets already.

1 Like