Validation Check Metadata Reporting

Report 3 offers the complete set of metadata about each validation check that is available in the SAS Clinical Standards Toolkit. The report can be printed in a multi-panel or one-page-per-check presentation format.
A sample driver program is provided to define the SAS Clinical Standards Toolkit environment and to call the primary task framework macro (%cstutil_createmetadatareport). This excerpt from the driver program header provides a brief overview:
cst_metadatareport.sas

Sample driver program to perform reporting of validation check metadata.
This code performs any needed set-up and data management tasks, followed by
one or more calls to the %cstutil_createmetadatareport() macro to generate
report output.

Two scenarios for invoking this routine are addressed in this driver module:
  (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 (&_cstSASRefs) exists and
      contains information on all files required for reporting.
  (2) This code is being run in another SAS session with no CST setup
      established.  In this case, the user assumes responsibility for
      defining all librefs and macro variables needed to run the reports,
      although defaults are set.

 Assumptions:
 (1) SASReferences is not required for this task.  If found, it will be used.
     If not found, default libraries and macro variables are set and may be
     overridden by the user.
 (2) The user of this code may override any cstutil_createmetadatareport
     parameter values.
 (3) Only the cstutil_createmetadatareport &_cstRptControl and &_cstMessages
     parameters are REQUIRED.
 (4) If the _cststdrefds parameter is not set, the associated panel cannot be
     generated.
 (5) By default, a PDF report format is assumed. This may be overridden.
 (6) Report output will be written to cstcheckmetadatareport.pdf in the SAS
     WORK library unless another location is specified in SASReferences or
     in the set-up code below.
 (7) The report macro cstutil_createmetadatareport will only produce panel 1
     (Check Overview) unless any of the last 3 parameters are set to Y.
Report setup is similar to reporting on process results. The only key difference is that the call to the %cstutil_reportsetup macro passes a different parameter value to request check metadata reporting:
%cstutil_reportsetup(_cstRptType=Metadata);
To generate the metadata report, the reporting driver program makes one or more calls to the utility reporting macro. At a minimum (using default parameter values), a simple macro call to create report 3 might include this code:
%cstutil_createmetadatareport(
               _cstValidationDS=&_cstRptControl 
              ,_cstMessagesDS=&_cstMessages
              ,_cstReportOutput=%bquote(&_cstRptOutput)
              );
This table describes all supported parameters in the sample %cstutil_createmetadatareport macro:
Supported Parameters for the %cstutil_createmetadatareport Macro
Parameter
Description
_cstStandardTitle
This parameter is optional. Title that defines the title2 statement.
_cstValidationDS
This parameter is required. The validation data set that is used by a SAS Clinical Standards Toolkit process. This is Validation Master, Validation Control, or a derivative as specified by you.
_cstValidationDSWhClause
Optional WHERE clause applied to _cstValidationDS.
_cstMessagesDS
This parameter is required. The Messages data set used by a SAS Clinical Standards Toolkit process.
_cstStdRefDS
The Validation StdRef data set created for a SAS Clinical Standards Toolkit standard. This file is required if _cstStdRefReport=Y.
_cstReportOutput
This parameter is required. The path and filename where the report output is to be written. File types HTML, RTF, and PDF are supported.
_cstCheckMDReport
Specifies whether panel 2 additional check details is run. The default value is N.
_cstMessageReport
Specifies whether panel 3 message details is run. The default value is N.
_cstStdRefReport
Specifies whether panel 4 reference information is run. The default value is N.
_cstRecordView
If the value is Y, then all available check metadata is generated, by check, in a single listing. Either this listing, or the multi-panel report can be generated in a single invocation of this macro, but not both. The default value is N.
A more complete example of the %cstutil_createmetadatareport reporting macro includes this macro call:
%cstutil_createmetadatareport( 
   _cststandardtitle=%str(CDISC-SDTM 3.1.1 Validation Check Metadata), 
   _cstvalidationds=refcntl.validation_master, 
   _cstvalidationdswhclause=, 
   _cstmessagesds=&_cstMessages, 
   _cststdrefds=refcntl.validation_stdref, 
   _cstreportoutput=%nrbquote(&studyOutputPath/results/cstcheckmetadatareport.pdf), 
   _cstcheckmdreport=Y, 
   _cstmessagereport=Y, 
   _cststdrefreport=Y, 
   _cstrecordview=N);
Interpretation of this request, based on the parameter descriptions in Supported Parameters for the %cstutil_createmetadatareport Macro, produces a validation check metadata report (cstcheckmetadatareport.pdf) that contains all four report sections for the CDISC SDTM 3.1.1 validation checks.
Example of Check Overview
Example the check overview from a report
Example of Additional Check Details (Panel 2) [_cstCheckMDReport=Y]
Example additional check details from a report where _cstCheckMDReport=Y
Example of Message Details (Panel 3) [_cstMessageReport=Y]
Example message details from a report where _cstMessageReport=Y
Example of Reference Information (Panel 4) [_cstSTDRefReport=Y]
Example reference information from a report where _cstSTDRefReport=Y
Example of Using WHERE Clause [_cstValidationDSWhClause=checkid='SDTM0801']
Example check overview from a report where _cstValidationDSWhClause=checkid='SDTM0801'
Example of by Record View [_cstRecordView=Y]
Example full metadata from a report where _cstRecordView=Y