Example #1
0
    def add_fill_from_string(self, tooth_id, input):
        '''
        :param: int
        :param: string

        allows the addition of a fill in the form "MOD,CO"
        '''

        if tooth_id:
            prop = tooth_data.ToothData(tooth_id)
            prop.set_type(prop.FILLING)
            prop.from_fill_string(input)
            self.add_property(prop)
Example #2
0
 def add_comment(self, record):
     '''
     add comment from the database orm
     fill is an instance of QtSqlQRecord, with some customisations
     see lib_openmolar.common.db_orm.static_comments for details
     '''
     tooth_id = record.tooth_id
     if tooth_id:
         prop = tooth_data.ToothData(tooth_id)
         prop.set_type(prop.COMMENT)
         prop.set_comment(record.text)
         prop.in_database = True
         self.add_property(prop)
Example #3
0
 def add_root(self, root_record):
     '''
     add root data from the database orm
     root_record is an instance of QtSqlQRecord, with some customisations
     see lib_openmolar.common.db_orm.static_roots for details
     '''
     root_id = root_record.tooth_id
     if root_id:
         prop = tooth_data.ToothData(root_id)
         prop.set_type(prop.ROOT)
         prop.set_root_type(root_record.description)
         prop.set_comment(root_record.comment)
         prop.in_database = True
         self.add_property(prop)
Example #4
0
 def add_fill(self, fill_record):
     '''
     add fill from the database orm
     fill is an instance of QtSqlQRecord, with some customisations
     see lib_openmolar.common.db_orm.static_fills for details
     '''
     tooth_id = fill_record.tooth_id
     if tooth_id:
         prop = tooth_data.ToothData(tooth_id)
         prop.set_type(prop.FILLING)
         prop.set_surfaces(fill_record.surfaces)
         prop.set_material(fill_record.material)
         prop.set_comment(fill_record.comment)
         prop.in_database = True
         self.add_property(prop)
Example #5
0
 def add_crown(self, crown_record):
     '''
     add crown from the database orm
     crown is an instance of QtSqlQRecord, with some customisations
     see lib_openmolar.common.db_orm.static_crowns for details
     '''
     tooth_id = crown_record.tooth_id
     if tooth_id:
         prop = tooth_data.ToothData(tooth_id)
         prop.set_type(prop.CROWN)
         prop.set_crown_type(crown_record.crown_type)
         prop.set_technition(crown_record.technition)
         prop.set_comment(crown_record.comment)
         prop.in_database = True
         self.add_property(prop)