Download Let ODS in SAS® V8 Help to Speed Up Your Electronic Clinical Study Report (e-CSR)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
Let ODS in SAS® V8 Help to Speed Up Your Electronic Clinical Study Report (e-CSR)
Jim J. Wang, Medpace LLC, Cincinnati, OHIO
Sherry L. Pinnell, Medpace LLC, Cincinnati, OHIO
Tikiri B. Karunasundera, Medpace LLC, Cincinnati, OHIO
Abstract
An electronic clinical study report (e-CSR) contains in-text
tables within the body of the report, and also post-text
results (tables, figures, listings) as its supplements. It is a
common practice to create in-text table shells in MSWord®, and then keypunch in the numbers based upon
the post-text results, which is time-consuming and
vulnerable to human errors. Prior to the birth of SAS®
Output Delivery System (ODS), all the post-text results
had to be in the ASCII format, which led to another tedious
task of converting ASCII files to Adobe Portable Document
Format (PDF) files. This paper will present how ODS may
help to speed up the generation of your e-CSR by
delivering PDF and/or Rich Text Format (RTF) post-text
results without any format conversion processes. Most of
all, the RTF post-text tables from ODS can be either
directly used as or easily transformed into in-text tables in
the e-CSR.
support the traditional SAS listing or monospace output,
new version 8.2 is capable of delivering output with either
Rich Text Format (RTF), Portable Document Format
(PDF), or both RTF and PDF at the same time, without
having to import it into word processors such as MSWord®.
These new output features are translated into the following
advantages for the creation of an e-CSR:
1.
Direct PDF outputs for all post-text results (tables,
figures and listings) used as the supplements of an
e-CSR save the time and effort of format conversion
2.
RTF outputs could be directly used as or
transformed into in-text tables of an e-CSR. It
saves the time and effort of reproducing the posttext results using MS- Word®, while reducing errors
3.
Both PDF and RTF outputs could be generated at
the same time
How PDF Output Destination Works
Key Words: e-CSR, ODS, PDF/RTF format
In SAS® V8.2, PDF output can be obtained as follows:
Motivations
As a major part of the paperless submission to the FDA,
an electronic clinical study report (e-CSR) not only
embeds numerous in-text tables and figures to
demonstrate the safety and efficacy perspectives of the
investigational drug but also requires the data sources for
the information displayed as its supplements, which are
commonly referred to as post-text tables, figures and
listings.
It is a common practice to create in-text table shells using
word processors such as MS-Word®, and then keypunch
the numbers based on the post-text results (tables and
listings). This process is time-consuming, vulnerable to
human errors, and requires quality verification. Prior to
the emergence of the SAS® Output Delivery System
(ODS), all post-text results had to be in ASCII format,
which led to another tedious task of converting ASCII files
to Adobe Portable Document Format (PDF) files as the
supplements of an e-CSR.
When a more accurate and efficient way to create both intext tables and post text results is practically needed to
speed up the creation of an e-CSR, here comes SAS® V8
Output Delivery System (ODS).
The new SAS® V8 ODS provides many exciting new
features and enhancements. SAS users will no longer be
confined to boring SAS monospace outputs, and will be
able to take full advantage of font styles, color, and
different output formats. Although ODS continues to
ODS Pdf file=”drive:\foldername\filename.pdf”;
Other SAS codes or procedures …
ODS Pdf close;
Based on the complexity of the output, a customized style
template may be created by using PROC TEMPLATE.
The customized styles overwrite the default styles with a
STYLE= option:
ODS Pdf file=”…” style=newstyles;
How RTF Output Destination Works
Similarly, RTF output can be obtained as follows:
ODS Rtf file=”drive:\foldername\filename.rtf”;
Other SAS codes or procedures …
ODS Rtf close;
Of course, the STYLE= option is also applicable. Since
the PDF and RTF output destinations work the same way,
the following sections will only discuss the RTF output
format.
Define the Styles To Use for In-text
Tables
There are numerous styles of in-text tables used in clinical
study reports. Each company has its own preferences.
Thus, the style templates for in-text tables can be
predefined and tailored. Of course, the more complex
style templates involve a more in-depth understanding of
the ODS system. The built-in style elements with some
SAS procedures, such as PROC REPORT/ TABULATE,
sometimes even non-SAS applications, such as Visual
Basic, may be needed to achieve the desirable style. The
following sections will show how to obtain some predefined in-text table styles by examples.
Use the ODS Direct Outputs
A common adverse events in-text table may use one of
the following two table layouts created with the
combination of a user-defined STYLE template and
STYLE option in the PROC REPORT procedure.
Examples
cellspacing = 0.5 pt
borderwidth = 1.25 pt
bordercolordark=black;
replace Body from Document
"Controls the Body file."
bottommargin =1 in
/*output margins*/
topmargin = 1.25 in
rightmargin =1 in
leftmargin = 1 in;
replace fonts /
/*Document header*/
'TitleFont' = ("Times Roman", 8pt, Bold )
/*Table title and footnote*/
'docFont' = ("Times Roman", 8pt, normal)
/*Table column header*/
'headingFont' = ("Times Roman",8pt,Bold);
end;
run;
Template 1:
Table X
Number and Percentage of Patients with Adverse Events
By Body System and Preferred Term
Drug A
(N = ##)
Drug B
(N = ##)
Body System
Preferred Term
n
(%)
n
(%)
-Total Patients with AE-
##
(##.#)
##
(##.#)
BODY SYSTEM 1
Preferred Term 1
##
##
(##.#)
(##.#)
##
##
(##.#)
(##.#)
Preferred Term 2
##
(##.#)
##
(##.#)
Footnotes:
Template 2:
Table X
Number and Percentage of Patients with Adverse Events
By Body System and Preferred Term
Drug A
(N = ##)
Drug B
(N = ##)
Body System
Preferred Term
n
(%)
n
(%)
-Total patients with AE-
##
(##.#)
##
(##.#)
BODY SYSTEM 1
##
(##.#)
##
(##.#)
Preferred Term1
##
(##.#)
##
(##.#)
Preferred Term 2
##
(##.#)
##
(##.#)
Footnotes:
The user-defined style template that creates the above
templates can be defined as follows:
** Template MYRTFSTYLE **;
Proc Template;
define style Styles.myrtfstyle;
parent = styles.printer;
style table from table /
outputwidth=85%
/*range from 0-100%*/
cellpadding = 3 pt
To use MYRTFSTYLE, add the STYLE= option in the
ODS statement:
ODS Rtf file = “drive:\folder\ae.rtf"
style=styles.myrtfstyle;
other SAS statements;
ODS Rtf close;
In order to create a table similar to Template 1 or
Template 2, the STYLE option also needs to be used in
the PROC REPORT procedure,
/* Template 1 */
Proc Report data=aedata headskip
style(report)={ frame=BOX}
style(column)={asis=on
st
/* the indentation of 1 column */
font_face="Times Roman"
font_size=8 pt
/* font style for all columns*/ }
style(header)={asis=on
st
/*the indentation of 1 column header*/ };
…
/* Template 2 */
Proc Report data=aedata headskip
style(report)={rules=cols}
style(column)={asis=on
st
/* the indentation of 1 column */
font_face="Times Roman"
font_size=8 pt
/* font style for all columns*/ }
style(header)={asis=on
st
/* the indentation of 1 column header */
background=dmgray
/*grey background on column header*/ };
…
In both Templates 1 and 2, the bold and italic style used
for the row of BODY SYSTEM1 comes from a COMPUTE
block in PROC REPORT. Suppose the variable AETERM
is the first column in the output table, we would code the
following:
COMPUTE aeterm;
if aeterm=’BODY SYSTEM 1’ then
CALL DEFINE(_ROW_, "STYLE",
"STYLE=[font_weight=bold font_style=italic
rules=none]");
ENDCOMP;
Use Visual Basic (VBA) Macros to Modify the ODS
Outputs
As mentioned earlier, the current ODS system may not be
flexible enough to deliver some of the more stylish table
layouts by itself. Sometimes other tools, such as an MSWord® VBA macro, may be needed to assist ODS to
achieve your goals. The approach is to create an ODS
RTF output with or without any cell border. We can
program a VBA macro based on the desired table layout,
and then run the VBA macro on the ODS direct output
table. The macro will turn on or off the cell borders as
needed.
Examples
Template 3:
Table X
Number and Percentage of Patients with Adverse Events
By Body System and Preferred Term
Drug A
(N = ##)
Drug B
(N = ##)
Body System
Preferred Term
n
(%)
n
(%)
-Total Patients with AE-
##
(##.#)
##
(##.#)
BODY SYSTEM 1
##
(##.#)
##
(##.#)
Preferred Term 1
##
(##.#)
##
(##.#)
Preferred Term 2
##
(##.#)
##
(##.#)
Footnotes:
Template 4:
Table X
Number and Percentage of Patients with Adverse Events
By Body System and Preferred Term
Drug A
(N = ##)
Drug B
(N = ##)
Body System
Preferred Term
n
(%)
n
(%)
-Total Patients with AE-
##
(##.#)
##
(##.#)
BODY SYSTEM 1
##
(##.#)
##
(##.#)
Preferred Term 1
##
(##.#)
##
(##.#)
Preferred Term 2
##
(##.#)
##
(##.#)
Footnotes:
To obtain the table layout of Template 3, we will use the
same MYRTFSTYLE style template as Template 1;
however, we need to modify the STYLE option in the
PROC REPORT statement to make all borders invisible.
/* Template 3 */
Proc Report data=aedata headskip
style(report)={ rules=NONE} /*turn off all borders*/
style(column)={asis=on
st
/* the indentation of 1 column */
font_face="Times Roman"
font_size=8 pt
/* font style for all columns*/ }
style(header)={asis=on
st
/* the indentation of 1 column header*/ };
…
We open the RTF output from MS- Word® and then run a
custom VBA macro (“makeborder”) to turn on the borders
as needed in Template 3. The “Makeborder” macro would
be programmed as follows:
Sub makeborder()
Dim Tablescount as integer
With activedocument
Tablescount=.tables.count ‘# of pages in Table X
For i=1 to tablescount
< code to turn on the required borders on Page i of
Table X>
next
end with
end sub
Similarly, Template 4 can be obtained by running another
custom VBA macro (‘HTMLborder’) on the RTF output of
Template 1. The ‘HTMLborder’ macro turns off the
borders of the top cell, and then adds double-line HTMLlike borders as desired.
Conclusion
The new SAS® V8.2 ODS enables the creation of various
new output file types such as Rich Text Format (RTF) and
Portable Document Format (PDF), which could streamline
the creation of electronic clinical study reports (e-CSR).
By eliminating the file format conversion and the process
of reproducing post-text results into in-text tables, it saves
a significant amount of manpower while reducing errors.
ODS advanced new features, such as styles and
templates, could also help to generate more visually
appealing tables with greater control over color, font, size,
justification, order, label and format.
References
Sunil K. Gupta, “Using Styles and Templates to Customize
SAS® ODS Output, ” SUGI26 Proceedings 2001, Gupta
Programming, Simi Valley, CA
McNeill, Sandy, “Changes & Enhancements for ODS by
Example (through Version 8.2),” SUG’26 Proceedings
2001, SAS Institute Inc., Cary, N
Olinger, Chris, “Twisty Little Passages, All Alike – ODS
Templates Exposed”, PharmaSUG ’99 Proceedings, SAS
Institute Inc., Cary, NC
“SAS Online DOC Version 8”, SAS Institute Inc., Cary, NC
Acknowledgements
The authors would like to thank Ms. Weimin Gai, Director
of Biometrics at Medpace, for her invaluable support in the
preparation of this paper.
Trademarks
SAS is a registered trademark of the SAS Institute
Inc.,Cary, NC, USA.
MS-Word is a registered trademark of the Microsoft
Corporation, Redmond, WA, USA.
Contact Information
Comments and questions are welcomed. The authors of
this paper can be contacted as follows:
Medpace LLC
4850 Smith Road
Cincinnati, OH 45212
Phone: (513) 579-9911
Fax: (513) 579-0444
Jim J. Wang, Extension 227
E-mail: [email protected]
Sherry L. Pinnell, Extension 363
E-mail: [email protected]
Tikiri B. Karunasundera, Extension 250
E-mail: [email protected]