PS Suite: Advanced Field Mapping

In some cases, you may not have an ideal one-to-one mapping between an eForm question item and a custom form value. In these cases, eForm formula items may provide the flexibility you need. For any custom form item that you'd like to populate, you can create corresponding invisible formula item. The formula can make use of any other eForm value, or even calculate new values.

To map a formula item to a custom form item:

  1. Add a new "Formula" type item to the eForm. In the "Note Formatting" tab, set the "Make a note for this item" to "never".
  2. Make the formula item's reference the same as the custom form item's name.
  3. Set the item's formula to return the value that you'd like to see on the custom form.
  4. You likely want the formula item to be invisible, so go to the "Scripting and More" tab and set the formula's "Show this field if" value to "false".
  5. You also probably do not want the formula to contribute to the generated note, so go to the "Note Formatting" tab and change the "Create a note for this item" to "never".

For example:

  • Suppose you have a 'pain' question on the eForm, i.e. item: 'Are you having any pain?'; item reference: 'pain'.
  • Suppose you have two checkboxes on the PSS custom form to record this answer, one for pain being 'Yes' and one for pain being 'No'.
  • Suppose these checkboxes have names 'PainYes' and 'PainNo', respectively, in the PS custom form editor.

Since the Ocean eForm 'pain' question can only have one reference, you can't have it directly populate both of the checkbox values on the PSS custom form.

However, you can create two new formula items on the eForm to map these values:

  • One formula item will have reference 'PainYes' with formula 'pain.r == 'Y''.
  • The other formula item will have reference 'PainNo' with formula 'pain.r == 'N''.

Suppose the patient chooses 'No' for the question on the tablet. Consequently the 'PainYes' formula will evaluate to 'false' and the 'PainNo' formula will evaluate to 'true'.

When Ocean does the custom form field prepopulation, the 'PainNo' checkbox will be set to the value of 'true', which will make the checkbox checked. The 'PainYes' checkbox will be set to the value of 'false', which will leave it unchecked.

 

Remember: These formula items must use valid JavaScript expressions, so in the event that you would like to set a custom form value to a particular string, you will need to wrap that string in single quotes.

For example, a formula can be set to: 'a value I would like to prepopulate', but NOT simply: a value I would like to prepopulate.

 

To map a formula item to an encounter assistant item:

Using a similar technique, you can also map eForm answers to Encounter Assistant (EA) fields. EA's are actually just a special type of custom form, so you can use the same "pssCF" formula as above to point to the EA.

Mapping the answers to EA items is slightly more difficult. First, you need to find out the ID of the EA item of interest by opening the EA in the custom form editor (as opposed to the usual CF editor).

To open the EA in the CF editor, press and hold Alt (Option) when you click to open the EA in the Edit Custom Forms dialog. You can then see the EA items as they are rendered within the CF.

WARNINGDo not make any changes in the CF editor. Any changes you make to the EA in the CF editor may be overwritten when you make subsequent changes in the EA editor.

Click on the box for the EA item to view its ID. It should start with a "#". Your corresponding eForm item ref should be the same, except with "NUM_" replacing the "#".

e.g. An EA with ID "#item1614254" maps to "NUM_item1614254" in the eForm XML.

WARNING: Make sure you click on the actual checkbox or the cycle box to see the ID, not the label of the EA item. The label ID is different.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request