Working with Data from the CDISC-SDTM to CRT-DDS Transformation

Problem

You want to save the data from the CDISC-SDTM to CRT-DDS transformation. Saving this data enables you to edit the tables to add information to the CRT-DDS that is not represented in CDI metadata. This section describes how to:
  • save the data from a CDISC-SDTM to CRT-DDS transformation
  • include computational algorithm and codelist metadata in the CRT-DDS define.xml file
  • add annotated CRF and value-level metadata to the CRT-DDS define.xml file

Save the Data from a CDISC-SDTM to CRT-DDS Transformation

When creating a define.xml file, select a location into which tables that are created by the CDISC-SDTM to CRT-DDS transformation can be copied.
To save the data from a CDISC-SDTM to CRT-DDS transformation into a specified location, complete the following steps:
  1. Add a CDISC-SDTM to CRT-DDS transformation to a job. For detailed information about adding a CDISC-SDTM to CRT-DDS transformation, see The CDISC-SDTM to CRT-DDS Transformation.
  2. Right-click on CDISC-SDTM to CRT-DDS, and select Properties. The CDISC-SDTM to CRT-DDS Properties dialog box appears.
  3. Click the Generation tab.
  4. Select the Save work tables to permanent location check box. The Browse button next to the Location field becomes active, and Location field itself becomes active.
  5. Click the Browse button. The Select Path dialog box appears.
    Note: The file type is Folder. You can select entries that are folders.
  6. Select a folder in which you want to save the CRT-DDS tables. The folder that you select must be accessible by the SAS Workspace Server where the code executes. This means that the C:\ folder that is listed in the Select Path dialog box is not on your local PC, but is on the SAS Workspace Server. You must have write access to this folder. If there are tables from a previous CDISC-SDTM to CRT-DDS transformation in this folder, then they will be overwritten without any prompting.
  7. Click OK in the Select Path dialog box. The Location field contains the folder that you selected in the Select Path dialog box.
  8. Click OK in the CDISC-SDTM to CRT-DDS Properties dialog box.
  9. Save and run the job. SAS Data Integration Studio generates the SAS code for validating, and then submits the code to SAS. The CRT-DDS define.xml file is created. Several data sets are created in the folder that you selected in the Generation tab. Depending on the metadata found for the domain and study, many of these data sets (tables) will be empty. For more information about the data sets (tables) that are created, see the SAS Clinical Standard Toolkit: User's Guide.

Include Computational Algorithm and Codelist Metadata in the CRT-DDS define.xml File

Problem

You want to include computational algorithm and codelist metadata about the domains that you collected during a study. This study involved domains transformed from the CDISC-SDTM standard format to the CRT-DDS standard format. To do this, you need to edit the metadata properties for the domain columns, and then use the CDISC-SDTM to CRT-DDS transformation to transform CDISC SDTM domains into a define.xml file that meets the CRT-DDS standard.

Solution

For each domain column that has a codelist or computational algorithm, you need to edit the clinical properties.

Tasks

To edit clinical properties, complete the following steps:
  1. In the Folders tree, right-click on a domain, and select Properties. The Properties dialog box appears.
  2. Click the Columns tab. The domain columns are listed.
  3. Right-click on a column, and select Properties. The column properties dialog box appears.
  4. Click the Clinical Domain tab.
  5. Edit the Method property to enter the computational algorithm metadata.
  6. Edit the XML Codelist property to enter the codelist metadata.
  7. Click OK to save the changes and exit the column properties dialog box.
  8. Click OK to save the changes and exit the Properties dialog box.
  9. Add a CDISC-SDTM to CRT-DDS transformation to a job. For detailed information about adding a CDISC-SDTM to CRT-DDS transformation, see The CDISC-SDTM to CRT-DDS Transformation. Select the domains of the columns that you edited in the previous steps.
  10. Run the job. The computational algorithm and codelist metadata will be included in the CRT-DDS define.xml file.
  11. Open the define.xml file. Notice that the Codelist and Computational Method information is displayed for each of the domain columns where you updated the column properties.

Add Annotated CRF and Value-Level Metadata to the CRT-DDS define.xml File

Add Annotated CRF Metadata to the CRT-DDS define.xml File

You want to include the annotated CRF metadata about the domains that you collected during a study. Edit the SAS tables that were generated by the CDISC-SDTM to CRT-DDS transformation to include the metadata. Run the %CRTDDS_WRITE macro to generate the CRT-DDS define.xml file.
To update the SAS tables and run the macro, complete the following steps:
  1. Add a CDISC-SDTM to CRT-DDS transformation to a job. For detailed information about adding a CDISC-SDTM to CRT-DDS transformation, see The CDISC-SDTM to CRT-DDS Transformation.
  2. Click the Generation tab. Select the Save work tables to permanent location check box, and enter a location for the generated SAS tables. For more information about saving tables, see Save the Data from a CDISC-SDTM to CRT-DDS Transformation.
  3. Click Run to run the job. The define.xml file is generated, and the SAS tables used to generate this file are included.
  4. Add records to the annotatedcrfs, mdvleaf, and mdvleaftitles tables.
    1. Drag and drop the User Written Code transformation onto the diagram.
    2. Right-click on User Written, and select Properties. The User Written Properties dialog box appears.
    3. Click the General tab, and rename the transformation Update SAS CRT-DDS tables.
    4. Click the Code tab. In the Code generation mode field, select All user written.
    5. In the code editor, add the code to include annotated CRF metadata. The following code example includes annotated CRF metadata:
      *Lookup OID for the SDTM 3.1.2 standard in MetaDataVersion;
      proc sql noprint;
      select OID into :mdv from _svWork.MetaDataVersion
      where name="CDISC-SDTM 3.1.2";
      quit;
      *Add records for Annotated CRF;
      proc sql;
      insert into _svWork.AnnotatedCRFs
      set DocumentRef = "BlankCRF",
      leafID= "AnnotatedCRF",
      FK_MetaDataVersion = "&mdv";
      insert into _svWork.MDVLeaf
      set ID= "AnnotatedCRF",
      href = "./blankcrf.pdf",
      FK_MetaDataVersion = "&mdv";
      insert into _svWork.MDVLeafTitles
      set title= "Blank Annotated CRF",
      FK_MDVLeaf = "AnnotatedCRF";
      quit;
      *reassign srcdata to location of _svWork data sets;
      data _null_; path=pathname('_svwork'); rc=libname('srcdata');
      rc=libname('srcdata',path);
      run;
      *create new define.xml file using updated SAS CRT-DDS data sets;
      %crtdds_write(_cstCreateDisplayStyleSheet=1);
    6. Click OK to save the code.
  5. Click Run to run the job. Review the define.xml file and make sure that the annotated CRF metadata is included.

Add Value-Level Metadata to the CRT-DDS define.xml file

You want to include the value-level metadata about the domains that you collected during a study into the CRT-DDS standard format. Edit the SAS tables that were generated by the CDISC-SDTM to CRT-DDS transformation to include the metadata. Run the %CRTDDS_WRITE macro to generate the CRT-DDS define.xml file.
To update the SAS tables and run the macro, complete the following steps:
  1. Add a CDISC-SDTM to CRT-DDS transformation to a job. For detailed information about adding a CDISC-SDTM to CRT-DDS transformation, see The CDISC-SDTM to CRT-DDS Transformation.
  2. Click the Generation tab. Select the Save work tables to permanent location check box, and enter a location for the generated SAS tables. For more information about saving tables, see Save the Data from a CDISC-SDTM to CRT-DDS Transformation.
  3. Click Run to run the job. The define.xml file is generated, and the SAS tables used to generate this file are included.
  4. Add records to the valuelists, itemvaluelistrefs, valuelistitemrefs, and itemdefs tables.
    1. Drag and drop the User Written Code transformation onto the diagram.
    2. Right-click on User Written, and select Properties. The User Written Properties dialog box appears.
    3. Click the Code tab. In the Code generation mode field, select All user written.
    4. In the code editor, add the code to include the value-level metadata. The following code provides an example of how to include the value-level metadata on the SC domain. This example includes two values: height without shoes and weight without shoes.
      *Lookup OID for the SDTM 3.1.2 standard in MetaDataVersion;
      proc sql noprint;
      select OID into :mdv from _svWork.MetaDataVersion
      where name="CDISC-SDTM 3.1.2";
      quit;
      *Lookup OID for the SCTEST column in ItemDefs;
      proc sql noprint;
      select OID into :srccol from _svWork.ItemDefs
      where name='SCTEST';
      quit;
      *add record for a new valuelist SCTESTVALS;
      proc sql ;
      insert into _svWork.ValueLists
      set OID= "SCTESTVALS",
      FK_MetaDataVersion = "&mdv";
      *add record associating the value list SCTESTVALS to the OID for SCTEST ItemDefs record;
      insert into _svWork.ItemValueListRefs
      set ValueListOID= "SCTESTVALS",
      FK_ItemDefs = "&srccol";
      *add records to the ItemDefs data set for each value in the SCTESTVAL value list;
      insert into _svWork.ItemDefs
      set OID= "VAL001",
      Name = "SCTEST",
      DataType = "text",
      Length = 3,
      SASFieldName = "SCTEST",
      comment = "Height taken barefoot",
      label="Height in inches",
      FK_MetaDataVersion = "&mdv"
      set OID= "VAL002",
      Name = "SCTEST",
      DataType = "text",
      Length = 4,
      SASFieldName = "SCTEST",
      comment = "Weight without shoes",
      label="Weight in pounds",
      FK_MetaDataVersion = "&mdv";
      *add records associating the value list SCTESTVALS to rows in the ItemDefs data set;
      insert into _svWork.ValueListItemRefs
      set ItemOID= "VAL001",
      OrderNumber=1,
      Mandatory="Yes",
      KeySequence=1,
      FK_ValueLists = "SCTESTVALS"
      set ItemOID= "VAL002",
      OrderNumber=2,
      Mandatory="Yes",
      KeySequence=2,
      FK_ValueLists = "SCTESTVALS";
      quit;
      *reassign srcdata to location of _svWork data sets;
      data _null_; path=pathname('_svwork'); rc=libname('srcdata');
      rc=libname('srcdata',path);
      run;
      *create new define.xml file using updated SAS CRT-DDS data sets;
      %crtdds_write(_cstCreateDisplayStyleSheet=1);
    5. Click OK to save the code.
  5. Click Run to run the job. The define.xml file is created in the location that was specified. It contains the value-level metadata for Height and Weight for the SCTEST column in the SC domain.