Noga Meiry Lewin, The Emmes Company; Aimee Wahle, The Emmes Company; Amarnath Vijayarangan, Emmes Services Pvt Ltd; Abigail G. Matthews, The Emmes Company
Ten years ago, our reporting team developed a web report system for the National Drug Abuse Treatment Clinical Trials Network. Each study had its own specifications, and a common setup program standardized the programming process for all programmers. Nightly a program generated all reports, followed by a summary program that uploaded reports to the website. Errors were investigated, and the program reran. As the number of studies increased, the advantages of using one program to run everything were outweighed by problems related to the varying specifications and data. We developed a new system that satisfies these requirements: While studies are programmed using standard processes, they run independently on different PCs so that failure in one does not affect others; for each study, programs are assigned for submission using a batch file-creating excel spreadsheet that drives the process and serves all aspects of documentation; each step only executes if the previous one succeeded; the batch file runs all programs separately; an initialization program checks that data was updated, and resets and updates the environments permanent libraries, for the reports that follow; finally, a program checks required outputs, creates a consolidated PDF report, uploads reports to the website directory and sends a status email. Only the problem program is resubmitted, followed by the web upload program. A summary program across all studies sends an overall status update daily to key staff.
Watch An Integrated-Software Solution for Automated and Reliable Distributed Reporting System as presented by the authors on the SAS Users YouTube channel.
The National Drug Abuse Treatment Clinical Trials Network has contracted Emmes to serve as the Data and Statistics Center (DSC) over ten years ago. Included in the scope of work is to design and implement a daily Trial Progress Reporting System which had in its core a set of standard reports. The trials consisted of a small number of studies that had many common traits, and most of the reports were uniform across studies. The sponsor had a very clear set of requirements and specifications and all studies adhered to them.
Based on this framework, our reporting team developed and implemented a web reporting system with the following specifications:
The CTN portfolio of trials has evolved over time and thus the needs of the web reporting system changed. While we started with a small number of similar studies, the number of concurrent studies tripled, and the studies were very different from one another and substantial customization was needed to meet the needs of each investigative team. As the web reporting system attempted to adapt to the new paradigm, the advantages of using one program to run everything were outweighed by the growing number of studies and increased heterogeneity among them. The issues we encountered were as follows:
Our goal was to create a reliable, multiuser, multi-platform study SAS® reporting system that adheres to the following, sometimes contradictory, requirements:
The study data flow consists of data update, reporting and web upload. Therefore, the reporting system will first verify that data update was successful, and only then will the reports run. To insure the integrity of the reports, uploading reports to the website will only occur after verifying that all reports for the study ran successfully. Thus, all reports on the website are based on data that were updated at the same time.
For each study, three types of programs run in sequence but independently using a batch file. Because reports are independent of each other, running them in batch prevents one report from stopping the other reports as in the case of an include program. The three types of programs are described below.
/*********************************************************
Program: age_00XX_prod.sas
Author: John Doe
Date:: December 2019
Description:: create age report
SAS Version:: sas9.4m4
Gemini ticket:
Input Data:: enroll, sitename, dem
OUTPUT:: &prot._age.pdf
Revision::
*************************************************************/
ods listing close;
%LET PROT=00XX;
%LET PLATFORM=YYY;
%let prod_dev=_prod;/*suffix for prod or dev programs. required.*/
%let prod_dev_path=prod;
/*do not modify the next three lines*/
%let root=G:\xxx\TPR\yyy;
%let prot_path=&root\&prod_dev_path\&PLATFORM\&Prot;
%INCLUDE "&prot_path\programs\&platform._setup_&PROT.&prod_dev..sas"/SOURCE2;
/*call your macro*/
%M_age&prod_dev(PROT=&PROT)
3. Web upload program: this program runs last. It summarizes the distributed system results and does the following:Note that if there is a failure, a programmer follows up by checking the log of the failed report and fixing the program. They then run this report only and re-run the web upload program.
An Excel spreadsheet is used to create the batch file described above. This approach is ideal for documentation and tracking purposes given the large number of programs involved. It also facilitates the addition or removal of certain reports as a study progresses and controls the order of reports in the consolidated PDFs. The approach implemented in Excel is described below.
Figure 1. Columns in the Excel sheet that serve as input to the bat file
Figure 2. Columns that serve as input to the summary program
Figure 3. Columns that serve only for tracking purposes
Below is a description of how the batch file functions in the report generation process.
:sub
IF EXIST "%SASLOC%\%PROGRAM%" (
"%SASPATH%" -CONFIG "C:\Program Files\SASHome2\x86\SASFoundation\9.4\nls\en\sasv9.cfg" -sysin "%SASLOC%\%PROGRAM%" -print "%LSTLOC%\%PROGRAM%.lst" -log "%LOGLOC%\%PROGRAM%.log" -ICON %MEM%
) ELSE (SET ERROR=1
ECHO file %SASLOC%\%PROGRAM% does not exist
)
exit /b
(
SET PROGRAM=%platform%_INITIALIZE_%SUFFIX%
REM INITIALIZE ENVIRONMENT. IF NOT SUCCESSFUL DO NOT CONTINUE (CHECK IF INIT_Y WAS CREATED)
REM ******************************************************************
attrib -r %root%\initdata\*.* /s
del "%INIT_Y%"
call :sub
if NOT exist "%INIT_Y%" GOTO EXIT
REM ******************************************
set PROGRAM=RANDOMIZATION_plots_00xxA_prod.sas
REM ******************************************
call :sub
REM ******************************************
set PROGRAM=title_page_00xxA_prod.sas
REM ******************************************
call :sub
REM ******************************************
set PROGRAM=web_upload_00xx_prod.sas
REM ******************************************
call :sub
Two types of emails provide status reports to staff:
|
Figure 4. Study Status Report Email - Success
|
Figure 5. Study Status Report Email - Failure
|
Figure 6. Overall Status Report Email – Success
|
Figure 7. Overall Status Report Email – Failure in data update and reporting
For this system to work, it requires collaboration among different players with different skill sets, namely data managers, statisticians and SAS programmers with different levels of experience, and a Visual Basic programmer. Our work environment is supported by the following practices:
Figure 8 is a top overview of the process. We were able to save time on each step:
|
Figure 8: Top View of the Reporting System
The time it takes to add a study to the old system grew from ten hours when we seldom added studies ten years ago, to twenty hours, and just prior to revamping the web reporting process, it had grown to forty hours. After implementing the process described here, it takes four hours to add a new study to this system. It had taken an hour and a half to run and upload a complete set of all studies to the web in the previous system, while now, in many cases, it takes a full report set five to ten minutes to run and upload to the web.
The development of our web reporting system is a process of continuous evaluation. New methods build on the ones that exist and had proven themselves in order to preclude “re-inventing the wheel” and conserve resources. For example, while writing the paper we learned that we should develop performance measuring tools for accurate monitoring. Participation to the internal Emmes SAS User Group keeps us informed of methods used by other groups supporting different clients within the company, and some of which have been adopted and incorporated into the new process.
The current system has been functioning in production for six months, with another nine months of revamping prior to implementation. Development of programs is not hindered by the growing number of studies and various, complex reporting requirements. Standardization simplifies the programming and allows for easier central monitoring and aggregation.
We would like to thank our colleagues at the Emmes Company for their feedback and encouragement, and especially the web report team of the NIDA CTN Data and Statistics Center. This work has been partially funded by the National Institute on Drug Abuse (contract 75N95019D00013).
Your comments and questions are valued and encouraged. Contact the authors at:
Noga Meiry Lewin The Emmes Company |
Aimee Wahle The Emmes Company
|
Amarnath Vijayarangan Emmes Services Pvt Ltd
|
Abigail G. Matthews The Emmes Company |
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
Other brand and product names are trademarks of their respective companies.