def node_block(conn, cursor, file_number, table): from ask_y_n_statement import ask_option from add_update_sql import update_multiple sent_data = node_details("Sentinel") sentinel, sent_number_rem, sent_number_pos, sent_number = sent_data print("Sentinel Node " + sent_number) ax_data = node_details("Axillary") ax, ax_number_rem, ax_number_pos, ax_number = ax_data print("Axillary Node " + ax_number) ap_data = node_details("Apical") ap, ap_number_rem, ap_number_pos, ap_number = ap_data print("Apical Node " + ap_number) category = "Perinodal Spread" options = ["Yes", "No"] per_spread = ask_option(category, options) category = "Supraclavicular Node Involvment" options = ["Yes", "No"] supra_inv = ask_option(category, options) data = sentinel, sent_number_rem, sent_number_pos, sent_number, ax, ax_number_rem, ax_number_pos, ax_number, ap, \ ap_number_rem, ap_number_pos, ap_number, per_spread, supra_inv columns = "Sentinel_Node_Block_Report", "Sentinel_Node_Number_Removed", "Sentinel_Node_Number_Positive", \ "Sentinel_Node_Block_Report_Number", "Axillary_Node_Block_Report", "Axillary_Node_Number_Removed", \ "Axillary_Node_Number_Positive", "Axillary_Node_Block_Report_Number", "Apical_Node_Block_Report", \ "Apical_Node_Number_Removed", "Apical_Node_Number_Positive", "Apical_Node_Block_Report_Number", \ "Perinodal_Spread_Node_Block_Report", "Supraclavicular_Involved_Node_Block_Report" update_multiple(conn, cursor, table, columns, file_number, data)
def surgery_info(conn, cursor, file_number, table): from ask_y_n_statement import ask_option, ask_y_n from add_update_sql import update_multiple surg_block_id = input("Surgical Block ID: ") surg_location = input("Location of surgery block id " + surg_block_id) surg_no_block = input("Number of Blocks: ") surg_block_source = input("Surgery Block Source: ") surg_tumour_block = input("Tumour Block Reference: ") surg_node_block = input("Nodes Block Reference: ") surg_normal_block = input("Adjacent Normal Block Reference: ") surg_red_block = input("Reduction Tissue Block Reference: ") surg_date = input("Date of Surgery: ") surg_name = input("Name of surgeon: ") surg_hosp_id = input("Hospital ID: ") #can add review statement here. lesion_side = () lesion_side_rb_y_n = ask_y_n("Lesion Side RB") if lesion_side_rb_y_n: category = "Lesion Side RB" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] lesion_side_rb = ask_option(category, options) lesion_side_rb_data = "RB-" + lesion_side_rb lesion_side_lb_y_n = ask_y_n("Lesion Side LB") if lesion_side_lb_y_n: category = "Lesion Side LB" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] lesion_side_lb = ask_option(category, options) lesion_side_lb_data = "LB-" + lesion_side_lb if lesion_side_rb_y_n and lesion_side_lb_y_n: lesion_side = lesion_side_rb_data + "; " + lesion_side_lb_data elif lesion_side_rb_y_n: lesion_side = lesion_side_rb_data elif lesion_side_lb_y_n: lesion_side = lesion_side_lb_data print("Lesion side " + lesion_side) category = "Type Surgery" options = [ "Reconstruction", "Breast Conservation Surgery (BCS)", "Therapeutic Mammoplasty", "Reduction Mammoplasty", "Wide Local Excision", "Other" ] surg_type = ask_option(category, options) if surg_type == "Reconstruction": category = "Type Reconstruction" options = ["Mastectomy/Modified Radical Mastectomy", "Implant"] surg_type = ask_option(category, options) category = "Response to Surgery" options = [ "Complete_Remission/No Residual Tumor", "Progressing", "Partial", "Static", "Other" ] surg_response = ask_option(category, options) data = surg_block_id, surg_no_block, surg_block_source, surg_tumour_block, surg_node_block, surg_normal_block, \ surg_red_block, surg_date, surg_name, surg_hosp_id, lesion_side, surg_type, surg_response surgery_info = "Surgical_Block_ID", "Surgery_Block_Location", "Surgery_No_of_blocks", "Block_Source", "Tumor_block_ref", "Nodes_block_ref", \ "Ad_Normal_block_ref", "Reduction_tissue_block_ref", "Date_of_Surgery", "Name_Surgeon", "Hospital_ID", \ "Lesion_Side", "Type_surgery", "Response_surgery" update_multiple(conn, cursor, table, surgery_info, file_number, data)
def family_cancer_table(conn, cursor, file_number): from ask_y_n_statement import ask_option, ask_y_n from add_update_sql import insert add_family = True type_cancer_list, relation_degree_list, type_relation_list, age_detect_list = [], [], [], [] all_data = [] while add_family: type_of_cancer = input("Type of Cancer: ") type_cancer_list.append(type_of_cancer) relation_to_patient = ask_option( "Relation to patient", ["Immediate Family", "Maternal Family", "Paternal Family"]) relation_degree_list.append(relation_to_patient) type_relation = input("Specific Relationship:") type_relation_list.append(type_relation) age_at_detection_yrs = input('Age at detection (yrs) :') age_detect_list.append(age_at_detection_yrs) family_history = file_number, type_of_cancer, relation_to_patient, type_relation, age_at_detection_yrs family_history_list = "; ".join([ type_of_cancer, relation_to_patient, type_relation, age_at_detection_yrs ]) all_data.append(family_history_list) columns = 'File_number, Type_Cancer, Relation_to_Patient, Type_Relation, Age_at_detection_yrs' table = "Family_Cancer_History" insert(conn, cursor, table, columns, family_history) add_family = ask_y_n("Add more family cancer history? ") all_data_flat = "|".join(all_data) return (all_data_flat)
def nipple_cytology(conn, cursor, file_number, table): import ask_y_n_statement import add_update_sql cyto = ask_y_n_statement.ask_option("Nipple Cytology", ["Done", "Not Done"]) if cyto == "Not Done": cyto_date, cyto_number, cyto_report = "NA", "NA", "NA" else: cyto_date = input("Date of nipple cytology: ") cyto_number = input("Nipple Cytology number: ") cyto_report = ask_y_n_statement.ask_option( "Nipple Cytology report and interpretation", ["Normal", "Suspicious", "Diagnostic for Cancer", "Other"]) data = cyto, cyto_date, cyto_number, cyto_report columns = "Nipple_Cytology", "Date_Nipple_Cytology", "Number_Nipple_Cytology", "Report_Nipple_Cytology" add_update_sql.update_multiple(conn, cursor, table, columns, file_number, data)
def bio_info(conn, cursor, file_number, table): import add_update_sql import ask_y_n_statement check = False while not check: mr_number = input('MR_number :') name = input('Name :') consent = ask_y_n_statement.ask_y_n("Is consent form with signature present in file", "Consent Taken", "Consent form not present") aadhaar_card = input("Aadhaar card number (if available): ") date_first = input("Date of first visit: ") permanent_address = input('Permanent Address :') current_address_check = ask_y_n_statement.ask_option('Current Address', ["Same as Permanent", "Different"]) if current_address_check == "Different": current_address = input ("Current Address: ") else: current_address = permanent_address phone = input('Phone :') email_id = input('Email_ID :') gender = ask_y_n_statement.ask_option('Gender', ["Female", "Male", "Other"]) age_yrs = input('Age (yrs) :') date_of_birth = input('Date of Birth (mm/dd/yyyy):') place_birth = input('Place of Birth :') height = ask_y_n_statement.ask_option("Height unit", ["cm", "feet/inches"]) if height == "cm": height_cm= input('Height (cm) :') else: height_feet = float(input ("Height (feet)")) height_inch = float(input ("Height (inches)")) height_inch = height_inch + 12*height_feet height_cm = str(height_inch * 2.54) weight_kg = input('Weight (kg) :') height = float(height_cm) / 100 weight = float(weight_kg) BMI = str(round(weight / (height * height))) columns_list = ["MR_number", "Name", "Consent", "Aadhaar_Card", "FirstVisit_Date", "Permanent_Address", "Current_Address", "Phone", "Email_ID", "Gender", "Age_yrs", "Date_of_Birth", "Place_Birth", "Height_cm", "Weight_kg", "BMI"] new_data = [mr_number, name, consent, aadhaar_card, date_first, permanent_address, current_address, phone, email_id, gender, age_yrs, date_of_birth, place_birth, height_cm, weight_kg, BMI] check = add_update_sql.review_input(file_number, columns_list, new_data) columns = "MR_number", "Name", "Consent", "Aadhaar_Card", "FirstVisit_Date", "Permanent_Address", "Current_Address", \ "Phone", "Email_ID", "Gender", "Age_yrs", "Date_of_Birth", "Place_Birth", "Height_cm", "Weight_kg", "BMI" data = mr_number, name, consent, aadhaar_card, date_first, permanent_address, current_address, phone, email_id, \ gender, age_yrs, date_of_birth, place_birth, height_cm, weight_kg, BMI add_update_sql.update_multiple(conn, cursor, table, columns, file_number, data)
def tumour_biopsy_data(conn, cursor, file_number, table): from ask_y_n_statement import ask_option from add_update_sql import update_multiple category = "Tumour biopsy diagnosis" options = ['Benign', "Ductal carcinoma in situ(DCIS) with microinvasion", "Ductal carcinoma in situ(DCIS) without microinvasion", "Lobular Carcinoma in Situ (LCS)", "Invasive Ductal Carcinoma (IDC)", "Invasive Lobular Carcinoma (ILC)", "Granulamatous Mastitis", "Papillary Carcinoma", "Phylloid Carcinoma", "Other"] tumour_diagnosis = ask_option(category, options) if tumour_diagnosis == 'Other': tumour_diagnosis = input ('Detail of other diagnosis: ') check = False while not check: tumour_grade = input("Tumour_biopsy_diagnosis_grade (1, 2 or 3): ") val = ["1", "2", "3"] check = tumour_grade in val category = "ER Status" options = ["Positive", "Negative"] tumour_er= ask_option(category, options) if (tumour_er == "Positive"): tumour_er_percent = input ("ER Percent: ") else: tumour_er_percent = "NA" category = "PR Status" options = ["Positive", "Negative"] tumour_pr = ask_option(category, options) if (tumour_pr == "Positive"): tumour_pr_percent = input ("PR Percent: ") else: tumour_pr_percent = "NA" category = "HER2 Status" options = ["Positive", "Negative"] tumour_her2 = ask_option(category, options) if (tumour_her2 == "Positive"): tumour_her2_percent = input ("HER2 Percent: ") else: tumour_her2_percent = "NA" category = "FISH" options = ["Positive", "Negative"] tumour_fish = ask_option(category, options) tumour_ki67 = input("Ki67 Percent") data = tumour_diagnosis,tumour_er ,tumour_er_percent ,tumour_pr, tumour_pr_percent, tumour_her2, tumour_her2_percent,\ tumour_fish, tumour_ki67 columns = "Tumour_biopsy_diagnosis", "Tumour_biopsy_diagnosis_grade", "Tumour_biopsy_ER", "Tumour_biopsy_ER_Percent", "Tumour_biopsy_PR", "Tumour_biopsy_PR_Percent", "Tumour_biopsy_HER2", "Tumour_biopsy_HER2_Grade", "Tumour_biopsy_FISH", "Tumour_biopsy_Ki67_Percent" update_multiple(conn, cursor, table, columns, file_number, data)
def lymphnode_biopsy(conn, cursor, file_number, table): from ask_y_n_statement import ask_option from add_update_sql import update_multiple category = "Lymph Node biopsy FNAC" options = ["Done", "Not Done"] fnac = ask_option(category, options) if fnac == "Done": category = "Lymph Node biopsy location" options = ["Right", "Left", "Both"] fnac_location = ask_option(category, options) category = "Lymph Node biopsy diagnosis" options = ["Normal", "Benign", "Malignant"] fnac_diagnosis = ask_option(category, options) else: fnac_location = "NA" fnac_diagnosis = "NA" data = fnac, fnac_location, fnac_diagnosis columns = "Lymph_Node_biopsy_FNAC", "Lymph_Node_biopsy_location", "Lymph_Node_biopsy_diagnosis" update_multiple(conn, cursor, table, columns, file_number, data)
def surgery_block (conn, cursor, file_number, table): from ask_y_n_statement import ask_option from add_update_sql import update_multiple tumour_size = input ("Tumour size: ") tumour_grade = input ("Tumour Grade (1, 2, or 3: ") check = False while not check: val = ['1', '2', '3'] check = tumour_grade is val category = "Surgery Diagnosis" options = ["Ductal carcinoma in situ(DCIS)", "Invasive Ductal Carcinoma"] surg_diag = ask_option(category, options) if (surg_diag == "Ductal carcinoma in situ(DCIS)"): dcis_percent = input (Percent DCIS) category = "DCIS Invasion" options = {'Microinvasion', 'Macroinvasion'} dcis_invasion = ask_option(category, options) else: dcis_percent = "NA" dcis_invasion = "NA"
def surgery_block(conn, cursor, file_number, table): from ask_y_n_statement import ask_option, ask_y_n from add_update_sql import update_multiple print("Surgery Block Report") tumour_size = input("Tumour size: ") category = "Tumour Grade" options = ["I", "II", "III", "Other"] tumour_grade = ask_option(category, options) category = "Surgery Diagnosis" options = [ "Ductal carcinoma in situ(DCIS)", "Invasive Ductal Carcinoma", "Other" ] surg_diag = ask_option(category, options) if (surg_diag == "Ductal carcinoma in situ(DCIS)"): dcis_percent = input("Percent DCIS: ") category = "DCIS Invasion" options = ['Microinvasion', 'Macroinvasion'] dcis_invasion = ask_option(category, options) else: dcis_percent = "NA" dcis_invasion = "NA" per_inv = ask_y_n("Perineural Invasion", "Perineural Invasion Present", "Perineural Invasion Absent") necrosis = ask_y_n("Necrosis", "Necrosis Present", "Necrosis Absent") lymph_invasion = ask_y_n("Lymphovascular invasion", "Lymphovascular invasion Present", "Lymphovascular invasion Absent") category = "Margins" options = ["Involved", "Free"] margin = ask_option(category, options) print("Surgery Block Report") category = "Pathological Complete Remission" options = ["Yes", "No", "Other"] report = ask_option(category, options) data = tumour_size, tumour_grade, surg_diag, dcis_percent, dcis_invasion, per_inv, necrosis, lymph_invasion, margin, report columns = "Tumour_size_Surgery_Block_Report", "Grade_Surgery_Block_Report", "Diagnosis_Surgery_Block_Report", \ "DCIS_Percent_Surgery_Block_Report", "DCIS_Invasion_Surgery_Block_Report", \ "Perineural_Invasion_Surgery_Block_Report", "Necrosis_Surgery_Block_Report", \ "Lymphovascular_Invasion_Surgery_Block_Report", "Margins_Surgery_Block_Report", "Surgery_Block_Report" update_multiple(conn, cursor, table, columns, file_number, data)
def det_by(conn, cursor, table, file_number): from add_update_sql import update_multiple from ask_y_n_statement import ask_option category = "Current Breast Cancer" options = ["Self", "Physician", "Screening Camp", "Other"] determined_by = ask_option(category, options) if determined_by == "Screening Camp": sc_id = input("Screening Camp ID: ") determined_by = "Screening Camp ID " + sc_id det_date = input("Date of current breast cancer detection: ") columns = "Current_Breast_Cancer_Detected_By", "Current_Breast_Cancer_Detected_Date" data = determined_by, det_date update_multiple(conn, cursor, table, columns, file_number, data)
def feed_duration (conn, cursor, file_number, children_number): from ask_y_n_statement import ask_option from add_update_sql import insert table = "Breast_Feeding" child_number = int(children_number) for index in range(0, child_number): kid = str(index+1) feeding_duration = input("Breast feeding duration for child "+ kid +" (months) ?") category = "Breast feeding for child " + kid options = ["Right", "Left", "Both", "Other"] feeding_details = ask_option(category, options) columns = 'File_number, Child_number, Feeding_duration, Breast_usage_feeding' data = file_number, kid, feeding_duration, feeding_details insert (conn, cursor, table, columns, data)
def surgery_info (conn, cursor, file_number, table): from ask_y_n_statement import ask_option from add_update_sql import update_multiple surg_block_id = input("Surgical Block ID: ") surg_no_block = input("Number of Blocks: ") surg_block_source = input ("Surgery Block Source: ") surg_tumour_block = input ("Tumour Block Reference: ") surg_node_block = input ("Nodes Block Reference: ") surg_normal_block = input ("Adjacent Normal Block Reference: ") surg_red_block = input ("Reduction Tissue Block Reference: ") surg_date = input ("Date of Surgery: ") surg_name = input ("Name of surgeon: ") surg_hosp_id = input ("Hospital ID: ") category = "Lesion Side" options = ["RB-UOQ", "RB-UIQ", "RB-C", "RB-LOQ", "RB-LIQ", "LB-UOQ", "LB-UIQ", "LB-C", "LB-LOQ", "LB-LIQ"] lesion_side = ask_option(category, options) category = "Type Surgery" options = ["Reconstruction", "Breast Conservation Surgery (BCS)", "Therapeutic Mammoplasty"] surg_type = ask_option (category, options) if (surg_type == "Reconstruction"): category = "Type Reconstruction" options = ["Mastectomy/Modified Radical Mastectomy", "Implant"] surg_type = ask_option(category, options) elif (surg_type == "Breast Conservation Surgery"): category = "Type Breast Conservation Surgery" options = ["Therapeutic Mammoplasty/Reduction Mammoplasty", "Wide Local Excision"] surg_type = ask_option(category, options) category = "Response to Surgery" options = ["Complete_Remission/No Residual Tumor", "Progressing", "Partial", "Static"] surg_response = ask_option(category, options) data = surg_block_id, surg_no_block, surg_block_source, surg_tumour_block, surg_node_block, surg_normal_block, \ surg_red_block, surg_date, surg_name, surg_hosp_id, lesion_side, surg_type, surg_response columns = "Surgical_Block_ID", "Surgery_No_of_blocks", "Block_Source", "Tumor_block_ref", "Nodes_block_ref", \ "Ad_Normal_block_ref", "Reduction_tissue_block_ref", "Date_of_Surgery", "Name_Surgeon", "Hospital_ID", \ "Lesion_Side", "Type_surgery", "Response_surgery" update_multiple(conn, cursor, table, columns, file_number, data)
def block_report_info(conn, cursor, file_number, table): from add_update_sql import update_multiple from ask_y_n_statement import ask_option, ask_y_n block_sr = input("Block Serial Number: ") block_id = input("Biopsy Block ID: ") block_number = input("No of blocks: ") block_date = input("Date of Biopsy: ") lab_id = input("Lab ID: ") category = "Biopsy Type" options = [ "Direct", "USG Guided", "VAB", "True-cut", "Steriotactic", "Other" ] biopsy_type = ask_option(category, options) columns = "Block_SR_Number", "Biopsy_Block_ID", "No_of_blocks", "Date_of_Biopsy", "Lab_ID", "Biopsy_Type" data = block_sr, block_id, block_number, block_date, lab_id, biopsy_type update_multiple(conn, cursor, table, columns, file_number, data)
def habits(conn, cursor, file_number, table): from add_update_sql import update_multiple, update_single from ask_y_n_statement import ask_option, ask_y_n category = "Diet" options = ["Vegetarian", "Non-Vegetarian", "Ovo-Vegetarian", "Other"] diet = ask_option(category, options) alcohol = ask_y_n("Alcohol consumption") if alcohol: alcohol_consump = "Alcohol Consumption" alcohol_age = input("Consumption of alcohol from which age (yrs): ") alcohol_quant = input("Quantity of alcohol consumed per week: ") alcohol_duration = input("Duration of alcohol consumption: ") alcohol_comments = input( "Additional comments for alcohol consumption: ") else: alcohol_consump = "No Alcohol Consumption" alcohol_age = "NA" alcohol_quant = "NA" alcohol_duration = "NA" alcohol_comments = "NA" columns = "Diet", "Alcohol_y_n", "Alcohol_Consumption_age_yrs", "Quantity_alcohol_per_week", "Duration_alcohol", "Comments_alcohol" new_data = diet, alcohol_consump, alcohol_age, alcohol_quant, alcohol_duration, alcohol_comments update_multiple(conn, cursor, table, columns, file_number, new_data) tobacco = ask_y_n("Tobacco consumption") if tobacco: tobacco = "Tobacco consumption" tobacco_type = input("Type of tobacco consumption: ") tobacco_age = input("Consumption of tobacco from which age (yrs): ") tobacco_quant = input("Quantity of tobacco consumed per week: ") tobacco_duration = input("Duration of tobacco consumption: ") tobacco_comments = input( "Additional comments for tobacco consumption: ") else: tobacco = "No Tobacco Consumption" tobacco_type = "NA" tobacco_age = "NA" tobacco_quant = "NA" tobacco_duration = "NA" tobacco_comments = "NA" columns = "Tobacco_y_n", "Type_tobacco", "Tobacco_consumption_age_yrs", "Quantity_tobacco_per_week", "Duration_tobacco", "Comments_tobacco" new_data = tobacco, tobacco_type, tobacco_age, tobacco_quant, tobacco_duration, tobacco_comments update_multiple(conn, cursor, table, columns, file_number, new_data) other_del_habits = input( "Other Deleterious Habits (if present give details): ") update_single(conn, cursor, table, "Other_Deleterious_Habits", file_number, other_del_habits)
def family_cancer_table(conn, cursor, file_number): from ask_y_n_statement import ask_option, ask_y_n from add_update_sql import insert add_family = True all_data = [] while add_family: type_of_cancer = input("Type of Cancer: ") category = ("Relation to patient") options = ["Immediate Family", "Maternal Family", "Paternal Family"] relation_to_patient = ask_option(category, options) type_relation = input("Specific Relationship:") age_at_detection_yrs = input('Age at detection (yrs) :') family_history = file_number, type_of_cancer, relation_to_patient, type_relation, age_at_detection_yrs #family_history_list = [type_of_cancer, relation_to_patient, type_relation, age_at_detection_yrs] #all_data.append(family_history_list) columns = 'File_number, Type_Cancer, Relation_to_Patient, Type_Relation, Age_at_detection_yrs' table = "Family_Cancer_History" insert(conn, cursor, table, columns, family_history) add_family = ask_y_n("Add more family cancer history? ")
def tumour_biopsy_data(conn, cursor, file_number, table): from ask_y_n_statement import ask_option, ask_y_n from add_update_sql import update_multiple category = "Tumour biopsy diagnosis" options = [ 'Benign', "Ductal carcinoma in situ(DCIS) with microinvasion", "Ductal carcinoma in situ(DCIS) without microinvasion", "Lobular Carcinoma in Situ (LCS)", "Invasive Ductal Carcinoma (IDC)", "Invasive Lobular Carcinoma (ILC)", "Granulamatous Mastitis", "Papillary Carcinoma", "Phylloid Carcinoma", "Invasive Mammary Carcinoma", "Invasive Breast Carcinoma", "Other" ] tumour_diagnosis = ask_option(category, options) category = "Tumour Biopsy Diagnosis" options = ["Grade 1", "Grade 2", "Grade 3", "Other"] tumour_grade = ask_option(category, options) category = "ER Status" options = ["Positive", "Negative"] tumour_er = ask_option(category, options) if (tumour_er == "Positive"): tumour_er_percent = input("ER Percent: ") else: tumour_er_percent = "NA" category = "PR Status" options = ["Positive", "Negative"] tumour_pr = ask_option(category, options) if (tumour_pr == "Positive"): tumour_pr_percent = input("PR Percent: ") else: tumour_pr_percent = "NA" category = "HER2 Status" options = ["Positive", "Equivocal", "Negative"] tumour_her2 = ask_option(category, options) if tumour_her2 == "Negative": tumour_her2_grade = "NA" tumour_fish = "NA" else: tumour_her2_grade = input("HER2 Grade: ") category = "FISH" options = ["Positive", "Negative"] tumour_fish = ask_option(category, options) tumour_ki67 = input("Ki67 Percent: ") data = tumour_diagnosis, tumour_grade, tumour_er ,tumour_er_percent ,tumour_pr, tumour_pr_percent, tumour_her2, tumour_her2_grade,\ tumour_fish, tumour_ki67 columns = "Tumour_biopsy_diagnosis", "Tumour_biopsy_diagnosis_grade", "Tumour_biopsy_ER", "Tumour_biopsy_ER_Percent",\ "Tumour_biopsy_PR", "Tumour_biopsy_PR_Percent", "Tumour_biopsy_HER2", "Tumour_biopsy_HER2_Grade", \ "Tumour_biopsy_FISH", "Tumour_biopsy_Ki67_Percent" update_multiple(conn, cursor, table, columns, file_number, data)
def feed_duration(conn, cursor, file_number, children_number): from ask_y_n_statement import ask_option from add_update_sql import insert table = "Breast_Feeding" child_list, feeding_duration_list, feeding_details_list = [], [], [] child_number = int(children_number) for index in range(0, child_number): kid = str(index + 1) kid_add = "Child " + kid child_list.append(kid_add) feeding_duration = input("Breast feeding duration for " + kid_add + " (months) ?") feeding_duration_list.append(feeding_duration) category = "Breast feeding for child " + kid options = ["Right", "Left", "Both", "Other"] feeding_details = ask_option(category, options) feeding_details_list.append(feeding_details) columns = 'File_number, Child_number, Feeding_duration, Breast_usage_feeding' data = file_number, kid, feeding_duration, feeding_details insert(conn, cursor, table, columns, data) child = '; '.join(child_list) duration = '; '.join(feeding_duration_list) feed = "; ".join(feeding_details_list) return (child, duration, feed)
def repro_details(conn, cursor, file_number, table): from add_update_sql import update_multiple from breast_cancer_tables import feed_duration from ask_y_n_statement import ask_option, ask_y_n menarche = input('Age at menarche (yrs): ') category = "Menopausal Status" options = ["Pre-menopausal", "Peri-menopausal", "Post-Menopausal", "Other"] menopause = ask_option(category, options) menopause_age = menopause if menopause == "Post-Menopausal": menopause_age = input('Age at menopause (yrs): ') lmp = "Last menstrual period " + menopause_age + " yrs" period_type = "NA" else: lmp = input("Date of last menstrual period: ") category = "Period" options = ["Regular", "Irregular", "Other"] period_type = ask_option(category, options) number_pregnancy = input("Number of pregnancies: ") number_term = input( "Pregnancy carried to term (include abortion after 6 months): )") number_abortion = input("Number of abortions: ") sql = ( 'SELECT Children FROM Patient_Information_History WHERE File_number = \'' + file_number + "'") cursor.execute(sql) kids = cursor.fetchall() children_number = kids[0][0] sql = ( 'SELECT Age_yrs FROM Patient_Information_History WHERE File_number = \'' + file_number + "'") cursor.execute(sql) age = cursor.fetchall() age_mother = age[0][0] if children_number == 'No Children': age_first = 'NA' age_last = 'NA' else: age_first = input("Age of first child: ") if int(children_number) > 1: age_last = input("Age of last child: ") else: age_last = age_first age_first_preg = input("Age at first pregnancy: ") if str.lower(age_first_preg) == "na": age_first_preg = str(int(age_mother) - int(age_first)) age_last_preg = input("Age at last pregnancy: ") if str.lower(age_first_preg) == "na": age_last_preg = str(int(age_mother) - int(age_last)) twice_birth = ask_y_n("Two births in a year (not twins) y/n: ", "Two births in a year", "No two births in a year") breast_feeding = ask_y_n("Breast feeding?") if breast_feeding: breast_feeding = "Breast feeding" feed_duration(conn, cursor, file_number, children_number) else: breast_feeding = "No Breast feeding" type_birth_control = input("Type of birth control used: ") if str.lower(type_birth_control) == "na": detail_birth_control = "NA" duration_birth_control = "NA" else: detail_birth_control = input("Details of birth control used: ") duration_birth_control = input("Duration of birth control use: ") new_data = menarche, menopause, menopause_age, lmp, period_type, number_pregnancy, number_term, number_abortion, \ age_first, age_first_preg, age_last,age_last_preg, twice_birth, breast_feeding, \ type_birth_control,detail_birth_control, duration_birth_control columns = "Menarche_yrs", "Menopause_Status", "Age_at_Menopause_yrs", "Date_last_menstrual_period", "Period_Type", \ "Number_pregnancies", "Pregnancy_to_term", "Number_abortions", "Age_first_child", "Age_first_pregnancy",\ "Age_last_child", "Age_last_pregnancy", "Two_births_in_year", "Breast_feeding", \ "Type_birth_control_used", "Details_birth_control", "Duration_birth_control" update_multiple(conn, cursor, table, columns, file_number, new_data)
def update_record(conn, cursor, file_number, table): from ask_y_n_statement import ask_option, ask_y_n import block_report_data import gen_info_tables import clinical_exam options = ["General Information", "Block Report", "Clinical Information"] check = ask_option("Update Record for", options) if check == "General Information": enter = ask_y_n("Enter Patient Biographical Information") if enter: gen_info_tables.bio_info(conn, cursor, file_number, table) enter = ask_y_n("Enter Patient habits") if enter: gen_info_tables.phys_act(conn, cursor, file_number, table) gen_info_tables.habits(conn, cursor, file_number, table) gen_info_tables.nut_supplements(conn, cursor, file_number, table) enter = ask_y_n("Enter Patient family and reproductive details?") if enter: gen_info_tables.family_details(conn, cursor, file_number, table) gen_info_tables.repro_details(conn, cursor, file_number, table) enter = ask_y_n("Enter Patient and family medical history?") if enter: gen_info_tables.med_history(conn, cursor, file_number, table) gen_info_tables.cancer_history(conn, cursor, file_number, table) gen_info_tables.family_cancer(conn, cursor, file_number, table) enter = ask_y_n("Enter Patient Symptoms?") if enter: gen_info_tables.det_by(conn, cursor, table, file_number) gen_info_tables.breast_symptoms(conn, cursor, file_number, table) gen_info_tables.metastasis_symp(conn, cursor, file_number, table) if check == "Block Report": enter = ask_y_n("Enter Block Report information?") if enter: block_report_data.block_report_info(conn, cursor, file_number, table) enter = ask_y_n("Enter Tumour Biopsy data?") if enter: block_report_data.tumour_biopsy_data(conn, cursor, file_number, table) enter = ask_y_n("Enter Lymphnode Biopsy data?") if enter: block_report_data.lymphnode_biopsy(conn, cursor, file_number, table) enter = ask_y_n("Enter Surgery Information?") if enter: block_report_data.surgery_info(conn, cursor, file_number, table) enter = ask_y_n("Enter Surgery Block Report?") if enter: block_report_data.surgery_block(conn, cursor, file_number, table) enter = ask_y_n("Enter Patient family and reproductive details?") if enter: block_report_data.node_block(conn, cursor, file_number, table) enter = ask_y_n("Enter Pathological Stage?") if enter: block_report_data.path_stage(conn, cursor, file_number, table) if check == "Clinical Exam": enter = ask_y_n("Enter Initial Clinical Examination?") if enter: clinical_exam.clinical_exam_initial(conn, cursor, file_number, table) enter = ask_y_n("Nipple Cytology and Mammography details?") if enter: clinical_exam.nipple_cytology(conn, cursor, file_number, table) clinical_exam.mammography(conn, cursor, file_number, table)
def mammography(conn, cursor, file_number, table): import ask_y_n_statement import add_update_sql mammo_loc = ask_y_n_statement.ask_option("Mammography Diagnosis at", ["PCCM", "Outside", "Other"]) mammo_details = ask_y_n_statement.ask_y_n("First Mammography?") mammo_date = input("Date of last mammography done: ") if mammo_details: mammo_details = "First Mammography" mammo_number, mammo_rep_previous = "NA", "NA" else: mammo_details = "More than one Mammography" mammo_number = input("Number of mammographies undergone: ") mammo_rep_previous = input("Report of previous mammography: ") mammo = ask_y_n_statement.ask_y_n("Mammography diagnosis done") if mammo: mammo = "Mammography diagnosis done" mammo_diag_date = input("Date of mammography diagnosis: ") mammo_diag_acc = input("Accession number of mammography diagnosis") else: mammo = "Mammography diagnosis not done" mammo_diag_date, mammo_diag_acc = "NA", "NA" mammo_lesion = ask_y_n_statement.ask_option( "Location of lesion", ["Right Breast", "Left Breast", "Both", "Not present"]) mammo_lesion_data = [] if mammo_lesion == "Right Breast" or mammo_lesion == "Both": category = "Mastitis location on Right Breast" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] mammo_lesion_rb = ask_y_n_statement.ask_option(category, options) mammo_lesion_rb_data = "RB-" + mammo_lesion_rb mammo_lesion_data.append(mammo_lesion_rb_data) if mammo_lesion == "Left Breast" or mammo_lesion == "Both": category = "Mastitis location on Left Breast" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] mammo_lesion_lb = ask_y_n_statement.ask_option(category, options) mammo_lesion_lb_data = "LB-" + mammo_lesion_lb mammo_lesion_data.append(mammo_lesion_lb_data) mammo_lesion_data = "; ".join(mammo_lesion_data) if mammo_lesion == "Not present": mammo_lesion_data = "Lesion" + mammo_lesion mammo_shape = ask_y_n_statement.ask_option("Shape", ["Oval", "Round", "Irregular"]) mammo_size = input("Size: ") mammo_margin = ask_y_n_statement.ask_option( "Margins", ["Circumscribed", "Obscured", "Indistinct", "Spiculated", "Other"]) mammo_density = ask_y_n_statement.ask_option("Density", [ "High Density", "Equal Density", "Low Density", "Fat-containing", "Other" ]) mammo_calcification = ask_y_n_statement.ask_option("Calcification Type", [ "Skin", "Vascular", "Coarse or 'Popcorn-like'", "Large Rod-like", "Round and punctate", "Lucent-Centered", "Eggshell or Rim", "Milk of Calcium", "Suture", "Dystrophic", "Amorphous", "Coarse Heterogeneous", "Fine Pleomorphic", "Fine Linear or Fine Linear Branching", "Other" ]) mammo_calcification_type = ask_y_n_statement.ask_option( "Is calcification type", ["Typically Benign", "Suspicious Morphology", "Other"]) mammo_arch = ask_y_n_statement.ask_option( "Architectural distortion", ["Right", "Left", "Both", "Not present"]) mammo_asymm = ask_y_n_statement.ask_option( "Asymmetry", ["Global", "Focal", "Developing", "Not present", "Other"]) mammo_intra = ask_y_n_statement.ask_option( "Intra mammary lymph nodes", ["Right", "Left", "Both", "Other"]) mammo_lesion_skin = ask_y_n_statement.ask_option( "Skin Lesion", ["Right", "Left", "Both", "Other"]) mammo_dil = ask_y_n_statement.ask_option( "Solitary Dilated duct", ["Right", "Left", "Both", "Other"]) asso_feat = [ "Skin Retraction", "Nipple Retraction", "Skin Thickening", "Trabecular Thickening", "Axillary lymphadenopathy" ] asso_feat_data = [] for index in (asso_feat): var = ask_y_n_statement.ask_option(index, ["Right", "Left", "Both", "Other"]) asso_feat_data.append(var) asso_feat_1, asso_feat_2, asso_feat_3, asso_feat_4, asso_feat_5 = asso_feat_data mammo_sec = input("Secondary Lesion/Contralateral Lesion: ") mammo_dist = input("Distance from Skin (cm): ") mammmo_pect = input("Distance from Pectoralis Major (cm): ") mammo_birads = ask_y_n_statement.ask_option( "BI-RADS", ["0", "I", "II", "III", "IV", "IVA", "IVB", "IVC" "V"]) data = mammo_loc, mammo_details, mammo_date, mammo_number, mammo_rep_previous, mammo, mammo_diag_date, mammo_diag_acc, \ mammo_lesion, mammo_lesion_data, mammo_shape, mammo_size, mammo_margin, mammo_density, mammo_calcification, \ mammo_calcification_type, mammo_arch, mammo_asymm, mammo_intra, mammo_lesion_skin, mammo_dil, asso_feat_1, \ asso_feat_2, asso_feat_3, asso_feat_4, asso_feat_5, mammo_sec, mammo_dist, mammmo_pect, mammo_birads columns = 'DiagnosisLocation_Mammography', 'First_Mammography', 'LatestDate_Mammography', 'Number_Mammography', \ 'PreviousDate_Mammography', 'Diagnosis_Mammography', 'Date_Diagnosis_Mammography', 'AccessionNumber_Mammography', \ 'Lesion_Mammography', 'LesionLocation_Mammography', 'Shape_Mammography', 'Size_Mammography', \ 'Margin_Mammography', 'Density_Mammography', 'Calcification_Mammography', \ 'Calcification_Implication_Mammography', 'Architecture_Mammography', 'Asymmetry_Mammography', \ 'IntraMammaryLN_Mammography', 'SkinLesion_Mammography', 'DilatedDuct_Mammography', \ 'Features_SkinRetraction_Mammography', 'Features_NippleRetraction_Mammography', \ 'Features_SkinThickening_Mammography', 'Features_TrabecularThickening_Mammography', \ 'Features_AxillaryLymphadenopathy_Mammography', 'SecondaryLesion_ContralateralBreast_Mammography', \ 'DistancefromSkin_Mammography', 'DistanceFromPectMaj_Mammography', 'BIRADS_Mammography' add_update_sql.update_multiple(conn, cursor, table, columns, file_number, data)
def habits(conn, cursor, file_number, table): from add_update_sql import update_multiple, review_input from ask_y_n_statement import ask_option, ask_y_n check = False while not check: category = "Diet" print ("Note Ovo-Vegetarian is Egg + Veg eating. If eating patterms are only fish etc enter in Others") options = ["Vegetarian", "Non-Vegetarian", "Ovo-Vegetarian", "Other"] diet = ask_option(category, options) alcohol = ask_y_n("Alcohol consumption") if alcohol: alcohol_consump = "Alcohol Consumption" alcohol_age = input("Consumption of alcohol from which age (yrs): ") alcohol_quant = input("Quantity of alcohol consumed per week: ") alcohol_duration = input("Duration of alcohol consumption: ") alcohol_comments = input("Additional comments for alcohol consumption: ") else: alcohol_consump = "No Alcohol Consumption" alcohol_age, alcohol_quant, alcohol_duration, alcohol_comments = ("NA",) * 4 columns_list = ["Diet", "Alcohol_y_n", "Alcohol_Consumption_age_yrs", "Quantity_alcohol_per_week", "Duration_alcohol", "Comments_alcohol"] data_list = [diet, alcohol_consump, alcohol_age, alcohol_quant, alcohol_duration, alcohol_comments] check = review_input(file_number, columns_list, data_list) columns = "Diet", "Alcohol_y_n", "Alcohol_Consumption_age_yrs", "Quantity_alcohol_per_week", "Duration_alcohol", "Comments_alcohol" new_data = diet, alcohol_consump, alcohol_age, alcohol_quant, alcohol_duration, alcohol_comments update_multiple(conn, cursor, table, columns, file_number, new_data) check = False while not check: print ("Note this question includes Gutkha, Pan Masala, Jarda/Maava, Hookah, Nicotine Patch, Mishri consumption") tobacco = ask_y_n("Tobacco exposure (Passive and/or Active)") if tobacco: tobacco = "Tobacco consumption" exposure_type = ask_option("Mode of exposure to Tobacco", ["Passive", "Active", "Other"]) if exposure_type =="Passive": tobacco_type_partic = ask_option("Mode of passive consumption", ["Home", "Work", "Commute", "Social Interactions"]) if tobacco_type_partic == "Home": tobacco_type_who = input ("What is the specific source?") tobacco_passive = tobacco_type_partic + (" : ") + tobacco_type_who else: tobacco_passive = tobacco_type_partic else: tobacco_passive = "NA" tobacco_type = ask_option("Type of tobacco use", ["Cigarette", "Beedi", "Gutkha", "Pan Masala", "Jarda/Maava", "Hookah", "Nicotine Patch", "Mishri", "Other"]) tobacco_age = input("Consumption of tobacco from which age (yrs): ") tobacco_freq = input ("Frequency of tobacco consumption: ") tobacco_quant = input("Quantity of tobacco consumed per week: ") tobacco_duration = input("Duration of tobacco consumption: ") tobacco_comments = input("Additional comments for tobacco consumption: ") else: tobacco = "No Tobacco Consumption" exposure_type, tobacco_passive, tobacco_type, tobacco_age, tobacco_freq, tobacco_quant, tobacco_duration, \ tobacco_comments = ("NA",) * 8 other_del_habits = input("Other Deleterious Habits (if present give details): ") columns_list = ["Tobacco_y_n", "Exposure_Mode", "Type_Passive", "Type_tobacco","Tobacco_consumption_age_yrs", "Tobacco_Frequency","Quantity_tobacco_per_week", "Duration_tobacco", "Comments_tobacco", "Other_Deleterious_Habits"] data_list = [tobacco, exposure_type, tobacco_passive,tobacco_type, tobacco_age, tobacco_freq, tobacco_quant, tobacco_duration, tobacco_comments, other_del_habits] check = review_input(file_number, columns_list, data_list) columns = "Tobacco_y_n", "Exposure_Mode", "Type_Passive", "Type_tobacco","Tobacco_consumption_age_yrs", \ "Tobacco_Frequency","Quantity_tobacco_per_week", "Duration_tobacco", "Comments_tobacco",\ "Other_Deleterious_Habits" data = tobacco, exposure_type,tobacco_passive, tobacco_type, tobacco_age, tobacco_freq, tobacco_quant, \ tobacco_duration, tobacco_comments, other_del_habits update_multiple(conn, cursor, table, columns, file_number, data)
def path_stage(conn, cursor, file_number, table): from add_update_sql import update_multiple from ask_y_n_statement import ask_option, ask_y_n category = "pT" options = ["is", "0", "1", "2", "3", "4", "Other"] pT = ask_option(category, options) category = "pN" options = ["0", "1", "2", "3", "4", "Other"] pN = ask_option(category, options) category = ("M") options = ["0", "x", "Present", "Other"] M = ask_option(category, options) path_stage = "pT" + pT + "N" + pN + "M" + M print("Pathological Stage: " + path_stage) check = input("Is patholgicial stage correct (y/n): ") if str.lower(check) == "n": path_stage = input("Please enter correct pathological stage: ") if M == "1": clinical_stage = "IV" elif M == "0": if pN == "3": clinical_stage = "IIIC" elif pN == "2": if pT == "4": clinical_stage = "IIIB" else: clinical_stage = "IIIA" elif pN == "1mi": clinical_stage = "IB" elif pN == "1": if (pT == "0" or pT == "1"): clinical_stage = "IIA" elif pT == "2": clinical_stage = "IIB" elif pT == "3": clinical_stage = "IIIA" elif pT == "4": clinical_stage = "IIIC" else: clinical_stage = input("Clinical Staging: ") elif pN == "0": if pT == "is": clinical_stage = "0" elif pT == "1": clinical_stage = "IA" elif pT == "2": clinical_stage = "IIA" elif pT == "3": clinical_stage = "IIB" elif pT == "4": clinical_stage = "IIIB" else: clinical_stage = input("Clinical Staging: ") else: clinical_stage = input("Clinical Staging: ") print("Clinical stage " + clinical_stage) print( "Based on TNM status", path_stage, "and data at https://emedicine.medscape.com/article/2007112-overview") check = ask_y_n("Is clinical stage correct", True, False) if not check: clinical_stage = input("Please enter correct clinical stage: ") data = pT, pN, M, path_stage, clinical_stage columns = "Pathological_Staging_pT", "Pathological_Staging_pN", "Pathological_Staging_M", \ "Pathological_Staging_P_Stage", "Clinical_Staging" update_multiple(conn, cursor, table, columns, file_number, data)
def clinical_exam_initial(conn, cursor, file_number, table): import ask_y_n_statement from add_update_sql import update_multiple prov_diag = input("Provisional Diagnosis: ") options = ["Definite", "Vague", "Diffuse", "Nil", "Other"] lump_palp = ask_y_n_statement.ask_option("Palpable lump in the breast?", options) lump_location = ask_y_n_statement.ask_option( "Location of lump", ["Right Breast", "Left Breast", "Both", "Not present"]) lump_location_data = [] if lump_location == "Right Breast" or lump_location == "Both": category = "Lump location on Right Breast" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] lump_location_rb = ask_y_n_statement.ask_option(category, options) lump_location_rb_data = "RB-" + lump_location_rb lump_location_data.append(lump_location_rb_data) if lump_location == "Left Breast" or lump_location == "Both": category = "Lump location on Left Breast" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] lump_location_lb = ask_y_n_statement.ask_option(category, options) lump_location_lb_data = "LB-" + lump_location_lb lump_location_data.append(lump_location_lb_data) lump_location_data = "; ".join(lump_location_data) if lump_location == "Not present": lump_location_data = "Lump" + lump_location lump_size, lump_number, lump_consistency, lump_fixity = "NA", "NA", "NA", "NA" else: lump_size = input("Lump size") lump_number = ask_y_n_statement.ask_option( "Number of lumps", ["Single", "Multiple", "Other"]) lump_consistency = ask_y_n_statement.ask_option( "Consistency of lumps", ["Soft", "Firm", "Hard", "Cystic", "Mobile", "Other"]) lump_fixity = ask_y_n_statement.ask_option("Lump fixity to ", [ "Skin", "Chest wall", "Pectoral major muscle", "No Fixation", "Other" ]) mastitis_location = ask_y_n_statement.ask_option( "Location of mastitis", ["Right Breast", "Left Breast", "Both", "Not present"]) mastitis_location_data = [] if mastitis_location == "Right Breast" or mastitis_location == "Both": category = "Mastitis location on Right Breast" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] mastitis_location_rb = ask_y_n_statement.ask_option(category, options) mastitis_location_rb_data = "RB-" + mastitis_location_rb mastitis_location_data.append(mastitis_location_rb_data) if mastitis_location == "Left Breast" or mastitis_location == "Both": category = "Mastitis location on Left Breast" options = ["UOQ", "UIQ", "C", "UCQ", "LCQ", "LOQ", "LIQ"] mastitis_location_lb = ask_y_n_statement.ask_option(category, options) mastitis_location_lb_data = "LB-" + mastitis_location_lb mastitis_location_data.append(mastitis_location_lb_data) mastitis_location_data = "; ".join(mastitis_location_data) if mastitis_location == "Not present": mastitis_location_data = "mastitis" + mastitis_location mastitis_type = "NA" else: mastitis_type = ask_y_n_statement.ask_option( "Mastitis type", ["Diffuse", "Sectoral", "Other"]) tender = ask_y_n_statement.ask_option( "Tenderness in breast ?", ["Right Breast", "Left Breast", "Both", "Not Present", "Other"]) retract = ask_y_n_statement.ask_option( "Nipple Retraction ?", ["Right Breast", "Left Breast", "Both", "Not Present", "Other"]) discharge = ask_y_n_statement.ask_option( "Nipple Discharge ?", ["Right Breast", "Left Breast", "Both", "Not Present", "Other"]) if discharge == "Not Present": discharge_type = "NA" else: discharge_type = ask_y_n_statement.ask_option( "Discharge Type?", ["Serous", "Milky", "Brown", "Bloody", "Other"]) skin_change_location = ask_y_n_statement.ask_option( "Skin Changes?", ["Right Breast", "Left Breast", "Both", "Not Present", "Other"]) if skin_change_location == "Not Present": skin_change_type = "NA" else: skin_change_type = ask_y_n_statement.ask_option( "Type of skin change?", [ "Dimpling", "Ulceration", "Discolouration", "Eczema", "Edema", "Redness", "Peau d'orange", "Other" ]) ax_nodes = ask_y_n_statement.ask_option( "Palpable axillary nodes", ["Right Breast", "Left Breast", "Both", "Not palpable", "Other"]) if ax_nodes == "Not palpable": ax_nodes_number, ax_nodes_size, ax_nodes_fixity = "NA", "NA", "NA" else: ax_nodes_number = input("Number of nodes: ") ax_nodes_size = input("Size of nodes: ") ax_nodes_fixity = ask_y_n_statement.ask_y_n("Fixity of axillary nodes", "Yes", "No") supra_nodes = ask_y_n_statement.ask_option( "Palpable supraclavicular nodes", ["Right Breast", "Left Breast", "Both", "Not palpable", "Other"]) if supra_nodes == "Not palpable": supra_nodes_number, supra_nodes_size, supra_nodes_fixity = "NA", "NA", "NA" else: supra_nodes_number = input("Number of nodes: ") supra_nodes_size = input("Size of nodes: ") supra_nodes_fixity = ask_y_n_statement.ask_y_n( "Fixity of supraclavicular nodes", "Yes", "No") contra_breast = ask_y_n_statement.ask_option( "Contralateral Breast", ["Nomral", "Diffuse Mastitis", "Localised Mastitis", "Other"]) arm_edema = ask_y_n_statement.ask_option( "Edema of arm", ["Right", "Left", "Both", "Not Present", "Other"]) arm_circ_right = input("Circumference of right arm (cm): ") arm_volume_right = input("Upper limb volume - right arm (cc): ") arm_elbow_right = input("Distance from the elbow - right arm (cm): ") arm_circ_left = input("Circumference of left arm (cm): ") arm_volume_left = input("Upper limb volume - left arm (cc): ") arm_elbow_left = input("Distance from the elbow - left arm (cm): ") data = prov_diag, lump_palp, lump_location_data, lump_size, lump_number, lump_consistency, lump_fixity, \ mastitis_location_data, mastitis_type, tender, retract, discharge, discharge_type, skin_change_location, \ skin_change_type, ax_nodes, ax_nodes_number, ax_nodes_size, ax_nodes_fixity, supra_nodes, supra_nodes_number, \ supra_nodes_size, supra_nodes_fixity, contra_breast, arm_edema, arm_circ_right, arm_volume_right, \ arm_elbow_right, arm_circ_left, arm_volume_left, arm_elbow_left columns = 'Provisional_Diagnosis_Clinical_Examination_CE', 'Lump_Palpable_CE', 'Lump_Location_CE', 'Lump_Size_CE', 'Lump_Number_CE', \ 'Lump_Consistency_CE', 'Lump_Fixity_CE', 'Mastitis_CE', 'Mastitis_type_CE', 'Tenderness_CE', \ 'Nipple_Retraction_CE', 'Nipple_Discharge_CE', 'Nipple_Discharge_Type_CE', 'Skin_changes_CE', \ 'Skin_change_type_CE', 'Palpable_axillary_nodes_CE', 'Palpable_axillary_nodes_number_CE', \ 'Palpable_axillary_nodes_size_CE', 'Palpable_axillary_nodes_fixity_CE', \ 'Palpable_supraclavicular_nodes_CE', 'Palpable_supraclavicular_nodes_number_CE', \ 'Palpable_supraclavicular_nodes_size_CE', 'Palpable_supraclavicular_nodes_fixity_CE', \ 'Contralateral_Breast_CE', 'Edema_arm_CE', 'RightArm_Circumference_cm_CE', \ 'RightArm_UpperLimbVolume_cc_CE', 'RightArm_ElbowDistance_cm_CE', 'LeftArm_Circumference_cm_CE', \ 'LeftArm_UpperLimbVolume_cc_CE', 'LeftArm_ElbowDistance_cm_CE' update_multiple(conn, cursor, table, columns, file_number, data)