Community Health Toolkit

QR code reading and "profile" picture

Hi all, I have a question about reading QR codes from within an app form and taking a picture from within a contact form that is then added as profile picture. Would these two functionalities be possible to build?

I am not adding this as a feature request, I’m for now interested whether it would be possible and whether someone could speak about the complexity of developing this feature.



Hi @hhornung thanks for the inquiry. We have this open GitHub issue that tracks a similar request. The bar code scanner is supported by both XLSForm and ODK Collect. Feel free to add to the GH ticket. If it is a requirement for a deployment, please add project context if you can.

1 Like

Thanks for pointing me to that. This basically describes the use case we have in mind, with the exception that we have QR codes instead of barcodes.

In “our” workflow (we are actually trying to harmonize/unify an app of another development partner with our CHT app), the scan is required to associate the client record with a pre-printed health card. An alternative that I’d like to propose to our partner is for the CHT to generate the unique client ID, and then to print the card with the QR code after that (e.g. at the facility). That way, it wouldn’t be necessary to scan the code with the CHT app. An added benefit would be to maintain the client ID after loss of the card

Using a photo for a profile picture is something we could investigate and I don’t think we have an existing feature request for this work. I have some concerns about patient privacy, but ultimately that’s a balance for the project manager to weigh up. Please raise an issue with details like why this is useful, where you’d like the photo to show up, what happens if there is no photo, etc.

There are two ways to generate client IDs in the CHT.

  1. UUIDs are automatically generated for every doc when it’s created. These are long but but may be useful for generating barcodes or QR codes.
  2. Short integer codes can be configured using a sentinel transition. These are useful if the ID also needs to be entered manually.

I’ll discuss the profile picture use case with our partner. We probably do not need it as a profile picture in the CHT app, as it would be of limited use to our CHVs and more a nice-to-have. Our partner would like this picture to be used at facility level, so it could also just be a form field of type “image”.

Is the “image” type supported, and does that access the camera, or would we have to train CHVs to take a picture outside the app and then choose it in some kind of file selector?

Privacy is definitely a concern here. Another concern is the data volume. Looking at CHVs with 1000+ people in their catchment area, the data volume can become quite high. Thanks for helping me think through this. I’ll talk to our partner, and if we come up with a meaningful use case, I’ll raise a feature request.

And thanks for pointing me to the sentinel transition!


Cool to see this thread happening. I’ll loop in @cfeld from I-TECH/University of Washington, because I know she’s interested in scanning barcodes too.

In the context where she’s planning a study, a team has been using an ODK app to scan barcodes on patient health booklets. The study will test how useful it is to have additional features like patient profiles and tasks, but the existing ODK app’s support for scanning patient IDs is something they like and hope to keep. @hhornung does the app you mentioned wanting to harmonize with also use ODK? If there’s another tool doing this well, it might be helpful for us to look more into how they support this workflow and what we could learn from that.

The other app is a bespoke Android app, so it might be there is not a lot of potential to reuse code, but let me look more into it. Our partner is already out for their office break, so I’ll probably update this thread in the new year.

1 Like