Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Installation

  1. Download the latest version from the OpenMRS module repository and add it to your OpenMRS application using the Administration->Manage Modules page.

...

Ensure that your form has the Encounter Type field set. Forgetting to do so will result into errors while trying to submit form data. If no encounter type exists, then go to the Administration screen and select Manage Encounter Types to click the Add Encounter Type link.

 

 



One note is that all concepts should be entered under the OBS branch of the schema as shown in the image below

 


      4. Once you are done with building the form schema, click the "Design XForm" link which will open the XForms Module Form Designer to allow you customize the form. Check the Design Surface Tab to ensure that you can see some widgets. If the form looks good (even if you have made no changes)  you should save the form. When you save the form, it will be ready for data entry.

...

Allows you to delete an existing XForm from the database. This item will be shown only when you have saved an XForm into the database.

Settings

Use the following settings for further customizations:

...

  1. While in the form designer, change the type of the ENCOUNTER DATE TIME field from "Date" to "Date and Time".
  2. Set the value of setting named "xforms.dateTimeSubmitFormat" to yyyy-MM-dd'T'HH:mm:ssZ
  3. Set the value of the setting "xforms.encounterDateIncludesTime" to true
  4. For OpenMRS version up to 1.8, change the default form style sheet, which you can access by clicking the "View XSLT" link on the form schema screen, as explained below.

...

How to display forms in different languages

  1. Ensure that the setting xforms.localeList has the locales which you want the forms to be displayed in, for example, en:English,es:Spanish
  2. Go to the Form Designer for the form you would like to change. You must have already created the form for one of the languages.
  3. In the Form Designer on the top right where it says Language, choose the language that you would like to translate to
  4. Click OK when it says that all changes will be discarded.
  5. Click on the text in the Design Surface tab and translate it. You will also need to change the text of the drop down options (for single select question types) in the "Form Fields" panel to the selected language.
  6. Save the form
  7. And now when you view the form in a patient's page it should change according to the locale.

...