This code is public domain for anyone to use as they wish. However, if you have a peer reviewed paper based in part on the code, we ask that you cite:
- Development and Validation of Trigger Algorithms to Identify Delays in Diagnostic Evaluation of Gastroenterological Cancer. Clin Gastroenterol Hepatol. 2018 Jan;16(1):90-98.
- Computerized Triggers of Big Data to Detect Delays in Follow-up of Chest Imaging Results. Chest. 2016 Sep;150(3):613-20.
- Development and Validation of Electronic Health Record-based Triggers to Detect Delays in Follow-up of Abnormal Lung Imaging Findings. Radiology. 2015 Oct;277(1):81-7.
- Electronic health record-based triggers to detect potential delays in cancer diagnosis. BMJ Qual Saf. 2014 Jan;23(1):8-16.
Assuming you are reading this on github.com:
-
Before downloading, jot down or copy/paste the text in the light blue bar above, especially the seven random-looking letters and numbers such as "LWeiBCM Update Lung.sql ... 8c2f54a 2 days ago." This will identify the exact version of the code you downloaded, for future reference.
-
Click on the SQL file you want above (such as
Lung.sql
). -
Click on the grey button "Raw" near the top the page that comes up.
-
Use your browser menu to save file to disk (such as "File / Save Page As...").
The code you download should always be the latest version. Email z i m o l z a k at bcm.edu with any questions (delete those spaces first, and replace at with a real at sign).
Don't forget to review the change package at the SharePoint site! This link is specific to cohort 2 and needs to be accessed from the VA network.
-
Find the first day of the current month (e.g. if today is Feb 19, you rewind to find Feb 1).
-
Subtract two more months from that (so you get Dec 1) if you are running
Lung.sql
. Subtract three months if you are runningFobt.sql
. -
Set
sp_start
equal to that (such asset @sp_start='2019-12-01 00:00:00'
). -
Set
sp_end
to the end of that month (such asset @sp_end='2019-12-31 23:59:59'
). -
You need to set your sta3n and sta6a.
-
Done! Other stuff like
fu_period
can be left as it is.
-
select * from #Lung_Sta3n528_3_Ins_U_TriggerPos
-
Counts from
Lung_Sta3n528_4_01_Count
should display automatically. -
select * from #FOBT_Sta3n528_5_Ins_U_TriggerPos
-
Counts from
FOBT_Sta3n528_5_Ins_X_count
should display automatically. -
Don't forget to review your EPRP data! This is different from e-trigger data. It needs to be accessed from within VA network.
The site personnel doing validation should receive the "Ins_U_TriggerPos" tables (which will contain PHI, so don't send outside your station). The data display spreadsheet should receive the data from the "_Count" tables.
See the Word documents in the specifications folder if you don't want to review lots of SQL code. See also the papers cited, for details about design process and validation.
InSTRuCt is the Improving Safety of Test Results Collaborative, designed to help the follow-up of medical diagnostic tests. This repository stores SQL code that implements some e-triggers for diagnostic tests. An e-trigger answers the question, "How do you find (in the database) patients who had a test that shows a possibility of cancer, but who have not had timely follow-up?" In brief, the code performs the following steps:
-
Construct multiple tables with diagnostic codes we will need later (this can comprise half of the lines in the SQL code).
-
Find tests that are suspicious for cancer (most critical step but few lines of code).
-
Collect diagnosis/procedure codes that will be used for exclusion
-
Perform the exclusion (e.g. too young, deceased, known prior lung cancer, known other terminal condition).
-
Exclude those who had the proper follow-up (e.g. lung biopsy, follow-up imaging, tumor board).
-
Compile list of e-trigger positive patients.
-
Count e-trigger positive patients.
The SQL code was developed by Li Wei (Houston VAMC) against the US Dept of Veterans Affairs corporate data warehouse. Perl/Python/makefile was developed by Andrew Zimolzak. As a work of the United States Government, this project is in the public domain within the United States. Additionally, we waive copyright and related rights in the work worldwide (see LICENSE file).