Creating Documentation

 

Overview of Documentation

There are many forms of documentation which are essential as part of an electronic submission package.  This section will focus on the data definition documentation as established by CDISC - Clinical Data Interchange Standards Committee.   CDISC refers to this section of the documentation as the clinical domain data models.  This is essentially documenting the meta data of SAS datasets which are included in the electronic submission.  Examples are available from the DIA web page.  The goal of this documentation is to provide FDA reviewers with a road map to the data so they can navigate to determine how each variable is derived.  Due to the nature of the PDF file format and the need for navigation, hyperlinks are used extensively by the Trialex System's documentation tools.  An example of this documentation for the adverse event dataset is shown here:

documetation1.jpg (68224 bytes)

Hyperlinks for the definition of derived variables are highlighted in blue.

Preparing for Documentation

Before the data definition can be documented, it is important to identify where each derivation took place in the SAS programs.  This can be accomplished by either using an interactive variable selection tool or by adding proper comments inside the SAS program.  This will identify the blocks of code which derive each variable.  The following steps are necessary for this process.

  • Identify the SAS program which contains the derived variable needed in the documentation.
  • Select the beginning and the end of the code segment which derives the variable.
  • Associate this to the proper derived variable for a particular dataset.

More details on the interactive variable selection tool and the syntax for identifying the variable through proper comments are available in the reference section.

Creating Documentation in Batch Mode

Once all derived variables are prepared in the related programs, these three macros will automate the generation of the documentation.  These macros include:

  • %vardef - captures variable definitions from documented SAS programs
  • %docprog - creates documentation for SAS programs
  • %datadef - creates the data definition clinical domain documentation

Since the variable definition macro produces data which is later used by the program documentation and the data definition documentation, it is recommended that these macros be executed in the order presented.  By default, these macros document all the programs and data defined to the Trialex System for a specific study.  The macros do allow for selection of specific programs and data in the event of updates.  The syntax of these macros are available in the reference section but the following example illustrates the documentation of the adverse event data domain.

/*-----------------------------------------*
 Program: docgen.sas
 Date: 05/23/2000, 10:27:02 am
 User: Sy Truong (struong)
 *-----------------------------------------*/

libname inlib 'd:\global\project1\study1';
libname library 'd:\global\project1\study1\source data';

*** Generate the variable definition for program: a_ae.sas ***;
%vardef(prgname=a_ae.sas);

*** Generate the program documentation for program: a_ae.sas ***;
%docprog(prgname=a_ae.sas);

*** Generate the data definition documentation for all datasets ***;
%datadef;
Creating Documentation Interactively

As an alternative to writing a SAS program, the following interactive tool will automate the creation of the data definition documentation.  This is available in the documentation tools area within the study conduct section.  The icon which identifies this tool is shown here:

documentation_icon.gif (1360 bytes)

The three documentation tools are presented as check boxes.  This allows for updating any of the tools separately.   The tools include:

  • Variable Definition - captures variable definitions from documented SAS programs
  • SAS Program - creates documentation for SAS programs
  • Data Definition - creates the data definition clinical domain documentation

generate_doc.jpg (46780 bytes)

A useful feature within the data definition tool is that if a user-defined macro is used, this tool will decode the values automatically.

doc_codes.jpg (48377 bytes)

This formatted information is acquired from the formats catalog.  The formats library path specified in the dialog box points to the location of the formats catalog.  Another approach is to decode the formatted values inside the dataset before the documentation is generated.  This can be automated with the de-format tool.

If the documentation is being updated, it is recommended that a subset of programs and data be selected for efficiency.   The "Select All" button is available for cases where all programs or data needs to be documented.

Even though this process is interactive, it can be re-executed in batch mode if the SAS program is saved for future invocation.  The "Save Generation Code" option will save the equivalent selection in a batch SAS program named docgen.sas in the programs directory.  Note that the programs directory is defined in the programs object, so this definition has to be previously defined for the current study.  The program generated is shown in the example above.

Once the documentation is complete, an email is delivered to the user containing hyperlinks to the documentation.   An example email is shown here:

doc_email.jpg (68938 bytes)

Additional options are available by clicking on the options button.  These include:

  • Emailing the result of the documentation to other team members
  • Scheduling the documentation updates for future dates
  • Evaluating the log of the execution for cautionary messages

doc_options.jpg (69553 bytes)

 
     Meta-Xceed Inc.© 2007