- |
- Discussion |
- Edit |
- History
FormEntry Module Taskpane Widgets
Contents |
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 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
-
taskPaneNavigateTo('/concept.htm?className=Drug&nodePath=//orders/medication_orders&includeDrugConcepts=true&title=medications.title&createConceptList=true');
redirect: diagnosis.htm
Calls concept.htm with classNames Diagnosis, Finding, Symptom, and Symptom/Finding. Will also pass through any variable named "queryString"
- Usage
-
selectNewDiagnosis();
-
selectResolvedDiagnosis();
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
- 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
- In the schema design page for your form, add SOME CONCEPT SET to obs section
- Set the MAX of the SOME CONCEPT SET field to -1
- Download, save, and design (open) your xsn.
- Place the cursor where you want to put your table
- In the Insert menu, select "Repeating Table..."
- Highlight SOME CONCEPT SET from the obs section and click Next
- Highlight value in the PROBLEM ADDED section and click Add
- Highlight value in the PROBLEM ID section and click Add
- Click Finish
- Paint/format/design the newly created table as you like
- 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.
- Double click on your delete button and then click Edit Form Code
- Place this jscript in the delete method:
-
var node = eventObj.Source;
- var newProbs = node.parentNode.selectNodes("some_concept_set");
- if (newProbs.length > 1) {
- deleteTableRow(eventObj);
- }
- else {
- var node = node.firstChild;
- while (node != null) {
- var valueNode = node.selectSingleNode("value");
- if (valueNode != null)
- valueNode.text = "";
- node = node.nextSibling;
- }
- }
-
- Save and close the script editor
- Add a button under the table for adding problems.
- Double click the button and select Edit Form Code.
- Place this jscript in the add problem method:
-
taskPaneNavigateTo('/concept.htm?createConceptList=true&nodePath=//obs/some_concept_set/problem_added&extraNodePath=//obs/some_concept_set/problem_id&extraLabel=Problem Id');
-
- Save and close the script editor
- Save and close your xsn
- Upload the xsn to OpenMRS
See Media:extparams.xsn as an example xsn for how to use the extra parameters in the concept taskpane widget. (The schema layout: Media: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
-
taskPaneNavigateTo('/conceptAnswer.htm?conceptId=1054&nodePath=//patient.civil_status&title=Civil Status');
location.htm
A location list/picker.
- Parameters
-
- nodePath (defaults to //encounter.location_id): path to schema node to be filled in
- Usage
-
selectLocation();
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":
taskPaneNavigateTo('/user.htm?role=Nurse&nodePath=//nurse.user_id&title=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":
taskPaneNavigateTo('/user.htm?role=Nurse&role=Doctor&role=Lab%20Technician&nodePath=//somebody.user_id&title=This%20will%20be%20the%20title');
redirect: provider.htm
Calls user.htm with role of "Provider" and title of "User.provider". Will also pass through any variable named "queryString"
- Usage
-
selectProvider();
redirect: clinician.htm
Calls user.htm with role of "Clinician" and title of "User.clinician". Will also pass through any variable named "queryString"
- Usage
-
selectClinician();
tribe.htm
A tribe list/picker.
- Parameters
-
- nodePath (defaults to //tribe.tribe_id): path to schema node to be filled in
- Usage
-
taskPaneNavigateTo('/tribe.htm');
