# Path: rwslib/builders/constants.py
# class DataType(enum.Enum):
#     """ODM Data Types"""
#     Text = 'text'
#     Integer = 'integer'
#     Float = 'float'
#     Date = 'date'
#     DateTime = 'datetime'
#     Time = 'time'
#     String = 'string'  # Used only by codelists


from rwslib.builders import *
from rwslib.builders.constants import DataType
from datetime import datetime
    from rwslib import RWSConnection
    from rwslib.rws_requests import PostMetadataRequest, PostDataRequest
    from _settings import accounts
    )

    meta << StudyEventDef("AE", "Adverse Events", False, StudyEventDef.COMMON)(
        FormRef("AE", 1, False)
    )

    dm_form = FormDef("DM","Demography")
    dm_form << MdsolHelpText("en","Some help text for Demography")
    dm_form << MdsolViewRestriction('Data Manager')
    dm_form << MdsolEntryRestriction('Batch Upload')
    dm_form << ItemGroupRef("DM_IG1", 1)
    dm_form << ItemGroupRef("DM_IG2", 2)

    # Add to metadata
    meta << dm_form

    # Define item group
    meta << ItemGroupDef("DM_IG1", "DM Item Group 1")(
        MdsolLabelRef("LBL1", 1),
        ItemRef("SEX", 2)(
            MdsolAttribute("Standards","CDASH","SEX"),
            MdsolAttribute("Standards","STDNUMBER","1120")
        ),
        ItemRef("RACE", 3),
        ItemRef("RACE_OTH", 4),
        ItemRef("DOB", 5),
        ItemRef("AGE", 6)
    )

    # Add the ItemDefs

# Path: rwslib/builders/constants.py
# class DataType(enum.Enum):
#     """ODM Data Types"""
#     Text = 'text'
#     Integer = 'integer'
#     Float = 'float'
#     Date = 'date'
#     DateTime = 'datetime'
#     Time = 'time'
#     String = 'string'  # Used only by codelists


# Path: rwslib/builders_example.py
from rwslib.builders import *
from rwslib.builders.constants import DataType
from datetime import datetime
    from rwslib import RWSConnection
    from rwslib.rws_requests import PostMetadataRequest, PostDataRequest
    from _settings import accounts

    )

    meta << StudyEventDef("AE", "Adverse Events", False, StudyEventDef.COMMON)(
        FormRef("AE", 1, False)
    )

    dm_form = FormDef("DM","Demography")
    dm_form << MdsolHelpText("en","Some help text for Demography")
    dm_form << MdsolViewRestriction('Data Manager')
    dm_form << MdsolEntryRestriction('Batch Upload')
    dm_form << ItemGroupRef("DM_IG1", 1)
    dm_form << ItemGroupRef("DM_IG2", 2)

    # Add to metadata
    meta << dm_form

    # Define item group
    meta << ItemGroupDef("DM_IG1", "DM Item Group 1")(
        MdsolLabelRef("LBL1", 1),
        ItemRef("SEX", 2)(
            MdsolAttribute("Standards","CDASH","SEX"),
            MdsolAttribute("Standards","STDNUMBER","1120")
        ),
        ItemRef("RACE", 3),
        ItemRef("RACE_OTH", 4),
        ItemRef("DOB", 5),
        ItemRef("AGE", 6)
    )

    # Add the ItemDefs

    meta << ItemDef("SEX", "Gender", DataType.Text, 1, control_type=ControlType.RadioButton