Пример #1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            this.colPatientName.Visible = true;
            this.dataGridView1.Rows.Clear();
            string dept = string.Empty;

            if (this.cboDept.SelectedItem != null)
            {
                MDSDBLib.DeptInfo deptInfo = this.cboDept.SelectedItem as MDSDBLib.DeptInfo;
                dept = deptInfo.DeptCode;
            }
            if (string.IsNullOrEmpty(dept))
            {
                return;
            }

            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在检查病历时效,请稍候...");
            this.Update();

            DateTime dtBegin = SystemConfig.Instance.Get(SystemData.ConfigKey.DEPT_DEFAULT_ADMISSION_BEGIN, DateTime.MinValue);
            DateTime dtEnd   = SystemConfig.Instance.Get(SystemData.ConfigKey.DEPT_DEFAULT_ADMISSION_END, DateTime.MaxValue);

            List <EMRDBLib.PatVisitInfo> lstPatVisitLogs = new List <EMRDBLib.PatVisitInfo>();

            PatVisitAccess.Instance.GetPatVisitList(dept, EMRDBLib.PatientType.PatInHosptial, dtBegin, dtEnd, ref lstPatVisitLogs);

            List <TimeCheckResult> lstCheckResults = new List <TimeCheckResult>();
            TimeCheckQuery         timeCheckQuery  = new TimeCheckQuery();

            foreach (EMRDBLib.PatVisitInfo log in lstPatVisitLogs)
            {
                timeCheckQuery.PatientID   = log.PATIENT_ID;
                timeCheckQuery.PatientName = log.PATIENT_NAME;
                // timeCheckQuery.VisitID = log.VISIT_ID;
                //timeCheckQuery.VisitID = SystemParam.Instance.PatVisitLog.VISIT_ID;
                //编辑器VISIT_NO=VISIT_ID
                timeCheckQuery.VisitID = log.VISIT_NO;
                TimeCheckEngine.Instance.PerformTimeCheck(timeCheckQuery);
                lstCheckResults.AddRange(TimeCheckEngine.Instance.TimeCheckResults);
            }
            lstCheckResults.Sort(new Comparison <TimeCheckResult>(this.Compare));


            if (lstCheckResults == null)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                this.ShowStatusMessage(null);
                return;
            }
            SetGridData(lstCheckResults);
        }
Пример #2
0
        /// <summary>
        /// 加载QC时效检查记录
        /// </summary>
        private void LoadTimeCheckResult()
        {
            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在检查病历时效,请稍候...");
            this.Update();

            TimeCheckQuery timeCheckQuery = new TimeCheckQuery();

            if (SystemParam.Instance.PatVisitInfo != null)
            {
                timeCheckQuery.PatientID   = SystemParam.Instance.PatVisitInfo.PATIENT_ID;
                timeCheckQuery.PatientName = SystemParam.Instance.PatVisitInfo.PATIENT_NAME;
                //timeCheckQuery.VisitID = SystemParam.Instance.PatVisitLog.VISIT_ID;
                //编辑器VISIT_NO=VISIT_ID
                timeCheckQuery.VisitID     = SystemParam.Instance.PatVisitInfo.VISIT_NO;
                timeCheckQuery.VisitNO     = SystemParam.Instance.PatVisitInfo.VISIT_NO;
                timeCheckQuery.DoctorLevel = "1";//默认只检查经治医生提交情况
            }
            if (this.cboDept.SelectedItem != null)
            {
                MDSDBLib.DeptInfo dept = this.cboDept.SelectedItem as MDSDBLib.DeptInfo;
                timeCheckQuery.DeptCode = dept.DeptCode;
            }
            try
            {
                TimeCheckEngine.Instance.PerformTimeCheck(timeCheckQuery);
            }
            catch (Exception ex)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                LogManager.Instance.WriteLog("DocumentTimeForm.OnRefreshView", ex);
                return;
            }

            List <TimeCheckResult> lstCheckResults = TimeCheckEngine.Instance.TimeCheckResults;

            lstCheckResults.Sort(new Comparison <TimeCheckResult>(this.Compare));
            if (lstCheckResults == null)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                this.ShowStatusMessage(null);
                return;
            }
            this.colPatientName.Visible = false;
            SetGridData(lstCheckResults);
        }