...
AlertConfiguration table:
Id | Name | Description | RuleNameAlertKey | RoomIdWorkspaceId | SendNotification |
---|---|---|---|---|---|
1 | RuleX | RuleX | poda | true |
Given that we only want to notify only to associated providers, we don't require to have an entry in AlertConfigurationRoleRecipient nor in AlertConfigurationUserRecipient.
Alert
...
AlertConfigurationRoleRecipient table:
Id | AlertConfigurationId | RoleId |
---|---|---|
1 | 1 | 1 (i.e. nurse) |
RolePermission talbe:
Id | RoleId | PermissionName | OrganizationId |
---|---|---|---|
1 | 1 | read_alerts_only_from_associated_patients |
If we want the alert to be available only to providers that are currently associated with the patient the targeted provider's role must have 'read_alerts_only_from_associated_patients' permission. Otherwise, the alert will be visible in the provider's inbox no matter if he/she is currently associated to the patient or not.
Alert
Alerts table:
Id | Timestamp | Title | Description | Payload | Priority | AlertConfigurationId | Status | UserId |
---|---|---|---|---|---|---|---|---|
1 | 2014-08-05 10:00:00 | Rule X was fired | - | - | High | 1 | New | UserX (or NULL if the rule was triggered by a timer) |
...
AlertConfiguration table:
Id | Name | Description | RuleNameAlertKey | RoomIdWorkspaceId | SendNotification |
---|---|---|---|---|---|
1 | RuleX | RuleX | poda | true |
...
Id | AlertConfigurationId | RoleId |
---|---|---|
1 | 1 | 2 (i.e. charge_UNC) |
Alert
Alert Alerts table:
Id | Timestamp | Title | Description | Payload | Priority | AlertConfigurationId | Status | UserId |
---|---|---|---|---|---|---|---|---|
1 | 2014-08-05 10:00:00 | Rule X was fired | - | - | High | 1 | New | UserX |
...
AlertConfiguration table:
Id | Name | Description | RuleNameAlertKey | RoomIdWorkspaceId | SendNotification |
---|---|---|---|---|---|
1 | RuleX | RuleX | poda | true |
...
Id | AlertConfigurationId | RoleId |
---|---|---|
1 | 1 | 2 (i.e. charge_UNC) |
2 | 1 | nurse_UNC |
...
1 (i.e. nurse_UNC |
...
) |
...
Alert
Alert table:
Id | Timestamp | Title | Description | Payload | Priority | AlertConfigurationId | Status | UserId |
---|---|---|---|---|---|---|---|---|
1 | 2014-08-05 10:00:00 | Rule X was fired | - | - | High | 1 | New | UserX |
...
AlertConfiguration table:
Id | Name | Description | RuleNameAlertKey | RoomIdWorkspaceId | SendNotification |
---|---|---|---|---|---|
1 | RuleX | RuleX | poda | true |
...
- The nurse's role has 'read_alerts_only_from_associated_patients' permission
- The rule that fired either:
- Doesn't have any entry in AlertConfiguration table Has has an entry in AlertConfiguration table that is either:
- not associated with any AlertConfigurationRoleRecipient associated with associated to an AlertConfigurationRoleRecipient containing nurse's role as a recipient
- For the notification to occurr, the following must be true:
- The nurse is at least registered in one device
- The rule that fired has an entry in AlertConfiguration table with SendNotification field = true
...