Using Variables

In algebra, mathematical expressions can contain variables that act as placeholders for other values.

The following expression contains two variables: x + y.

If values are substituted for x and y, the expression can be evaluated. If x is equal to 3 and y is equal to 4, then the equation becomes 3 + 4, which evaluates to 7.

In PracticeScript, pre-defined variables represent different information from the PracticeWorks database.

For example, Patient.CancelCount is a variable that represents the number of times a patient has canceled an appointment. With this variable, a single PracticeScript expression can be created to determine if a patient has canceled an appointment more than 3 times:

Patient.CancelCount > 3

PracticeScript can substitute the real value for a particular patient and evaluate the expression to see if it is TRUE (1) or FALSE (0). This is how the Automation Expert uses PracticeScript to determine if a particular automation response should occur for a given event.

 

Related Topics

Using PracticeScript Operators

Using Functions