def add_data(self): enter = ask.ask_y_n("Enter Biopsy Block Report information?") if enter: data = BiopsyData.biopsy_report_info(self) sql.update_multiple(self.conn, self.cursor, self.table, names.names_biopsy_new("biopsy_report_info"), self.file_number, data) enter = ask.ask_y_n("Enter Tumour Biopsy data?") if enter: data = BiopsyData.biopsy_report_info(self) sql.update_multiple(self.conn, self.cursor, self.table, names.names_biopsy_new("tumour_biopsy_data"), self.file_number, data)
def edit_data(self): print("Block Report information") col_list = names.names_biopsy_new("biopsy_report_info") enter = sql.review_data(self.conn, self.cursor, self.table, self.file_number, col_list) if enter: data = BiopsyData.biopsy_report_info(self) sql.update_multiple(self.conn, self.cursor, self.table, col_list, self.file_number, data) print("Tumour Biopsy data") col_list = names.names_biopsy_new("tumour_biopsy_data") enter = sql.review_data(self.conn, self.cursor, self.table, self.file_number, col_list) if enter: data = BiopsyData.biopsy_report_info(self) sql.update_multiple(self.conn, self.cursor, self.table, col_list, self.file_number, data)
def db_dict(table, module): db_tables = { "Patient_Information_History": names.names_info(module), "Biopsy_Report_Data": names.names_biopsy_new(module), "Radiology": names.names_radio(module), "Neo_Adjuvant_Therapy": names.names_nact(module), "Surgery_Report": names.names_surgery_information(module), "Surgery_Block_Report_Data": names.names_surgery(module), "Adjuvant_ChemoTherapy": names.names_chemotherapy(module), "Radiotherapy": names.names_radiation(), "HormoneTherapy_Survival": names.names_longterm(module), "Follow_up_Data": names.name_follow_up() } cols = db_tables.get(table) return cols
cursor.execute('CREATE TABLE {tn}({nf})'.format(tn=table, nf=file_number)) module_names = [ "bio_info", "phys_act", "habits", "nut_supplements", "family_details", "med_history", "cancer_history", "family_cancer", "det_by", "breast_symptoms" ] for index in module_names: col_name = pccm_names.names_info(index) add_columns(cursor, table, col_name) print(table + ' created') table = "Biopsy_Report_Data" if table_check(cursor, table) == 0: cursor.execute('CREATE TABLE {tn}({nf})'.format(tn=table, nf=file_number)) module_names = ["biopsy_report_info", "tumour_biopsy_data"] for index in module_names: col_name = pccm_names.names_biopsy_new(index) add_columns(cursor, table, col_name) print(table + ' created') table = "Surgery_Block_Report_Data" if table_check(cursor, table) == 0: cursor.execute('CREATE TABLE {tn}({nf})'.format(tn=table, nf=file_number)) module_names = [ "surgery_block_information_1", "surgery_block_information_2", "surgery_block_information_3", "path_stage" ] for index in module_names: col_name = pccm_names.names_surgery(index) add_columns(cursor, table, col_name) print(table + ' created') table = "block_data" if table_check(cursor, table) == 0: