Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

@TODO

Configuration

AlertConfiguration Table

This table contains the configuration about alerts. Each alert can be configured in a different way for each of the rooms in an organization.
When an alert fires, its configuration is retrieved from this table using the room of the alert's source patient and the specific rule name that generated the alert.

The structure of this table is:

IdNameDescriptionRuleNameRoomIdSendNotification

Where:

  • Id: unique id of this configuration.
  • Name: a decriptive name of this configuration.
  • Description: a human friendly description of the configuration.
  • RuleName: the name of the rule that this particular configuration belongs to.
  • RoomId: The configuration is valid only for this room. Different rooms could have different configurations.
  • SendNotification: boolean value that specifies whether a notification should also be sent along with the alert.

If a rule is fired, and there is no particular entry in this table for the name of the rule or for the room where the room got executed (this information comes from the patient that generated the alert), the alert is going to be generated without any specific recipient (user or role). This kind of alerts are only going to be visible to users with permission 'read_alerts_only_from_associated_patients'. Generally speaking, these alerts are intended only to the providers that are associated (currently or in the future) to the patient that generated it.

Because of a limitation in the current implementation, the combination between RuleName and RoomId MUST BE UNIQUE. In the case of time-based rules, we may want to have different cron expressions for the same rule so, for example, we could have different recipients. The only workaround for this situation is to duplicate the rule in Survey Agent and give it a different name. Both rules could still share the same template id though.

AlertConfigurationUserRecipient Table

This table is an extension of AlertConfiguration table that allows to register specific users as recipients for a specific alert.

The structure of this table is:

IdAlertConfigurationIdUserId

Where:

  • Id: unique id of this entry.
  • AlertConfigurationId: the id of the Alert Configuration where this recipient belongs.
  • UserId: the id of the targeted User.

 

AlertConfigurationRoleRecipient Table

This table is an extension of AlertConfiguration table that allows to register specific roles as recipients for a specific alert.

The structure of this table is:

IdAlertConfigurationIdRoleId

Where:

  • Id: unique id of this entry.
  • AlertConfigurationId: the id of the Alert Configuration where this recipient belongs.
  • RoleId:the id of the targeted Role.
Roles with 'read_alerts_only_from_associated_patients' permission shouldn't have any entry in this table. These roles are going to omit this table and read straight from AlertPatient table. Entries for these roles in this table are thus redundant.

TimeBasedAlertConfiguration

This table is an extension of AlertConfiguration that allows the configuration of alerts that are generated by a cron job instead of by the submission of a form. When the system starts-up, a Quartz job is created for each of the entries in this table. The job will be configured using the cron expression provided by this table and using the timezone of the facility where the associated Alert Configuration belongs to (given by the RoomId column of AlertConfiguration).

The structure of this table is:

IdAlertConfigurationIdCronExpressionFactNameJobKey

Where:

  • Id: unique id of this configuration.
  • AlertConfigurationId: the id of the Alert Configuration where this recipient belongs.
  • CronExpression: the cron expression used to register a job in Quartz.
  • FactName: This string is used by the time-based rules to know when they should be fired.
  • JobKey: The Quartz job key associated with this entry. If this entry doesn't have a Quartz job associated, this value is null. 

 

  • No labels