This module was developed by Jembi.
As part of an implementation which is being done by Jembi, there are some special requirements for the HTML Form Entry Module. The details of this tweaked module are outlined below.
The custom features of this module are defined below.
Forms pop out into a new window to be completed, viewed or previewed.
On the form designer, roles can be associated with forms. Roles associated with a form can either be associated as a "View" role or an "Edit" role (or the equivalent "Both" role). On the patient dashboard, if there are roles associated with a form, then the currently authenticated user must have the appropriate roles to view and/or edit a form.
There are two parts to this feature. Firstly, on the form designer page, the preview now pops out into a new window. This is done by making use of a request parameter (
mode=PREVIEW) on the
htmlForm.jsp page, which when used, displays only the preview and not the designer. When this parameter is not used, the normal designer page is displayed, but instead of the preview at the bottom, a link is displayed to the same page, but with the
mode=PREVIEW parameter used. This link is made to pop into a new window.
The second part of the feature affects the patient dashboard portlet (
patientHtmlForms.jsp). The links on this page have been made to pop into a new window.
A new database table called
htmlformentry_html_form_role is introduced. This table facilitates a many-to-many mapping between roles and html forms. There will also be a column in the table which will be used to denote whether the given mapping is a "View" or "Edit" ("Both") mapping. That is, separate mappings will be created for the case where a user can view a completed form and for the case where a user can complete a new form.
HtmlFormController.java is extended to return associated roles and a complete list of roles to the view via the
referenceData method. Also, the
onSubmit method is extended to persist the associated roles to the database. Functionality has been added to
htmlForm.jsp in order to facilitate the adding of new roles on the form designer.
populateModel method has been extended to filter out any forms that the current user doesn't have permission to view/complete. Note: forms with no associated roles will always be displayed.