/// <summary> /// 查询方法 /// Add by xlb 2013-04-08 /// </summary> private void Search() { try { //存储过程名称 string procedureName = DS_SqlService.GetConfigValueByKey("MadeOrderProcedure"); string IsView = DS_SqlService.GetConfigValueByKey("MadeOrderIsView");; if (string.IsNullOrEmpty(procedureName)) { procedureName = "usp_GetDoctorAdvice"; } DS_SqlHelper.CreateSqlHelperByDBName("HISDB"); CheckConnectHIS(); if (IsView == "1") { GetDateTable(); } else { GetDateTableByPrc(procedureName); } gridView1.Columns.Clear(); gridControlOrder.DataSource = dtOrder; for (int i = 0; i < gridView1.Columns.Count; i++) { //列头居中 gridView1.Columns[i].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; if (gridView1.Columns[i].FieldName.Trim() == "医嘱内容") { gridView1.Columns[i].Width = 200; } else { gridView1.Columns[i].Width = (gridControlOrder.Width - 200) / gridView1.Columns.Count - 1; } //RepositoryItem repository = new RepositoryItemMemoEdit(); //gridView1.Columns[i].ColumnEdit = repository; } gridView1.OptionsCustomization.AllowColumnMoving = false; gridView1.OptionsCustomization.AllowColumnResizing = true; gridView1.OptionsCustomization.AllowRowSizing = false; gridView1.OptionsCustomization.AllowQuickHideColumns = false; gridView1.OptionsCustomization.AllowFilter = false; gridView1.OptionsCustomization.AllowSort = false; //禁掉自带排序 gridView1.OptionsBehavior.Editable = false; //不可编辑 DS_SqlHelper.CreateSqlHelper(); } catch (Exception ex) { DS_SqlHelper.CreateSqlHelper(); throw ex; } }
public DaLianYiBaoForm(Inpatient currentInpatient) { InitializeComponent(); m_currentInpatient = currentInpatient; DS_SqlHelper.CreateSqlHelperByDBName("HISDB"); string sql = string.Format("select patnoofhis,yybh,bxbh,zlxh from YD_DLYBSC where patnoofhis='{0}'", m_currentInpatient.NoOfHisFirstPage); DataTable dt = DS_SqlHelper.ExecuteDataTable(sql, CommandType.Text); }
public DataTable GetPatEhrPatid(string patid) { try { DataTable dt = null; DS_SqlHelper.CreateSqlHelperByDBName("EHRDB"); dt = DS_SqlHelper.ExecuteDataTable("select * from InPatient where PatID='" + patid + "'"); return(dt); } catch (Exception ex) { io.WriteLog(ex.Message); return(null); } }
/// <summary> /// 获取患者费用信息 /// </summary> /// <param name="PatId">病人ID</param> /// <returns>费用Json字符</returns> public DataTable GetFree(string PatId) { try { DataTable dt = null; string sql = string.Format(@"SELECT * FROM DC_Free where PatId = '{0}'", PatId); DS_SqlHelper.CreateSqlHelperByDBName("HISDB"); dt = DS_SqlHelper.ExecuteDataTable(sql, CommandType.Text); return(dt); } catch (Exception ex) { io.WriteLog(ex.Message); return(null); } }
/// <summary> /// 获取医嘱信息 /// </summary> /// <param name="BeginTime">开始时间</param> /// <param name="EndTime">结束时间</param> /// <param name="patNoOfHIS">病人号</param> /// <returns>医嘱Json字符</returns> public DataTable GetOrders(string BeginTime, string EndTime, string patNoOfHIS) { try { DataTable dt = null; //xll 2013-03-14 医嘱更据接口文档标准建立 string value = GetConfigValueByKey("ISBiaoZhunMadeorder"); if (value == null && value.Trim() == "") { value = "select * from dc_orders"; } string StPat = null; string StVist = null; string[] StpatNoOfHIS = patNoOfHIS.Split('_'); StPat = StpatNoOfHIS[0]; StVist = "1"; if (StpatNoOfHIS.Length > 1) { StVist = StpatNoOfHIS[1]; } value += " where patient_id = '" + StPat + "' and visit_id = " + StVist; if (BeginTime != "") { value += " and '" + BeginTime + " 00:00:00' <= DATE_BGN "; } if (EndTime != "") { value += " and DATE_BGN <= '" + EndTime + " 23:59:59' "; } value += " order by order_no"; string sql = string.Format(value, patNoOfHIS, BeginTime, EndTime); DS_SqlHelper.CreateSqlHelperByDBName("HISDB"); dt = DS_SqlHelper.ExecuteDataTable(string.Format(sql.ToUpper(), patNoOfHIS), CommandType.Text); return(dt); } catch (Exception ex) { io.WriteLog(ex.Message); return(null); } }
public string GetImage(string id, string PicID) { try { DataTable dt = null; string sql = string.Format(@"SELECT PicData FROM PicTable where ID='{0}' and PicID='{1}'", id, PicID); DS_SqlHelper.CreateSqlHelperByDBName("EHRDB"); dt = DS_SqlHelper.ExecuteDataTable(sql, CommandType.Text); byte[] bytes = (byte[])dt.Rows[0]["PicData"]; if (bytes.Length == 0) { return(""); } io.WriteImage(bytes); return("Images\\image.jpg"); } catch (Exception ex) { io.WriteLog(ex.Message); return(null); } }