Workflow Conditional "If" Elements
You can use the "If" element of the Workflow editor to evaluate patient data as you run a workflow, to determine how the workflow activities will function when the workflow is triggered for a specific patient. For example, a workflow can trigger a different word processing document, depending on whether a patient is at least 18 years old.
Conditional "If" Element vs Question Element - This topic discusses adding a conditional "If" element to a workflow to evaluate Edge Cloud data and choose the appropriate activities to run depending on the result. Alternately, if you want to evaluate data that is not in Edge Cloud, you can use the Question element to ask a yes/no question as the workflow runs, and choose which activities to run at that time.See "Workflow Yes/No Question Element" for details.
Add a Conditional Element to a Workflow
Drag the "If" element from the Common Activities list onto your Workflow Activities list. An "Else" element is automatically added, directly below the "If".
Set Up the Conditional Element
Click the "If" element in the Workflow Activities list to select it, then click [...] to open the Conditions Editor window.
Use the Left Properties section at the bottom of the window to choose the variable type you want to evaluate. First, select the variable type to work with, such as "Field", then select the properties for that variable, such as "Patient Age - Years". Your selected variable appears at the top of the window. Tell me more about variable types,,,
Use these variables to evaluate a specific type of static data. For example, variables that you create with the Assign element contain data that is available only for the workflow activity in which they were created.
Use this variable type to evaluate whether data is "true" (checked), or "false" (unchecked). Check the Value option if you want the tested data to be "true"; leave it unchecked if you want the tested data to be "false".
Use this variable type to evaluate a number up to two digits past the decimal point (i.e. 18.75 or .99)
Use this variable type to evaluate a specific field in your Edge Cloud database. After selecting this variable type, choose the Field to work with (such as Patient Age Years or Office Abbreviation). Most often, the Selected Table property correctly reflects the type of field you have chosen. On occasion, you may wish to choose a Selected Variable that will contain this field data for the duration of the workflow activity.
Use this variable type to evaluate an integer, or whole number, such as 18. After selecting this variable type, be sure to enter the integer to evaluate in the Value field.
Use this variable type to evaluate a list response from your Edge Cloud database. After selecting this variable type, you choose the Field to work with, such as Office Abbreviation or Patient Status. The available responses then appear in the Value box, where you can select one or more responses to work with.
Use the Right Properties section at the bottom of the window to enter the value, or response you are looking to evaluate. Usually, the appropriate Variable Type is already selected, according to the type of data you chose at the left side of the screen, and you only need to enter the details that you want evaluated. For example, if you have selected "Patient Age - Years" at the left, the right side of the screen defaults to the variable type "Integer", and all you have to do is enter the age you want to evaluate, such as "18". Your selected value appears at the top of the window. Tell me more about variable types,,,
Use these variables to evaluate a specific type of static data. For example, variables that you create with the Assign element contain data that is available only for the workflow activity in which they were created.
Use this variable type to evaluate whether data is "true" (checked), or "false" (unchecked). Check the Value option if you want the tested data to be "true"; leave it unchecked if you want the tested data to be "false".
Use this variable type to evaluate a number up to two digits past the decimal point (i.e. 18.75 or .99)
Use this variable type to evaluate a specific field in your Edge Cloud database. After selecting this variable type, choose the Field to work with (such as Patient Age Years or Office Abbreviation). Most often, the Selected Table property correctly reflects the type of field you have chosen. On occasion, you may wish to choose a Selected Variable that will contain this field data for the duration of the workflow activity.
Use this variable type to evaluate an integer, or whole number, such as 18. After selecting this variable type, be sure to enter the integer to evaluate in the Value field.
Use this variable type to evaluate a list response from your Edge Cloud database. After selecting this variable type, you choose the Field to work with, such as Office Abbreviation or Patient Status. The available responses then appear in the Value box, where you can select one or more responses to work with.
Select the Mathematical Operator
Use the Operator field that appears between the variable you have selected at the left side of the window, and the value you are looking for at the right side of the window, to choose the mathematical operator to use. Your conditional statement is now complete.
Equal to ( = ) - This operator includes records that exactly match the field value.
Not equal to ( <> ) - This operator excludes records that match the field value.
Greater than (> ) - This operator includes records whose value is more than, but not the same as, the field value.
Greater than or equal to ( >= ) - This operator includes records whose value is either more than or the same as the field value.
Less than ( < ) - This operator includes records whose value is less than, but not the same as, the field value.
Less than or equal to ( <= ) - This operator includes records whose value is either less than or the same as the field value.
Click New at the top of the Conditions Editor to add another statement to this "If" element, or click Delete to remove the selected statement. When your workflow is triggered, all statements must be satisfied before the "If" element is considered "true".
Click Ok at the bottom of the window to close the Conditions Editor and return to your Workflows editor.
Evaluating Treatment Chart List Responses - You can use responses from your Treatment Chart lists within a conditional element to evaluate a patient's newly-created treatment chart record. You might use this feature, for example, to send a "Poor Oral Hygiene" letter when the patient's treatment chart indicates a failing oral hygiene grade. For this to work properly, you must follow a few steps exactly.
-
As you create the conditional statement, select any "@" variable type (or select the String variable type) in the Left Properties, and type the variable in the format @TX_[ColumnName], where [ColumnName] is the exact name of your treatment chart list
-
You must trigger the workflow immediately after creating the treatment chart record. (You can do this with the Create Treatment Chart Entry workflow trigger, or with your Workflow Quick Actions.)
In most cases, you must drag and drop items in the Workflow Activities list to be sure the appropriate activities will be completed, according to whether or not the "If" element has been satisfied.
True / False Activity Placement
If you want an activity to occur when the conditional statement is true, drag that activity directly onto the "If" element. The activity will then appear indented below the If. Likewise, if you want an activity to occur when the conditional statement is false, drag that activity directly onto the "Else" element. The activity will appear indented below the Else.
Unconditional Activity Placement
Activities that are not part of the conditional statement can be either above or below the "If / Else" statements, and will occur whenever the workflow is triggered. These activities are not indented.
To be sure an activity is not part of the conditional statement, click the VCollapse arrows b