示例#1
0
    def _create_tenure_type_lookup_column(self, tenure_vl):
        # Returns a lookup column whose parent is the given tenure value list.
        col_name = tenure_vl.short_name.replace('check_',
                                                '').replace(' ', '_').lower()
        tenure_lookup_col = LookupColumn(col_name, self)
        tenure_lookup_col.value_list = tenure_vl

        return tenure_lookup_col
示例#2
0
文件: utils.py 项目: cb-flts/stdm
def append_person_columns(entity):
    household_id = IntegerColumn('household_id', entity)
    first_name = VarCharColumn('first_name', entity, maximum=30)
    last_name = VarCharColumn('last_name', entity, maximum=30)

    # Create gender lookup column and attach value list
    gender = LookupColumn('gender', entity)
    gender_value_list = create_gender_lookup(entity)
    gender.value_list = gender_value_list

    entity.add_column(household_id)
    entity.add_column(first_name)
    entity.add_column(last_name)
    entity.add_column(gender)
示例#3
0
文件: utils.py 项目: gltn/stdm
def append_person_columns(entity):
    household_id = IntegerColumn('household_id', entity)
    first_name = VarCharColumn('first_name', entity, maximum=30)
    last_name = VarCharColumn('last_name', entity, maximum=30)

    #Create gender lookup column and attach value list
    gender = LookupColumn('gender', entity)
    gender_value_list = create_gender_lookup(entity)
    gender.value_list = gender_value_list

    entity.add_column(household_id)
    entity.add_column(first_name)
    entity.add_column(last_name)
    entity.add_column(gender)