HASALERT Database Function
Use: | This function searches for NextGen® Enterprise EHR alerts and indicates whether a patient has any alerts or a specific alert: NextGen® Enterprise EHR alerts are created through the Alerts module. For more information on alerts, go to NextGen Healthcare Success Community and download the latest Alerts Module for NextGen® Enterprise EHR. |
Syntax: |
|
Arguments: |
|
Returns: | 0 = False 1 = True |
Example 1: Search for any alerts | Button field = has_alerts Numeric data entry field = alert_indicator On the has_alerts button field, set up a Button Click event/Assign Field Value trigger with the following value calculation: templatename_.alert_indicator = {HASALERT( )} Result: The patient has alerts, so 1 displays in the alert_indicator field. To display a pop-up window with a message stating that the patient has alerts: On the alert_indicator field, set up an Edit event/Alert trigger with the following condition: templatename_.alert_indicator = 1 |
Example 2: Search for a specific alert ID | Button field = has_specific_alert Numeric data entry field = alert_indicator Text data entry field 1 = alert_ID Text data entry field 2 = alert_description On the alert_description field, set up a Click event/DBPicklist stored procedure trigger to display the description for a selected alert at run time. On the alert_ID field, set up a Click event/DBPicklist stored procedure trigger to display the ID for a selected alert at run time. On the has_specific_alert button field, set up a Button Click event/Assign Field Value trigger with the following value calculation: templatename_.alert_indicator = {HASALERT( {templatename_.alert_ID} )} Result: Patient does not have the specified alert, so 0 displays in the alert_indicator field. To display a pop-up window with a message stating that the patient does not have the alert: On the alert_indicator field, set up an Edit event/Alert trigger with the following condition: templatename_.alert_indicator = 0 |
Example 3: Search for any match within a group of alert IDs | Button field = has_one_of_the_alerts Numeric data entry field = alert_indicator Text data entry field 1 = alert_ID Text data entry field 2 = alert_description On the alert_description field, set up a Click event/DBPicklist stored procedure trigger to display the descriptions for selected alerts at run time. On the alert_ID field, set up a Click event/DBPicklist stored procedure trigger to display IDs for selected alerts at run time. Enter the applicable alert IDs in the {HASALERT («"id"»,«"id"»,«"id"»,...)} function below. On the has_one_of_the_alerts button field, set up a Button Click event/Assign Field Value trigger with the following value calculation: templatename_.alert_indicator = {HASALERT("ECD33F5F-5244-42C9-BD5B-12759F92A4A5","DC82BC8A-97E8-43D6-ADC0-9275D27F0BB4","F40FF467-5AB8-4CC6-9386-0D24C14E76CB", "D989EF10-D30F-4D28-8AEA-51287586EA90" )} Result: Patient has an alert that matches the ID of one of the alerts entered so 1 displays in the alert_indicator field To display a pop-up window with a message stating that the patient has one of the alerts: On the alert_indicator field, set up an Edit event/Alert trigger with the following condition: templatename_.alert_indicator = 1 |