How to Use SDTM Definition and ADaM Specifications Documents. to Facilitate SAS Programming



Similar documents
How to easily convert clinical data to CDISC SDTM

WHITE PAPER. CONVERTING SDTM DATA TO ADaM DATA AND CREATING SUBMISSION READY SAFETY TABLES AND LISTINGS. SUCCESSFUL TRIALS THROUGH PROVEN SOLUTIONS

SDTM, ADaM and define.xml with OpenCDISC Matt Becker, PharmaNet/i3, Cary, NC

USE CDISC SDTM AS A DATA MIDDLE-TIER TO STREAMLINE YOUR SAS INFRASTRUCTURE

ABSTRACT INTRODUCTION THE MAPPING FILE GENERAL INFORMATION

Essential Project Management Reports in Clinical Development Nalin Tikoo, BioMarin Pharmaceutical Inc., Novato, CA

Automate Data Integration Processes for Pharmaceutical Data Warehouse

How To Write A Clinical Trial In Sas

A Macro to Create Data Definition Documents

Managing Data Issues Identified During Programming

Best Practice in SAS programs validation. A Case Study

ClinPlus. Report. Technology Consulting Outsourcing. Create high-quality statistical tables and listings. An industry-proven authoring tool

WOW! YOU DID THAT WITH SAS STORED PROCESSES? Dave Mitchell, Solution Design Team, Littleton, Colorado

Data Presentation. Paper Using SAS Macros to Create Automated Excel Reports Containing Tables, Charts and Graphs

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

Managing very large EXCEL files using the XLS engine John H. Adams, Boehringer Ingelheim Pharmaceutical, Inc., Ridgefield, CT

Importing Excel Files Into SAS Using DDE Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

It s not the Yellow Brick Road but the SAS PC FILES SERVER will take you Down the LIBNAME PATH= to Using the 64-Bit Excel Workbooks.

Requesting Materials in the LC Online Catalog (catalog.loc.gov)

Clinical Trial Data Integration: The Strategy, Benefits, and Logistics of Integrating Across a Compound

Switching from PC SAS to SAS Enterprise Guide Zhengxin (Cindy) Yang, inventiv Health Clinical, Princeton, NJ

Methodologies for Converting Microsoft Excel Spreadsheets to SAS datasets

Experiences in Using Academic Data for BI Dashboard Development

Introduction to SAS Business Intelligence/Enterprise Guide Alex Dmitrienko, Ph.D., Eli Lilly and Company, Indianapolis, IN

Practical application of SAS Clinical Data Integration Server for conversion to SDTM data

ing Automated Notification of Errors in a Batch SAS Program Julie Kilburn, City of Hope, Duarte, CA Rebecca Ottesen, City of Hope, Duarte, CA

Using Pharmacovigilance Reporting System to Generate Ad-hoc Reports

Choosing the Best Method to Create an Excel Report Romain Miralles, Clinovo, Sunnyvale, CA

Labels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY

ABSTRACT INTRODUCTION CLINICAL PROJECT TRACKER OF SAS TASKS. Paper PH

# or ## - how to reference SQL server temporary tables? Xiaoqiang Wang, CHERP, Pittsburgh, PA

PharmaSUG 2014 Paper CC23. Need to Review or Deliver Outputs on a Rolling Basis? Just Apply the Filter! Tom Santopoli, Accenture, Berwyn, PA

THE HELLO WORLD PROJECT

SUGI 29 Coders' Corner

PharmaSUG Paper AD11

Improving Productivity using IT - Level 3 Scenario Assignment Sample Test 4 Version SampleMQTB/1.0/IP3/v1.0. Part 1 Performance

Pharmaceutical Applications

Implementing the CDISC standards into an existing CDMS

Search and Replace in SAS Data Sets thru GUI

Salary Review Spreadsheets

Flat Pack Data: Converting and ZIPping SAS Data for Delivery

Table Lookups: From IF-THEN to Key-Indexing

CDW DATA QUALITY INITIATIVE

Managing Custom Data Standards in SAS Clinical Data Integration

Introduction. Why Use ODBC? Setting Up an ODBC Data Source. Stat/Math - Getting Started Using ODBC with SAS and SPSS

Use of Metadata to Automate Data Flow and Reporting. Gregory Steffens Novartis PhUSE 13 June 2012

Importing Excel File using Microsoft Access in SAS Ajay Gupta, PPD Inc, Morrisville, NC

Using SAS Data Integration Studio to Convert Clinical Trials Data to the CDISC SDTM Standard Barry R. Cohen, Octagon Research Solutions, Wayne, PA

Bridging Statistical Analysis Plan and ADaM Datasets and Metadata for Submission

Let SAS Modify Your Excel File Nelson Lee, Genentech, South San Francisco, CA

Introduction to Microsoft Access 2003

A Recursive SAS Macro to Automate Importing Multiple Excel Worksheets into SAS Data Sets

The ADaM Solutions to Non-endpoints Analyses

SAS Comments How Straightforward Are They? Jacksen Lou, Merck & Co.,, Blue Bell, PA 19422

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

Dynamic Decision-Making Web Services Using SAS Stored Processes and SAS Business Rules Manager

Provider Express Obtaining Login Access. Information for Network Providers

SPSS: Getting Started. For Windows

NorthClark Computing, Inc. Bill of Material and Parts Master Maintenance. Administrator s Guide

Data Management for Multi-Environment Trials in Excel

Lessons Learned from the QC Process in Outsourcing Model Faye Yeh, Takeda Development Center Americas, Inc., Deerfield, IL

Using SAS With a SQL Server Database. M. Rita Thissen, Yan Chen Tang, Elizabeth Heath RTI International, RTP, NC

Wave Analytics Data Integration

AN ANIMATED GUIDE: SENDING SAS FILE TO EXCEL

The SET Statement and Beyond: Uses and Abuses of the SET Statement. S. David Riba, JADE Tech, Inc., Clearwater, FL

MICROSOFT ACCESS 2003 TUTORIAL

Creating a Gradebook in Excel

The Essentials of Finding the Distinct, Unique, and Duplicate Values in Your Data

Introduction to Python

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Tips and Tricks for Creating Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS. Vincent DelGobbo, SAS Institute Inc.

A Method for Cleaning Clinical Trial Analysis Data Sets

Importing TSM Data into Microsoft Excel using Microsoft Query

Excel Reports and Macros

Post Processing Macro in Clinical Data Reporting Niraj J. Pandya

Produced by Flinders University Centre for Educational ICT. PivotTables Excel 2010

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

How to Create and Send a Froogle Data Feed

PharmaSUG 2016 Paper IB10

Sample- for evaluation only. Advanced Excel. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

PharmaSUG Paper QT26

Creating a Participants Mailing and/or Contact List:

Microsoft Access 2007 Introduction

Search help. More on Office.com: images templates

CDISC SDTM & Standard Reporting. One System

Computer Science 217

Access Queries (Office 2003)

Legal Notes. Regarding Trademarks. Model supported by the KX printer driver KYOCERA MITA Corporation

Jet Data Manager 2012 User Guide

Release 2.1 of SAS Add-In for Microsoft Office Bringing Microsoft PowerPoint into the Mix ABSTRACT INTRODUCTION Data Access

A white paper presented by: Barry Cohen Director, Clinical Data Strategies Octagon Research Solutions, Inc. Wayne, PA

Calculating Cash Flow Using Excel Data Lists

ADaM Implications from the CDER Data Standards Common Issues and SDTM Amendment 1 Documents Sandra Minjoe, Octagon Research Solutions, Wayne, PA

Home Loan Manager Pro 7.1

MOVES Batch Mode: Setting up and running groups of related MOVES run specifications. EPA Office of Transportation and Air Quality 11/3/2010

Transcription:

How to Use SDTM Definition and ADaM Specifications Documents to Facilitate SAS Programming Yan Liu Sanofi Pasteur ABSTRCT SDTM and ADaM implementation guides set strict requirements for SDTM and ADaM variable attributes, including their names, labels, types, formats etc. Without a good programming solution, this can make clinical SAS programming time consuming and prone to mistakes. This paper introduces a simple method that utilizes SDTM definition and ADaM specifications documents to improve clinical SAS programming efficiency and accuracy. KEY WORDS SDTM, ADaM, EXCEL, MACRO, VARIABLE ATTRIBUTE, %SYSCALL SET INTRODUCTION The implementation of CDISC standards has greatly improved the efficiency of new drug development in the pharmaceutical industry. Common standard among the industry makes new drug application review easier for the regulators and makes global exchange smoother. In the meantime, CDISC standards make more demands for clinical SAS programming because of the strict variable attribute requirements set by the SDTM and ADaM Implementation Guides. Directly coding all the label, length and format statements in SAS for so many variables in so many data sets can be tedious and prone to mistakes. This paper introduces a simple and efficient method to meet SDTM and ADaM Implementation Guide requirements and make clinical SAS programming easier. In the following sections of this paper, I ll first introduce how to use SAS macro to convert SDTM definition and ADaM specifications documents into useful SAS data sets. Then I ll introduce how to use SAS macro to retrieve variable attributes from the data sets converted and apply them to SDTM domain or ADaM analysis data sets that will be submitted to regulators for new drug application. CONVERT THE SDTM AND ADAM DOCUMENTS INTO SAS SYSTEM SDTM definition and ADaM specifications documents come in Excel files. Separate

worksheets are used for each SDTM domain or ADaM analysis data set. On each of these worksheets, information about the variables for each SDTM domain and ADaM data set is listed, including the variable name, label, type, length, format, source etc. The followings are two examples of such documents. A Sample of SDTM definition document in Excel format A Sample of ADaM specifications document in Excel format 2

In order to make use of these documents in SAS programming, the first thing that needs to do is to convert the information listed on these two documents into SAS data sets. The simple way to do this is to use the PROC IMPORT procedure in the SAS macro. Since the variable information for each data set is listed on separate worksheets, a SAS macro parameter should be created to select which worksheet the SAS should convert. In this paper, I name this parameter as dsnme. The first row of the excel work sheet will be kept as the data set variable names. So the GETNAMES option in the PROC IMPORT procedure should be set to Yes. If the layouts of the excel file is not as neat as the above samples and the file has extra rows on the top with extra specifications information. Then only those parts that contain variable attributes should be converted into a SAS data set. In such case, the RANGE option of the PROC IMPORT procedure should be used to specify which part of the spreadsheet SAS should convert. For example, the following statement will instruct SAS to convert only the area of the specified spreadsheet covering A12 to H50. RANGE="&dsnme.$A12:H50"; RETRIEVE VARIABLE ATTRIBUTES AND APPLY TO SDTM DOMAIN OR ADAM ANALYSIS DATA SETS The following SAS macro code is used to retrieve variable attributes from the temporary data set created and apply them to the SDTM domain or ADaM analysis data sets to be submitted to the regulator. %let id=%sysfunc(open(_temp)); %let NOBS=%sysfunc(attrn(&id,NOBS)); %syscall set(id); data &dsout(label="&label"); %do i=1 %to &NOBS; %let rc=%sysfunc(fetchobs(&id,&i)); %if %upcase(&type)=char %then %do; format &Variable_Name %sysfunc(compress($&length..)) ; length &Variable_Name %sysfunc(compress($&length..)) ; %else %if %upcase(&type)=num %then %do; %if %index(&controlled_terms_or_format,.) %then %do; format &Variable_Name%sysfunc(compress(&Controlled_Terms_or_Format..)) ; length &Variable_Name%sysfunc(compress(&length..)) ; %else %do; format &Variable_Name %sysfunc(compress(&length..)); 3

label &Variable_Name= "&Variable_Label"; keep &Variable_Name; set &dsin; run; %let id=%sysfunc(close(&id)); The %SYSCALL SET routine in the above SAS code creates a macro variable for each of the variable listed in the worksheet, with the macro variable names being exactly the same. The FETCHOBS function in the %DO loop retrieves variable attributes one by one and store them into the corresponding macro variables %SYSCALL SET routine created. These variable attributes stored in the macro variables then are applied through the label, length and format statements to the variables in the final data set. Since the SAS format and length statement syntax for numeric and character variables are different, %if conditions are used. The format statement for character variables can use the value provided by the length column in the work sheet. But for the numeric variables, that will not be enough. If a numeric variable contains more than just integral and has decimal points, additional %if conditions are used to make sure the values in the control terms of format column are used as input. The KEEP statement in the above code keeps only those variables that specified in the documents and in the same sequence as they are listed. All the other variables either temporarily created during programming or retrieved from the source data will be dropped, because they are not the needed STDM or ADaM variables. If there is a variable specified in the documents but doesn t exist in the data set. Such variable will still be generated by the macro. But a warning of uninitialized variable will show up in the SAS log and the variable will have all null values. These will prompt the programmer to correct any forgotten variables. A sample call of the macro looks like this, %attrb(dsnme=dm, dsin=_dm, dsout=db.dm, Path= z:\sdtm_mta72.xls ) Where, dsnme is the name of the worksheet for the data set; dsin is the data set to which you want to apply the variable attributes; dsout is the name for the final data set with the required variable attributes; Path is the location of the SDTM or ADaM documents. 4

CONCLUSION Compared with coding variable attributes directly in SAS statements, this method I introduced here has many advantages. First, by utilizing the SDTM definition and ADaM specifications documents, it saves a lot of time and makes the SAS codes look more compact. Second, by using this method, I don t need to worry about whether I forgot to drop a not-needed variable or whether I forgot to create a needed variable that is specified in the documents. In addition, all the new variables will be ordered in the exact sequence as they show in the Implementation Guide. At last, since all the variables and their attributes are listed in worksheets, it is much easier to check for mistakes and make corrections once any mistakes are found. Therefore it greatly improves programming accuracy and efficiency. REFERENCE 1. CDISC SDTM Implementation Guide V3.1.1 Final, http://www.cdisc.org/ 2. the Analysis Data Model, Version 2.1, the ADaM Implementation Guide, Version 1.0, http://www.cdisc.org AUTHOR CONTACT Yan Liu Sanofi Pasteur 108 Jianguo Road, Beijing, China chris.liu@sanofipasteur.com TRADEMARK INFORMATION SAS, SAS Certified Professional, SAS Certified Advanced Programmer, and all other SAS Institute Inc. product or service names are registered trademarks of SAS Institute, Inc. in the USA and other countries. indicates USA registration. 5