Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
The xreports module uses the purcreports ReportDesigner and ReportRunner widgets.
The ReportDesigner widget is used for the designing of forms while the ReportRunner widget is used for form data entry.
The ReportDesigner widget is embedded in the xformDesigner.jsp page where it attaches itself at a div with an id of "purcformsdesigner"
The FormRunner widget is embedded in the formEntry.jsp page where it attaches itself at a div with an id of "purcformrunner"
These two widgets transfer that data in xml format with the xforms module in a RESTful manner.
When one clicks the "Design Xform" link on the openmrs form schema screen, the "org.openmrs.module.xforms.XformBuilder" class uses the form xml template and schema to create an xform which is then sent to the form designer widget to let the user customize the form. When the user is done, the form designer sends back the xform definition and widget layout data which the module stores in the "xforms_xform" table.
When one selects a form on the patient dashboard, the module fetches the xreports definition and widget layout data from the database and passes it to the ReportRunner widget which displays the form to the user for data entry. When the user submits the form, the ReportRunner widget submits the xreports instance data xml (which is identical the one one submitted by Infopath), to the module which passes it through the same form entry queue processing as done for the Infopath forms. The difference here being that the form entry queue API is called immediately instead of waiting for the scheduler as done for Infopath forms.