odmlib.dataset_1_0_1 module

class odmlib.dataset_1_0_1.model.ItemData(**kwargs)[source]

Bases: ODMElement

A single data value for one item (variable) in a Dataset-XML document.

Each ItemData element holds the actual collected or derived value for one variable in a row of tabular clinical data.

Parameters:

kwargs (Any)

ItemOID

OID reference to the corresponding ItemDef in the associated ODM metadata.

Type:

str, required

Value

The actual data value for this item. May be omitted when the item has no value for this row.

Type:

str

ItemOID

Descriptor for OID reference attributes.

References the OID of a definition element. Used on reference elements (e.g., ItemRef.ItemOID references ItemDef.OID).

Value

Descriptor for string-valued ODM attributes.

namespace = 'odm'
class odmlib.dataset_1_0_1.model.ItemGroupData(**kwargs)[source]

Bases: ODMElement

One row (record) of data within a Dataset-XML dataset.

Corresponds to a single observation row in a tabular dataset. Contains one ItemData child for every variable in that row that has a value. The data:ItemGroupDataSeq attribute provides the row number for ordering records within the dataset.

Parameters:

kwargs (Any)

ItemGroupOID

OID reference to the ItemGroupDef that describes the dataset structure.

Type:

str, required

ItemGroupDataSeq

Sequential row number for ordering records; stored in the data: namespace.

Type:

int, required

ItemData

Zero or more ItemData children, each carrying one variable value for this row.

Type:

list

ItemGroupOID

Descriptor for OID reference attributes.

References the OID of a definition element. Used on reference elements (e.g., ItemRef.ItemOID references ItemDef.OID).

ItemGroupDataSeq

Descriptor for positive integer attributes (value > 0).

Combines integer type validation with positive value constraint. Used for Length, ItemGroupDataSeq, and similar attributes.

ItemData

Descriptor for a list of child ODM elements.

Validates that all items assigned to the list are instances of the expected element class. Stored as a plain list in the instance.

Parameters:
  • element_class (type) – The class that all list items must be.

  • namespace (str) – XML namespace prefix (default: “odm”).

namespace = 'odm'
class odmlib.dataset_1_0_1.model.ClinicalData(**kwargs)[source]

Bases: ODMElement

A container for subject-level (clinical) tabular data in a Dataset-XML file.

ClinicalData groups all ItemGroupData rows that belong to the same study and metadata version. It is used for SDTM/ADaM datasets containing actual subject observations.

Parameters:

kwargs (Any)

StudyOID

OID reference to the Study in the associated ODM metadata.

Type:

str, required

MetaDataVersionOID

OID reference to the MetaDataVersion that describes the dataset structure.

Type:

str, required

ItemGroupData

Zero or more ItemGroupData rows.

Type:

list

StudyOID

Descriptor for OID reference attributes.

References the OID of a definition element. Used on reference elements (e.g., ItemRef.ItemOID references ItemDef.OID).

MetaDataVersionOID

Descriptor for OID reference attributes.

References the OID of a definition element. Used on reference elements (e.g., ItemRef.ItemOID references ItemDef.OID).

ItemGroupData

Descriptor for a list of child ODM elements.

Validates that all items assigned to the list are instances of the expected element class. Stored as a plain list in the instance.

Parameters:
  • element_class (type) – The class that all list items must be.

  • namespace (str) – XML namespace prefix (default: “odm”).

namespace = 'odm'
class odmlib.dataset_1_0_1.model.ReferenceData(**kwargs)[source]

Bases: ODMElement

A container for reference (non-subject) tabular data in a Dataset-XML file.

ReferenceData is used for datasets that contain study-level reference information rather than per-subject observations, such as trial design or arm/epoch lookup tables.

Parameters:

kwargs (Any)

StudyOID

OID reference to the Study in the associated ODM metadata.

Type:

str, required

MetaDataVersionOID

OID reference to the MetaDataVersion that describes the dataset structure.

Type:

str, required

ItemGroupData

Zero or more ItemGroupData rows.

Type:

list

StudyOID

Descriptor for OID reference attributes.

References the OID of a definition element. Used on reference elements (e.g., ItemRef.ItemOID references ItemDef.OID).

MetaDataVersionOID

Descriptor for OID reference attributes.

References the OID of a definition element. Used on reference elements (e.g., ItemRef.ItemOID references ItemDef.OID).

ItemGroupData

Descriptor for a list of child ODM elements.

Validates that all items assigned to the list are instances of the expected element class. Stored as a plain list in the instance.

Parameters:
  • element_class (type) – The class that all list items must be.

  • namespace (str) – XML namespace prefix (default: “odm”).

namespace = 'odm'
class odmlib.dataset_1_0_1.model.ODM(**kwargs)[source]

Bases: ODMElement

The root element of a Dataset-XML 1.0.1 document.

A Dataset-XML file carries tabular clinical or reference data for submission. It references ODM metadata via StudyOID and MetaDataVersionOID and uses namespace http://www.cdisc.org/ns/Dataset-XML/v1.0 (prefix data:) for Dataset-XML-specific attributes such as ItemGroupDataSeq.

Parameters:

kwargs (Any)

Description

Human-readable description of the file.

Type:

str

FileType

“Snapshot” or “Transactional”.

Type:

str, required

FileOID

Globally unique OID for this specific file.

Type:

str, required

CreationDateTime

ISO 8601 datetime when the file was created.

Type:

str, required

PriorFileOID

OID of the preceding file in a sequence.

Type:

str

AsOfDateTime

ISO 8601 datetime indicating currency of the data.

Type:

str

ODMVersion

Version of the base ODM standard being used.

Type:

str

DatasetXMLVersion

Version of the Dataset-XML standard; one of “1.0.0” or “1.0.1”.

Type:

str, required

Originator

Organization that created the file.

Type:

str

SourceSystem

Software system that generated the file.

Type:

str

SourceSystemVersion

Version of the source system.

Type:

str

schemaLocation

xs:schemaLocation attribute for schema validation.

Type:

str

ReferenceData

Zero or more ReferenceData sections.

Type:

list

ClinicalData

A single ClinicalData section.

Description

Descriptor for string-valued ODM attributes.

FileType

String descriptor that validates against a dynamically-loaded set of permitted values.

Combines string type validation with value set membership checking. Used for attributes like FileType, Repeating, Mandatory, DataType, etc.

FileOID

Descriptor for OID (Object Identifier) attributes.

OIDs uniquely identify definition elements within a MetaDataVersion. Used on the OID attribute of *Def elements (e.g., ItemDef.OID).

CreationDateTime

Descriptor for ISO 8601 datetime strings.

Validates format: YYYY-MM-DDTHH:MM:SS[.sss][Z|±HH:MM]

Used for CreationDateTime, AsOfDateTime, and similar attributes.

PriorFileOID

Descriptor for OID reference attributes.

References the OID of a definition element. Used on reference elements (e.g., ItemRef.ItemOID references ItemDef.OID).

AsOfDateTime

Descriptor for ISO 8601 datetime strings.

Validates format: YYYY-MM-DDTHH:MM:SS[.sss][Z|±HH:MM]

Used for CreationDateTime, AsOfDateTime, and similar attributes.

ODMVersion

String descriptor that validates against a dynamically-loaded set of permitted values.

Combines string type validation with value set membership checking. Used for attributes like FileType, Repeating, Mandatory, DataType, etc.

DatasetXMLVersion

Descriptor that validates against an explicit list of permitted values.

Unlike ValidValues, the allowed values are provided at class definition time in the valid_values list argument.

Originator

Descriptor for string-valued ODM attributes.

SourceSystem

Descriptor for string-valued ODM attributes.

SourceSystemVersion

Descriptor for string-valued ODM attributes.

schemaLocation

Descriptor for string-valued ODM attributes.

ReferenceData

Descriptor for a list of child ODM elements.

Validates that all items assigned to the list are instances of the expected element class. Stored as a plain list in the instance.

Parameters:
  • element_class (type) – The class that all list items must be.

  • namespace (str) – XML namespace prefix (default: “odm”).

ClinicalData

Descriptor for a single child ODM element.

Stores a reference to the element class and validates type on assignment. When accessed on an unset optional attribute, instantiates the element class with no arguments.

Parameters:
  • element_class (type) – The expected child element class.

  • namespace (str) – XML namespace prefix (default: “odm”).

namespace = 'odm'