HTML Form Entry Module and REST

In general, most patient data is stored as observations (obs) wrapped in encounters. Here are some resources about the OpenMRS information and data models:

1 Like

Not sure if this is helpful with your question at all, but:

The HTML Form Entry module pre-dates the REST API, so it just used a typical HTML Form Submission process to create and edit encounters and obs.

It would be cool, in the future, if HTML Form Entry could submit form data RESTful, but this currently isn’t on the roadmap.

Take care, Mark

Hi Mark! What is the basic difference between form and html form entry.Is there any possibility that html entry form will support Rest API in near future?

Naveed,

It’s possible, but it’s not on the roadmap on this time.

Take care, Mark

Also, for reference, the Html Form Entry UI module provides a way to RESTfully fetch the HTML that the Html Form Entry module generates, but not the the individual obs, etc. The fragment to fetch this can be found here… see the “getAsHtml” method:

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.

@danfuterman your use case makes perfect sense. I think this should be mentored. If there isn’t someone already mentoring, then I’ll be more than happy to.

2 Likes

Thanks for volunteering @owais.hussain, that would be great! I’ve listed you as the primary mentor on the project page - please feel free to add more detail and/or expand on the objectives.

This would be very valuable… I don’t know if I will have time to “offiically” mentor but keep in the loop and I will hopefully be able to do some initial design work as the project approaches.

Take care, Mark

2 Likes

Thanks @mogoodrich, will keep you in the loop as things progress. Otherwise, it could be valuable to have you listed as the backup mentor, if your schedule allows.

Generally the backup mentor doesn’t have much of a time commitment, but I don’t know if I’d have the time to fill in as the primary mentor if the primary ends up being unavailable, so I guess that means I shouldn’t be the backup? :slight_smile:

Good point, thanks :slight_smile:

As primary mentor, I will be able to spend 4-8 hours a week. Not sure if that’s sufficient.

I don’t remember 100%, but I think 4 hours is the required commitment.

@owais.hussain That sounds (more than) sufficient, the expectation for mentors is a minimum of 4 hours a week, and there’s usually support from other mentors when needed.

Hello @owais.hussain, i am interested to work on this feature. i believe now all the form fields are sent to the backend when the form is submitted. What i understand is we need to create a CRUD endpoints which can be accessible from any where. and we are talking about this https://demo.openmrs.org/openmrs/module/htmlformentry/htmlForms.list , am i right? also about the use case of html-form-entry: i think it might be helpful if someone wants to enter patient details some other way rather than by just simply using the Reference application ui, did i get it right?

Hi Piyush,

Glad to know you’re interested in this project.

You’re right. The objective is to make this module to be made usable RESTfully, and build an Open Web App as proof of concept. To get a technical overview, please visit here.

1 Like

@owais.hussain @danfuterman @piyush9620 Hi I am interested in contributing to this project at GSOC 2018, Could you please give me some tips to get me started… Thanks

Hi @madushan, as mentioned above you should start with understanding what the requirement is. Please read about the existing HTML Form entry module on the openmrs wiki to get acquainted.

1 Like

@piyush9620Thanks for your tips. I will begin with reading the wiki.

1 Like