OpenClinica / enketo-oc

OpenClinica's fork of the Enketo web forms monorepo
Apache License 2.0
0 stars 1 forks source link

Look into barcode support #165

Open MartijnR opened 5 years ago

MartijnR commented 5 years ago

There is an enketo-core issue for this, but this issue also caters to the possibility of creating a custom online-only widget.

MartijnR commented 5 years ago
MartijnR commented 5 years ago

3 approaches identified:

1. Support on Android and iOS only by requiring a particular Android/iOS app to be installed on the device.

Disadvantages: a. may break Enketo's goto functionality (but we can probably work around) b. 3rd party app requirement, no support outside of android/iOS c. not great user experience to open another app from within form.

Advantages: a. May only be about 2-3 days of work. Relatively cheap.

2. Use a JS library and a browser webcam

Disadvantages: a. Not so great at detecting barcodes which can be frustrating. You can test here: https://serratus.github.io/quaggaJS/v1.0.0-beta.1/examples/scan-to-input/ b. The library appears to be dead, so if any bugs are found, they may be hard/expensive to fix b. Probably about 4-8 days of work.

Advantages: a. Integrated experience b. Works on modern browsers (incl Mac OS, Windows, Chrome OS)

3. Wait for a built-in browser API which is currently under development

Advantages: a. Should be great on supported browsers. b. Would be cheap (like option 1).

Disadvantages: a. No idea when this will officially launch in Chrome b. Initially may only work in Chrome on all platforms except iOS. Could easily take years to land on iOS.

Depending on the client's requirements, I am thinking option 2 is probably the most attractive until option 3 becomes possible. Once that happens, we could continue to use option 2 for unsupported browsers (iOS in particular).