Decision Support Bulk Export
How the Decision Support System fits together
There are two sets of linked tables that support Mirah’s decision support functionality.
The first is the setup instructions:
- Entity Decision Algorithm supplies the configuration for what decision support is going to trigger, including what dates and the population of patients it applies to, and other settings.
- Workflow is a specific action that an algorithm can trigger. For example, ‘if the patient endorses a self harm item…”.
- Workflow Action is a specific action, either taken by the system or instructing the provider. For example:
- “Add the patient to a given treatment track” (system)
- “Complete a safety planning exercise for the patient” (instruction to provider)
These combine as follows:
- Configure an algorithm to run on all patients currently in outpatient treatment… (entity decision algorithm)
- Which triggers a workflow whenever a patient endorses a self harm item…(workflow)
- That prompts them to do a safety plan (workflow action)
Whenever the triggering event occurs, an additional set of tables include information about what steps have happened for that particular patient:
- Triggered Decision Algorithm links to Entity Decision Algorithm and a particular Episode of Care to show that this episode of care has been triggered by the algorithm.
- Triggered Workflow shows that a particular workflow has been triggered for this patient, and is linked to the Triggered Decision Algorithm
- Triggered Workflow Action shows the actions that are available for this patient
- Triggered Workflow Action Log shows which actions were actually taken by the system or by a provider
- Provider Notification shows the inbox notifications and emails sent to a provider
Entity Decision Algorithm
The Entity Decision Algorithm represents at a top level a Decision Support algorithm that is in use.
Column |
Name |
Format |
Nullable |
Description |
Notes |
id | ID | uuid | false | The mirah internal identifier of the algorithm | |
name | Name | string | false | The visible name of the algorithm | |
notes | Notes | string | true | Additional notes displayed as context for the algorithm | |
params | Params | json | true | Additional configuration params | This is mirah internal and is not well documented for external use but is provided as context |
sendNotifications | Send Notifications? | boolean | false | Whether notifications will be sent for this algorithm | Providers will receive alerts in their inbox either way but this governs if emails will be sent |
startDate | Start Date | datetime | true | The first date for which this algorithm will process data | |
status | Status | Active | paused | hidden | disabled | false | Is this algorithm active | Paused = algorithm will not trigger but existing alerts will be visible Hidden = algorithm triggers but alerts will not be generated Disabled = algorithm will not be triggered and alerts are hidden |
workflowNote | Workflow Note | string | false | Additional information surfaced to the provider when the workflow triggers | This can be used to customize instructions etc |
Workflow
A set of potential decisions and actions that can be triggered by an event. Generally only one workflow is active per algorithm per episode of care at a time. The highest priority algorithm will take precedence.
Column | Name | Format | Nullable | Description | Notes |
id | Id | uuid | false | The mirah identifier | |
callToAction | Call To Action | string | false | The top description of the workflow designed to spur action | E.g. “Patient has reported self harm” |
defaultPriority | Default Priority | integer | false | The priority of this workflow | |
description | Description | string | true | An optional description of this workflow | |
emailBody | Email Body | string | false | The body of the email that is constructed when the workflow triggers | |
emailSubject | Email Subject | string | false | The subject of the email that is constructed when the workflow triggers | |
instructions | Instructions | markdown | true | The set of instructions that will be displayed to users when this workflow triggers | |
notificationMode | Notification Mode | Send_email | no_email | false | Whether emails will be sent | |
title | Title | string | false | The name of the workflow | |
createdAt | Created At | datetime | false | ||
updatedAt | Updated At | Datetime | false |
Workflow Action
An action that can be taken as part of a workflow, either by the system or as a prompt for a provider. For example - ‘add a patient to a treatment track’, or ‘complete safety planning with a patient’.
Column | Name | Format | Nullable | Description | Notes |
id | Id | uuid | false | The mirah identifier | |
phase | Phase | Manual | before | after | false | When this action occurs | Manual: this action can only be triggered by a user. Before: this action will automatically trigger when the workflow starts After: this action will automatically trigger when the workflow completes |
reusable | Reusable | boolean | false | Whether this action can be used multiple times | |
sideEffectParams | Side Effects | json | true | This is an internal column which includes state on how to trigger parameters | |
text | Text | string | false | The text to display for this action | |
createdAt | Created At | datetime | false | ||
updatedAt | Updated At | Datetime | false | ||
workflowId | Workflow Id | uuid | false | The workflow this action is associated with |
Triggered Decision Algorithm
This table represents the triggering of an algorithm for a particular patient’s episode of care.
Column | Name | Format | Nullable | Description | Notes |
id | Id | uuid | false | The mirah identifier | |
context | Context | json | true | An internal blob of information containing useful additional context on how the algorithm was triggered | |
status | Status | Active | complete | canceled | false | The status of this algorithm | |
triggeredAt | Triggered At | datetime | false | When the algorithm was triggered | |
careEpisodeId | Care Episode Id | uuid | false | The episode of care this algorithm has been triggered for | |
entityDecisionAlgorithmId | Entity Decision Algorithm Id | uuid | false | The algorithm triggered |
Triggered Workflow
An active workflow for an episode of care.
Column | Name | Format | Nullable | Description | Notes |
id | Id | uuid | false | The mirah identifier | |
activeSince | Active Since | datetime | false | When this workflow became active | |
isCurrentlyTriggered | Currently Triggered | boolean | false | Is this workflow currently active | |
priority | Priority | integer | false | The priority of this workflow | Only one workflow can be active for the same algorithm at the same time |
reasons | Reasons | string | true | A text based summary of why this workflow was triggered | E.g. “The patient scored a 14 on the PHQ-9 which is above the threshold of 7” |
snoozedUntil | Snoozed Until | datetime | true | This item is snoozed until this time | |
status | Status | Active | snoozed | complete | canceled | false | The status of this item | |
triggeredAt | Triggered At | datetime | false | When this item was triggered | |
statusUpdatedById | Status Updated By Id | uuid | true | The user id who updated the status last | |
triggeredDecisionAlgorithmId | Triggered Decision Algorithm Id | uuid | false | The reference to Triggered Algorithm Decision | |
workflowId | Workflow Id | uuid | false | The reference to Workflow |
Triggered Workflow Action
An action for a particular Triggered Workflow that may be taken.
Column | Name | Format | Nullable | Description | Notes |
id | Id | uuid | false | The mirah identifier | |
status | Status | Available | used | false | The status of the action | Available: this action can be taken Used: this action has already been taken |
createdAt | Created At | Datetime | false | ||
updatedAt | Updated At | Datetime | false | ||
triggeredWorkflowId | Triggered Workflow Id | uuid | false | Which Triggered Workflow this refers to | |
workflowActionId | Workflow Action Id | uuid | false | Which Workflow Action this refers to |
Triggered Workflow Action Log
A log of the actions taken for a workflow.
Column | Name | Format | Nullable | Description | Notes |
id | Id | uuid | false | The mirah identifier | |
triggeredWorkflowActionId | Triggered Workflow Action Id | uuid | false | The Triggered Workflow Action used | |
userId | User Id | uuid | false | The user taking the action | |
usedAt | Used At | Datetime | false | When the action was taken |
Provider Notification
A notification sent to an individual provider regarding a triggered workflow.
Column | Name | Format | Nullable | Description | Notes |
id | Id | uuid | false | The mirah identifier | |
sentAt | Sent At | datetime | true | If a notification was sent, when it was emailed | |
createdAt | Created At | datetime | false | ||
updatedAt | Updated At | datetime | false | ||
providerId | ProviderId | uuid | false | The provider receiving the notification | |
triggeredWorkflowId | Triggered Workflow Id | uuid | false | The triggered workflow requiring notification |