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

« Previous Version 5 Next »

Table Of Contents

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 Table

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. 

Entity Model

Alert Entries

Introduction

Whenever an alert rule is fired, one or more entries in the Alert table are inserted according to the configuration described in the previous section.

Alert Table

This table contains the specific data of an alert such as body, title, timestamp, etc. This table is the replacement of current 'alertticket' and 'alertstatus' tables. The patient/s associated to an alert are now placed in a separate table: AlertPatient.

The structure of this table is:

IdTimestampTitleDescriptionPayloadPriorityAlertConfigurationIdStatusUserId

Where:

  • Id: unique id of the alert.
  • Timestamp: the creation timestamp.
  • Title: the title of the alert.
  • Description: the description of the alert.
  • Payload: any payload (as text) that the alert has.
  • Priority: the priority of the alert. Possible values are: High, Medium, Low. These values come from an enum defined in the application and not from another table.
  • AlertConfigurationId: the id of the AlertConfiguration entry that generated this Alert. The associated AlertConfiguration can be used to retrieve information such as the recipients of the Alert (users or roles) and the rule that originated the Alert.
  • Status: the status of the alert. Possible values are: New, Read, Archived. These values come from an enum defined in the application and not from another table.
  • UserId: the id of the user that generated this alert. In the case of time-based alerts, this value is NULL.

Alerts could be shared among different users. In this case, the status of the alert is also shared: when a user marks the alert as 'Read', the alert is now 'Read' for all the users sharing it.

AlertStatusAudit Table

This table serves as a log of how the status of an alert has changed in time.

The structure of this table is:

IdAlertIdStatusTimestampUserId

Where:

  • Id: unique id of each entry.
  • AlertId: the id of the alert this entry refers to.
  • Status: the new status of the alert.
  • Timestamp: when the alert status was changed.
  • UserId: who (userId) updated the status of the alert.

AlertPatient Table

This table contains the different patients an Alert is related to. 

IdAlertIdPatientId

Where:

  • Id: unique id of each entry.
  • AlertId: the id of the alert this entry refers to.
  • PatientId: the patient related to the alert.

Entity Model

 

 

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.