Chapter 8: CDISC Validation Using SAS

SAS Clinical Standards Toolkit SDTM Validation

SAS Clinical Standards Toolkit Setup

SAS Clinical Standards Toolkit SDTM Validation Program

SAS Clinical Data Integration SDTM Validation

SAS Clinical Standards Toolkit Define.xml Validation Program

SAS Clinical Data Integration Define.xml Validation

Chapter Summary

As we begin to discuss CDISC validation, it might make sense to first clarify what is meant by the term validation. Two types of checks are important in this context: 1) ensuring that the data contents are, in fact, what they should be and 2) ensuring that the file structures are what they should be. The latter is the focus of this chapter and other parts of this book, although checks relating to the appropriate use of controlled terminology, which are also covered here, can be construed as the former type.

Human intervention is needed most for the first type of validation check, where ensuring that the collected data values have been correctly converted or mapped to the SDTM. This conversion process, for the most part, is unique to every trial. Standardized file and data structures, on the other hand, vary little from one project to the next. These types of checks, which we also refer to as compliance checks, lend themselves well to the use of automated tools. At the time of this writing, there are a handful of tools available to CDISC implementers for checking CDISC compliance. The SAS Clinical Standards Toolkit, SAS Clinical Data Integration (which uses the toolkit), and the Pinnacle 21Community Validator (previously known as OpenCDISC) are three such compliance tools.

There is another important thing to consider before your first attempt at CDISC data validation: Achieving 100% compliance (according to the tool being used) tends to be an unattainable goal. Too often there are issues either with the collected data, the study design, the implementation strategy, or the compliance checks themselves that prevent you from making all errors and warnings go away. Because of this, when you are submitting data to the FDA or to anyone involved with inspecting the data, it might be a good idea to point out certain checks that fail and the reason why they cannot be corrected. These issues can be documented in the Study Data Reviewer’s Guide or the Analysis Data Reviewer’s Guide.

SAS Clinical Standards Toolkit SDTM Validation

The SAS Clinical Standards Toolkit that we explored in Chapter 4 for the production of SDTM data sets can also be used to validate SDTM data sets. We will build on the metadata introduced in Chapter 4 to use the SAS Clinical Standards Toolkit to validate those SDTM data sets created in Base SAS using the SAS Clinical Standards Toolkit. This example is built on information provided in the SAS Clinical Standards Toolkit 1.6: User's Guide.

SAS Clinical Standards Toolkit Setup

SAS Clinical Standards Toolkit jobs are governed by various metadata data sets, control data sets, a properties file, and finally a SAS program that pulls it all together. To validate the SDTM data sets that were created in Chapter 4, we need a validation checks control data set; a study-specific controlled terminology format catalog; a set of study and target standard metadata data sets; a configuration validation properties file; and a sasreferences data set to tell the final validation SAS program where everything can be found for the job. The first step that you should take is to create an area in which to perform the SDTM validation. For this exercise, that is C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtm. You can replace that with any directory that you would like to use as a default so long as you change it in the following examples as well. For this chapter, the following subdirectories should be created under validate_sdtm: control, data, metadata, programs, esults, and erminology.

Validation Control Data Set

The SAS Clinical Standards Toolkit is preloaded with three sets of checks, including the Oracle Health Sciences WebSDM, OpenCDISC (discussed in a later chapter, and now called Pinnacle 21 Community), and checks that are based on SAS, along with the SDTM validation checks for multiple versions of the SDTM. Please note in SAS Clinical Standards Toolkit 1.7 that the OpenCDISC/Pinnacle 21 checks have now been removed from the toolkit. All of the checks can be found in the SAS toolkit global library for your standard, which is provided in the validation_master.sas7bdat data set under the validationcontrol folder. However, you might not want to institute every provided check. You should create a validation_control.sas7bdat control data set based on the validation_master.sas7bdat data set that contains just the SDTM checks that you want to run. For this exercise, we will run the OpenCDISC and WebSDM checks for SDTM version 3.2 only. The following program creates that data set:

libname master "C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6validationcontrol";

libname control "C:UsersyouridDesktop

SAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtmcontrol";

 

data control.validation_control;

  set master.validation_master;

 

  where standardversion in ("***","3.2")

        and checksource in ("OpenCDISC","WebSDM");

run;

This program takes a copy of the core XYZ-SDTM-3.2 standard master validation data set called validation_master.sas7bdat and subsets it just for the checks that we want into a data set called validation_control.sas7bdat.

Study-Based Custom Codelist Format Catalog

In Chapter 4, we stored our custom formats in a format.sas7bcat file that contained our customized controlled terminology for the XYZ123 study. You will want to do the same thing here and store that data under C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtm erminologyformats. Here is what the control file looks like for that format catalog:

image

Reference and Source Data Set Metadata

You need metadata data sets that define the reference standard in the XYZ-SDTM-3.2 core standard, as well as metadata that defines the source variables for your study. The reference standards data sets are already out there from our work in Chapter 4 and can be found at C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6metadataas reference_columns.sas7bdat and reference_tables.sas7bdat. However, you need to create the source_columns.sas7bdat and source_tables.sas7bdat data sets for the particular study. These data sets are structured the same as the reference data set versions. We already created versions of these data sets in Chapter 4 when we used the CST to create define.xml. You can just get those data sets from C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTCST_make_definemetadata and place them under C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtmmetadata.

Properties Files

You need a copy of the initialize.properties and validation.properties files. You can just copy these from the XYZ123 standard from C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6programs to C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtmprograms.

SDTM Data Sets

The CST is validating your SDTM data sets, so it needs to see them as well. You can place those data sets at C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtmdata.

SAS Clinical Standards Toolkit SDTM Validation Program

Now that the metadata, data, and other files are in place to run the SAS Clinical Standards Toolkit SDTM validation job, you can set that program up. You can copy a template program from C:cstSampleLibrarycdisc-sdtm-3.2-1.6sascstdemodataprograms to your validation area at C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtmprograms. The primary revisions to that program are with the work.sasreferences data set. Here is the revised program:

******************************************************************;

* validate_data.sas                                              *;

*                                                                *;

* Sample driver program to perform a primary Toolkit action, in  *;

* this case, validation, to assess compliance of some source     *;

* data and metadata with a registered standard. A call to a      *;

* standard-specific validation macro is required later in this   *;

* code.                                                          *;

*                                                                *;

* Assumptions:                                                   *;

*   The SASReferences file must exist, and must be identified in *;

*   the call to cstutil_processsetup if it is not                *;

*   work.sasreferences.                                          *;

*                                                                *;

* CSTversion  1.6                                                *;

******************************************************************;

 

%let _cstStandard=CDISC-SDTM;

%let _cstStandardVersion=XYZ-SDTM-3.2; *<--- 3.1.1, 3.1.2, 3.1.3, or 3.2 *;

%let _cstCTPath=C:cstSampleLibrarycdisc-ct-1.0.0-1.6datasdtm201312formats;

%let _cstCTMemname=cterms.sas7bcat;

%let _cstCTDescription=201312;

 

%cst_setStandardProperties(_cstStandard=CST-FRAMEWORK,_cstSubType=initialize);

 

* Set Controlled Terminology version for this process  *;

%cst_getstandardsubtypes(_cstStandard=CDISC-TERMINOLOGY,_cstOutputDS=work._cstStdSubTypes);

data _null_;

  set work._cstStdSubTypes (where=(standardversion="&_cstStandard" and

                            isstandarddefault='Y'));

  * User can override CT version of interest by specifying a different where

    clause:            *;

  * Example: (where=(standardversion="&_cstStandard" and

              standardsubtypeversion='201104'))   *;

  call symputx('_cstCTPath',path);

  call symputx('_cstCTMemname',memname);

  call symputx('_cstCTDescription',description);

run;

 

proc datasets lib=work nolist;

  delete _cstStdSubTypes;

quit;

 

**************************************************************************;

* The following data step sets (at a minimum) the studyrootpath and

* studyoutputpath. These are used to make the driver programs portable

* across platforms and allow the code to be run with minimal modification.

* These macro variables by default point to locations within the

* cstSampleLibrary, set during install but modifiable thereafter.  The

* cstSampleLibrary is assumed to allow write operations by this driver

* module.

*;

**************************************************************************;

 

%cstutil_setcstsroot;

data _null_;

  call symput

('studyRootPath',"C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtm");

  call symput

('studyOutputPath',"C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtm");

run;

%let workPath=%sysfunc(pathname(work));

 

%let _cstSetupSrc=SASREFERENCES;

 

**************************************************************************;

* One strategy to defining the required library and file metadata for a

* CST process is to optionally build SASReferences in the WORK library.

* An example of how to do this follows.

* The call to cstutil_processsetup below tells CST how SASReferences will

* be provided and referenced.  If SASReferences is built in work, the call

* to cstutil_processsetup may, assuming all defaults, be as simple as

* %cstutil_processsetup()

**************************************************************************;

 

**************************************************************************;

* Build the SASReferences data set  

* column order: standard, standardversion, type, subtype, sasref, reftype,

*               iotype, filetype, allowoverwrite, relpathprefix, path,

*               order, memname, comment

* note that &_cstGRoot points to the Global Library root directory 

* path and memname are not required for Global Library references -

* defaults will be used  **************************************************************************;

%cst_createdsfromtemplate(_cstStandard=CST-FRAMEWORK,

     _cstType=control,_cstSubType=reference, _cstOutputDS=work.sasreferences);

proc sql;

  insert into work.sasreferences

  values ("CST-FRAMEWORK"     "1.2"                   "messages"          ""                  "messages" "libref"  "input"  "dataset"  "N"  "" "C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6messages" 1 "messages.sas7bdat" "")

  values ("CST-FRAMEWORK"     "1.2"                   "template"          ""                  "csttmplt" "libref"  "input"  "folder"   "N"  "" ""     2 ""                  "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "autocall"          ""                  "sdtmauto" "fileref" "input"  "folder"   "N"  "" "C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6macros"   1 ""     "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "control"           "reference"         "cntl_s"   "libref"  "both"   "dataset"  "Y"  "" "&workpath"                                      . "sasreferences.sas7bdat"      "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "control"           "validation"        "cntl_v"   "libref"  "input"  "dataset"  "N"  "" "&studyRootPathcontrol"                         . "validation_control.sas7bdat" "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "fmtsearch"   ""                  "srcfmt"   "libref"  "input"  "catalog"  "N"  "" "&studyRootPath erminologyformats"             1 "formats.sas7bcat"            "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "messages"    ""                  "sdtmmsg"  "libref"  "input"  "dataset"  "N"  "" ""                                    2 ""            "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "lookup"      ""                  "lookup"   "libref"  "input"  "dataset"  "N"  "" ""                                     . ""            "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "template"    ""                  "sdtmtmpl" "libref"  "input"  "folder"   "N"  "" ""                                     1 ""            "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "properties"  "initialize"        "inprop"   "fileref" "input"  "file"     "N"  "" "&studyRootPathprograms"                        1 "initialize.properties"              "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "properties"  "validation"        "valprop"  "fileref" "input"  "file"     "N"  "" "&studyRootPathprograms"                        2 "validation.properties"       "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "referencecontrol"  "validation"        "refcntl"  "libref"  "input"  "dataset"  "N"  "" "C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6validationcontrol" . "validation_master.sas7bdat" "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "referencecontrol"  "standardref"       "refcntl"  "libref"  "input"  "dataset"  "N"  "" "C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6validationcontrol" . "validation_stdref.sas7bdat" "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "referencecterm"    ""                  "ctref"    "libref"  "input"  "dataset"  "N"  "" "&studyRootPath erminologycoding-dictionaries" . "meddra.sas7bdat"             "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "referencemetadata" "column"            "refmeta"  "libref"  "input"  "dataset"  "N"  "" "C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6metadata" . "reference_columns.sas7bdat"  "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "referencemetadata" "table"             "refmeta"  "libref"  "input"  "dataset"  "N"  "" "C:cstGlobalLibrarystandardsXYZ_program_cdisc-sdtm-3.2-1.6metadata" . "reference_tables.sas7bdat"   "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "results"   "validationmetrics" "results"  "libref"  "output" "dataset"  "Y"  "" "&studyOutputPath esults"                       . "validation_metrics.sas7bdat" "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "results"   "validationresults" "results"  "libref"  "output" "dataset"  "Y"  "" "&studyOutputPath esults"                       . "validation_results.sas7bdat" "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "sourcedata"   ""               "srcdata"  "libref"  "input"  "folder"   "N"  "" "&studyRootPathdata"                . ""             "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "sourcemetadata"    "column"            "srcmeta"  "libref"  "input"  "dataset"  "N"  "" "&studyRootPathmetadata"                . "source_columns.sas7bdat"     "")

  values ("&_cstStandard"     "&_cstStandardVersion"  "sourcemetadata"    "table"             "srcmeta"  "libref"  "input"  "dataset"  "N"  "" "&studyRootPathmetadata"                        . "source_tables.sas7bdat"      "")

  values ("CDISC-TERMINOLOGY" "NCI_THESAURUS"         "fmtsearch"         ""                  "cstfmt"   "libref"  "input"  "catalog"  "N"  "" "&_cstCTPath"                                    2  "&_cstCTMemname"             "")

  ;

quit;

 

************************************************************;

* Debugging aid:  set _cstDebug=1                          *;

* Note value may be reset in call to cstutil_processsetup  *;

*  based on property settings.  It can be reset at any     *;

*  point in the process.                                   *;

************************************************************;

%let _cstDebug=1;

data _null_;

  _cstDebug = input(symget('_cstDebug'),8.);

  if _cstDebug then

    call execute("options &_cstDebugOptions;");

  else

    call execute(("%sysfunc(tranwrd(options %cmpres(&_cstDebugOptions), %str( ),

         %str( no)));"));

run;

 

**************************************************************************;

* Clinical Standards Toolkit utilizes autocall macro libraries to contain

* and reference standard-specific code libraries. Once the autocall path is

* set and one or more macros have been used within any given autocall

* library, deallocation or reallocation of the autocall fileref cannot

* occur unless the autocall path is first reset to exclude the specific

* fileref. This becomes a problem only with repeated calls to

* %cstutil_processsetup() or %cstutil_allocatesasreferences within the same

* sas session. Doing so, without submitting code similar to the code below

* may produce SAS errors such as:

*     ERROR - At least one file associated with fileref SDTMAUTO is still

*             in use.

*     ERROR - Error in the FILENAME statement.      

*

* Use of the following code is NOT needed to run this driver module

* initially.

**************************************************************************;

 

%*let _cstReallocateSASRefs=1;

%*include "&_cstGRoot/standards/cst-framework-&_cstVersion/programs/resetautocallpath.sas";

 

***********************************************************************;

* The following macro (cstutil_processsetup) utilizes the following

* parameters

* _cstSASReferencesSource - Setup should be based upon what initial source?

*   Values: SASREFERENCES (default) or RESULTS data set. If RESULTS:       

*    (1) no other parameters are required and setup responsibility is

*        passed to the cstutil_reportsetup macro                            

*    (2) the results data set name must be passed to cstutil_reportsetup as 

*        libref.memname                                       

*                                                                  

* _cstSASReferencesLocation-The path (folder location) of the sasreferences

*                           dataset (default is the path to the WORK

*                           library)           

* _cstSASReferencesName - The name of the sasreferences data set

*                         (default is sasreferences)     

**************************************************************************;

 

%cstutil_processsetup();

 

 

**************************************************************************;

* Run the standard-specific validation macro.                 

**************************************************************************;

 

%sdtm_validate;

 

* Delete sasreferences if created above and not needed for additional processing *;

proc datasets lib=work nolist;

  delete sasreferences / memtype=data;

quit;

Note that the work.sasreferences data set refers to a number of the core standard XYZ-SDTM-3.2 standard metadata files as well as some metadata files that we defined in the prior section. When the program has been run, it produces two results data sets found under C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtm esults calledvalidation_metrics.sas7bdat and validation_results.sas7bdat. The validation_metrics data set holds operational statistics on the validation checks. For this run, here is what the first 15 records look like:

image

Here is a snapshot of a few records from the validation_results data set:

image

A resultflag of 0 means that the check ran without problems. A resultflag of 1 means there was a finding.

At this point, the results of the SAS Clinical Standards Toolkit SDTM validation run are in unformatted raw SAS data sets. You can use the CST template program cst_report.sas found in the CST Sample library at C:cstSampleLibrarycdisc-sdtm-3.2-1.6sascstdemodataprograms to render those results in a nicely formatted PDF file. If you run this program right after the validate_data.sas program, all of the necessary references will already be in place. Here is what the cst_report.sas program looks like:

************************************************************************;

* cst_report.sas                                                       *;

*                                                                      *;

* Sample driver program to perform a primary Toolkit action, in        *;

* this case, reporting of process results.  This code performs any     *;

* needed set-up and data management tasks, followed by one or more     *;

* calls to the %cstutil_createreport() macro to generate report        *;

* output.                                                              *;

*                                                                      *;

* Two options for invoking this routine are addressed in these         *;

* scenarios:                                                           *;

*   (1) This code is run as a natural continuation of a CST process,   *;

*       within the same SAS session, with all required files           *;

*       available. The working assumption is that the SASReferences    *;

*       data set (referenced by the _cstSASRefs macro) exists and      *;

*       contains information on all input files required for reporting.*;

*   (2) This code is being run in another SAS session with no CST setup  *;

*       established, but the user has a CST results data set and         *;

*       therefore can derive the location of the SASReferences file that *;

*       can provide the full CST setup needed to run the reports.        *;

*                                                                        *;

* Assumptions:                                                           *;

*   To generate all panels for both types of reports, the following      *;

*   metadata is expected:                                                *;

*     - the SASReferences file must exist, and must be identified in the *;

*       call to cstutil_processsetup if it is not work.sasreferences.    *;

*     - a Results data set                                               *;

*     - a (validation-specific) Metrics data set                         *;

*     - the (validation-specific) run-time Control data set itemizing    *;

*       the validation checks requested.                                 *;

*     - access to the (validation-specific) check messages data set      *;

*                                                                        *;

* CSTversion  1.3                                                        *;

**************************************************************************;

 

%let _cstStandard=CDISC-SDTM;

%let _cstStandardVersion=XYZ-SDTM-3.2;  * <------- 3.1.1, 3.1.2, 3.1.3, or 3.2   *;

 

%cst_setStandardProperties(_cstStandard=CST-FRAMEWORK,_cstSubType=initialize);

 

**************************************************************************;

* The following data step sets (at a minimum) the studyrootpath and      *;

* studyoutputpath.  These are used to make the driver programs portable  *;

* across platforms and allow the code to be run with minimal             *;

* modification. These macro variables by default point to locations      *;

* within the cstSampleLibrary, set during install but modifiable         *;

* thereafter.  The cstSampleLibrary is assumed to allow write operations *;

*  by this driver module.                                                *;

**************************************************************************;

 

%cstutil_setcstsroot;

data _null_;

  call symput

('studyRootPath',"C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtm");

  call symput

('studyOutputPath',"C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTvalidate_sdtm");

run;

 

%let workPath=%sysfunc(pathname(work));

 

* Initialize macro variables used for this task  *;

 

%let _cstRptControl=;

%let _cstRptLib=;

%let _cstRptMetricsDS=;

%let _cstRptOutputFile=&studyOutputPath/results/cstreport.pdf;

%let _cstRptResultsDS=;

%let _cstSetupSrc=SASREFERENCES;

 

************************************************************;

* Debugging aid:  set _cstDebug=1                          *;

* Note value may be reset in call to cstutil_processsetup  *;

*  based on property settings.  It can be reset at any     *;

*  point in the process.                                   *;

************************************************************;

%let _cstDebug=0;

data _null_;

  _cstDebug = input(symget('_cstDebug'),8.);

  if _cstDebug then

    call execute("options &_cstDebugOptions;");

  else

    call execute(("%sysfunc(tranwrd(options %cmpres(&_cstDebugOptions), %str( ), %str( no)));"));

run;

 

* The call to cstutil_processsetup below tells CST how SASReferences     *;

* will be provided and referenced.  If SASReferences is built in work,   *;

* the call to cstutil_processsetup may, assuming all defaults, be as     *;

* simple as %cstutil_processsetup()                                      *;

**************************************************************************;

 

 

**************************************************************************;

* Clinical Standards Toolkit utilizes autocall macro libraries to        *;

* contain and reference standard-specific code libraries.  Once the      *;

* autocall path is set and one or more macros have been used within any  *;

* given autocall library, deallocation or reallocation of the autocall   *;

* fileref cannot occur unless the autocall path is first reset to        *;

* exclude the specific fileref.                                          *;

*                                                                        *;

* This becomes a problem only with repeated calls to                     *;

* %cstutil_processsetup() or %cstutil_allocatesasreferences within the   *;

* same sas session. Doing so, without submitting code similar to the     *;

* code below may produce SAS errors such as:                             *;

* ERROR - At least one file associated with fileref SDTMAUTO is still    *;

*         in use.                                                        *;

* ERROR - Error in the FILENAME statement.                               *;

*                                                                        *;

* If you call %cstutil_processsetup() or %cstutil_allocatesasreferences  *;

* more than once within the same sas session, typically using %let       *;

* _cstReallocateSASRefs = 1 to tell CST to attempt reallocation, use of  *;

* the following code is recommended between each code submission.        *;

*                                                                        *;

* Use of the following code is NOT needed to run this driver module      *;

* initially.                                                             *;

**************************************************************************;

 

%*let _cstReallocateSASRefs=1;

%*include "&_cstGRoot/standards/cst-framework-&_cstVersion/programs/resetautocallpath.sas";

 

**************************************************************************;

* The following macro (cstutil_processsetup) utilizes the following      *;

* parameters:                                                            *;

*                                                                        *;

* _cstSASReferencesSource - Setup should be based upon what initial      *;

*                           source?                                      *;

*   Values: SASREFERENCES (default) or RESULTS data set. If RESULTS:     *;

*     (1) no other parameters are required and setup responsibility is   *;

*         passed to the cstutil_reportsetup macro                        *;

*     (2) the results data set name must be passed to                    *;

*         cstutil_reportsetup as libref.memname                          *;

*                                                                        *;

* _cstSASReferencesLocation - The path (folder location) of the          *;

*                             sasreferences data set (default is the     *;

*                             path to the WORK library)                  *;

*                                                                        *;

* _cstSASReferencesName - The name of the sasreferences data set         *;

*                              (default is sasreferences)                *;

**************************************************************************;

 

%cstutil_processsetup(_cstSASReferencesLocation=&studyrootpath/control);

 

%*let _cstRptResultsDS=results.validation_results;

%cstutil_reportsetup(_cstRptType=Results);

 

**************************************************************************;

* Run reports                                                            *;

* Note multiple invocations require unique &_cstreportoutput parameter   *;

* values                                                                 *;

**************************************************************************;

 

%cstutil_createreport(

    _cstsasreferencesdset=&_cstSASRefs,

    _cstresultsdset=&_cstRptResultsDS,

    _cstmetricsdset=&_cstRptMetricsDS,

    _cstreportbytable=N,

    _cstreporterrorsonly=Y,

    _cstreportobs=50,

    _cstreportoutput=%nrbquote(&_cstRptOutputFile),

    _cstsummaryReport=Y,

    _cstioReport=Y,

    _cstmetricsReport=Y,

    _cstgeneralResultsReport=Y,

    _cstcheckIdResultsReport=Y);

This program creates a file called cstreport.pdf, and the first page looks like this with all of the CST validation checks following it:

image

You can also take the validation_results SAS data set and format it however you want via PROC REPORT or any other reporting mechanism that you want to use. There is also the option of defining your own validation checks within the SAS Clinical Standards Toolkit. For information about how to do that, you should refer to the SAS Clinical Standards Toolkit: User’s Guide.

A similar process may be followed for ADaM data set validation because the Clinical Standards Toolkit supports ADaM as well. However, the results metadata extension is not supported for validation purposes in the toolkit.

SAS Clinical Data Integration SDTM Validation

In Chapter 5, we implemented the SDTM using SAS Clinical Data Integration. Also in that chapter, we imported the SAS Clinical Standards Toolkit SDTM standard for XYZ123, produced the SDTM data sets, and produced a define file. Here we will use SAS Clinical Data Integration to validate the SDTM that we created in Chapter 5. Fortunately, SAS Clinical Data Integration gives you a transformation called CDISC-SDTM Compliance that can be dragged to a job. This transformation is easier to implement than the manual setup process found above in the SAS Clinical Standards Toolkit. The transformation looks like this in CDI:

image

Assuming that the metadata was imported and set up properly in Chapter 5 in SAS Clinical Data Integration, there are only a few additional steps to finish this validation job. If you right-click CDISC-SDTM Compliance, select Properties, and click the Data Standard tab, then you can select the standard to validate your SDTM data against. In this case, we want to select our customized XYZ-SDTM-3.2 standard:

image

Under the Domains tab, we can subset for individual domains if we want, like this:

image

The Checks tab enables you to add any of the built-in SDTM checks from SAS, WebSDM, or OpenCDISC that you would like. That screen looks like this:

image

Under the Reports tab, you need to specify where you want the SDTM validation reports saved. You can specify that you want the validation reports given to you by domain or by validation check. That screen looks like this:

image

Now you can run the job and review your SDTM validation results in the server folder specified. At the start of the compliance report, we get a nice by-domain bookmarked summarization of findings like this:

image

Then if we click the AE domain bookmark, we would see this:

image

In this example, SAS Clinical Data Integration is serving as a front-end graphical user interface to the SAS Clinical Standards Toolkit.

Because of the volume of checks available and because many of them are informational, it would be wise for you to subset the checks for what your organization deems to be important. The validation reports that SAS Clinical Data Integration can generate via the SAS Clinical Standards Toolkit can be prohibitively large otherwise.

SAS Clinical Standards Toolkit Define.xml Validation Program

In Chapter 4, we used the Clinical Standards Toolkit to create define.xml for our XYZ123 SDTM data. That same define file also needs validation. The SAS Clinical Standards Toolkit 1.6 provides validation of the define file against the published CDISC XML schema to ensure that the define file is well formed XML. In our create_definexml.sas program in Chapter 4, we included this macro call:

%cstutilxmlvalidate();

If there are any warnings or  errors messages of note in the creation of the define.xml file, they would get stored in the C:UsersyouridDesktopSAS_BOOK_cdisc_2nd_editionCSTCST_make_define esultswrite_results.sas7bdat data set. SAS Clinical Standards Toolkit 1.7 does go a bit further in providing an additional driver program that will also check the data set and variable-level metadata against the contents of your SDTM data.

SAS Clinical Data Integration Define.xml Validation

In Chapter 5, we used SAS Clinical Data Integration to build our SDTM data sets as well as to generate our define.xml file. Once again, CDI provides us with a nice graphical user interface transformation to enable us to validate the define file that we created. If we look at the clinical transformations available to us, we see CDISC-Define Validation as an option as seen here:

image

We can add that to the end of our “make define.xml” job with a simple drag:

image

If you open the Properties window of the CDISC-Define Validation transformation, you can select the version (for example, 1 or 2) of define.xml that you wish, and you can specify the message level (for example, info, warning, error) of the validation reporting. Finally, you need to click the Reports tab to specify where to store the results of the define file validation run as follows:

image

The results of running this transformation are stored in a file called ValidateCrtdds.pdf and look like this:

image

Chapter Summary

There are now a handful of options available to CDISC implementers intent on ensuring that their data and define files are compliant with the published standards. The ones covered in this chapter include tools that come with the SAS Clinical Data Standards Toolkit and SAS Clinical Data Integration. Because of changing standards, changing validation rules, and a recognition that not all rules apply to all situations, the chosen tool needs to be flexible enough to allow users to either make customizations or to  obtain updates. It should also be easy to install and implement, and the validation results must be easy to interpret. In this chapter, we tried to highlight each of these features so that you can decide which tool would be best to use for your particular study, set of studies, or other situation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset