e-picsa / picsa-apps

Monorepo for building tools to support E-PICSA Apps
https://picsa.app
GNU General Public License v3.0
5 stars 1 forks source link

feat(dashbboard): ability to upload monitoring form xlsx files and convert to enketo json format #248

Closed chrismclarke closed 3 months ago

chrismclarke commented 4 months ago

Is your feature request related to a problem? Please describe. To display forms in the app there is currently a manual process where a user must first upload to kobotoolbox, deploy to enketo, and then extract the generated json from the enketo website indexeddb entry. This is highly technical and not very administrator friendly.

Describe the solution you'd like

The largest part of this is the creation of the cloud function. In order to convert xlsx files to the correct format there are separate scripts that must be executed in python and javascript. An example of the scripts can be found at: https://github.com/IDEMSInternational/parenting-app-ui/tree/master/packages/@idemsInternational/xlsform-converter

To make matters more challenging, only specific python and node versions are supported, making it hard to use standard cloud function providers (e.g. firebase functions). As such the scripts need to be compiled into a docker image to be deployed to a platform like Google Cloud Run

It would be recommended that a standalone git repo be setup to handle the cloud function, based on the example code and then extended to support passing the form in a http request (instead of the example which expects to find the form stored locally).

Describe alternatives you've considered We could try using kobotoolbox rest api to submit form xlsx files and generate enketo links, however this may be difficult to implement and would remove the availability for the dashboard to operate independent of kobotoolbox (which may be desirable for data protection reasons)

Additional context

chrismclarke commented 3 months ago

Closed by #252