Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Formatting of document - still has links to mediawiki archive & can't locate these pages on the current wiki

...

  1. Review your existing paper form.
  2. Log into OpenMRS.
  3. Go to the concept dictionary
  4. For each field on the paper form, search the Concept Dictionary to locate an existing concept.
  5. If a concept already exists, it is helpful to mark the concept ID on the paper form or keep a list of form questions and corresponding concept IDs for your future reference.
  6. If a corresponding concept does not exist, add it to the concept dictionary.

_Concepts have a number of possible data types. The most common are: _

  • Number. Choose this if the concept you are setting up is a question with a numeric answer, for example, weight. (Another example commonly used in OpenMRS demos is nasal hair length (smile) ) If the value could be entered as a floating number (with decimals) as an answer to the question, check the "precise" box. If the user is limited to entering whole numbers, uncheck the "precise" box.
  • Coded. Choose this if the concept you are setting up is a question with another concept as an answer. This is what you use if you want the user to choose the answer on the form using a drop down list / combo box / set of option buttons or set of tick boxes. After you choose the "coded" data type, you are given an option of choosing the possible answers to the question. (If you haven't yet set up the possible answers as concepts, you have to do this first before linking them to the question)
  • N/A. This is used if the concept you are setting up is not actually a question at all, but a possible answer.
  • Text. Choose this if the concept you are setting up is a question with a textual answer. Note that textual answers are not so easy to analyse later.
  • Boolean. Choose this if the concept you are setting up is a question with a yes/no answer.

...

  1. Log into OpenMRS as an administrator.
  2. Select the Administration link in the top navigation menu.
  3. Select Manage Forms under the Forms link section.

To create a new form, follow these instructions:

  1. Select the Add Form link at the top of the page
    Panel

    __'NOTE: currently, the form submission engine requires encounter-based forms with a specific hierarchy (contained in the Basic Form definition); therefore, you should start new forms by copying the Basic Form and adding observations to that foundation.

    To duplicate an existing form, follow these instructions:
  2. Select an existing form from the Duplicate Form field — e.g., the Basic Form contains all of the currently required fields in the proper hierarchy to be handled properly by the FormEntry engine.
  3. Click the Duplicate button.
  4. Update the form metadata, including the form name.

NOTE: While editing the form schema, ensure that the Published checkbox is unchecked. When we are ready to make the form available through the Form Entry module, we will need to check this checkbox.

Design Schema

This process involves using the OpenMRS application to create a schema for your form. This means telling OpenMRS which concepts are on your form.

To add new concepts to a form schema:

  1. Choose the Design Schema use case.
  2. Type the desired concept into the Find Field Elements search box (consult Define Concept section above). The search results should automatically display in the area below the search box.
  3. Press the Enter key. The search box and search result index (i.e. the number to the left of the search result) should now be highlighted in gold.
  4. Type the search result index in the search box.
  5. Press the Enter key.

NOTE: You can also drag n' drop the desired field element from the search result box to the form schema. However, when starting with a blank form schema it is difficult to locate the place to "drop" the field element. You can also double-click the desired field element, but this requires you to "update" the its metadata.

...

  1. Right-click the desired form element in the schema.
  2. Click 'Edit Field'.
  3. Select 'Edit for this form only' to edit the form element for the current form.
  4. Enter the appropriate information (in most cases you will only need to change Multi?, Field #, Field Part, Page #, Min, Max, and Required).
    • Multi - Indicates whether the schema should allow multiple values for a single form element (i.e. multiple answers to a single question like "What medications are you currently taking?").
    • Field # - The field number corresponding to the actual form element in your form. This value may be left blank.
    • Field Part - The sub field number/letter corresponding to the actual form element in your form (i.e. 'a' in 1a). This value may be left blank.
    • Page # - The page number where this form element appears. This value may be left blank.
    • Min - The minimum number of times that this form element should appear on the form. This value may be left blank. Default = 0.
    • Max - The maximum number of times that this form element should appear on the form. This value may be left blank. Default = 1. Use -1 to allow for an arbitrary number of values, for example, if you intend to use a repeating table in the form which gathers many observations for this field.
    • Required - Indicates whether the form element should be required.

...

  1. Select the X icon next to the form element name.

_ Default value _

  • The default value field is a velocity expression that is rendered every time the form is loaded
  • If using the FormEntry Module, these variables are available to you:
    • enterer = User object for the person filling out the form (e.g. ${enterer.userId})
    • dateEntered = Date object for the current date+time
    • patient = Patient object (e.g. ${patient.personName})
    • timestamp = date format: yyyyMMdd'T'HH:mm:ss.SSSZ
    • date = date format: yyyyMMdd
    • time = time format: HH:mm:ss
    • sessionId = current user's java session id
    • uid = a unique identifier for the form being filled out that will carry through to the hl7 message
    • patientEncounters = the current patient's past encounters. Most recent is first in the list
    • relationships = all relationships the person currently has (as of version 4.2 of formentry)

...