Customizing Features for Your Practice > Using PracticeScript
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.
Whenever PracticeScript encounters a string of characters that are NOT enclosed in quotation marks, it assumes it is either a variable or a function. If it does not recognize a variable, an error occurs. A constant string, such as "John", must be enclosed in quotation marks.