danfuterman
(Daniel Futerman)
January 26, 2018, 1:38pm
9
It will be nice to be able to POST to html forms created with the html form entry module via REST. This has been raised a few times though I’m not very sure about their use cases but my use case is to be able to build an offline app for OpenMRS. I have been working on an offline app for a client. It’s an OWA. They needed to be able to register patients when they are having connection issues and did not feel like the android client was the right path for them. Making patient registration work offline was not much of challenge. The challenge for me was and still is doing form entry offline. What I’ve done is design these forms and created a REST endpoint for them and every POST adds a new row to some table depending on which form is submitted. This works fine within my app but the issue is that the forms submitted with offline app are not compatible with those created with html module. Which means when internet comes back, they can’t proceed with their normal workflow as the forms submitted offline are not treated as html forms and won’t show up on patient dashboard.
On @ivange94 ’s suggestion, this has been added as a project idea for GSoC 2018 :
RESTful Submission of Forms in HTML Form Entry
If there’s any interest in mentoring this project, or adding to the project objectives, please feel free to update the page. The objectives could use some work to try define what this could look like for a 6-8 week student project.