Evaluations: Conditional Logic

  • Updated

Conditional Logic allows specific Evaluation fields to be revealed based on the patient's response to the preceding question. For example, if a patient answers "Yes" to the question “Do you have suicidal thoughts?” the system can show a follow-up question “For how long?”. Patients that answer "No" would not be shown the follow-up question. 

You can build as many conditional questions and responses as you need, you can even include conditional question(s) inside of another conditional question. However, to add a conditional item within a conditional item you must use the Firefox browser instead of Chrome or you won't see the option.

This article shows how to build a template with conditional logic, tips and tricks for building conditional questions, and how conditional questions look in Evaluations added to the patient chart.

Building Conditional Questions

Super Admins or users with Manage Templates or Manage Template - Consents and/or Evaluations can create a new form or update existing forms with conditional questions. 

  1. Open Templates then click on Evaluations.
  2. Click on the Edit icon to modify an existing evaluation or create a new evaluation.
  3. Let's start by adding the conditional_question field.
  4. At the end of the form, click Add item.
  5. Complete the following fields:
    1. Add an item Name.
    2. Type your question into the Label field. If necessary, set a label width.
    3. Select conditional_question from the Field Type drop-down.
    4. Type your answer in the Records Name field, dividing the options with the | symbol. You can set as many responses as you need (remember, they look like radio buttons when the form is added to the patient's chart) e.g., Yes|No|Unsure.
  6. In the Conditions field, type in the answer or answers that should result in the patient receiving the additional question(s).mceclip4.png
    • If multiple answers should trigger additional questions, divide them with the | symbol. For example, if the Yes and Unsure answers generate 5 additional questions, type Yes|Unsure in the Conditions field.
    • Important: The Conditions field is case sensitive, avoid extra spaces around the | symbol and make sure the value matches the record name 100%. Otherwise, it will only recognize the first item within the Conditions field. If none of them match, then nothing will show up.
  7. Click Add Conditional Item to create the first item that will be displayed for users who answer Yes.mceclip5.png
  8. A new form item that has white background and is titled Conditional item for evaluation item.mceclip6.png
  9. These Conditional Items can use any Evaluation Form Field Type (e.g., checkboxes, drop-downs, etc.).
  10. You can add as many additional conditional items as needed by clicking Add Conditional Item.
  11. When building a conditional question within the conditional question, pay attention to which item you are clicking on and select Add Conditional Item. If you select Add item, then it will add on a new item option instead of a conditional item.
  12. If you need to delete the conditional item, use the Delete Item button. If you delete the main conditional_question field, this will delete all related conditional items.

Note: You cannot change conditional_question field type if you have added conditional items. This will result in an error message that requires refreshing the template. 

Building Conditional Questions: Tips and Tricks

There are a few tricks that can help you to build your form with the conditional question(s) easier:

  • When you need to add a lot of conditional items, use the Duplicate Item option instead of Add Conditional Item. Add Conditional Item will add only one item underneath the last conditional item at a time for the conditional question you are working within. If you have more than five questions, that will require a lot of scrolling up and down to add each item. Duplicate Item will create a new conditional item right where you currently are in the form's template.
    mceclip8.png
  • Conditional Questions and the subsequent items cannot have pre-populated answers from other forms. You can, however, populate the answers from conditional items to subsequent forms by putting the Evaluation Item number in the Pre-populate with (ID) field on the other form within a non-conditional item.
  • Move hidden items. Your conditional items do not have to be located all together in one area. Once you generate the conditional item, the system remembers what conditional question triggers it. You can move your item anywhere in the form. Select the Edit icon in the right-top corner of the form (across from the evaluation name) to switch to Items mode. Use [drag] to move your items around (Note: This is why it is important to give comprehensive names to your form items).
    mceclip9.png
  • Use the CSS style drop-down to change how your radio button options look in the form. If you leave the CSS Style drop-down empty, the answer's text will be located to the right of the radio button, and the system will auto-calculate the best distance between the answers. If you select any option between 9% and 90% (e.g. 20%), your conditional question answers will look like regular radio buttons with text above the button, and each button will squeeze into its % from the form space (e.g. 20%). 

Sample Form with Conditional Logic

Let's review how an Evaluation with conditional logic will behave when added to a patient chart. 

mceclip0.png

Check out the following GIF to see conditional questions in action!

Conditional_Logic_0.gif

Was this article helpful?

7 out of 10 found this helpful

Comments

0 comments

Article is closed for comments.