CDISC ODM KeySet Members

What Is a CDISC ODM KeySet?

In a CDISC ODM XML document, a clinical trials data KeySet references an entity, such as a study, a subject, a study event, and so on. The following is an excerpt from a sample XML document that shows a fully populated KeySet:
<ClinicalData StudyOID="123-456-789" MetaDataVersionOID="v1.1.0">
   <SubjectData SubjectKey="001">
      <StudyEventData StudyEventOID="SE.VISIT1" StudyEventRepeatKey="1">
         <FormData FormOID="FORM.AE" FormRepeatKey="1">
            <ItemGroupData ItemGroupOID="IG.AE" ItemGroupRepeatKey="1" 
               TransactionType="Insert">
                  

Converting CDISC ODM KeySet Members

PROC CDISC imports and exports CDISC ODM KeySet members as follows:
  • When importing, KeySet members (KeySet attributes) that are in the input XML document are converted to SAS variables and values in the output SAS data set.
  • When exporting, KeySet members (SAS variables and values) that are in the input SAS data set are converted to KeySet attributes in the output XML document.
The following tables list the results of importing and exporting KeySet members:
Importing KeySet Members from a CDISC ODM XML Document
KeySet Member
Description
Resulting SAS Variable Name 1
StudyOID=
Specifies a unique identifier for the study.
__STUDYOID
MetaDataVersionOID=
Specifies the metadata version that is used by the study.
__METADATAVERSIONOID
SubjectKey=
Specifies a subject within the study.
__SUBJECTKEY
StudyEventOID=
Specifies a StudyEventDef in the study.
__STUDYEVENTOID
StudyEventRepeatKey=
Specifies a study event repeat key.
__STUDYEVENTREPEATKEY
FormOID=
Specifies a FormDef in the study.
__FORMOID
FormRepeatKey=
Distinguishes between repeats of the same type of form in a single study event.
__FORMREPEATKEY
ItemGroupOID=
Specifies an ItemGroup in the study.
__ITEMGROUPOID
ItemGroupRepeatKey=
Specifies an ItemGroup repeat key.
__ITEMGROUPREPEATKEY
TransactionType=
Specifies the transaction type, which can be Insert, Update, Remove, Upsert, or Context.
__TRANSACTIONTYPE
1The first two characters in resulting SAS variable names are two underscores to ensure that the name is unique.
Exporting KeySet Members from a SAS Data Set
KeySet Member
Description
Resulting KeySet Attributes
Created By
__STUDYOID
Specifies a unique identifier for the study.
StudyOID=
STUDY statement
__METADATAVERSIONOID
Specifies the metadata version that is used by the study.
MetaDataVersionOID=
METADATAVERSION statement
__SUBJECTKEY
Specifies a subject in the study.
SubjectKey=
Read from the exported SAS data set
__STUDYEVENTOID
Specifies a StudyEventDef in the study.
StudyEventOID=
STUDY statement
__STUDYEVENTREPEATKEY
Specifies a study event repeat key.
StudyEventRepeatKey=
Automatically generated
__FORMOID
Specifies a FormDef in the study.
FormOID=
Automatically generated
__FORMREPEATKEY
Distinguishes between repeats of the same type of form in a single study event.
FormRepeatKey=
Automatically generated
__ITEMGROUPOID
Specifies an ItemGroup in the study.
ItemGroupOID=
Automatically generated
__ITEMGROUPREPEATKEY
Specifies an ItemGroup repeat key.
ItemGroupRepeatKey=
Automatically generated
__TRANSACTIONTYPE
Specifies the transaction type, which can be Insert, Update, Remove, Upsert, or Context.
TransactionType=
INSERT is always used

Processing CDISC ODM KeySet Members

PROC CDISC provides processing options that determine how KeySet members are imported or exported. The following processing options are specified in the ODM statement:
LONGNAMES=NO | YES
when importing or exporting, determines the sources of captured SAS name parameters and controls the maximum length of SAS names that is valid.
ODMMAXIMUMOIDLENGTH=number
when importing, specifies a character length for CDISC ODM KeySet members.
ODMMINIMUMKEYSET=NO|YES
when importing or exporting, specifies whether to limit CDISC ODM KeySet members that are in the study data.
For more information about processing options, see the ODM Statement.
For examples of how the KeySet processing options affect the data in an import operation, see Importing a CDISC ODM XML Document Using Default KeySet Processing and Importing a CDISC ODM XML Document Specifying KeySet Processing Options.