public bool insertFollowVisit(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into follow_visit(fv_id,fv_date,log_id,main_report,heavy_thing,light_thing,heart_rate,heart_rythm,thyroid_size,thyroid_grain,ph_else,ft3,ft4,tsh,tt3,tt4,tpoab,tgab,trab,wbc,rbc,hb,plt,n,l,tb,db,alt,ast,alp," + "ygt,tp,alb,glo,ag,bun,ua,cr,glu,lab_else,handle) value('" + fv_id + "','" + fv_date + "','" + lid + "','" + main_report + "','" + heavy_thing + "','" + light_thing + "'," + heart_rate + "," + heart_rythm + "," + +thyroid_size + ",'" + thyroid_grain + "','" + ph_else + "'," + ft3 + "," + ft4 + "," + tsh + "," + tt3 + "," + tt4 + "," + tpoab + "," + tgab + "," + trab + "," + wbc + "," + rbc + "," + hb + "," + plt + ",'" + n + "','" + l + "'," + tb + "," + db + "," + alt + "," + ast + "," + alp + "," + ygt + "," + tp + "," + alb + "," + glo + "," + ag + "," + bun + "," + ua + "," + cr + "," + glu + ",'" + lab_else + "','" + handle + "')"; MySqlCommand command = new MySqlCommand(insert_sql, con); try { con.Open(); command.ExecuteNonQuery(); MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("无法保存!"); } con.Close(); return(true); } }
public bool insertPhysicalInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into physical_inspect(log_id,thyroid_inspect,thyroid_bigger,thyroid_left,thyroid_right,heart_rate,heart_inspect,noise_level,blood_lpresure," + "blood_hpresure,eye_inspect,left_eye_out,right_eye_out,eye_distance,else_inspect) value('" + lid + "','" + thyroid_inspect + "'," + thyroid_bigger + "," + thyroid_left + "," + thyroid_right + "," + heart_rate + ",'" + heart_inspect + "'," + noise_level + "," + blood_lpressure + "," + blood_hpressure + ",'" + eye_inspect + "'," + left_eye_out + "," + right_eye_out + "," + eye_distance + ",'" + else_inspect + "')"; MySqlCommand command = new MySqlCommand(insert_sql, con);; try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("体格检查保存失败!"); } con.Close(); return(true); } }
public bool updatePhysicalInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string update_sql = "update physical_inspect set thyroid_inspect='" + thyroid_inspect + "', thyroid_bigger=" + thyroid_bigger + ",thyroid_left=" + thyroid_left + ",thyroid_right=" + thyroid_right + ",heart_rate=" + heart_rate + ",heart_inspect='" + heart_inspect + "',noise_level=" + noise_level + ",blood_lpresure=" + blood_lpressure + ",blood_hpresure=" + blood_hpressure + ",eye_inspect='" + eye_inspect + "',left_eye_out=" + left_eye_out + ",right_eye_out=" + right_eye_out + ",eye_distance=" + eye_distance + ",else_inspect='" + else_inspect + "' where log_id='" + lid + "'"; MySqlCommand command = new MySqlCommand(update_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("更新成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("体格检查更新失败!"); } con.Close(); return(true); } }
public bool insertConstHistory(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into const_history(log_id,past_his,person_his,mari_age,preg_times,bear_times," + "nat_bear,op_bear,nat_abort,op_abort,early_bear,dead_bear,menophania_age,period,cycle_day,menopause_y," + "menopause_m,bleed_amount,meno_pain,meno_irregular,parent_his) values('" + lid + "','" + past_his + "','" + person_his + "'," + mari_age + "," + preg_times + "," + bear_times + "," + nat_bear + "," + op_bear + "," + nat_abort + "," + op_abort + "," + early_bear + "," + dead_bear + "," + menophania_age + "," + period + "," + cycle_day + "," + menopause_y + "," + menopause_m + "," + bleed_amount + "," + meno_pain + "," + meno_irregular + ",'" + parent_his + "')"; MySqlCommand command = new MySqlCommand(insert_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("既往史保存失败"); } con.Close(); return(true); } }
public bool readLabInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { con.Open(); MySqlCommand command = new MySqlCommand("select * from lab_inspect where log_id='" + lid + "'", con); MySqlDataReader reader = command.ExecuteReader(); if (reader.Read()) { ft3 = reader.GetDouble(1); ft4 = reader.GetDouble(2); tsh = reader.GetDouble(3); tt3 = reader.GetDouble(4); tt4 = reader.GetDouble(5); tpoab = reader.GetDouble(6); tgab = reader.GetDouble(7); trab = reader.GetDouble(8); wbc = reader.GetDouble(9); rbc = reader.GetDouble(10); hb = reader.GetDouble(11); plt = reader.GetDouble(12); n = reader.GetString(13); l = reader.GetString(14); tb = reader.GetDouble(15); db = reader.GetDouble(16); alt = reader.GetDouble(17); ast = reader.GetDouble(18); alp = reader.GetDouble(19); ygt = reader.GetDouble(20); tp = reader.GetDouble(21); alb = reader.GetDouble(22); glo = reader.GetDouble(23); ag = reader.GetDouble(24); bun = reader.GetDouble(25); ua = reader.GetDouble(26); cr = reader.GetDouble(27); glu = reader.GetDouble(28); else_inspect = reader.GetString(29); sc = reader.GetDouble(30); k = reader.GetDouble(31); p = reader.GetDouble(32); reader.Close(); con.Close(); return(true); } else { reader.Close(); con.Close(); return(false); } } }
public bool insertCurePlan(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into cure_plan(log_id,twoh_rate,twentyfourh_rate,rate_level,recom_dose," + "cal_dose,real_dose,ef_factor,ef_else,else_things,plan_dose,illness_course,illness_states) value('" + lid + "'," + twoh_rate + "," + twentyfourh_rate + "," + rate_level + "," + recom_dose + "," + cal_dose + "," + real_dose + ",'" + ef_factor + "','" + ef_else + "','" + else_things + "'," + plan_dose + "," + illness_course + "," + illness_states + ")"; MySqlCommand command = new MySqlCommand(insert_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("治疗计划保存失败!"); } con.Close(); return(true); } }
public bool updateCurePlan(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string update_sql = "update cure_plan set twoh_rate=" + twoh_rate + ", twentyfourh_rate=" + twentyfourh_rate + ",rate_level=" + rate_level + ",recom_dose=" + recom_dose + ",cal_dose=" + cal_dose + ",real_dose=" + real_dose + ",ef_factor='" + ef_factor + "',ef_else='" + ef_else + "',else_things='" + else_things + "',plan_dose=" + plan_dose + ",illness_course=" + illness_course + ",illness_states=" + illness_states + " where log_id='" + lid + "'"; MySqlCommand command = new MySqlCommand(update_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("更新成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("治疗计划更新失败!"); } con.Close(); return(true); } }
public bool insertLabInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into lab_inspect(log_id,ft3,ft4,tsh,tt3,tt4,tpoab,tgab,trab,wbc,rbc,hb,plt,n,l,tb,db,alt,ast,alp," + "ygt,tp,alb,glo,ag,bun,ua,cr,glu,else_inspect,sc,k,p) value('" + lid + "'," + ft3 + "," + ft4 + "," + tsh + "," + tt3 + "," + tt4 + "," + tpoab + "," + tgab + "," + trab + "," + wbc + "," + rbc + "," + hb + "," + plt + ",'" + n + "','" + l + "'," + tb + "," + db + "," + alt + "," + ast + "," + alp + "," + ygt + "," + tp + "," + alb + "," + glo + "," + ag + "," + bun + "," + ua + "," + cr + "," + glu + ",'" + else_inspect + "'," + sc + "," + k + "," + p + ")"; MySqlCommand command = new MySqlCommand(insert_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("化验检查保存失败!"); } con.Close(); return(true); } }
public bool insertImageInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into image_inspect(log_id,ecg,ect_left,ect_right,ect_area,ect_tb,ect_weight,ect_inspect," + "ect_nodule,b_left,b_right,b_area,b_weight,b_inspect,b_nodule,else_inspect,diagnosis) value('" + lid + "','" + ecg + "','" + ect_left + "','" + ect_right + "'," + ect_area + "," + ect_tb + "," + ect_weight + ",'" + ect_inspect + "','" + ect_nodule + "','" + b_left + "','" + b_right + "'," + b_area + "," + b_weight + ",'" + b_inspect + "','" + b_nodule + "'," + else_inspect + ",'" + diagnosis + "')"; MySqlCommand command = new MySqlCommand(insert_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("影像检查保存失败!"); } con.Close(); return(true); } }
public bool insertPhysicalInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into present_history(log_id,main_report,symptom,stool_times,palsy_times,else_things,treat_process) value('" + lid + "','" + main_report + "','" + symptom + "'," + stool_times + "," + palsy_times + ",'" + else_things + "','" + treat_process + "')"; MySqlCommand command = new MySqlCommand(insert_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("现病史保存失败!"); } con.Close(); return(true); } }
public bool readPresentHistory(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { con.Open(); MySqlCommand command = new MySqlCommand("select * from present_history where log_id='" + lid + "'", con); MySqlDataReader reader = command.ExecuteReader(); if (reader.Read()) { main_report = reader.GetString(1); symptom = reader.GetString(2); stool_times = reader.GetInt32(3); palsy_times = reader.GetInt32(4); else_things = reader.GetString(5); treat_process = reader.GetString(6); reader.Close(); con.Close(); return(true); } else { reader.Close(); con.Close(); return(false); } } }
public bool updatePhysicalInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string update_sql = "update present_history set main_report='" + main_report + "', symptom='" + symptom + "',stool_times=" + stool_times + ",palsy_times=" + palsy_times + ",else_things='" + else_things + "',treat_process='" + treat_process + "' where log_id='" + lid + "'"; MySqlCommand command = new MySqlCommand(update_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("更新成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("现病史更新失败"); } con.Close(); return(true); } }
public bool insertBasicInfo() { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string insert_sql = "insert into basic_info(log_id,p_name,p_sex,p_age,p_married,p_radical,hos_id,p_home,p_born,p_jobaddr,p_job,p_addr,p_tel,p_email,p_contact,p_relation) values('" + log_id + "','" + p_name + "','" + p_sex + "'," + p_age + ",'" + p_married + "','" + p_radical + "'," + hos_id + ",'" + p_home + "','" + p_born + "','" + p_jobaddr + "','" + p_job + "','" + p_addr + "','" + p_tel + "','" + p_email + "','" + p_contact + "','" + p_relation + "')"; MySqlCommand command = new MySqlCommand(insert_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("保存成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("基本信息保存失败!"); } con.Close(); return(true); } }
public bool updateLabInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { string update_sql = "update lab_inspect set ft3=" + ft3 + ", ft4=" + ft4 + ",tsh=" + tsh + ",tt3=" + tt3 + ",tt4=" + tt4 + ",tpoab=" + tpoab + ",tgab=" + tgab + ",trab=" + trab + ",wbc=" + wbc + ",rbc=" + rbc + ",hb=" + hb + ",plt=" + plt + ",n='" + n + "',l='" + l + "',tb=" + tb + ",db=" + db + ",alt=" + alt + ",ast=" + ast + ",alp=" + alp + ",ygt=" + ygt + ",tp=" + tp + ",alb=" + alb + ",glo=" + glo + ",ag=" + ag + ",bun=" + bun + ",ua=" + ua + ",cr=" + cr + ",glu=" + glu + ",else_inspect='" + else_inspect + "',sc=" + sc + ",k=" + k + ",p=" + p + " where log_id='" + lid + "'"; MySqlCommand command = new MySqlCommand(update_sql, con); try { con.Open(); command.ExecuteNonQuery(); //MessageBox.Show("更新成功!"); } catch (MySqlException e) { e.Message.ToString(); MessageBox.Show("化验检查更新失败!"); } con.Close(); return(true); } }
public bool readConstHistory(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { con.Open(); MySqlCommand command = new MySqlCommand("select * from const_history where log_id='" + lid + "'", con); MySqlDataReader reader = command.ExecuteReader(); if (reader.Read()) { past_his = reader.GetString(1); person_his = reader.GetString(2); mari_age = reader.GetInt32(3); preg_times = reader.GetInt32(4); bear_times = reader.GetInt32(5); nat_bear = reader.GetInt32(6); op_bear = reader.GetInt32(7); nat_abort = reader.GetInt32(8); op_abort = reader.GetInt32(9); early_bear = reader.GetInt32(10); dead_bear = reader.GetInt32(11); menophania_age = reader.GetInt32(12); period = reader.GetInt32(13); cycle_day = reader.GetInt32(14); menopause_y = reader.GetInt32(15); menopause_m = reader.GetInt32(16); bleed_amount = reader.GetInt32(17); meno_pain = reader.GetInt32(18); meno_irregular = reader.GetInt32(19); parent_his = reader.GetString(20); reader.Close(); con.Close(); return(true); } else { reader.Close(); con.Close(); return(false); } } }
public bool readImageInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { con.Open(); MySqlCommand command = new MySqlCommand("select * from image_inspect where log_id='" + lid + "'", con); MySqlDataReader reader = command.ExecuteReader(); if (reader.Read()) { ecg = reader.GetString(1); ect_left = reader.GetString(2); ect_right = reader.GetString(3); ect_area = reader.GetDouble(4); ect_tb = reader.GetDouble(5); ect_weight = reader.GetDouble(6); ect_inspect = reader.GetString(7); ect_nodule = reader.GetString(8); b_left = reader.GetString(9); b_right = reader.GetString(10); b_area = reader.GetDouble(11); b_weight = reader.GetDouble(12); b_inspect = reader.GetString(13); b_nodule = reader.GetString(14); else_inspect = reader.GetDouble(15); diagnosis = reader.GetString(16); reader.Close(); con.Close(); return(true); } else { reader.Close(); con.Close(); return(false); } } }
public void readBasicInfoById(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { flag = false; return; } else { con.Open(); MySqlCommand command = new MySqlCommand("select * from basic_info where log_id='" + lid + "'", con); MySqlDataReader reader = command.ExecuteReader(); if (reader.Read()) { log_id = reader.GetString(0); p_name = reader.GetString(1); p_sex = reader.GetChar(2); p_age = reader.GetInt32(3); p_married = reader.GetChar(4); p_radical = reader.GetString(5); hos_id = reader.GetInt32(6); p_home = reader.GetString(7); p_born = reader.GetString(8); p_jobaddr = reader.GetString(9); p_job = reader.GetString(10); p_addr = reader.GetString(11); p_tel = reader.GetString(12); p_email = reader.GetString(13); p_contact = reader.GetString(14); p_relation = reader.GetString(15); } else { flag = false; } reader.Close(); con.Close(); return; } }
public bool readPhysicalInspect(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { con.Open(); MySqlCommand command = new MySqlCommand("select * from physical_inspect where log_id='" + lid + "'", con); MySqlDataReader reader = command.ExecuteReader(); if (reader.Read()) { thyroid_inspect = reader.GetString(1); thyroid_bigger = reader.GetInt32(2); thyroid_left = reader.GetInt32(3); thyroid_right = reader.GetInt32(4); heart_rate = reader.GetInt32(5); heart_inspect = reader.GetString(6); noise_level = reader.GetInt32(7); blood_lpressure = reader.GetInt32(8); blood_hpressure = reader.GetInt32(9); eye_inspect = reader.GetString(10); left_eye_out = reader.GetDouble(11); right_eye_out = reader.GetDouble(12); eye_distance = reader.GetDouble(13); else_inspect = reader.GetString(14); reader.Close(); con.Close(); return(true); } else { reader.Close(); con.Close(); return(false); } } }
public bool readCurePlan(string lid) { MySqlConnection con = CommonFunc.getConnection(); if (con == null) { return(false); } else { con.Open(); MySqlCommand command = new MySqlCommand("select * from cure_plan where log_id='" + lid + "'", con); MySqlDataReader reader = command.ExecuteReader(); if (reader.Read()) { twoh_rate = reader.GetDouble(1); twentyfourh_rate = reader.GetDouble(2); rate_level = reader.GetInt32(3); recom_dose = reader.GetDouble(4); cal_dose = reader.GetDouble(5); real_dose = reader.GetDouble(6); ef_factor = reader.GetString(7); ef_else = reader.GetString(8); else_things = reader.GetString(9); plan_dose = reader.GetDouble(10); illness_course = reader.GetInt32(11); illness_states = reader.GetInt32(12); reader.Close(); con.Close(); return(true); } else { reader.Close(); con.Close(); return(false); } } }