NextGen Knowledge Center

Manage Trigger Scripts

The Trigger Script displays a list of NextGen® Enterprise EHR and user-defined trigger scripts. Selecting a trigger script displays the comments related to the script and adds all the scripts defined in the parameters to the grid.

You can use the created script from the Trigger Functions icon in the main toolbar.

  1. On the main toolbar, select the Trigger Functions icon.
    The Trigger Scripts window opens.
  2. In the Trigger Script list, select the required script.
    The comments of the script appear.

    You can select the ellipsis button to add, update, or delete scripts.

  3. In the Parameters list, select the required parameter, and then select Apply.
    The parameter values are updated based on the trigger script selected.
  4. In the My Code Snippets list, select the required code snippet, and then select Add Code Snippet.
    The code snippet is added to the body area.
    You can select the ellipsis button to add, update, or delete code snippets.
  5. In the Trigger Script Helper list, select trigger action.
    The selected trigger window opens.
  6. Enter the required fields for the selected action, and then select OK.
    The syntax for the trigger actions appear in the body area as a script at the cursor position.
    1. To update the trigger actions, select Trigger Script Helper.
      The selected trigger window opens.
    2. Select OK.
  7. In the body area, enter {.
    A list of functions and template fields and components appears.
  8. To search and replace a string within the body, select Find and Replace.
    The Replace window opens.
    • In Find what, enter the text to find and replace.
    • In Replace with, enter the text to replace.
    • To find the text, select Find Next, and then do the following:
      • To replace the highlighted text, select Replace.
      • To replace the text in the entire script, select Replace All.
    • To match the whole word, select the Match whole word only check box.
    • To exactly match the text or string, select the Match Case check box.
  9. To comment or uncomment codes, select Comment out code block and Uncomment out code block.
  10. To add or remove parentheses for a code, select the Add or Remove parentheses button.
  11. Select Save, and then select Close.