/// <summary>
 /// 保存所有病历
 /// </summary>
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2013-02-21</date>
 /// <param name="list"></param>
 private void SaveRecordsInTran(List <DataRow> list)
 {
     try
     {
         if (null == list || list.Count() == 0)
         {
             return;
         }
         DS_SqlHelper.CreateSqlHelper();
         DS_SqlHelper.BeginTransaction();
         foreach (DataRow dr in list)
         {
             if (dr["sortid"].ToString() == ContainerCatalog.BingChengJiLu && !m_IsNeedBatchInDailyEmr)//如果是病程记录,并且不需要导入病程,则暂时不做任何动作
             {
                 //TODO
             }
             else
             {
                 EmrModel model = new EmrModel(dr);
                 if (null != dr["content"] && !string.IsNullOrEmpty(dr["content"].ToString().Trim()))
                 {
                     model.ModelContent = NewXmlDocument(dr["content"].ToString());
                 }
                 m_RecordDal.InsertModelInstanceInTran(model, Convert.ToInt32(m_CurrentInpatient.NoOfFirstPage));
             }
         }
         DS_SqlHelper.CommitTransaction();
     }
     catch (Exception ex)
     {
         DS_SqlHelper.AppDbTransaction.Rollback();
         throw new Exception(ex.Message);
     }
 }
Exemple #2
0
 /// <summary>
 /// 刷新数据 --- 员工列表
 /// </summary>
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2012-12-28</date>
 private void RefreashUsersData()
 {
     try
     {
         string             sqlStr   = " select u.id as userid,u.name as username,u.py,u.wb,u.sexy,u.deptID,d1.name as deptName from users u join department d1 on u.deptid=d1.id ";
         List <DbParameter> listPars = new List <DbParameter>();
         if (!string.IsNullOrEmpty(this.lookUpEditorDepartment.CodeValue.Trim()) && this.lookUpEditorDepartment.CodeValue.Trim() != "0000")
         {
             sqlStr += " and u.deptid = @deptid ";
             SqlParameter param1 = new SqlParameter("@deptid", SqlDbType.Char, 12);
             param1.Value = this.lookUpEditorDepartment.CodeValue.Trim();
             listPars.Add(param1);
         }
         if (!string.IsNullOrEmpty(this.txt_userName.Text.Trim()))
         {
             sqlStr += " and (u.id like @userName or u.name like @userName or u.py like @userName or u.wb like @userName) ";
             SqlParameter param2 = new SqlParameter("@userName", SqlDbType.Char, 32);
             param2.Value = "%" + this.txt_userName.Text.Trim() + "%";
             listPars.Add(param2);
         }
         sqlStr += " order by deptName,username ";
         DS_SqlHelper.CreateSqlHelper();
         DataTable dt = DS_SqlHelper.ExecuteDataTable(sqlStr, listPars, CommandType.Text);
         this.gridControl_user.DataSource = dt;
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemple #3
0
        public QCEmrItem(string formCaption)
        {
            try
            {
                InitializeComponent();
                formName = formCaption.Substring(0, formCaption.IndexOf("("));
                InitDataEMrQcItem();
                SetEditState(false, true);
                DS_SqlHelper.CreateSqlHelper();

                #region 事件
                btnSearch.Click               += new EventHandler(btnSearch_Click);
                btnReset.Click                += new EventHandler(btnReset_Click);
                btnAddEmrQcItem.Click         += new EventHandler(btnAddEmrQcItem_Click);
                btnEdit.Click                 += new EventHandler(btnEdit_Click);
                btnDeleteEmrQcItem.Click      += new EventHandler(btnDeleteEmrQcItem_Click);
                btnSave.Click                 += new EventHandler(btnSave_Click);
                btnCancel.Click               += new EventHandler(btnCancel_Click);
                btnClose.Click                += new EventHandler(btnClose_Click);
                gridViewEmrQcItem.DoubleClick += new EventHandler(gridViewEmrQcItem_DoubleClick);
                #endregion
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
 public MedIemArchive()
 {
     InitializeComponent();
     if (!DesignMode)
     {
         DS_SqlHelper.CreateSqlHelper();
     }
 }
Exemple #5
0
        /// <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;
            }
        }
Exemple #6
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public SqlUti()
 {
     try
     {
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #7
0
        List <InPatientSim> currentInpat;//病人集合用于查询
        #region 方法 xlb 2013-01-17

        /// <summary>
        /// 构造
        /// </summary>
        public InpatRecord()
        {
            try
            {
                InitializeComponent();
                DS_SqlHelper.CreateSqlHelper();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #8
0
 public CommonNote_ModelInfo()
 {
     try
     {
         InitializeComponent();
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
Exemple #9
0
        public static void InsertConsultationRecordDept(string consultApplySn, string orderValue, string hospitalCode, string departmentCode,
                                                        string departmentName, string employeeCode, string employeeName, string employeeLevelID, string createUser, string createTime)
        {
            try
            {
                DS_SqlHelper.CreateSqlHelper();
                SqlParameter[] sqlParam = new SqlParameter[]
                {
                    new SqlParameter("@ConsultA pplySn", SqlDbType.Decimal),
                    new SqlParameter("@OrderValue", SqlDbType.Decimal),
                    new SqlParameter("@HospitalCode", SqlDbType.VarChar),
                    new SqlParameter("@DepartmentCode", SqlDbType.VarChar),
                    new SqlParameter("@DepartmentName", SqlDbType.VarChar),
                    new SqlParameter("@EmployeeCode", SqlDbType.VarChar),
                    new SqlParameter("@EmployeeName", SqlDbType.VarChar),
                    new SqlParameter("@EmployeeLevelID", SqlDbType.VarChar),
                    new SqlParameter("@CreateUser", SqlDbType.VarChar),
                    new SqlParameter("@CreateTime", SqlDbType.VarChar),
                };

                if (consultApplySn.Trim() == "")
                {
                    sqlParam[0].Value = 0f;
                }
                else
                {
                    sqlParam[0].Value = Convert.ToInt32(consultApplySn);
                }
                if (orderValue.Trim() == "")
                {
                    sqlParam[1].Value = 0;
                }
                else
                {
                    sqlParam[1].Value = Convert.ToInt32(orderValue);
                }
                sqlParam[2].Value = hospitalCode;
                sqlParam[3].Value = departmentCode;
                sqlParam[4].Value = departmentName;
                sqlParam[5].Value = employeeCode;
                sqlParam[6].Value = employeeName;
                sqlParam[7].Value = employeeLevelID;
                sqlParam[8].Value = createUser;
                sqlParam[9].Value = createTime;

                DS_SqlHelper.ExecuteNonQueryInTran("EMR_CONSULTATION.usp_InsertConsultationRecord", sqlParam, CommandType.StoredProcedure);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #10
0
 private void NewTempUser_Load(object sender, EventArgs e)
 {
     try
     {
         Random rand = new Random();
         txt_ID.Text = rand.Next(3000, 8000).ToString();
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Exemple #11
0
 public CommonNote_ModelInfo(IEmrHost app)
 {
     try
     {
         InitializeComponent();
         m_app = app;
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #12
0
 /// <summary>
 /// 获取指定类型的病历内容  Add by wwj 2013-03-07
 /// </summary>
 /// <param name="emrType"></param>
 /// <param name="noofinpat"></param>
 /// <returns></returns>
 private string GetEmrContent(string emrType, string noofinpat)
 {
     try
     {
         DS_SqlHelper.CreateSqlHelper();
         string sqlGetEmrContent = string.Format("select content from recorddetail where noofinpat = '{0}' and sortid = '{1}' and valid = '1'", noofinpat, emrType);
         return(DS_SqlHelper.ExecuteScalar(sqlGetEmrContent).ToString());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #13
0
 /// <summary>
 /// 窗体加载事件
 /// xlb 2013-01-11
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UCTimeQcInfo_Load(object sender, EventArgs e)
 {
     try
     {
         if (!this.DesignMode)
         {
             DS_SqlHelper.CreateSqlHelper();
         }
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
 WaitDialogForm m_WaitForm;//等待窗体
 public CommonNote_ModelWeiHu(IEmrHost app)
 {
     try
     {
         m_app = app;
         InitializeComponent();
         DS_SqlHelper.CreateSqlHelper();
         m_WaitForm = new WaitDialogForm("正在加载窗体", "请稍后");
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #15
0
        private List <string> m_DeleteList;  //保存删除ID列表 xlb 2012-12-19
        //private string m_DiseId = "";//病种ID用来判断保存事件是修改或者新增

        /// <summary>
        /// 构造函数
        /// </summary>
        public SetAttendDoctor(IEmrHost app)
        {
            try
            {
                m_app       = app;
                m_SqlHelper = app.SqlHelper;
                DS_SqlHelper.CreateSqlHelper();
                m_DeleteList = new List <string>();
                InitializeComponent();
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Exemple #16
0
        public UCIemDiagnose()
        {
            try
            {
                InitializeComponent();

                m_SqlHelper = DataAccessFactory.DefaultDataAccess;
                InitLookUpEditor();
                DS_SqlHelper.CreateSqlHelper();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #17
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public FrmRecordConsult()
 {
     try
     {
         if (!DesignMode)
         {
             DS_SqlHelper.CreateSqlHelper();
             Register();
         }
         InitializeComponent();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #18
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public FormExtension()
 {
     try
     {
         InitializeComponent();
         sqlUtil = new SqlUti();
         SetStyle(ControlStyles.UserPaint, true);            /*控件自行绘制*/
         SetStyle(ControlStyles.AllPaintingInWmPaint, true); /*禁止擦除背景*/
         SetStyle(ControlStyles.DoubleBuffer, true);         /*双缓冲(绘制在缓冲区进行完成后输出到屏幕上)*/
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="user"></param>
 public FormChangePassword(IEmrHost app)
 {
     try
     {
         InitializeComponent();
         m_User       = app.User;
         m_app        = app;
         m_Acnt       = new Account();
         m_messagebox = new DSMessageBox();
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public void Init(string noOfFirstPage, IEmrHost app, bool isNew /*是否是新增申请*/, bool readOnly /*是否只读*/, string consultApplySN)
        {
            m_App = app;
            DS_SqlHelper.CreateSqlHelper();
            m_NoOfFirstPage  = noOfFirstPage;
            m_ReadOnly       = readOnly;
            m_ConsultApplySN = consultApplySN;

            gridViewDept.OptionsSelection.EnableAppearanceFocusedRow  = true;
            gridViewDept.OptionsSelection.EnableAppearanceFocusedCell = false;
            gridViewDept.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;

            RegisterEvent();
            InitInner(isNew);
            InitFocus();
        }
Exemple #21
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public FormApplyForMultiply()
 {
     try
     {
         InitializeComponent();
         //非设计模式执行
         if (!DesignMode)
         {
             DS_SqlHelper.CreateSqlHelper();
             Register();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #22
0
        public AdviceInputor(IEmrHost application)
        {
            m_WaitDialog = new WaitDialogForm("正在创建用户界面...", "请稍候");

            DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true;//解决第三方控件异步报错的问题
            System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls             = false;
            InitializeComponent();
            DS_SqlHelper.CreateSqlHelper();
            m_App = application;
            CreateAdviceEditor();
            CreateSuiteBox();

            if (m_App.CurrentPatientInfo != null)
            {
                m_AdviceEditor.CallShowPatientOrder(m_App.CurrentPatientInfo);
            }
        }
Exemple #23
0
 /// <summary>
 /// 有参构造
 ///  <auth>张业兴</auth>
 /// <date>2012-12-12</date>
 /// </summary>
 /// <param name="app"></param>
 public UCPicSign(IEmrHost app)
 {
     try
     {
         InitializeComponent();
         DS_SqlHelper.CreateSqlHelper();
         m_App = app;
         InitDepartment();
         #region 屏蔽右键菜单
         ContextMenuStrip contextMenuStrip1 = new ContextMenuStrip();
         DS_Common.CancelMenu(panelControl1, contextMenuStrip1);
         #endregion
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #24
0
 public FormOrderForInpat(string nOofinpat)
     : this()
 {
     try
     {
         CurrentNoofinpat = nOofinpat;
         DS_SqlHelper.CreateSqlHelper();
         GetConfig();
         InitDataDept(lookUpEditorDept);
         InitDefault();
         RegisterEvent();
         GeInpat();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #25
0
 /// <summary>
 /// 获取体温单配置路径
 /// <auth>zyx</uath>
 /// <date>2012-12-28</date>
 /// </summary>
 /// <param name="app"></param>
 /// <returns></returns>
 public static string GetXMLPath(string currentInpatient)
 {
     try
     {
         if (currentInpatient != null && currentInpatient != "")
         {
             DS_SqlHelper.CreateSqlHelper();
             string         noofinpat = currentInpatient.ToString();
             string         sql       = "select * from Inpatient i where ISBABY='1' and noofinpat=@noofinpat";
             SqlParameter[] parms     = new SqlParameter[]
             {
                 new SqlParameter("@noofinpat", SqlDbType.NVarChar)
             };
             parms[0].Value = noofinpat;
             DataTable dt = DS_SqlHelper.ExecuteDataTable(sql, parms, CommandType.Text);
             if (dt != null && dt.Rows.Count > 0)
             {
                 if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + "Sheet\\Configbaby.xml"))
                 {
                     configName = "Configbaby.xml";
                     return(AppDomain.CurrentDomain.BaseDirectory + "Sheet\\Configbaby.xml");
                 }
                 else
                 {
                     configName = "Config.xml";
                     return(AppDomain.CurrentDomain.BaseDirectory + "Sheet\\Config.xml");
                 }
             }
             else
             {
                 configName = "Config.xml";
                 return(AppDomain.CurrentDomain.BaseDirectory + "Sheet\\Config.xml");
             }
         }
         else
         {
             return(AppDomain.CurrentDomain.BaseDirectory + "Sheet\\" + configName);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #26
0
        bool isNeedCheck;     //是否需要校验记录已重复

        #region 方法 Add by xlb 2013-03-11

        public ChooseConsultEmployee()
        {
            try
            {
                InitializeComponent();
                if (!DesignMode)
                {
                    DS_SqlHelper.CreateSqlHelper();
                    RegisterEvent();
                    InitDepartMent();
                    InitDoctorLevel();
                    InitDoctor(lookUpEditorDepartment.CodeValue);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #27
0
 /// <summary>
 /// 初始化会诊申请列表
 /// Add xlb 2013-03-06
 /// </summary>
 private void InitDataList()
 {
     try
     {
         DS_SqlHelper.CreateSqlHelper();
         string         sql = @"select consultapplysn,urgencytypeid,abstract,purpose,applyuser,
         applytime,director from consultapply c where c.noofinpat=@nOofinpat";
         SqlParameter[] sps = { new SqlParameter("@nOofinpat", noofinpat) };
         DataTable      dt  = DS_SqlHelper.ExecuteDataTable(sql, sps, CommandType.Text);
         if (dt == null || dt.Rows.Count <= 0)
         {
             return;
         }
         gridControlApplyList.DataSource = dt;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #28
0
 /// <summary>
 /// 带参构造函数
 /// </summary>
 /// <param name="app"></param>
 public UCList(IEmrHost app)
     : this()
 {
     try
     {
         m_App = app;
         BindPopupMenu();
         BindLookUpEditorData();
         simpleButtonSearch.Click += new EventHandler(simpleButtonSearch_Click);
         InitGridControl();
         InitDateEdit();
         //Search();
         textEditName.Focus();
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #29
0
 /// <summary>
 /// 重载构造
 /// </summary>
 /// <param name="noofpat">病案号</param>
 public FormExtension(string noofpat)
     : this()
 {
     try
     {
         this.noofInpat = noofpat;
         sqlUtil        = new SqlUti();
         InitIemExcept();
         GetIemMainPageExceptUsePat();
         InitControl(iemExcept, iemExceptUse);
         SetStyle(ControlStyles.UserPaint, true);            /*控件自行绘制*/
         SetStyle(ControlStyles.AllPaintingInWmPaint, true); /*禁止擦除背景*/
         SetStyle(ControlStyles.DoubleBuffer, true);         /*双缓冲(绘制在缓冲区进行完成后输出到屏幕上)*/
         RegisterEvent();                                    /*注册事件*/
         DS_SqlHelper.CreateSqlHelper();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #30
0
 bool IsLoad = false;  //判断窗体是否加载
 public MultiInputVitalSign()
 {
     try
     {
         IsLoad = false;
         InitializeComponent();
         this.TopLevel = false;
         m_xmlFilePath = AppDomain.CurrentDomain.BaseDirectory + "Sheet\\Config.xml";
         radios.Clear();
         radios.AddRange(new CheckEdit[] { radio1, radio2, radio3, radio4, radio5, radio6 });
         dateEdit.Text  = DateTime.Now.ToShortDateString();
         m_CurrDatetime = dateEdit.DateTime.ToString("yyyy-MM-dd");
         DS_SqlHelper.CreateSqlHelper();//只需在一处运行一次即可 创建连接对象
         m_insertSql = "insert into notesonnursing(ID,DATEOFSURVEY,TIMESLOT,DATEOFRECORD,DOCTOROFRECORD,";
         m_updateSql = "update notesonnursing set ";
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }