Set Up Variables
You can add, update, or remove the variables.
You can use the Script It button in the Setup Variables window to create the code snippet for the selected variable. In the Trigger Scripts, you can copy the code snippet to the clipboard and paste into a trigger script.
- To open the Setup Variables window, do one of the following:
- On the Main toolbar, select Variables.
- In the Trigger Info or Assign Field Value window, right-click a variable in the Variables list, and then select Setup Variables.
- Right-click anywhere on the body of a template and then select Variables from the shortcut menu.
The Setup Variable window opens, with four color-coded tabs that list existing System (pink), Patient (green), Template (blue), and Encounter (purple) variables. - From the Scope list, select System, Patient, Template, or Encounter.
Note: To create a Template variable, you must open an existing template before opening the Setup Variables window. Otherwise, the Template option does not appear in Scope list. Therefore, the Template tab also does not appear.
- Enter a name in Variable.
Use only alphanumeric characters and underscores.The variable name appears in the same color as the variable scope.Note: Template Editor prefixes @ to the name automatically when you save the variable.
- Do the following:
- From Style, select Normal (default), Read, Macro, or Array.
- From Type, select Date, Decimal, Memo, Numeric, or Text (default).
- From Access, do one of the following:
- Select Private to hide the visibility and availability of variable to the template that the sub template is placed on.
- Select Public to expose the variable on sub template.
Public variables are visible and available to the template that the sub template is placed on.
- Enter any default content in Contents.
- If you are creating a Template variable, you can select the ellipsis to open the window.
- To fill in a Template variable array with a long list of values, you can select one or more picklists in the Assign Field Value window. In the Value Calculation box, you can enter "PICK: to open the window, and then select each picklist that assigns values to the array.
Note: Do not include any extra spaces between values.
- Enter Comments, if needed.
- Select Add.
Using the same procedure, you can create multiple variables for System, Patient, Template, and Encounter.
- Select Script It.
The Script Clipboard window opens.
- Select Copy to Clipboard.
The script is now copied to clipboard. You can paste it in a trigger script.
- Select OK.