def __init__(
        self,
        oid,
        name,
        datatype,
        length=None,
        significant_digits=None,
        sas_field_name=None,
        sds_var_name=None,
        origin=None,  # Not mapped in Rave
        comment=None,
        active=True,
        control_type=None,
        acceptable_file_extensions=None,
        indent_level=0,
        source_document_verify=False,
        default_value=None,
        sas_format=None,
        sas_label=None,
        query_future_date=False,
        visible=True,
        translation_required=False,
        query_non_conformance=False,
        other_visits=False,
        can_set_item_group_date=False,
        can_set_form_date=False,
        can_set_study_event_date=False,
        can_set_subject_date=False,
        visual_verify=False,
        does_not_break_signature=False,
        date_time_format=None,
        field_number=None,
        variable_oid=None,
    ):
        """
        :param str oid: OID for ItemDef
        :param str name: Name for ItemDef
        :param DataType datatype: Datatype for ItemDef
        :param int length: Max. Length of content expected in Item Value
        :param int significant_digits: Max. Number of significant digits in Item Value
        :param str sas_field_name: SAS Name for the ItemDef
        :param str sds_var_name: SDS Variable Name
        :param str origin: Origin for the Variable
        :param str comment: Comment for the Variable
        :param bool active: Is the Variable Active? - *Rave Specific Attribute*
        :param ControlType control_type: Control Type for the Variable - *Rave Specific Attribute*
        :param str acceptable_file_extensions: File extensions for File Upload Control (separated by a comma)
            - *Rave Specific Attribute*
        :param int indent_level: Level of indentation of a field from the left-hand page margin.
            - *Rave Specific Attribute*
        :param bool source_document_verify: Does this Variable need to be SDV'ed? - *Rave Specific Attribute*
        :param str default_value: Value entered in this field is displayed as the default value in Rave EDC.
            - *Rave Specific Attribute*
        :param str sas_format: SAS variable format of maximum 25 alphanumeric characters.
        :param str sas_label: SAS label of maximum 256 alphanumeric characters.
        :param bool query_future_date: Generates a query when the Rave EDC user enters a future date in the field.
            - *Rave Specific Attribute*
        :param bool visible:  Indicates that the field displays on the form when the version is pushed to Rave EDC.
            - *Rave Specific Attribute*
        :param bool translation_required: Enables translation functionality for the selected field.
            - *Rave Specific Attribute*
        :param bool query_non_conformance: Generates a query when the Rave EDC user enters data in a format other than what
            has been defined for the variable. - *Rave Specific Attribute*
        :param bool other_visits: Display previous visit data - *Rave Specific Attribute*
        :param bool can_set_item_group_date: If a form contains log fields, this parameter assigns the date entered
            into the field as the date for the record (log line) - *Rave Specific Attribute*
        :param bool can_set_form_date: Observation Date of Form assigns the date entered into the field as the date for
            the form - *Rave Specific Attribute*
        :param bool can_set_study_event_date: Observation Date of Folder assigns the date entered into the field as the date
            for the folder - *Rave Specific Attribute*
        :param bool can_set_subject_date: Observation Date of Subject assigns the date entered into the field
            as the date for the Subject. - *Rave Specific Attribute*
        :param bool visual_verify: This parameter sets the field as a Visual Verify field in Rave DDE
            - *Rave Specific Attribute*
        :param bool does_not_break_signature: Indicates that the field (both derived and non-derived) does not
            participate in signature. - *Rave Specific Attribute*
        :param str date_time_format: Displays text boxes for the user to enter the day, month, and year according to the
            specified variable format. - *Rave Specific Attribute*
        :param str field_number: Number that displays to the right of a field label in Rave EDC to create a numbered list
            on the form. - *Rave Specific Attribute*
        :param variable_oid: OID for Variable - *Rave Specific Attribute*
        """
        self.oid = oid
        self.name = name

        if datatype not in ItemDef.VALID_DATATYPES:
            raise AttributeError("{0} is not a valid datatype!".format(datatype))

        if control_type is not None:
            if not isinstance(control_type, ControlType):
                raise AttributeError(
                    "{0} is not a valid Control Type".format(control_type)
                )

        if length is None:
            if datatype in [DataType.DateTime, DataType.Time, DataType.Date]:
                # Default this
                length = len(date_time_format)
            else:
                raise AttributeError(
                    "length must be set for all datatypes except Date/Time types"
                )

        self.datatype = datatype
        self.length = length
        self.significant_digits = significant_digits
        self.sas_field_name = sas_field_name
        self.sds_var_name = sds_var_name
        self.origin = origin
        self.comment = comment
        self.active = active
        self.control_type = control_type
        self.acceptable_file_extensions = acceptable_file_extensions
        self.indent_level = indent_level
        self.source_document_verify = source_document_verify
        self.default_value = default_value
        self.sas_format = sas_format
        self.sas_label = sas_label
        self.query_future_date = query_future_date
        self.visible = visible
        self.translation_required = translation_required
        self.query_non_conformance = query_non_conformance
        self.other_visits = other_visits
        self.can_set_item_group_date = can_set_item_group_date
        self.can_set_form_date = can_set_form_date
        self.can_set_study_event_date = can_set_study_event_date
        self.can_set_subject_date = can_set_subject_date
        self.visual_verify = visual_verify
        self.does_not_break_signature = does_not_break_signature
        self.date_time_format = date_time_format
        self.field_number = field_number
        self.variable_oid = variable_oid

        #: Matching :class:`Question`
        self.question = None
        #: Matching :class:`CodeListRef`
        self.codelistref = None
        #: Collection of :class:`MeasurementUnitRef`
        self.measurement_unit_refs = []
        #: Collection of :class:`MdsolHelpText`
        self.help_texts = []
        #: Collection of :class:`MdsolViewRestriction`
        self.view_restrictions = []
        #: Collection of :class:`MdsolEntryRestriction`
        self.entry_restrictions = []
        #: Matching :class:`MdsolHeaderText`
        self.header_text = None
        #: Collection of :class:`MdsolReviewGroup`
        self.review_groups = []
        #: Collection of :class:`RangeCheck`
        self.range_checks = []
        #: Collection of :class:`Alias`
        self.aliases = []
def __init__ ( self , oid , name , datatype , length = None , significant_digits = None , sas_field_name = None , sds_var_name = None , origin = None , comment = None , active = True , control_type = None , acceptable_file_extensions = None , indent_level = 0 , source_document_verify = False , default_value = None , sas_format = None , sas_label = None , query_future_date = False , visible = True , translation_required = False , query_non_conformance = False , other_visits = False , can_set_item_group_date = False , can_set_form_date = False , can_set_study_event_date = False , can_set_subject_date = False , visual_verify = False , does_not_break_signature = False , date_time_format = None , field_number = None , variable_oid = None , ) : self . oid = oid self . name = name if datatype not in ItemDef . VALID_DATATYPES : raise AttributeError ( "{0} is not a valid datatype!" . format ( datatype ) ) if control_type is not None : if not isinstance ( control_type , ControlType ) : raise AttributeError ( "{0} is not a valid Control Type" . format ( control_type ) ) if length is None : if datatype in [ DataType . DateTime , DataType . Time , DataType . Date ] : length = len ( date_time_format ) else : raise AttributeError ( "length must be set for all datatypes except Date/Time types" ) self . datatype = datatype self . length = length self . significant_digits = significant_digits self . sas_field_name = sas_field_name self . sds_var_name = sds_var_name self . origin = origin self . comment = comment self . active = active self . control_type = control_type self . acceptable_file_extensions = acceptable_file_extensions self . indent_level = indent_level self . source_document_verify = source_document_verify self . default_value = default_value self . sas_format = sas_format self . sas_label = sas_label self . query_future_date = query_future_date self . visible = visible self . translation_required = translation_required self . query_non_conformance = query_non_conformance self . other_visits = other_visits self . can_set_item_group_date = can_set_item_group_date self . can_set_form_date = can_set_form_date self . can_set_study_event_date = can_set_study_event_date self . can_set_subject_date = can_set_subject_date self . visual_verify = visual_verify self . does_not_break_signature = does_not_break_signature self . date_time_format = date_time_format self . field_number = field_number self . variable_oid = variable_oid self . question = None self . codelistref = None self . measurement_unit_refs = [ ] self . help_texts = [ ] self . view_restrictions = [ ] self . entry_restrictions = [ ] self . header_text = None self . review_groups = [ ] self . range_checks = [ ] self . aliases = [ ]
:param str oid: OID for ItemDef
        :param str name: Name for ItemDef
        :param DataType datatype: Datatype for ItemDef
        :param int length: Max. Length of content expected in Item Value
        :param int significant_digits: Max. Number of significant digits in Item Value
        :param str sas_field_name: SAS Name for the ItemDef
        :param str sds_var_name: SDS Variable Name
        :param str origin: Origin for the Variable
        :param str comment: Comment for the Variable
        :param bool active: Is the Variable Active? - *Rave Specific Attribute*
        :param ControlType control_type: Control Type for the Variable - *Rave Specific Attribute*
        :param str acceptable_file_extensions: File extensions for File Upload Control (separated by a comma)
            - *Rave Specific Attribute*
        :param int indent_level: Level of indentation of a field from the left-hand page margin.
            - *Rave Specific Attribute*
        :param bool source_document_verify: Does this Variable need to be SDV'ed? - *Rave Specific Attribute*
        :param str default_value: Value entered in this field is displayed as the default value in Rave EDC.
            - *Rave Specific Attribute*
        :param str sas_format: SAS variable format of maximum 25 alphanumeric characters.
        :param str sas_label: SAS label of maximum 256 alphanumeric characters.
        :param bool query_future_date: Generates a query when the Rave EDC user enters a future date in the field.
            - *Rave Specific Attribute*
        :param bool visible:  Indicates that the field displays on the form when the version is pushed to Rave EDC.
            - *Rave Specific Attribute*
        :param bool translation_required: Enables translation functionality for the selected field.
            - *Rave Specific Attribute*
        :param bool query_non_conformance: Generates a query when the Rave EDC user enters data in a format other than what
            has been defined for the variable. - *Rave Specific Attribute*
        :param bool other_visits: Display previous visit data - *Rave Specific Attribute*
        :param bool can_set_item_group_date: If a form contains log fields, this parameter assigns the date entered
            into the field as the date for the record (log line) - *Rave Specific Attribute*
        :param bool can_set_form_date: Observation Date of Form assigns the date entered into the field as the date for
            the form - *Rave Specific Attribute*
        :param bool can_set_study_event_date: Observation Date of Folder assigns the date entered into the field as the date
            for the folder - *Rave Specific Attribute*
        :param bool can_set_subject_date: Observation Date of Subject assigns the date entered into the field
            as the date for the Subject. - *Rave Specific Attribute*
        :param bool visual_verify: This parameter sets the field as a Visual Verify field in Rave DDE
            - *Rave Specific Attribute*
        :param bool does_not_break_signature: Indicates that the field (both derived and non-derived) does not
            participate in signature. - *Rave Specific Attribute*
        :param str date_time_format: Displays text boxes for the user to enter the day, month, and year according to the
            specified variable format. - *Rave Specific Attribute*
        :param str field_number: Number that displays to the right of a field label in Rave EDC to create a numbered list
            on the form. - *Rave Specific Attribute*
        :param variable_oid: OID for Variable - *Rave Specific Attribute*