All OpenMRS ID accounts have been reset.

Read more and change your password before signing in.
Icon

EXTENDED: OMRS14 Proposals due 30 April! Read more and submit a proposal at OpenMRS Talk.

Skip to end of metadata
Go to start of metadata

The taskpane widgets are found in /web/module/taskpane in the FormEntry Module.

These are the taskpane pages defined. They are called via the scripting language in Infopath:

taskPaneNavigateTo('/concept.htm?className=Drug&nodePath=//orders/medication_orders');

A step by step example of how to configure a concept picker is at InfoPath Complex features for concepts, forms, fields and formentry.

concept.htm

A concept list/picker. If a concept is not found it gives the user the option of submitting a concept proposal.
;Parameters:

  • className (allows multiple): Class of the concept
  • nodePath: path to schema node to be filled in
  • mode: Valid values: 'add' or 'remove'. Used in add/remove diagnosis boxes
  • title: Spring message property id or just a title string to display
  • createConceptList: true/false whether concepts are added to a list or subsequent concept selections overwrite the first
  • includeDrugConcepts: true/false whether drug values are added as selectable options in the displayed search list
    ;Usage:

redirect: diagnosis.htm

Calls concept.htm with classNames Diagnosis, Finding, Symptom, and Symptom/Finding. Will also pass through any variable named "queryString"

  • Usage

concept.htm extra parameters

Create a list of concepts and allow DAs to assign metadata around them. (currently metadata can only be integer or string based)

Requires Form Entry Module v2.5

  • Example: DAs can insert any number of problems to add and associate a "problem id" to each
  1. Create a concept ("SOME CONCEPT SET" in example) that is defined as a set and has two set members:
    • PROBLEM ADDED
    • PROBLEM ID - defined with MISC class and NUMERIC datatype
  2. In the schema design page for your form, add SOME CONCEPT SET to obs section
  3. Set the MAX of the SOME CONCEPT SET field to -1
  4. Download, save, and design (open) your xsn.
  5. Place the cursor where you want to put your table
  6. In the Insert menu, select "Repeating Table..."
  7. Highlight SOME CONCEPT SET from the obs section and click Next
  8. Highlight value in the PROBLEM ADDED section and click Add
  9. Highlight value in the PROBLEM ID section and click Add
  10. Click Finish
  11. Paint/format/design the newly created table as you like
  12. For continuity, you can copy the numbering label and delete button from the problem added/problem removed repeating tables. Place them in the same row as the two values.
  13. Double click on your delete button and then click Edit Form Code
  14. Place this jscript in the delete method:
  15. :
  16. Save and close the script editor
  17. Add a button under the table for adding problems.
  18. Double click the button and select Edit Form Code.
  19. Place this jscript in the add problem method:
  20. :
  21. Save and close the script editor
  22. Save and close your xsn
  23. Upload the xsn to OpenMRS

See extparams.xsn as an example xsn for how to use the extra parameters in the concept taskpane widget. (The schema layout: extparams.gif)

conceptAnswer.htm

A concept list/picker displaying only the answers for the given conceptId.
;Parameters:

  • nodePath (required): path to schema node to be filled in
  • conceptId (required): Integer concept id to concept that has answers
  • title (defaults to conceptAnswer.title): Spring message property id or just a title string to display
    ;Usage:

location.htm

A location list/picker.

If using another node:

  • the node must be of type text and will receive data in the form #^Location Name.
  • Be sure to add the /value at the end of the nodepath

;Parameters:

  • nodePath (defaults to //encounter.location_id): path to schema node to be filled in

;Usage:

or

user.htm

A user list/picker.
;Parameters:

  • nodePath (defaults to //encounter.provider_id): path to schema node to be filled in
  • title: Spring message property id or just a title string to display
  • role: Optional role(s) to restrict the user search on
    ;Usage:

    To show only users with a role of "Nurse" and to place the value selected into the "//nurse.user_id" node in the schema and to title the taskpane with the message property "nurse.title":

    To show only users with roles of any of "Nurse", "Doctor", or "Lab Technician", and place the selected user into "//somebody.user_id" in the schema and to title the page with "This will be the title":

    ;Global properties:
  • as of version 3.6.3 if you set the global property 'formentry.infopath_taskpane.showAllUsersOnLoad' to 'false' then the user picker will not automatically show all users when loaded. (Otherwise this behavior is invoked automatically after 250ms, which occasionally causes problems.)

redirect: provider.htm

Calls user.htm with role of "Provider" and title of "User.provider". Will also pass through any variable named "queryString"

  • Usage

redirect: clinician.htm

Calls user.htm with role of "Clinician" and title of "User.clinician". Will also pass through any variable named "queryString"

  • Usage

tribe.htm

A tribe list/picker.
;Parameters:

  • nodePath (defaults to //tribe.tribe_id): path to schema node to be filled in
    ;Usage:

encounter.htm

An encounter selection widget that will allow a user to supply a
(Requires version 3.3 of formentry and openmrs 1.4 (or openmrs 1.3.1 and this patch))

  • Examples
    xsn: archive:Backfill-encounter.xsn
    schema: archive:Backfill-encounter-schema.png
    ; Parameters:
  • nodePath (defaults to //encounter/encounter.encounter_id): the path to the node to store the selected encounter id
  • originalDatetimeNodePath (optional): the node to store the selected datetime of the original backfilling encounter (used for verifying selection by the data assistant only)
  • patientId (required) The internal database id of the patient that this form is being filled out for
  • encounterTypeId (optional, multiple) EncounterTypeId of the encounter types to restrict the taskpane to
    ; Usage:

    var patientId = XDocument.DOM.selectSingleNode("//patient/patient.patient_id");
    if (patientId)
    patientId = patientId.text;
    taskPaneNavigateTo("/encounter.htm?patientId=" + patientId + "&nodePath=//encounter/encounter.encounter_id&originalDatetimeNodePath=//encounter/encounter.original_encounter_datetime");

relationship.htm

A widget that lets an infopath user add relationships to the current patient.
(Requires version 3.3 of formentry and openmrs 1.4 (or openmrs 1.3.1 and this patch))

  • Examples
    xsn: archive:relationships.xsn
    ; Parameters:
  • patientId (required) The internal database id of the patient that this form is being filled out for
    ; Usage:

    var patientId = XDocument.DOM.selectSingleNode("//patient/patient.patient_id");
    if (patientId)
    patientId = patientId.text;
    taskPaneNavigateTo("/relationship.htm?patientId=" + patientId);