The Subject Sequence Generator Transformation

Overview

Some of the domains in the CDISC SDTM data standard model require a sequence number as an identifier variable (–SEQ). This sequence number ensures the uniqueness of records for each subject within a data set.

Problem

You want to load study data into the SDTM VS domain. In the study, each subject had a series of vital signs collected during each visit. (For example, on day 17, several readings were taken for heart rate and blood pressure). You need to uniquely identify each of these vital signs for each subject. This means that when you convert the study data, you need to populate each domain and populate the VSSEQ variable.

Solution

Use the Subject Sequence Generator transformation to generate a unique sequence number across subjects in a domain. After running the Subject Sequence Generator transformation, another variable is generated that enables you to uniquely identify each vital sign.
Note: For detailed information about creating a job with a transformation, see the SAS Data Integration Studio: User's Guide.

Task

To use the Subject Sequence Generator transformation, complete the following steps:
  1. In SAS Data Integration Studio, create a new job. Select Filethen selectNewthen selectJob. An empty job diagram is displayed on the Diagram page.
  2. In the Folders tree, drag and drop the source table for the domain onto the diagram.
  3. In the Transformations tree, expand Clinical, select Subject Sequence Generator, and drag and drop it onto the diagram. The Diagram page displays the Subject Sequence Generator transformation.
  4. Connect the source table to the Subject Sequence Generator transformation. Drag the cursor from the source table to the input port of the transformation. This action connects the source to the transformation.
  5. Expand the Access folder, select Table Loader, and drag and drop it onto the diagram.
  6. Connect the Subject Sequence Generator_OUTPUT table to the Table Loader. Drag the cursor from the output table to the input port of the Table Loader.
  7. Connect the Table Loader to the SDTM VS domain (the data target). Drag the cursor from the output port of the Table Loader to the input port of the SDTM VS domain.
  8. Right-click on Subject Sequence Generator, and select Properties. The Subject Sequence Generator Properties dialog box appears.
  9. In the Folders tree, drag and drop the SDTM VS domain that you want to populate onto the diagram.
  10. Click the Options tab.
  11. In the Update Source field, select a setting. This step is optional.
    • NO indicates that the source table is not modified (that is, PROC SORT output is sent to a work table).
    • YES indicates that the source table is modified directly by PROC SORT in the code generation.
  12. In the Business Keys list, adjust the order of the available keys. This list identifies the keys in the source table. A key makes a record unique. Use these keys to sort the data.
  13. In the Sequence Key Variable list, select the name of the sequence variable in the target domain (–SEQ).
  14. In the Subject Variable list, select a variable. The subject variable represents the unique subject identifier (USUBJID).
  15. Click OK.
  16. Save and run the job. SAS Data Integration Studio generates the SAS code for transforming, and then submits the code to SAS. The –SEQ variable is populated with a sequence number that is unique for each record for each subject.