odmlib.ct_1_1_1 module

class odmlib.ct_1_1_1.model.TranslatedText(**kwargs)[source]

Bases: ODMElement

A piece of text in a specific language, used inside Description elements.

Parameters:

kwargs (Any)

lang

BCP 47 language tag (xml:lang attribute), e.g. “en”.

Type:

str

_content

The actual text content.

Type:

str, required

lang

Descriptor for string-valued ODM attributes.

namespace = 'odm'
class odmlib.ct_1_1_1.model.Alias(**kwargs)[source]

Bases: ODMElement

An alternative name or identifier for a CT-XML element in an external context.

Parameters:

kwargs (Any)

Context

The context in which the alias applies, e.g. the name of an external system or coding standard.

Type:

str, required

Name

The alias value in that context.

Type:

str, required

Context

Descriptor for string-valued ODM attributes.

Name

Descriptor for string-valued ODM attributes.

namespace = 'odm'
class odmlib.ct_1_1_1.model.StudyDescription(**kwargs)[source]

Bases: ODMElement

A plain-text description of the study in a CT-XML GlobalVariables element.

Parameters:

kwargs (Any)

_content

The study description text.

Type:

str, required

namespace = 'odm'
class odmlib.ct_1_1_1.model.ProtocolName(**kwargs)[source]

Bases: ODMElement

The name of the protocol associated with a CT-XML study.

Parameters:

kwargs (Any)

_content

The protocol name string.

Type:

str, required

namespace = 'odm'
class odmlib.ct_1_1_1.model.StudyName(**kwargs)[source]

Bases: ODMElement

The short name of the study in a CT-XML GlobalVariables element.

Parameters:

kwargs (Any)

_content

The study name string.

Type:

str, required

namespace = 'odm'
class odmlib.ct_1_1_1.model.GlobalVariables(**kwargs)[source]

Bases: ODMElement

Study-level identification variables for a CT-XML document.

Holds the study name, description, and protocol name that identify the controlled terminology package.

Parameters:

kwargs (Any)

StudyName

Short name of the study/package.

StudyDescription

Description of the study/package.

ProtocolName

Name of the associated protocol.

StudyName

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”).

StudyDescription

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”).

ProtocolName

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'
class odmlib.ct_1_1_1.model.Description(**kwargs)[source]

Bases: ODMElement

A human-readable description composed of one or more language-tagged text blocks.

Parameters:

kwargs (Any)

TranslatedText

One or more TranslatedText children providing the description in different languages.

Type:

list, required

TranslatedText

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.ct_1_1_1.model.CDISCSynonym(**kwargs)[source]

Bases: ODMElement

A CDISC synonym for a controlled terminology term.

Multiple CDISCSynonym elements may appear within a single EnumeratedItem or CodeList to list all recognized synonyms.

Parameters:

kwargs (Any)

_content

The synonym text string.

Type:

str, required

namespace = 'odm'
class odmlib.ct_1_1_1.model.CDISCDefinition(**kwargs)[source]

Bases: ODMElement

The CDISC-authored definition of a controlled terminology term.

Parameters:

kwargs (Any)

_content

The full definition text for the term as published by CDISC.

Type:

str, required

namespace = 'odm'
class odmlib.ct_1_1_1.model.CDISCSubmissionValue(**kwargs)[source]

Bases: ODMElement

The CDISC submission value (the value to use in regulatory submissions) for a CodeList.

Appears as a child of CodeList to provide the canonical submission value for the entire controlled terminology concept.

Parameters:

kwargs (Any)

_content

The submission value string.

Type:

str, required

namespace = 'odm'
class odmlib.ct_1_1_1.model.PreferredTerm(**kwargs)[source]

Bases: ODMElement

The NCI preferred term for a controlled terminology concept.

The preferred term is the primary human-readable label used by NCI/EVS for this concept.

Parameters:

kwargs (Any)

_content

The NCI preferred term string.

Type:

str, required

namespace = 'odm'
class odmlib.ct_1_1_1.model.EnumeratedItem(**kwargs)[source]

Bases: ODMElement

A single coded term (enumerated value) in a CT-XML CodeList.

Represents one controlled terminology concept with its NCI code, CDISC synonyms, definition, and NCI preferred term. Uses the nciodm: namespace for NCI-specific attributes and child elements.

Parameters:

kwargs (Any)

CodedValue

The submission value for this term (the value written into datasets).

Type:

str, required

ExtCodeID

NCI concept code for this term (nciodm:ExtCodeID attribute).

Type:

str, required

CDISCSynonym

Zero or more CDISC synonyms (nciodm:CDISCSynonym elements).

Type:

list

CDISCDefinition

CDISC definition of this term (nciodm:CDISCDefinition element).

Type:

required

PreferredTerm

NCI preferred term (nciodm:PreferredTerm element).

Type:

required

CodedValue

Descriptor for string-valued ODM attributes.

ExtCodeID

Descriptor for string-valued ODM attributes.

CDISCSynonym

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”).

CDISCDefinition

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”).

PreferredTerm

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'
class odmlib.ct_1_1_1.model.CodeList(**kwargs)[source]

Bases: ODMElement

A CDISC controlled terminology code list in a CT-XML 1.1.1 document.

Represents a single controlled terminology concept (e.g. the RACE code list) with all its coded values. NCI-specific metadata (ExtCodeID, CodeListExtensible, CDISCSubmissionValue, CDISCSynonym, PreferredTerm) uses the nciodm: namespace.

Parameters:

kwargs (Any)

OID

Unique identifier for this code list.

Type:

str, required

Name

Human-readable name of the code list.

Type:

str, required

DataType

Data type of the coded values (e.g. “text”).

Type:

str, required

ExtCodeID

NCI concept code for the code list itself (nciodm:ExtCodeID attribute).

Type:

str, required

CodeListExtensible

Whether sponsors may add additional terms (“Yes” or “No”) (nciodm:CodeListExtensible attribute).

Type:

str, required

Description

Optional human-readable description.

EnumeratedItem

The coded terms that belong to this code list.

Type:

list

CDISCSubmissionValue

The canonical submission value for the overall code list concept (nciodm:CDISCSubmissionValue).

Type:

required

CDISCSynonym

A CDISC synonym for the code list concept (nciodm:CDISCSynonym).

Type:

required

PreferredTerm

NCI preferred term for the code list concept (nciodm:PreferredTerm).

Type:

required

OID

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).

Name

Descriptor for the Name attribute of ODM elements.

DataType

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.

ExtCodeID

Descriptor for string-valued ODM attributes.

CodeListExtensible

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.

Description

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”).

EnumeratedItem

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”).

CDISCSubmissionValue

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”).

CDISCSynonym

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”).

PreferredTerm

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'
class odmlib.ct_1_1_1.model.MetaDataVersion(**kwargs)[source]

Bases: ODMElement

A versioned container for all controlled terminology code lists in a CT-XML document.

Parameters:

kwargs (Any)

OID

Unique identifier for this metadata version.

Type:

str, required

Name

Human-readable name.

Type:

str, required

Description

Optional plain-text description of this version.

Type:

str

CodeList

Zero or more CodeList elements defining the controlled terminology for this version.

Type:

list

OID

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).

Name

Descriptor for the Name attribute of ODM elements.

Description

Descriptor for string-valued ODM attributes.

CodeList

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.ct_1_1_1.model.Study(**kwargs)[source]

Bases: ODMElement

The study element in a CT-XML 1.1.1 document.

Identifies the controlled terminology package and contains the GlobalVariables and one or more MetaDataVersion elements with the code lists.

Parameters:

kwargs (Any)

OID

Unique identifier for the study/package.

Type:

str, required

GlobalVariables

Study identification variables (name, description, protocol name).

Type:

required

MetaDataVersion

Zero or more versioned containers of controlled terminology code lists.

Type:

list

OID

Descriptor for string-valued ODM attributes.

GlobalVariables

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”).

MetaDataVersion

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.ct_1_1_1.model.ODM(**kwargs)[source]

Bases: ODMElement

The root element of a CT-XML 1.1.1 controlled terminology document.

A CT-XML file distributes CDISC/NCI controlled terminology packages. It uses the base ODM namespace (http://www.cdisc.org/ns/odm/v1.3) and the NCI extension namespace (http://ncicb.nci.nih.gov/xml/odm/EVS/CDISC, prefix nciodm:).

Parameters:

kwargs (Any)

Description

Human-readable description of the file.

Type:

str

FileType

“Snapshot” or “Transactional”.

Type:

str, required

Granularity

Level of data included.

Type:

str

FileOID

Globally unique OID for this file.

Type:

str, required

CreationDateTime

ISO 8601 datetime of file creation.

Type:

str, required

AsOfDateTime

ISO 8601 datetime indicating currency of the terminology.

Type:

str

ODMVersion

Version of the ODM standard.

Type:

str

Originator

Organization that produced the file.

Type:

str

SourceSystem

Software system that generated the file.

Type:

str

SourceSystemVersion

Version of the source system.

Type:

str

schemaLocation

xs:schemaLocation for schema validation.

Type:

str

Study

One or more Study elements containing code lists.

Type:

list

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.

Granularity

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.

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.

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.

Study

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'