GSoC 2018-HTML Form Entry Module and REST

Hi all, All who are interested in contributing to this module are welcome and your contribution is highly appreciated !

1 Like

@madushan startup and tasks?

1 Like

@tendomart The goal is to make this module to be made usable RESTfully, and build an Open Web App.

@owais.hussain I read the documentation but faced these questions. Are we going to build a REST API which fetches information from the fields of submitted forms and direct those data to the database ? When we are saving the data are we connecting REST module with the existing FHIR FORM Entry module ? Can we reuse the existing REST module to build HTML Form Entry Module and REST. Feel free to answer the questions and correct me if my thoughts are wrong. Thanks

Hi @madushan

I just replied to this thread about my understanding of the project itself.

Actually, the HTML form entry module follows the legacy HTML entry format for the submission process to create and edit encounters and obs. The project tends to implement a new OWA which can extend this submission over a new HTML UI and features for the further access. The HTML Form entry module should have the REST Full API implementation to communicate with the OWA (OWA can only communicate with the modules through the REST services).

So you need to implement a REST Web Services for the HTML Form entry module and then use those REST services to implement a new kind of OWA for the submissions. There are two ways to implement the REST Services,

  1. Implement the REST Services inside the HTML Form Entry Module (I think, Mostly preferred way)
  2. Extend the HTML Form entry module functionalities to Web Servies module and implement required web services in Web Services module

I hope, you got some idea about the project right now. Let’s continue the discussions with @owais.hussain to get more information about the project

CC : @owais.hussain (If there are any wrongs, pls apologize me :slight_smile: )

3 Likes

Thanks for summing it up.

I would recommend extending HFE module. Reporting module probably does something similar reportingrest.

1 Like

I will advice anyone interested in this project to first take a look at the current html form entry module documentation and familiarize themselves with the current workflow. When an html for is saved, an encounter is created and every field in the form is saved as an observation. Your REST endpoint has to take care of that.

Take a look at this post

Here I was able to interact with HTML Forms via REST. To make that happen, I needed for these forms to be created with the HTML Form entry module and I took note of the form ID, the concept IDs of the obs used in the form and I had I created an endpoint for each for inside a custom module and when a request is made this my endpoint, I programmatically created an encounter and attached obs to this encounter. So in some ways this module provides a REST api for HTML forms but this module is limited to existing forms and for every new form that I need to handle via REST, I will need to implement a REST endpoint for it.

What I should see in your proposal is how to make this behavior dynamic. That is every new html form created should have a REST endpoint without needing to write code some more code.

An OWA should not be a hard requirement for this. It should just be a proof of concept as we are mostly interested in the REST part of this. But we should have a well tested REST API.

3 Likes

@suthagar23 @ivange94 @owais.hussain Thank you very much for the guidance.

1 Like

@owais.hussain @ivange94 I looked into this module with the hope of contributing. I found it hard to find the Java class which runs first in the module ? In HTML forms I find conceptId too often.

for e.g- <obs conceptId=“1000” answerConceptIds="1001/>

What is its significance? Is Openmrs project similar to a Spring MVC project? Looking foreward for your help. Thanks

@ivange94 Could you please post a link to the API you have developed in adding HTML forms. It would be a great help. Thanks

I will advice you and anyone else interested in this project to start with

https://wiki.openmrs.org/display/docs/HTML+Form+Entry+Module https://wiki.openmrs.org/display/docs/HTML+Form+Entry+Module+Getting+Started https://wiki.openmrs.org/display/docs/HTML+Form+Entry+Module+Technical+Overview

@michael25 a lot of the answers you seek can be found there. If you have any question that cannot be answered there don’t hesitate to ask here.

And yes OpenMRS is a spring mvc project :slight_smile:

2 Likes

There is no documentation for it but I will make some time this weekend to prepare one. Also I plan to do a call to show potential gsocers how the module I built work to give you some idea of the problem we are trying to solve.

3 Likes

Thank you very much. I will read them. :slight_smile:

1 Like

@ivange94Thank you. Waiting for that, as it could be a great help.

1 Like

@ivange94Thank you very much. It would help us all.

@ivange94 @owais.hussain I tried to understand HTML forms by creating a new one so used the following code snippet

But I continuously get the following error upon saving. errorToShow

Could you please help me understand why :slight_smile:

Hi @ivange94, I received a notification to say that you’d like to be added as a backup mentor for this GSoC project, but I can’t track down the post now (or the post has been edited). Are you still interested in participating as backup mentor?

2 Likes

Look for concept ID 2861 in your concept dictionary. You should have CIEL dictionary installed in your instance…

2 Likes

@owais.hussain Thanks for the support. It’s highly appreciated.

1 Like

These concepts don’t exist on your system. You either create them and use their IDs or import a concept dictionary. For development what I always do is just create them. See this section of the user guide to learn how to do html form entry http://guide.openmrs.org/en/Collecting%20Data/html-forms.html

Yes sorry for the confusion. I will DM you my email.

2 Likes