The defined variables of the SDTM general observation classes could restrict the ability of sponsors to represent all the data they wish to submit. Collected data that may not entirely fit includes relationships between records within a domain, records in separate domains, and sponsor-defined variables.
Related Records (RELREC) is a special-purpose dataset used to describe relationships between records for a subject and relationships between datasets. In both cases, relationships represented in RELREC are collected relationships, either by explicit references or check boxes on the CRF, or by design of the CRF( such as, from CRF it is given that vital signs captured during an exercise stress test.)
To define a relationship, add a record to RELREC dataset for each record to be related and assign a unique character identifier value for the relationship. That relationship Identifier variable in RELREC dataset is RELID.
The given example shows how to use the RELREC dataset to relate records stored in separate domains. For USUBJID 123456 and 123457 who had taken concomitant medications as the result of adverse events.
The record in AE dataset is:
The record in CM dataset is:
For the datasets it is clear that, the subject 123456 has taken a concomitant medication DOLIPRANE due to the adverse event STIFFNESS OF CALVES. Ie, there is a relationship between these records (record in AE dataset and record in CM dataset). Similarly, for the subject 123457, there is a relationship between AE and CM records.
This relationship is mapped to RELREC dataset and is as follows:
In this RELREC dataset, the RELID value is same for the first two records. It means that the two records are related. The variables USUBJID, IDVAR and IDVARVAL show this relationship is between AE record with AESEQ=2 and CM record with CMSEQ=3 for the subject 123456.
Similarly in the case of record 3 and 4 in RELREC dataset, RELID value 2 (for both records) shows these two are related. And the relationship is between AE record with AESEQ=4 and CM record with CMSEQ=6 for the subject 123457.
The SAS code used for this particular case is:
/*Considering the AE records for which Concomitant medication is taken*/
where AECONTRT= “Y”;
/*Considering the Concomitant medication dataset*/
proc sort data=analysis.cm out=cm;
by usubjid cmseq;
/*Finding out the related records */
merge ae(in=a ) cm(in=b );
if (a and b) and (strip(upcase(AEACNOTH))=strip(upcase(CMTRT)));
/*The program for RELREC dataset*/
data analysis.relrec(keep=STUDYID RDOMAIN USUBJID IDVAR IDVARVAL RELTYPE RELID);
retain STUDYID RDOMAIN USUBJID IDVAR IDVARVAL RELTYPE RELID;
retain RELID 1;
Note: The relationship identification can vary with situations. (ie, creation of REL dataset in the above program).
This example shows how to use the RELREC dataset to represent one-to-many relationship between two datasets. In the example below all the records in one domain are being related to all of the records in the other, so both USUBJID and IDVARVAL are null.
The variable RELTYPE identifies the type of relationship between the datasets. The allowable values are ONE and MANY. This information defines how a merge/join would be written, and what would be the result of the merge/join. The possible combinations are the following:
1.ONE and ONE
This combination indicates that there is no hierarchical relationship between the datasets and the records in the datasets. Only one record from each dataset will potentially have the same value of the IDVAR within USUBJID.
2. ONE and MANY
This combination indicates that there is a hierarchical (parent/child) relationship between the datasets. One record within USUBJID in the dataset identified by REL will potentially have the same value of the IDVAR with many (one or more) records in the dataset identified by REL.
3. MANY and MANY
This combination is unusual and challenging to manage in a merge/join.