Ejemplo n.º 1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MedicalRecordList_Load(object sender, EventArgs e)
        {
            try
            {
                InitializeParameters();
                InitializeGrid();
                DrectSoft.Common.DS_Common.CancelMenu(this.panelHead, contextMenuStrip1);
                ComponentCommand.InitializeDepartment(ref this.lookUpEditorDepartment, ref this.lookUpWindowDepartment);

                lookUpEditorDepartment.CodeValue = m_app.User.CurrentDeptId;
                lookUpEditorDepartment.Enabled   = false;


                ComponentCommand.InitializeDiagnosis(ref this.lookUpEditorDiagnosis, ref this.lookUpWindowDoctor);
                ComponentCommand.InitializeOperation(ref this.lookUpEditorOperation, ref this.lookUpWindowOperation);
                //this.lookUpWindowLock
                ComponentCommand.InitializeDoctor(ref this.lookUpEditorDoctor, ref this.lookUpWindowDoctor);
                //add by ck 2013-8-26
                this.txtName.Focus();
                this.rdbtnOutPat.Checked = true;//默认勾中出院的
                if (!isdeptManager(m_app.User.CurrentDeptId, m_app.User.Id))
                {
                    btnCancleCom.Visible = false;
                    btnCancleQC.Visible  = false;
                    btnQc.Visible        = false;
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据查询按钮后归档状态控制归档按钮
        /// </summary>
        private void InitBtnStatus()
        {
            try
            {
                int lockstatus = ComponentCommand.GetLockStatusValue(this.cbxLockStatus.Text);

                if (lockstatus == 4705 || lockstatus == 4707)
                {//未归档
                    this.btn_reback.Enabled = true;
                    this.btnCancel.Enabled  = false;
                }
                else if (lockstatus == 4701)
                {//已归档
                    this.btn_reback.Enabled = false;
                    this.btnCancel.Enabled  = true;
                }
                else if (lockstatus == 4702)
                {//撤销归档
                    this.btn_reback.Enabled = true;
                    this.btnCancel.Enabled  = false;
                }
                else
                {
                    this.btn_reback.Enabled = true;
                    this.btnCancel.Enabled  = true;
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("错误信息!" + ex.Message);
                return;
            }
        }
Ejemplo n.º 3
0
        private void InitializeButtonStatus()
        {
            try
            {
                int lockstatus = ComponentCommand.GetLockStatusValue(this.cbxLockStatus.Text);

                if (lockstatus == 4700)
                {//未完成
                    this.btn_reback.Enabled = false;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = false;
                }
                else if (lockstatus == 4701)
                {//已归档
                    this.btn_reback.Enabled = false;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = false;
                }
                else if (lockstatus == 4702)
                {//撤销归档
                    this.btn_reback.Enabled = true;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = false;
                }
                else if (lockstatus == 4704)
                {//已完成
                    this.btn_reback.Enabled = false;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = false;
                }
                else if (lockstatus == 4706)
                {//已提交
                    this.btn_reback.Enabled = true;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = true;
                }
                else if (lockstatus == 4707)
                {//已提交
                    this.btn_reback.Enabled = true;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = true;
                }
                else if (lockstatus == 4705)
                {//科室质控
                    this.btn_reback.Enabled = false;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = false;
                }
                else
                {
                    this.btn_reback.Enabled = true;
                    this.btnCancel.Enabled  = false;
                    this.simpleButton_BackCommit.Enabled = false;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        /*
         * //是编辑页面还是延期页面
         * public MedicalRecordEditAndDelay(IEmrHost app, object obj, int type)
         * {
         *  m_app = app;
         *  InitializeComponent();
         *  CApplyObject tempobj = (CApplyObject)obj;
         *  m_sApplyId = tempobj.m_sApply;
         *  m_sApplyDocId = tempobj.m_sApplyDocId;
         *  this.txtDept.Text = tempobj.m_sDepartmentName;
         *  this.txtName.Text = tempobj.m_sName;
         *  this.txtNumber.Text = tempobj.m_sNoOfInpat;
         *  this.txtTimes.Text = tempobj.m_iApplyTimes.ToString();
         *  this.memoReason.Text = tempobj.m_sApplyContent;
         *  m_dealyMaxTime = ComponentCommand.GetDealyMaxTime();
         *  //最大延迟次数
         *  m_delaymaxTimes = ComponentCommand.GetDealyTimes();
         *  //最大时间
         *  m_readMaxTime = ComponentCommand.GetReadTime();
         *  m_iType = type;
         *  if (type == 1)
         *  {
         *      this.labelMessage.Text = "延期原因";
         *      this.labelSubMessage.Text = "延期时间";
         *      this.Text = "申请延期";
         *      labelDay.Text = "天(*)最大不超过:" + m_dealyMaxTime + "天";
         *  }
         *  else if (type == 0)
         *  {
         *      this.labelMessage.Text = "借阅目的";
         *      this.labelSubMessage.Text = "借阅期限";
         *      this.Text = "借阅编辑";
         *      labelDay.Text = "天(*)最大不超过:" + m_readMaxTime + "天";
         *  }
         *  else if (type == 2)
         *  {
         *      this.btnSave.Enabled = false;
         *      this.btnSubmit.Enabled = false;
         *      this.txtTimes.Enabled = false;
         *      this.memoReason.Enabled = false;
         *      this.labelMessage.Text = "审核信息";
         *      this.labelSubMessage.Text = "审核日期";
         *      labelDay.Visible = false;
         *      this.txtTimes.Text = tempobj.m_sApproveDate;
         *      this.memoReason.Text = tempobj.m_sApproveContent;
         *      this.Text = "查看原因";
         *  }
         * }
         */
        #endregion

        /// <summary>
        /// 是编辑页面还是延期页面
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="type"></param>
        public MedicalRecordApplyBackEditAndDelay(object obj, int type)
        {
            try
            {
                InitializeComponent();
                WriteUpObject tempobj = (WriteUpObject)obj;
                m_sNoOfInpat      = tempobj.m_sNoOfInpat;
                m_sApplyId        = tempobj.m_sApply;
                m_sApplyDocId     = tempobj.m_sApplyDocId;
                this.txtDept.Text = tempobj.m_sDepartmentName;
                this.txtName.Text = tempobj.m_sName;
                //this.txtNumber.Text = tempobj.m_sNoOfInpat;主键
                this.txtNumber.Text = tempobj.m_sPatid;//add by zjy 2013-6-16 修改成住院号
                m_dealyMaxTime      = ComponentCommand.GetDealyMaxTime();
                //最大延迟次数
                m_delaymaxTimes = ComponentCommand.GetDealyTimes();
                //最大时间
                m_readMaxTime = ComponentCommand.GetReadTime();
                m_iType       = type;
                if (type == 1)
                {
                    this.labelMessage.Text    = "延期原因:";
                    this.labelSubMessage.Text = "延期天数:";
                    this.Text     = "申请延期";
                    labelDay.Text = "天(*)最大不超过:" + m_dealyMaxTime + "天;" + "延期次数不超过:" + m_delaymaxTimes + "次";
                    this.txtTimes.Properties.MaxValue = m_dealyMaxTime;
                }
                else if (type == 0)
                {
                    this.labelMessage.Text    = "借阅目的:";
                    this.labelSubMessage.Text = "借阅期限:";
                    this.Text          = "借阅编辑";
                    labelDay.Text      = "天(*)最大不超过:" + m_readMaxTime + "天";
                    this.txtTimes.Text = tempobj.m_iApplyTimes.ToString();
                    this.txtTimes.Properties.MaxValue = m_readMaxTime;
                    this.memoReason.Text = tempobj.m_sApplyContent;
                }
                else if (type == 2)
                {
                    this.btnSave.Enabled        = false;
                    this.btnSubmit.Enabled      = false;
                    this.txtTimes.Visible       = false;
                    this.txtApproveDate.Visible = true;
                    this.txtApproveDate.Enabled = false;
                    this.memoReason.Enabled     = false;
                    this.labelMessage.Text      = "审核信息:";
                    this.labelSubMessage.Text   = "审核日期:";
                    labelDay.Visible            = false;
                    this.txtApproveDate.Text    = tempobj.m_sApproveDate;
                    this.memoReason.Text        = tempobj.m_sApproveContent;
                    this.Text = "查看原因";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 5
0
 public MedicalRecordBrowse(int index, int Type, DataTable tables)
 {
     InitializeComponent();
     TypeNumber = Type;
     TypeIndex  = index;
     m_sUser    = ComponentCommand.GetCurrentDoctor();//获取登录用户信息
     User_Table = tables;
     Init();
 }
Ejemplo n.º 6
0
        /// <summary>
        /// 返回,不同类型的数据源
        /// </summary>
        /// <param name="TypeIndex">当前索引</param>
        /// <param name="TypeNumber">当前状态值(status)</param>
        /// <returns></returns>
        private DataTable GetInitDB(int TypeIndex, int TypeNumber)
        {
            DateTime dateStart = System.DateTime.Today.AddMonths(-6);
            DateTime dateEnd   = System.DateTime.Today;


            //add by zjy 2013-6-14
            string valueStr = DrectSoft.Service.DS_SqlService.GetConfigValueByKey("AutoScoreMainpage");
            string sql      = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_BORROW_SQL;

            if (valueStr.ToLower().Contains("iem_mainpage_diagnosis_sx"))
            {
                sql = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_BORROW_SQL_ZY;
            }

            List <DbParameter> sqlParams = new List <DbParameter>();

            sql = sql + " and i.applydocid = @doc";
            SqlParameter param1 = new SqlParameter("@doc", SqlDbType.VarChar);

            param1.Value = m_sUser;
            sqlParams.Add(param1);
            if (dateStart != null && dateStart.ToString() != "")
            {
                string ds = dateStart.ToString("yyyy-MM-dd");
                sql = sql + " and  to_char(i.applydate,'yyyy-mm-dd') >= @ds";
                SqlParameter param2 = new SqlParameter("@ds", SqlDbType.VarChar);
                param2.Value = ds;
                sqlParams.Add(param2);
            }
            if (dateEnd != null && dateEnd.ToString() != "")
            {
                string de = dateEnd.ToString("yyyy-MM-dd");
                sql = sql + " and  to_char(i.applydate,'yyyy-mm-dd') <= @de";
                SqlParameter param3 = new SqlParameter("@de", SqlDbType.VarChar);
                param3.Value = de;
                sqlParams.Add(param3);
            }

            if (TypeNumber >= 0)
            {
                sql = sql + " and i.status = @st";
                SqlParameter param4 = new SqlParameter("@st", SqlDbType.Int);
                param4.Value = TypeNumber;
                sqlParams.Add(param4);
            }

            DataTable dataTable = DrectSoft.DSSqlHelper.DS_SqlHelper.ExecuteDataTable(sql, sqlParams, CommandType.Text);

            //压缩DateSet中的记录,将住院诊断信息合并
            ComponentCommand.ImpressDataSet(ref dataTable, "id", "cyzd");
            //填入状态值
            ComponentCommand.InitializeStatusInfo(ref dataTable);
            //控制状态显示和预警信息显示颜色显示

            return(dataTable);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 初始化科室
 /// </summary>
 private void InitDepartment()
 {
     try
     {
         ComponentCommand.InitializeDepartment(ref this.lookUpEditorDepartment, ref this.lookUpWindowDepartment);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 ///
 /// </summary>
 private void InitializaTime()
 {
     try
     {
         m_iRemindtime = ComponentCommand.GetRemindTime();
     }
     catch (Exception)
     {
         m_iRemindtime = 1;
     }
 }
Ejemplo n.º 9
0
 private void InitializeImageList()
 {
     try
     {
         ComponentCommand.InitializaImage(ref this.imageListBrxb, ref this.repItemImageComboBoxBrxb);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 10
0
 private void InitializeButtonStatus()
 {
     try
     {
         int lockstatus = ComponentCommand.GetLockStatusValue(this.cbxLockStatus.Text);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 11
0
        /// <summary>
        /// 初始化病人姓名
        /// </summary>
        //private void InitName()
        //{
        //    try
        //    {
        //        this.lookUpWindowName.SqlHelper = SqlUtil.App.SqlHelper;

        //        DataTable Name = SqlUtil.App.SqlHelper.ExecuteDataTable("usp_GetMedicalRrecordViewFrm",
        //             new SqlParameter[] { new SqlParameter("@GetType", "4") }, CommandType.StoredProcedure);

        //        Name.Columns["ID"].Caption = "病人编号";
        //        Name.Columns["NAME"].Caption = "病人姓名";

        //        Dictionary<string, int> cols = new Dictionary<string, int>();

        //        cols.Add("ID", 60);
        //        cols.Add("NAME", 90);

        //        SqlWordbook nameWordBook = new SqlWordbook("queryname", Name, "ID", "NAME", cols, "ID//NAME//PY//WB");
        //        this.txt_patiName.SqlWordbook = nameWordBook;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw new Exception(ex.Message);
        //    }
        //}

        /// <summary>
        /// 初始化住院号
        /// </summary>
        //private void IntiRecordID()
        //{
        //    try
        //    {
        //        this.lookUpWindowRecordID.SqlHelper = SqlUtil.App.SqlHelper;

        //        DataTable RecordID = SqlUtil.App.SqlHelper.ExecuteDataTable("usp_GetMedicalRrecordViewFrm",
        //             new SqlParameter[] { new SqlParameter("@GetType", "5") }, CommandType.StoredProcedure);

        //        RecordID.Columns["ID"].Caption = "住院号";

        //        Dictionary<string, int> cols = new Dictionary<string, int>();

        //        cols.Add("ID", 120);

        //        SqlWordbook recordIDWordBook = new SqlWordbook("queryrecordid", RecordID, "ID", "ID", cols, "ID");
        //        this.txt_recordID.SqlWordbook = recordIDWordBook;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw new Exception(ex.Message);
        //    }
        //}
        #endregion

        /// <summary>
        /// 初始化诊断
        /// </summary>
        private void InitDiag()
        {
            try
            {
                ComponentCommand.InitializeDiagnosis(ref this.lookUpEditorInDiag, ref this.lookUpWindowInDiag);
                ComponentCommand.InitializeDiagnosis(ref this.lookUpEditorOutDiag, ref this.lookUpWindowOutDiag);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Ejemplo n.º 12
0
 private void MedicalRecordApprovedList_Load(object sender, EventArgs e)
 {
     try
     {
         InitializeParameters();
         InitializeGrid();
         DrectSoft.Common.DS_Common.CancelMenu(this.panelHead, contextMenuStrip1);
         ComponentCommand.InitializeDepartment(ref this.lookUpEditorDepartment, ref this.lookUpWindowDepartment);
         this.txtDoctor.Focus();
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Ejemplo n.º 13
0
 private void MedicalRecordCfg_Load(object sender, EventArgs e)
 {
     try
     {
         this.txtDelay.Text      = ComponentCommand.GetDealyMaxTime().ToString();
         this.txtDelayTimes.Text = ComponentCommand.GetDealyTimes().ToString();
         this.txtReadAmount.Text = ComponentCommand.GetApplyLimit().ToString();
         this.txtReadTime.Text   = ComponentCommand.GetReadTime().ToString();
         this.txtRemind.Text     = ComponentCommand.GetRemindTime().ToString();
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 14
0
        private void InitializeButtonStatus()
        {
            try
            {
                int lockstatus = ComponentCommand.GetLockStatusValue(this.cbxLockStatus.Text);

                if (lockstatus == 4700)
                {//未完成
                    this.btnCompelete.Enabled = true;
                    this.btnCancleCom.Enabled = false;
                    this.btnQc.Enabled        = false;
                    this.btnCancleQC.Enabled  = false;

                    this.btnCommit.Enabled = false;
                }
                else if (lockstatus == 4704)
                {//已完成
                    this.btnCompelete.Enabled = false;
                    this.btnCancleCom.Enabled = true;
                    // this.btnQc.Enabled = true;
                    this.btnCancleQC.Enabled = false;

                    this.btnCommit.Enabled = false;
                }
                else if (lockstatus == 4705)
                {//撤销归档
                    this.btnCompelete.Enabled = false;
                    this.btnCancleCom.Enabled = false;;
                    //this.btnQc.Enabled = false;
                    this.btnCancleQC.Enabled = true;

                    this.btnCommit.Enabled = true;
                }
                else
                {
                    this.btnCompelete.Enabled = false;
                    this.btnCancleCom.Enabled = false;
                    this.btnQc.Enabled        = false;
                    this.btnCancleQC.Enabled  = false;

                    this.btnCommit.Enabled = false;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 根据条件查询
        /// </summary>
        private void LoadDataByTerm()
        {
            try
            {
                if (this.dateLeaveStart.DateTime > this.dateLeaveEnd.DateTime)
                {
                    MessageBox.Show("入院起始日期不能大于结束日期", "信息提示");
                    this.dateLeaveStart.Focus();
                    return;
                }
                int    lockstatus = ComponentCommand.GetLockStatusValue(this.cbxLockStatus.Text);
                string initsql    = @"select OUTBED,patid,name,noofinpat,outhosdept,admitdept,islock from inpatient where status in (1502,1503) and islock='" + lockstatus + "'   ";
                //xll 未归档的应包括4700和null的值 2013-08-06
                if (lockstatus == 4700)
                {
                    initsql = @"select OUTBED, patid, name, noofinpat, outhosdept, admitdept, islock from inpatient where status in (1502, 1503) and( islock = '4700' or islock is null) ";
                }
                if (!string.IsNullOrEmpty(this.lookUpEditorDepartment.CodeValue))
                {
                    initsql += string.Format(" and outhosdept='{0}' ", this.lookUpEditorDepartment.CodeValue);
                }
                if (!string.IsNullOrEmpty(txtName.Text))
                {
                    initsql += string.Format(" and name like '%{0}%'", txtName.Text.ToString().Trim());
                }
                if (this.dateLeaveStart.Text.Trim() != null && this.dateLeaveStart.Text.Trim() != "")
                {
                    string ds = this.dateLeaveStart.DateTime.ToString("yyyy-MM-dd 00:00:00");
                    string de = this.dateLeaveEnd.DateTime.ToString("yyyy-MM-dd 23:59:59");
                    initsql += string.Format(" and OUTHOSDATE<= '{0}' and OUTHOSDATE>='{1}'", de, ds);
                }

                //新增住院号查询 add by ywk 2013年8月14日 10:00:27
                if (!string.IsNullOrEmpty(txtpatid.Text.ToString().Trim()))
                {
                    initsql += string.Format(" and patid like '%{0}%'", txtpatid.Text.ToString().Trim());
                }

                initsql += "order by name";
                DataTable dt = DS_SqlHelper.ExecuteDataTable(initsql, CommandType.Text);
                this.gcInpatient.DataSource = dt;
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("错误信息!" + ex.Message);
                return;
            }
        }
Ejemplo n.º 16
0
 /// <summary>
 ///
 /// </summary>
 public MedicalRecordBrowseForm()
 {
     try
     {
         InitializeComponent();
         InitializeParameter();
         m_sUser      = ComponentCommand.GetCurrentDoctor();//获取登录用户信息
         m_listObject = new List <object>();
         m_listObject.Clear();
         InitUserControl();
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 17
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void Init()
 {
     try
     {
         date_InHosBegin.DateTime  = DateTime.Now.AddMonths(-1);
         date_InHosEnd.DateTime    = DateTime.Now;
         date_OutHosBegin.DateTime = DateTime.Now.AddMonths(-1);
         date_OutHosEnd.DateTime   = DateTime.Now;
         ComponentCommand.InitializeDepartment(ref this.lookUpEditorDepartment, ref this.lookUpWindowDepartment);
         lookUpEditorDepartment.CodeValue = DS_Common.currentUser.CurrentDeptId;
         ///初始化显示项(默认为姓名索引卡)
         InitOptions();
         txt_Patid.Focus();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 窗体加载事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MedicalRecordList_Load(object sender, EventArgs e)
 {
     try
     {
         InitializeParameters();
         InitializeGrid();
         DrectSoft.Common.DS_Common.CancelMenu(this.panelHead, contextMenuStrip1);
         ComponentCommand.InitializeDepartment(ref this.lookUpEditorDepartment, ref this.lookUpWindowDepartment);
         ComponentCommand.InitializeDiagnosis(ref this.lookUpEditorDiagnosis, ref this.lookUpWindowDoctor);
         ComponentCommand.InitializeOperation(ref this.lookUpEditorOperation, ref this.lookUpWindowOperation);
         //this.lookUpWindowLock
         //  ComponentCommand.InitializeDoctor(ref this.lookUpEditorDoctor, ref this.lookUpWindowDoctor);
         //add by ck 2013-8-26
         this.txtName.Focus();
         this.rdbtnOutPat.Checked = true;//默认勾中出院的
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Ejemplo n.º 19
0
 public MedicalRecordApply()
 {
     try
     {
         InitializeComponent();
         InitializeParameters();
         InitializeGrid();
         m_readMaxTime   = ComponentCommand.GetReadTime();
         m_readMax       = ComponentCommand.GetApplyLimit();
         labelLimit.Text = "注:最大不超过 " + m_readMaxTime + "天;" + "批次申请选择记录数不超过" + m_readMax + "条";
         this.txtTimes.Properties.MaxValue = m_readMaxTime;
         m_sUser = ComponentCommand.GetCurrentDoctor();
         ComponentCommand.InitializeDepartment(ref this.lookUpEditorDepartment, ref this.lookUpWindowDepartment);
         ComponentCommand.InitializeDiagnosis(ref this.lookUpEditorDiagnosis, ref this.lookUpWindowDiagnosis);
         //ComponentCommand.InitializePurpose(ref this.lookUpEditorPurpose, ref this.lookUpWindowPurpose);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 20
0
 //验证是否还允许延期申请
 private bool CanDoDelay()
 {
     try
     {
         //InitializeApplyList();
         if (this.m_listObject.Count > 0)
         {
             CApplyObject obj   = (CApplyObject)m_listObject[0];
             int          times = ComponentCommand.GetDealyTimes();
             return(CApplyObject.IsCanDelay(obj, times) > 0);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 21
0
        public MedicalRecordApply(IEmrHost app)
        {
            try
            {
                InitializeComponent();
                InitializeParameters();
                InitializeGrid();
                m_readMaxTime   = ComponentCommand.GetReadTime();
                m_readMax       = ComponentCommand.GetApplyLimit();
                labelLimit.Text = "天(*)最大不超过: " + m_readMaxTime + "天;" + "批次申请选择记录数不超过:" + m_readMax + "条";
                m_sUser         = ComponentCommand.GetCurrentDoctor();
                SqlUtil.App     = app;
                ComponentCommand.InitializeDepartment(ref this.lookUpEditorDepartment, ref this.lookUpWindowDepartment);
                ComponentCommand.InitializeDiagnosis(ref this.lookUpEditorDiagnosis, ref this.lookUpWindowDiagnosis);

                // ComponentCommand.InitializePurpose(ref this.lookUpEditorPurpose, ref this.lookUpWindowPurpose);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 查询加载数据方法
        /// Modify by xlb 2013-05-30
        /// </summary>
        private void LoadData()
        {
            try
            {
                //add by 2013-6-14   xll
                string valueStr = DrectSoft.Service.DS_SqlService.GetConfigValueByKey("AutoScoreMainpage");
                string sql      = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_BORROW_SQL;
                if (valueStr.ToLower().Contains("iem_mainpage_diagnosis_sx"))
                {
                    sql = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_BORROW_SQL_ZY;
                }

                List <DbParameter> sqlParams = new List <DbParameter>();
                if (this.txtDoctor.Text.Trim() != null && this.txtDoctor.Text.Trim() != "")
                {
                    sql = sql + " and i.applyname like @doc ";
                    SqlParameter param1 = new SqlParameter("@doc", SqlDbType.VarChar);
                    param1.Value = "%" + this.txtDoctor.Text.Trim() + "%";
                    sqlParams.Add(param1);
                }
                if (this.txtName.Text.Trim() != null && this.txtName.Text.Trim() != "")
                {
                    sql = sql + " and i.name like @name ";
                    SqlParameter param2 = new SqlParameter("@name", SqlDbType.VarChar);
                    param2.Value = "%" + this.txtName.Text.Trim() + "%";
                    sqlParams.Add(param2);
                }
                if (this.txtNumber.Text.Trim() != null && this.txtNumber.Text.Trim() != "")
                {
                    sql = sql + " and i.patid like '%'||@patId||'%' ";
                    SqlParameter param3 = new SqlParameter("@patId", SqlDbType.VarChar);
                    param3.Value = this.txtNumber.Text.Trim();
                    sqlParams.Add(param3);
                }

                if (this.lookUpEditorDepartment.Text != null && this.lookUpEditorDepartment.Text.Trim() != "")
                {
                    if (lookUpEditorDepartment.CodeValue != "0000")
                    {
                        sql = sql + " and i.outhosdept = @dept";
                        SqlParameter param4 = new SqlParameter("@dept", SqlDbType.VarChar);
                        param4.Value = lookUpEditorDepartment.CodeValue;
                        sqlParams.Add(param4);
                    }
                }

                if (this.dateStart.Text.Trim() != null && this.dateStart.Text.Trim() != "")
                {
                    string ds = this.dateStart.DateTime.ToString("yyyy-MM-dd 00:00:00");
                    sql = sql + " and  to_char(i.applydate,'yyyy-mm-dd hh24:mi:ss') >= @ds";
                    SqlParameter param5 = new SqlParameter("@ds", SqlDbType.VarChar);
                    param5.Value = ds;
                    sqlParams.Add(param5);
                }
                if (this.dateEnd.Text.Trim() != null && this.dateEnd.Text.Trim() != "")
                {
                    string de = this.dateEnd.DateTime.ToString("yyyy-MM-dd 23:59:59");
                    sql = sql + " and  to_char(i.applydate,'yyyy-mm-dd hh24:mi:ss') <= @de";
                    SqlParameter param6 = new SqlParameter("@de", SqlDbType.VarChar);
                    param6.Value = de;
                    sqlParams.Add(param6);
                }
                if (this.cbxStatus.Text != "")
                {
                    sql = sql + " and  i.status = @st";
                    SqlParameter param7 = new SqlParameter("@st", SqlDbType.VarChar);
                    param7.Value = ComponentCommand.GetStatusValue(this.cbxStatus.Text);
                    sqlParams.Add(param7);
                }
                DataTable dataTable = DrectSoft.DSSqlHelper.DS_SqlHelper.ExecuteDataTable(sql, sqlParams, CommandType.Text);
                //压缩数据源生成新的数据源
                //压缩DateSet中的记录,将住院诊断信息合并
                ComponentCommand.ImpressDataSet(ref dataTable, "id", "cyzd");
                //
                ComponentCommand.InitializeStatusInfo(ref dataTable);
                string ResultName = string.Empty;//声明最终要在列表显示的姓名的内容
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    ResultName = SqlUtil.GetPatsBabyContent(SqlUtil.App, dataTable.Rows[i]["noofinpat"].ToString());
                    dataTable.Rows[i]["Name"] = ResultName;
                    if (dataTable.Rows[i]["isbaby"].ToString() == "1")
                    {
                        dataTable.Rows[i]["PATID"] = SqlUtil.GetPatsBabyMother(dataTable.Rows[i]["mother"].ToString());
                    }
                }
                this.dbGrid.DataSource = dataTable;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 23
0
        public void GetInitDB(bool IsUpdate)
        {
            if (IsUpdate)
            {
                //add by zjy 2013-6-14
                string valueStr = DrectSoft.Service.DS_SqlService.GetConfigValueByKey("AutoScoreMainpage");
                string sql      = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_BORROW_SQL;
                if (valueStr.ToLower().Contains("iem_mainpage_diagnosis_sx"))
                {
                    sql = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_BORROW_SQL_ZY;
                }

                //string sql = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_BORROW_SQL;
                List <DbParameter> sqlParams = new List <DbParameter>();

                sql = sql + " and i.applydocid = @doc";
                SqlParameter param1 = new SqlParameter("@doc", SqlDbType.VarChar);
                param1.Value = m_sUser;
                sqlParams.Add(param1);
                if (this.dateStart.Text.Trim() != null && this.dateStart.Text.Trim() != "")
                {
                    string ds = this.dateStart.DateTime.ToString("yyyy-MM-dd");
                    sql = sql + " and  to_char(i.applydate,'yyyy-mm-dd') >= @ds";
                    SqlParameter param2 = new SqlParameter("@ds", SqlDbType.VarChar);
                    param2.Value = ds;
                    sqlParams.Add(param2);
                }
                if (this.dateEnd.Text.Trim() != null && this.dateEnd.Text.Trim() != "")
                {
                    string de = this.dateEnd.DateTime.ToString("yyyy-MM-dd");
                    sql = sql + " and  to_char(i.applydate,'yyyy-mm-dd') <= @de";
                    SqlParameter param3 = new SqlParameter("@de", SqlDbType.VarChar);
                    param3.Value = de;
                    sqlParams.Add(param3);
                }
                if (TypeNumber >= 0)
                {
                    sql = sql + " and i.status = @st";
                    SqlParameter param4 = new SqlParameter("@st", SqlDbType.Int);
                    param4.Value = TypeNumber;
                    sqlParams.Add(param4);
                }
                DataTable dataTable = DrectSoft.DSSqlHelper.DS_SqlHelper.ExecuteDataTable(sql, sqlParams, CommandType.Text);
                //压缩DateSet中的记录,将住院诊断信息合并
                ComponentCommand.ImpressDataSet(ref dataTable, "id", "cyzd");
                //填入状态值
                ComponentCommand.InitializeStatusInfo(ref dataTable);
                //控制状态显示和预警信息显示颜色显示


                User_Table = dataTable;
            }
            this.dbGrid.DataSource = User_Table;
            if (TypeIndex == 4)
            {
                this.dbGridView.Columns["STATUSDES"].Visible = true;
            }
            else
            {
                this.dbGridView.Columns["STATUSDES"].Visible = false;
            }



            //审核日期
            if (TypeIndex == 4 || TypeIndex == 1 || TypeIndex == 3)
            {
                this.dbGridView.Columns["SHSJ"].Visible = true;
            }
            else
            {
                this.dbGridView.Columns["SHSJ"].Visible = false;
            }
        }
Ejemplo n.º 24
0
 public MedicalRecordBrowse()
 {
     InitializeComponent();
     m_sUser = ComponentCommand.GetCurrentDoctor();//获取登录用户信息
     Init();
 }
Ejemplo n.º 25
0
        /// <summary>
        /// 出院病人查询方法
        /// </summary>
        /// <param name="valueStr"></param>
        private void GoSerachOutHosPatInfo(string valueStr)
        {
            try
            {
                string sql = MedicalRecordManage.Object.DaoCommand._SELECT_MEDICAL_RECORD_INPATIENT_LONG;
                if (valueStr.ToLower().Contains("iem_mainpage_diagnosis_sx"))
                {
                    sql = DaoCommand._SELECT_MEDICAL_RECORD_INPATIENT_LONG_ZY;
                }
                List <DbParameter> sqlParams = new List <DbParameter>();
                if (this.txtName.Text.Trim() != null && this.txtName.Text.Trim() != "")
                {
                    sql = sql + " and i.name like '%'||@name||'%' ";
                    SqlParameter param1 = new SqlParameter("@name", SqlDbType.VarChar);
                    param1.Value = this.txtName.Text.Trim();
                    sqlParams.Add(param1);
                }
                if (this.txtNumber.Text.Trim() != null && this.txtNumber.Text.Trim() != "")
                {
                    sql = sql + " and i.patid like '%'||@patId||'%'";
                    SqlParameter param2 = new SqlParameter("@patId", SqlDbType.VarChar);
                    param2.Value = this.txtNumber.Text.Trim();
                    sqlParams.Add(param2);
                }

                if (this.lookUpEditorDepartment.Text != null && this.lookUpEditorDepartment.Text.Trim() != "")
                {
                    if (lookUpEditorDepartment.CodeValue != "0000")
                    {
                        sql = sql + " and i.outhosdept = @code ";
                        SqlParameter param5 = new SqlParameter("@code", SqlDbType.VarChar);
                        param5.Value = lookUpEditorDepartment.CodeValue;
                        sqlParams.Add(param5);
                    }
                }

                //add by ck 2013-8-26
                if (this.lookUpEditorDoctor.Text != null && this.lookUpEditorDoctor.Text.Trim() != "")
                {
                    sql = sql + " and i.resident = @inpatientID";
                    SqlParameter param4 = new SqlParameter("@inpatientID", SqlDbType.VarChar);
                    param4.Value = lookUpEditorDoctor.CodeValue;
                    sqlParams.Add(param4);
                }//主治医生

                if (this.dateAdmitStart.Text.Trim() != null && this.dateAdmitStart.Text.Trim() != "")
                {
                    string ds = this.dateAdmitStart.DateTime.ToString("yyyy-MM-dd 00:00:00");//开始时间默认当天的0点
                    sql = sql + " and i.admitdate >= @ds ";
                    SqlParameter param6 = new SqlParameter("@ds", SqlDbType.VarChar);
                    param6.Value = ds;
                    sqlParams.Add(param6);
                }
                if (this.dateAdmitEnd.Text.Trim() != null && this.dateAdmitEnd.Text.Trim() != "")
                {
                    string de = this.dateAdmitEnd.DateTime.ToString("yyyy-MM-dd 23:59:59");//结束时间默认当天23:59:59
                    sql = sql + " and i.admitdate <= @de ";
                    SqlParameter param7 = new SqlParameter("@de", SqlDbType.VarChar);
                    param7.Value = de;
                    sqlParams.Add(param7);
                }
                if (this.dateLeaveStart.Text.Trim() != null && this.dateLeaveStart.Text.Trim() != "")
                {
                    string ds = this.dateLeaveStart.DateTime.ToString("yyyy-MM-dd 00:00:00");
                    sql = sql + " and i.outhosdate >= @dss";
                    SqlParameter param8 = new SqlParameter("@dss", SqlDbType.VarChar);
                    param8.Value = ds;
                    sqlParams.Add(param8);
                }
                if (this.dateLeaveEnd.Text.Trim() != null && this.dateLeaveEnd.Text.Trim() != "")
                {
                    string de = this.dateLeaveEnd.DateTime.ToString("yyyy-MM-dd 23:59:59");
                    sql = sql + " and i.outhosdate <= @dee";
                    SqlParameter param9 = new SqlParameter("@dee", SqlDbType.VarChar);
                    param9.Value = de;
                    sqlParams.Add(param9);
                }
                if (this.cbxLockStatus.Text.Trim() != null && this.cbxLockStatus.Text.Trim() != "")
                {
                    int lockstatus = ComponentCommand.GetLockStatusValue(this.cbxLockStatus.Text);

                    if (lockstatus == 4700)
                    {
                        sql = sql + " and (i.islock = @lockstatus  OR  i.islock is null)";
                    }
                    else
                    {
                        sql = sql + " and (i.islock = @lockstatus or @lockstatus =0) ";
                    }
                    SqlParameter param10 = new SqlParameter("@lockstatus", SqlDbType.VarChar);

                    param10.Value = lockstatus;

                    sqlParams.Add(param10);
                }
                DataTable dataTable = DrectSoft.DSSqlHelper.DS_SqlHelper.ExecuteDataTable(sql, sqlParams, CommandType.Text);
                //压缩数据源生成新的数据源
                //压缩DateSet中的记录,将住院诊断信息合并
                ComponentCommand.ImpressDataSet(ref dataTable, "noofinpat", "cyzd", "operation_name");
                //add by zjy 2013-6-17
                string wheresql = "1=1 ";
                if (this.lookUpEditorDiagnosis.Text.Trim() != null && this.lookUpEditorDiagnosis.Text.Trim() != "")
                {
                    wheresql = wheresql + " and cyzd like '%" + this.lookUpEditorDiagnosis.Text.Trim() + "%'";
                }
                if (this.lookUpEditorOperation.Text.Trim() != null && this.lookUpEditorOperation.Text.Trim() != "")
                {
                    wheresql = wheresql + " and operation_name like '%" + this.lookUpEditorOperation.Text.Trim().Trim() + "%'";
                }

                DataRow[] dr = dataTable.Select(wheresql);
                if (dr != null && dr.Length > 0)
                {
                    DataTable tableRecord = ToDataTable(dr);
                    string    ResultName  = string.Empty;//声明最终要在列表显示的姓名的内容
                    for (int i = 0; i < tableRecord.Rows.Count; i++)
                    {
                        ResultName = SqlUtil.GetPatsBabyContent(SqlUtil.App, tableRecord.Rows[i]["noofinpat"].ToString());
                        tableRecord.Rows[i]["Name"] = ResultName;
                        if (tableRecord.Rows[i]["isbaby"].ToString() == "1")
                        {
                            tableRecord.Rows[i]["PATID"] = SqlUtil.GetPatsBabyMother(dataTable.Rows[i]["mother"].ToString());
                        }
                    }
                    //绑定控件
                    this.dbGrid.DataSource = tableRecord;
                    lblTip.Text            = "共" + tableRecord.Rows.Count.ToString() + "条";
                }
                else
                {
                    this.dbGrid.DataSource = null;
                    lblTip.Text            = "共0条";
                }
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Modify by xlb 2013-05-29
        /// 解决同一天数据检索不出问题
        /// <auth> Modify by xlb</auth>
        /// <date>2013-05-29</date>
        /// </summary>
        private void LoadData()
        {
            try
            {
                string valueStr = DrectSoft.Service.DS_SqlService.GetConfigValueByKey("AutoScoreMainpage");
                string sql      = DaoCommand._SELECT_MEDICAL_RECORD_INPATIENT_SHORT;
                if (valueStr.ToLower().Contains("iem_mainpage_diagnosis_sx"))
                {
                    sql = DaoCommand._SELECT_MEDICAL_RECORD_INPATIENT_SHORT_ZY;
                }



                //设置过滤条件,本用户已经申请的不再查询出结果
                sql = sql + "  and i.noofinpat not in ( " +
                      " select w.noofinpat from emr_recordborrow w " +
                      " where w.status < 3 and w.applydocid = " + "'" + m_sUser + "') ";

                /*
                 * 输入参数
                 */
                List <DbParameter> sqlParams = new List <DbParameter>();
                if (this.txtName.Text.Trim() != null && this.txtName.Text.Trim() != "")
                {
                    sql = sql + " and i.name like @name ";
                    SqlParameter param1 = new SqlParameter("@name", SqlDbType.VarChar);
                    param1.Value = "%" + this.txtName.Text.Trim() + "%";
                    sqlParams.Add(param1);
                }
                if (this.txtNumber.Text.Trim() != null && this.txtNumber.Text.Trim() != "")
                {
                    sql = sql + " and i.patid like '%'||@patId||'%' ";
                    SqlParameter param2 = new SqlParameter("@patId", SqlDbType.VarChar);
                    param2.Value = this.txtNumber.Text.Trim();
                    sqlParams.Add(param2);
                }
                //if (this.lookUpEditorDiagnosis.Text.Trim() != null && this.lookUpEditorDiagnosis.Text.Trim() != "")
                //{
                //    sql = sql + " and i.cyzd like @cyzd ";
                //    SqlParameter param3 = new SqlParameter("@cyzd", SqlDbType.VarChar);
                //    param3.Value = "%" + this.lookUpEditorDiagnosis.Text.Trim() + "%";
                //    sqlParams.Add(param3);
                //}
                if (this.lookUpEditorDepartment.Text != null && this.lookUpEditorDepartment.Text.Trim() != "")
                {
                    if (lookUpEditorDepartment.CodeValue != "0000")
                    {
                        sql = sql + " and i.outhosdept = @dept";
                        SqlParameter param4 = new SqlParameter("@dept", SqlDbType.VarChar);
                        param4.Value = lookUpEditorDepartment.CodeValue;
                        sqlParams.Add(param4);
                    }
                }
                if (this.dateLeaveStart.Text.Trim() != null && this.dateLeaveStart.Text.Trim() != "")
                {
                    string ds = this.dateLeaveStart.DateTime.ToString("yyyy-MM-dd  00:00:00");
                    sql = sql + " and i.outhosdate >= @ds";
                    SqlParameter param5 = new SqlParameter("@ds", SqlDbType.VarChar);
                    param5.Value = ds;
                    sqlParams.Add(param5);
                }
                if (this.dateLeaveEnd.Text.Trim() != null && this.dateLeaveEnd.Text.Trim() != "")
                {
                    string de = this.dateLeaveEnd.DateTime.ToString("yyyy-MM-dd 23:59:59");
                    sql = sql + " and i.outhosdate <= @de";
                    SqlParameter param6 = new SqlParameter("@de", SqlDbType.VarChar);
                    param6.Value = de;
                    sqlParams.Add(param6);
                }
                DataTable dataTable = DrectSoft.DSSqlHelper.DS_SqlHelper.ExecuteDataTable(sql, sqlParams, CommandType.Text);
                //压缩数据源生成新的数据源
                //压缩DateSet中的记录,将住院诊断信息合并
                ComponentCommand.ImpressDataSet(ref dataTable, "noofinpat", "cyzd");
                string wheresql = "1=1 ";
                if (this.lookUpEditorDiagnosis.Text.Trim() != null && this.lookUpEditorDiagnosis.Text.Trim() != "")
                {
                    wheresql = wheresql + " and CYZD like '%" + this.lookUpEditorDiagnosis.Text.Trim() + "%'";
                }


                DataRow[] dr = dataTable.Select(wheresql);



                this.dbGrid.DataSource = ToDataTable(dr);
            }
            catch (Exception)
            {
                throw;
            }
        }