HTML Form Entry REST documentation

The two main objectives of the project were to create wrapper rest controllers over the existing HFE module and to create a simple interface to test out the new rest module



Installation:

The installation is very simple just like any other OpenMRS module. The simplest way to load it is via module management in the administration section of the UI. The HFE module is a prerequisite for the same.



Brief Documentation of the APIs that were built:

API for Html Form management: (creating, viewing, editing html forms)

Url : openmrs/ws/rest/v1/htmlformentryrest/htmform?id=<html_form_id>

GET:

Expected Response:

{

“Id” : 1,

previewHtml” : "<htmlform formEncounterType=\"67a71486-..."
}

POST:

Body:

"form":{

"name":"test",

"description":"testing form via rest",

"version":"1.0",

"encounterType":"7",

"creator":{

"personName":"piyush"

},

"changedBy":{

"personName":"piyush"

},

"published":"checked"