CEHRT
Summary
This enhancement to CEHRT introduces a configurable delay between the signing of a report in RIS and the forwarding of a C-CDA to FHIR systems to which the patients has enrolled (such as Darena's BlueButtonPRO). This delay is required to comply with California legislation.
Note that this functionality is being delivered via a BAT script.
Background
Previously, Feature #29393 introduced a FHIR-based API for patients to access their data through third party system such as Apple Health etc. This functionality has been made available via Darena's BlueButtonPRO.
However, California (legislation) has introduced a requirement for a four-day delay before a patient can access records. As Darena does do not support the addition of a lag between the creation of a patient invite and the subsequent sending to the patient, this functionality will be implemented in RIS.
The related Feature #31787 - Backend Automation Tool (BAT) Phase Two - Rules, also included in this release, extends the functionality of the Backend Automation Tool (BAT) to create Backend Automation Task (BAT) "scripts" to implement advanced RIS workflows without requiring source code changes.
This "report delay" functionality is an ideal candidate to be implemented as a Backend Automation Task, and its implementation should be reviewed as a training exercise.
|
WARNING: BAT scripts should never be deployed into a production system without extensive review and testing. Potential consequences of improper scripting can include: § Data loss § Data corruption § Degradation of system performance, including rendering the system non-responsive. |
Feature Description
This functionality utilizes the RIS Backend Automation Tool (BAT) to a create Backend Automation Task (BAT) "script" to delay the transmission of C-CDAs to Darena's BlueButtonPRO, as required to by California legislation.
The External Access Delay BAT script workflow is initiated when an exam reaches either a Signed or an Exam Done Tech Only status. If the patient is enrolled with Darena's BlueButtonPRO (by providing an External Access Email), the workflow waits until the number of days specified by a new FHIRReportForwardingDelay SystemConfig setting have elapsed before forwarding a C-CDA.
This workflow is composed of three elements that must be configured:
1. Create the Queue Subscription.
2. Create the BAT Collection / BAT Steps.
3. Set the SystemConfig configuration option.
Monitoring and troubleshooting
Once enabled, the External Access Delay BAT script workflow will continue to run without user intervention.
Failures are silent, and can be monitored by querying the c_bat table (Service Team assistance may be required), e.g.:
SELECT TOP 100 * FROM c_bat WHERE bat_collection_code = 'FHIRReportForwardingDelay' AND status_code = 'Error' ORDER BY last_updated DESC
Once the BAT script completes, any downstream failures, i.e., after the BAT script has requested the C-CDA be sent, would be monitored as normal by querying the c_action_queue table (Service Team assistance may be required), e.g.:
SELECT TOP 100 * FROM c_action_queue WHERE queue_name = 'DARENA_Error' ORDER BY last_updated DESC
Configuration Instructions
System Administrators must complete the following actions to enable this feature and Service Team assistance is required for some actions.
|
All California sites must deploy this feature to comply with California legislation. |
Note that this functionality is being delivered via a BAT script. Refer to the related Feature #31787 - Backend Automation Tool (BAT) Phase Two - Rules, also included in this release, for details.
RIS Client
Changes to QueueSubscription Lookup Table Settings
Create a queue subscription to define the specific RIS action(s) that will initiate the workflow:
1. Confirm the following row exists in the QueueSubscription RIS Lookup Table, or add it if not:
1.1. Queue Name = BAT
1.2. Description = Actions that will initiate BAT Collection workflows.
1.3. Queue Rows to Acquire = 10
2. From the l_queue_subscription tab for BAT, add the subscription row:
2.1. queue_name = BAT
2.2. main_action = <All>
2.3. Db_action = ExternalAccessPatientEnrolled
2.4. exclusion_flag = N
3. From the l_queue_subscription tab for BAT, add the subscription row:
3.1. queue_name = BAT
3.2. main_action = <All>
3.3. db_action = ExternalAccessExportStudy
3.4. exclusion_flag = N
Remove the previous implementation for forwarding C-CDAs, which did not include this delay:
4. Locate the Queue Name = DARENA entry and disable it by setting Active = N (or by deleting the entry).
Changes to BATCollection Lookup Table Settings
Create the new BAT Collection and BAT Steps to perform the workflow.
|
WARNING: Do not deploy or modify BAT scripts without consulting the Service Team. |
Define a BAT Collection for the workflow:
1. Add a new row in the BATCollection RIS Lookup Table Editor:
1.1. Bat Collection Code = FHIRReportForwardingDelay
1.2. Description = Feature #34399 - Configurable delay before forwarding reports to Darena's BlueButtonPRO
1.3. Inclusion Rule - SQL listed below.
1.4. Active = Y
INCLUSION RULE
SELECT CASE
WHEN EXISTS (
SELECT 1
FROM c_patient_extra_info e
INNER JOIN c_action a ON e.patient_key = a.patient_key
WHERE e.patient_key = @patient_key
AND a.action_key =@action_key
AND patient_extra_info_code = 'ExternalAccessEmail'
AND a.db_action IN (
'ExternalAccessPatientEnrolled',
'ExternalAccessExportStudy'
)
)
THEN 1
ELSE -1
END
Define the BAT Steps for the workflow. This workflow consists of only one step:
2. Expand the new BatCollection row to add the step:
2.1. Bat Collection Code = FHIRReportForwardingDelay
2.2. Step = 1
2.3. Description = Feature #34399 - Configurable delay before forwarding reports to Darena's BlueButtonPRO
2.4. Active = Y
2.5. Available Datetime Rule - SQL listed below.
2.6. Parameter Calculation Rule - SQL listed below.
2.7. Action - SQL listed below.
2.8. Pre Workflow Rule - SQL listed below.
2.9. Post Workflow Rule - (none).
AVAILABLE DATETIME RULE:
SELECT dateadd(day, @FHIRReportForwardingDelay, sysdatetimeoffset())
PARAMETER CALCULATION RULE:
SELECT
(SELECT CAST (value AS INT)
FROM l_system_config
WHERE system_config_code = 'FHIRReportForwardingDelay') AS FHIRReportForwardingDelay,
(SELECT main_action FROM c_action WHERE
action_key =@action_key AND db_action IN ('ExternalAccessPatientEnrolled',
'ExternalAccessExportStudy')) AS main_action,
(SELECT db_action FROM c_action WHERE
action_key = @action_key AND db_action IN ('ExternalAccessPatientEnrolled',
'ExternalAccessExportStudy')) AS db_action
ACTION:
INSERT INTO c_post_message (
patient_key
,main_action
,db_action
,order_key
,study_key
,last_updated
,last_updated_by_user_id
,queue_name
,priority
)
VALUES (
@patient_key
,@main_action
,@db_action
,@order_key
,@study_key
,sysdatetimeoffset()
,'system'
,'DARENA'
,'0'
)
PREWORKFLOW RULE:
SELECT CASE
WHEN EXISTS (
SELECT 1
FROM c_patient_extra_info
WHERE patient_key = @patient_key
AND patient_extra_info_code = 'ExternalAccessEmail'
)
THEN 1
ELSE -1
END
Changes to SystemConfig Lookup Table Settings
· California sites should ensure FHIRReportForwardingDelay is set to a minimum of 4 days to comply with legislation.
The following related settings were added or updated:
Setting |
Default |
Purpose |
FHIRReportForwardingDelay |
Value=Days as Integer, Default=[0] |
Number of days after signing to delay forwarding of C-CDA to FHIR systems that patients have enrolled with. Updated by #34399 |