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). The following excerpt from the driver program header provides a brief overview:
cst_metadatareport.sas

Sample driver program to perform the reporting of validation check metadata.
This code performs any needed setup and data management tasks, followed by
one or more calls to the %cstutil_createmetadatareport() 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, in
       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 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 it is found, it will be used.
     If it is 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 is written to cstcheckmetadatareport.pdf in the SAS
     Work library unless another location is specified in SASReferences or
     in the setup code below.
(7) The report macro cstutil_createmetadatareport only produces 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 the following:
%cstutil_CreateMetadataReport(
               _cstValidationDS=&_cstRptControl 
              ,_cstMessagesDS=&_cstMessages
              ,_cstReportOutput=%bquote(&_cstRptOutput)
              );
The following 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 the user.
_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 the following 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 Table 9.3, produces a validation check metadata report (cstcheckmetadatareport.pdf) that contains all four report sections for the CDISC-SDTM 3.1.1 validation checks.
Check Overview
Display of the check overview from a report
Additional Check Details (Panel 2) [_cstCheckMDReport=Y]
Display of the additional check details from a report where _cstCheckMDReport=Y
Message Details (Panel 3) [_cstMessageReport=Y]
Display of the message details from a report where _cstMessageReport=Y
Reference Information (Panel 4) [_cstSTDRefReport=Y]
Display of the reference information from a report where _cstSTDRefReport=Y
Sample Report Using WHERE Clause [_cstValidationDSWhClause=checkid='SDTM0801']
Display of the check overview from a report where _cstValidationDSWhClause=checkid='SDTM0801'
Sample Report By Record View [_cstRecordView=Y]
Display of the full metadata from a report where _cstRecordView=Y