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:

  • Add a new "Formula" type item to the eForm.
  • In the "Note Formatting" tab, set the "Make a note for this item" to "never".
  • Make the formula item's reference the same as the custom form item's name.
  • Set the item's formula to return the value that you'd like to see on the custom form.
  • 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".
  • 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 question on your eForm, "Are you having any pain?", with the item reference: 'pain'. You also have two checkboxes on a PS Suite custom form to record the answer to this question, one called 'PainYes' for a 'Yes' answer and one called 'PainNo' for a 'No' answer.
    • Since the 'pain' question in your Ocean eForm can only have one item reference, you cannot have it directly populate both of the checkbox values on the PS Suite custom form.
    • However, you can create two new formula items on the eForm to map these values:

      Item Reference Formula
      PainYes
      pain.r == 'Y'
      Copy Formula
      PainNo
      pain.r == 'N'
      Copy Formula
    • Now, if the patient answers 'Yes' to the question on your Ocean eForm, the 'PainYes' formula will evaluate to 'true' and the 'PainNo' formula will evaluate to 'false'.
    • Then, when Ocean populates the PS Suite custom form field, the 'PainYes' checkbox will be set to the value of 'true', which will mark the checkbox checked. The 'PainNo' checkbox will be set to the value of 'false', which will leave it unchecked.

Reminder To Use Single Quotes Around Values

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. Encounter Assistant's are actually just a special type of custom form, so you can use the same "pssCF" formula as above to point to the Encounter Assistant.

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

  • Find the ID of the Encounter Assistant item

    • To open the Encounter Assistant in the custom form editor, press and hold Alt (Option) when you click to open the Encounter Assistant in the Edit Custom Forms dialog. You can then see the Encounter Assistant items as they are rendered within the Custom Form.
    • Warning: Do not make any changes in the custom form editor. Any changes you make to the Encounter Assistant in the custom form editor may be overwritten when you make subsequent changes in the Encounter Assistant editor.
    • Click on the box for the Encounter Assistant item to view its ID. It should start with a "#". Your corresponding eForm item ref should be the same, except with "NUM_" replacing the "#".
    • For Example: In an Encounter Assistant 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 Encounter Assistant item. The label ID is different.
Have more questions? Submit a request