A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment

Similar documents
Using PROC SQL to Generate Shift Tables More Efficiently

This paper describes a report layout for reporting adverse events by study consumption pattern and explains its programming aspects.

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma

Creating output datasets using SQL (Structured Query Language) only Andrii Stakhniv, Experis Clinical, Ukraine

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA

Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA

A Macro for Generating the Adverse Events Summary for ClinicalTrials.gov

Producing Summary Tables in SAS Enterprise Guide

Automate Clinical Trial Data Issue Checking and Tracking

A Taste of SDTM in Real Time

Mapping Clinical Data to a Standard Structure: A Table Driven Approach

Programmatic Automation of Categorizing and Listing Specific Clinical Terms

The Benefits of Traceability Beyond Just From SDTM to ADaM in CDISC Standards Maggie Ci Jiang, Teva Pharmaceuticals, Great Valley, PA

How Macro Design and Program Structure Impacts GPP (Good Programming Practice) in TLF Coding

A Macro To Generate a Study Report Hany Aboutaleb, Biogen Idec, Cambridge, MA

Indenting with Style

PharmaSUG Paper TT10 Creating a Customized Graph for Adverse Event Incidence and Duration Sanjiv Ramalingam, Octagon Research Solutions Inc.

STEP 1 - /*******************************/ /* Manipulate the data files */ /*******************************/ <<SAS DATA statements>>

SAS CLINICAL SYLLABUS. DURATION: - 60 Hours

Keeping Track of Database Changes During Database Lock

Pooling Clinical Data: Key points and Pitfalls. October 16, 2012 Phuse 2012 conference, Budapest Florence Buchheit

Let s Get FREQy with our Statistics: Data-Driven Approach to Determining Appropriate Test Statistic

An Efficient Method to Create Titles for Multiple Clinical Reports Using Proc Format within A Do Loop Youying Yu, PharmaNet/i3, West Chester, Ohio

How to write ADaM specifications like a ninja.

USING HASH TABLES FOR AE SEARCH STRATEGIES Vinodita Bongarala, Liz Thomas Seattle Genetics, Inc., Bothell, WA

Paper An Automated Reporting Macro to Create Cell Index An Enhanced Revisit. Shi-Tao Yeh, GlaxoSmithKline, King of Prussia, PA

Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC

Automation of SDTM Programming in Oncology Disease Response Domain Yiwen Wang, Yu Cheng, Ju Chen Eli Lilly and Company, China

IT S THE LINES PER PAGE THAT COUNTS Jonathan Squire, C2RA, Cambridge, MA Johnny Tai, Comsys, Portage, MI

SAS Macros for Grouping Count and Its Application to Enhance Your Reports

So Much Data, So Little Time: Splitting Datasets For More Efficient Run Times and Meeting FDA Submission Guidelines

An Efficient Solution to Efficacy ADaM Design and Implementation

PharmaSUG Paper CC02

Tools to Facilitate the Creation of Pooled Clinical Trials Databases

Submitting SAS Code On The Side

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc.

Integrated Clinical Systems, Inc. announces JReview 13.1 with new AE Incidence

An Introduction to Visit Window Challenges and Solutions

Hands-On ADaM ADAE Development Sandra Minjoe, Accenture Life Sciences, Wayne, Pennsylvania Kim Minkalis, Accenture Life Sciences, Wayne, Pennsylvania

Hands-On ADaM ADAE Development Sandra Minjoe, Accenture Life Sciences, Wayne, Pennsylvania

Let Hash SUMINC Count For You Joseph Hinson, Accenture Life Sciences, Berwyn, PA, USA

SAS (Statistical Analysis Software/System)

Knock Knock!!! Who s There??? Challenges faced while pooling data and studies for FDA submission Amit Baid, CLINPROBE LLC, Acworth, GA USA

The Dataset Diet How to transform short and fat into long and thin

Statistics and Data Analysis. Common Pitfalls in SAS Statistical Analysis Macros in a Mass Production Environment

Preparing the Office of Scientific Investigations (OSI) Requests for Submissions to FDA

Module I: Clinical Trials a Practical Guide to Design, Analysis, and Reporting 1. Fundamentals of Trial Design

Report Writing, SAS/GRAPH Creation, and Output Verification using SAS/ASSIST Matthew J. Becker, ST TPROBE, inc., Ann Arbor, MI

Planning to Pool SDTM by Creating and Maintaining a Sponsor-Specific Controlled Terminology Database

PharmaSUG Paper TT11

Customer oriented CDISC implementation

Using SAS Macro to Include Statistics Output in Clinical Trial Summary Table

Reducing SAS Dataset Merges with Data Driven Formats

Using Templates Created by the SAS/STAT Procedures

CFB: A Programming Pattern for Creating Change from Baseline Datasets Lei Zhang, Celgene Corporation, Summit, NJ

Standard Safety Visualization Set-up Using Spotfire

Implementing CDISC Using SAS. Full book available for purchase here.

BY S NOTSORTED OPTION Karuna Samudral, Octagon Research Solutions, Inc., Wayne, PA Gregory M. Giddings, Centocor R&D Inc.

Traceability in the ADaM Standard Ed Lombardi, SynteractHCR, Inc., Carlsbad, CA

To conceptualize the process, the table below shows the highly correlated covariates in descending order of their R statistic.

Compute; Your Future with Proc Report

How a Metadata Repository enables dynamism and automation in SDTM-like dataset generation

SDTM Implementation Guide Clear as Mud: Strategies for Developing Consistent Company Standards

How Macro Design and Program Structure Impacts GPP (Good Programming Practice) in TLF Coding

Validation Summary using SYSINFO

PharmaSUG Paper PO10

Facilitate Statistical Analysis with Automatic Collapsing of Small Size Strata

Get SAS sy with PROC SQL Amie Bissonett, Pharmanet/i3, Minneapolis, MN

%ANYTL: A Versatile Table/Listing Macro

186 Statistics, Data Analysis and Modeling. Proceedings of MWSUG '95

Dynamic Projects in SAS Enterprise Guide How to Create and Use Parameters

Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA

%check_codelist: A SAS macro to check SDTM domains against controlled terminology

Xiangchen (Bob) Cui, Tathabbai Pakalapati, Qunming Dong Vertex Pharmaceuticals, Cambridge, MA

Multiple Graphical and Tabular Reports on One Page, Multiple Ways to Do It Niraj J Pandya, CT, USA

Facilitating Data Integration for Regulatory Submissions

Going Under the Hood: How Does the Macro Processor Really Work?

MedDRA Dictionary: Reporting Version Updates Using SAS and Excel

PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA

Applying ADaM Principles in Developing a Response Analysis Dataset

SAS Studio: A New Way to Program in SAS

Chapter 6: Modifying and Combining Data Sets

Advanced Visualization using TIBCO Spotfire and SAS

A Breeze through SAS options to Enter a Zero-filled row Kajal Tahiliani, ICON Clinical Research, Warrington, PA

Regaining Some Control Over ODS RTF Pagination When Using Proc Report Gary E. Moore, Moore Computing Services, Inc., Little Rock, Arkansas

An Efficient Tool for Clinical Data Check

Cover the Basics, Tool for structuring data checking with SAS Ole Zester, Novo Nordisk, Denmark

Programming checks: Reviewing the overall quality of the deliverables without parallel programming

Tips on Creating a Strategy for a CDISC Submission Rajkumar Sharma, Nektar Therapeutics, San Francisco, CA

From Just Shells to a Detailed Specification Document for Tables, Listings and Figures Supriya Dalvi, InVentiv Health Clinical, Mumbai, India

Figure 1. Table shell

Out of Control! A SAS Macro to Recalculate QC Statistics

The Implementation of Display Auto-Generation with Analysis Results Metadata Driven Method

PharmaSUG Paper PO22

Pharmaceuticals, Health Care, and Life Sciences

PROC REPORT AN INTRODUCTION

Unlock SAS Code Automation with the Power of Macros

From Implementing CDISC Using SAS. Full book available for purchase here. About This Book... xi About The Authors... xvii Acknowledgments...

Reporting clinical adverse events and concomitant medications - How to compress several :days work into a fewm]ilutes.

ABSTRACT INTRODUCTION WHERE TO START? 1. DATA CHECK FOR CONSISTENCIES

Transcription:

A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment Abstract Jiannan Hu Vertex Pharmaceuticals, Inc. When a clinical trial is at the stage of the submission to regulatory authorities, or at the investigation of the interim analysis, most of the cases, safety analysis plays a key part in deciding whether the trial will be ongoing and drug is approved or not according to whether the drug is safe or not. Adverse event analysis is a pivotal piece in the safety analysis, and it is common in almost every trial, and every clinical study report. The adverse events related to study drug will be summarized, as well as by severity, by relationship. They are tabulated by MedDRA system organ class (SOC) and preferred term (PT), and each subject is counted only once, and the sorting is by descending frequency of SOC and PT. And the AE analysis is different from other safety analysis and efficacy analysis. However, there are similarities among the adverse event analysis within a study. There are challenges for a statistical programmer to provide high quality AE reports with a limited time frame. One approach is to use macros to modularize repeated work, and thus save the development time. This paper will discuss this approach in detail and share the code in getting the work done in an efficient way. Introduction In the drug development within pharmaceutical industry, clinical reports are created during the trials and provided to medical monitors or medical committee for trial monitoring, or after the clinical database is locked for regulatory agencies for approval. To generate accurate tables which explain the clinical data, and summarize it right, a good approach is conducted in the programming efforts to provide high quality AE tables for final CSR. Step 1. Analyze AE tables Some clinical trials may have different phases, and AE tables may be required to be summarized for each phase. Not surprisingly, there are tables by relationship, by severity, by seriousness across different treatment groups, and there are incidence and prevalence tables. The tables could be classified into different groups based on the similarities. This will be the base to design macros. Step 2. Modularize Macros In generating tables, there are some practices using open macro code to create a table, the macro statements are not encapsulated in one block to have a macro which likes a function to call. In this study, the macros are developed and for each production program, only one statement calling the macro by specifying different condition flag and timing

flag in verifying all the production tables. This way, high quality is achievable and efficiency is manageable. Since after one table matches the production table, then the same logic should work for the rest tables with the same shell and layout. On quality control side, this approach did catch some errors in some production tables. After classifying the tables, the macro modules are designed to meet the table requirements to streamline the table creation process. Some common function for different table types may be put in macros. The final macro for one table type may contain multiple macros. Step 3. Design the Flow Chart or Algorithm of Macros Flow chart has been widely used in the large complex software development. For some complex macros, flow chart will help to illustrate the work flow of the macro and will provide guideline in implementing and debugging the code. This will help to add comments in the program to document the macro, then make it easier to maintain and use. Step 4. Develop and Test Macros At the stage of macro development, it is very useful to turn on some macro options, such as Options symbolgen mprint; After macro is released and is put in production, turning off these two options eliminate the log about macro and macro variables. Options nosymbolgen nomprint; Algorithm There are different approaches to creating the summary data for a table with total counts at the last row and last column. Different programmer could have different preference and style. Below, the algorithm is demonstrated in two cases. For each case, multiple macros are created, which can be reused for multiple table sets with almost no modifications. You can read the flow of the approach by reading the program comments. Case 1. Common Macros %macro getpopulationds(inds=, outds=) ; ***************Created data for the column subtotal and total; data &outds; set &inds; trtan = 5; trta = "Total";

%mend getpopulation; The following macro is to calculate the denominator for each column. First, it gets the number of treatment groups. Then statement %let colnum = &colnum; will remove the leading space in macro variable colnum, which will be used to create other macro variables storing the denominators. Please be aware the data here is ADSL, subject level analysis dataset, where each subject only has one record. **************************get denominators -- number for each group; %macro getnum(inds=); proc sql; select count(distinct trtan) into: colnum from &inds where trtan ne.; %let colnum = &colnum; select trta into: col1 - : col&colnum from (select distinct trta, trtan from &inds) order by trtan; select count(usubjid) into: dcol1 - : dcol&colnum from &inds group by trtan; **************create the column header; %do i = 1 %to &colnum; %global count&i; %let count&i = %str((n=&&dcol&i)); % %mend getnum; Case 2. Frequency Table by Most Severe AE Macro One set of adverse event tables is the count and percentage of different adverse event characteristics distribution of combinations of treatment group, adverse events and study phases. The worst AE is counted for each subject. The following macro gets the numbers ready for reporting. The input parameters inds is the input data, which should be a subject level data. Every subject is counted only once in this kind of table. invar is the variable indicating the adverse event characteristics a table will describe. Different clinical trials could have different adverse events if the therapeutic area is different. Three different arrays are used here, a numeric array arr1, a character array arr2, and an array arr3 which holds the values, not the variables as the other two. %macro getcountperc(inds=, invar=); proc freq data = &inds noprint; table trtan*&invar/out=sevcount;

proc sort data = sevcount; by trtan &invar; proc transpose data=sevcount out=sevcountt prefix=col_;; by &invar; var count; id trtan ; data final; set sevcountt; array arr1(*) col_1 col_2 col_3 col_3_1 col_4 col_5; array arr2(*) $12 col_1c col_2c col_3c col_3_1c col_4c col_5c; array arr3(6) _temporary_ (&dcol1 &dcol2 &dcol3 &dcol4 &dcol5 &dcol6); do i = 1 to 6; if arr1(i) =. then arr2(i) = "-"; else arr2(i) = cat(arr1(i), 3.), " (", put(arr1(i)/arr3(i)*100, 5.1), ")"); %mend getcountperc; Case 3. Frequency Table by SOC, Preferred Term, and Treatment Group Macro Another set of adverse event tables is the count and percentage of adverse events by System Organ Class, Preferred Term, and Treatment Group. The rules in counting the different adverse event characteristics is that if a subject has multiple events within a system organ class or preferred term, the subject is counted once. And the table is sorted in descending frequency of the total number for each system organ class and preferred term. %macro aerepdata(adsl=, inds=, eventcond=, aedesc=, aeoutcome=, outds=report); ********************create pooled data for counting; %if &eventcond ne %then %let eventcond = %str(and &eventcond); data aefin(keep = usubjid aedecod aebodsys &aeoutcome trta trtan); set &inds; where aedecod ne "" &eventcond; if missing(aebodsys) then aebodsys="uncoded"; ******************************************count statistics; proc sql ; *********************This data is to count the unique subjects; *********************It is required in the table; create table aesubj as select distinct usubjid, trtan, trta, max(&aeoutcome) as maxval from aefin group by usubjid;

create table aesoc as select usubjid, trtan, trta, aebodsys, max(&aeoutcome) as maxval from aefin group by trtan, trta, usubjid, aebodsys; create table aept as select usubjid, trtan, trta, aebodsys, aedecod, max(&aeoutcome) as maxval from aefin group by trtan, trta, usubjid, aebodsys, aedecod; ****************************************Count number of subjects; proc freq data = aesubj noprint; table trtan*trta*maxval/out=subjcount; proc transpose data=subjcount out=subjcountt prefix=col_;; by trtan trta; var count; id maxval ; ***************************************************Count SOC; ***get total; ***99 is used to represent the total category; data aesocfin; set aesoc; maxval = 99; proc freq data = aesocfin noprint; table trtan*trta*aebodsys*maxval /out=soccount; proc sort data = soccount; by trtan trta aebodsys; proc transpose data=soccount out=soccountt prefix=col_;; by trtan trta aebodsys; var count; id maxval ; *****************sort SOC; proc sort data = soccountt; by trtan trta descending col_99; data soccountt; set soccountt; by trtan trta descending col_99;

retain ind 0; ind + 1; **************************************************Count PT; ***get total; data aeptfin; set aept; maxval = 99; proc freq data = aeptfin noprint; table trtan*trta*aebodsys*aedecod*maxval /out=ptcount; proc transpose data=ptcount out=ptcountt prefix=col_;; by trtan trta aebodsys aedecod; var count; id maxval ; *************Sort the preferred term; proc sort data = ptcountt; by trtan trta aebodsys descending col_99; data ptcountt; set ptcountt; by trtan trta aebodsys; retain indpt; if first.aebodsys then indpt = 1; else indpt + 1; ********************************************************stack together; *********The three parts in the table; data ae4count; set subjcountt(in=a) soccountt(in=b) ptcountt(in=c); length cat $200; if a then do; ind = 0; cat = "&aedesc"; aebodsys = ""; if b then cat = aebodsys; else if c then cat = cat(" ", strip(aedecod)); *******Populated the sorting key; proc sql; create table countfin as select * from

(select *, max(ind) as indsoc from ae4count group by trtan, aebodsys ) order by trtan, indsoc, indpt; *******************************************get final report data; ********get denominators for each column; proc sql; create table test as (select distinct trta, trtan from &adsl) order by trtan; data test2; set test; length trtaq $200; trtaq = quote(strip(trta)); proc sql; select trtaq into: trtarr separated by " " from test2; select count(usubjid) into: denomarr separated by " " from &adsl group by trtan; data &outds; set countfin; array trtarr(4) $20 _temporary_ (&trtarr); array denomarr(4) _temporary_ (&denomarr); array arr1(*) col_1 col_2 col_3 col_4; array arr2(*) $12 col_1c col_2c col_3c col_4c; drop i j _label name_; do j = 1 to dim(trtarr); if trta = trtarr(j) then do; do i = 1 to 4; if arr1(i) =. then arr2(i) = "-"; else arr2(i) = cat(put(arr1(i), 3.), " (", put(arr1(i)/denomarr(j)*100, 5.1), ")"); leave; %mend aerepdata; *******make the report; %macro report(inds=, width= ); ***********************************************************report part; %do i = 1 %to 6; title9 "&col&i (N=&&dcol&i)"; proc report list nowd missing headline headskip split = '*' data=&inds(where = (trta = "&&col&i")); column (" " ( indsoc indpt cat ("Relationship"

(" " (col_1c col_2c col_3c col_4c))))); define indsoc /order noprint; define indpt /order noprint; define cat /display width=&width "System Organ Class* Preferred Term" left flow; define col_1c /display width=14 center "Not Related*n (%)"; define col_2c /display width=14 center "Unlikely*Related*n (%)"; define col_3c /display width=14 center "Possibly*Related*n (%)"; define col_4c /display width=14 center "Related*n (%)"; break after indsoc/skip; % %mend report; Acknowledgements The author would like to acknowledge the encouragement and support from Xiangchen (Bob) Cui, associate director of Statistical Programming, Vertex Pharmaceuticals, Inc. SAS is a registered trademark of SAS Institute Inc. in the USA and other countries. References [1] SAS Institute Inc., SAS Macro Language Reference, First Edition, Cary, NC. SAS Institute., 1997 [2] SAS Institute Inc., The Little SAS Book: A Primer, Third Edition, Lora Delwiche and Susan Slaughter, 2003 Author Contact Jiannan Hu, Ph.D. Biometics Vertex Pharmaceuticals, Inc. 88 Sidney St. Cambridge, MA 02139 Tel: (857)919-0220 Email: hujiannan@gmail.com