Пример #1
0
        public QcCheckResult ToQcCheckResult()
        {
            QcCheckResult qcCheckResult = new QcCheckResult();

            qcCheckResult.BUG_CLASS          = 1;
            qcCheckResult.CHECKER_ID         = this.ISSUED_ID;
            qcCheckResult.CHECKER_NAME       = this.ISSUED_BY;
            qcCheckResult.CHECK_DATE         = this.ISSUED_DATE_TIME;
            qcCheckResult.CREATE_ID          = this.CREATOR_ID;
            qcCheckResult.CREATE_NAME        = this.DOCTOR_IN_CHARGE;
            qcCheckResult.DEPT_CODE          = this.DEPT_STAYED;
            qcCheckResult.DEPT_IN_CHARGE     = this.DEPT_NAME;
            qcCheckResult.DOCTYPE_ID         = string.Empty;
            qcCheckResult.DOC_SETID          = this.TOPIC_ID;
            qcCheckResult.DOC_TIME           = this.DefaultTime;
            qcCheckResult.DOC_TITLE          = this.TOPIC;
            qcCheckResult.ERROR_COUNT        = 1;
            qcCheckResult.INCHARGE_DOCTOR    = this.DOCTOR_IN_CHARGE;
            qcCheckResult.INCHARGE_DOCTOR_ID = this.DOCTOR_IN_CHARGE_ID;
            qcCheckResult.ISVETO             = false;
            qcCheckResult.MODIFY_TIME        = this.DefaultTime;
            qcCheckResult.MR_STATUS          = "O";
            qcCheckResult.MSG_DICT_CODE      = this.QC_MSG_CODE;
            qcCheckResult.MSG_DICT_MESSAGE   = this.MESSAGE;
            qcCheckResult.MSG_ID             = this.MSG_ID;
            qcCheckResult.PATIENT_ID         = this.PATIENT_ID;
            qcCheckResult.PATIENT_NAME       = this.PATIENT_NAME;
            qcCheckResult.QA_EVENT_TYPE      = this.QA_EVENT_TYPE;
            qcCheckResult.QC_RESULT          = 0;
            qcCheckResult.SCORE     = this.POINT;
            qcCheckResult.STAT_TYPE = 1;
            qcCheckResult.VISIT_ID  = this.VISIT_ID;
            qcCheckResult.VISIT_NO  = this.VISIT_NO;
            return(qcCheckResult);
        }
Пример #2
0
        /// <summary>
        /// 装载时效记录信息
        /// </summary>
        private void LoadQcCheckResult(List <EMRDBLib.QcCheckResult> lstQcCheckResult)
        {
            this.dataGridView1.Rows.Clear();
            if (lstQcCheckResult == null || lstQcCheckResult.Count <= 0)
            {
                return;
            }
            WorkProcess.Instance.Initialize(this, lstQcCheckResult.Count
                                            , string.Format("正在加载,请稍候..."));
            string szDeptCode    = string.Empty;
            string szDoctor      = string.Empty;
            string szPatientID   = string.Empty;
            string szVisitID     = string.Empty;
            string szQaEventType = string.Empty;

            for (int index = 0; index < lstQcCheckResult.Count; index++)
            {
                WorkProcess.Instance.Show(string.Format("加载到{0},请稍候...", index.ToString()), index);

                EMRDBLib.QcCheckResult record = lstQcCheckResult[index];
                int             nRowIndex     = this.dataGridView1.Rows.Add();
                DataGridViewRow row           = this.dataGridView1.Rows[nRowIndex];
                row.Tag = record;
                row.Cells[this.colDeptName.Index].Value       = record.DEPT_IN_CHARGE;
                row.Cells[this.colDoctorInCharge.Index].Value = record.INCHARGE_DOCTOR;
                row.Cells[this.colPatientName.Index].Value    = record.PATIENT_NAME;
                row.Cells[this.colPatientID.Index].Value      = record.PATIENT_ID;
                row.Cells[this.colVisitID.Index].Value        = record.VISIT_ID;
                row.Cells[this.colVisitID.Index].Value        = "1";
                row.Cells[this.colQaEventType.Index].Value    = record.QA_EVENT_TYPE;
                row.Cells[this.colDocTitle.Index].Value       = record.DOC_TITLE;
                row.Cells[this.colCreateName.Index].Value     = record.CREATE_NAME;
                row.Cells[this.colPoint.Index].Value          = record.SCORE;
                row.Cells[this.colErrorCount.Index].Value     = record.ERROR_COUNT;
                if (record.DOC_TIME != record.DefaultTime)
                {
                    row.Cells[this.colCreateTime.Index].Value = record.DOC_TIME.ToString("yyyy-MM-dd HH:mm");
                }
                row.Cells[this.colCheckDate.Index].Value      = record.CHECK_DATE.ToString("yyyy-MM-dd HH:mm");
                row.Cells[this.colQcExplain.Index].Value      = record.QC_EXPLAIN;
                row.Cells[this.colQcResult.Index].Value       = record.QC_RESULT == 1 ? "通过" : "不通过";
                row.Cells[this.colMsgDictMessage.Index].Value = record.MSG_DICT_MESSAGE;
            }
            WorkProcess.Instance.Close();
            string szMessage = string.Format("共找到{0}条记录", lstQcCheckResult.Count.ToString());

            this.ShowStatusMessage(szMessage);
        }
Пример #3
0
        private bool SaveQcCheckResult(DataGridViewRow row)
        {
            short     shRet     = SystemData.ReturnValue.OK;
            QcMsgDict qcMsgDict = row.Tag as QcMsgDict;

            if (qcMsgDict == null ||
                string.IsNullOrEmpty(qcMsgDict.MESSAGE))
            {
                return(false);
            }
            if (this.m_lstQcCheckResult == null)
            {
                this.m_lstQcCheckResult = new List <QcCheckResult>();
            }
            QcCheckResult qcCheckResult = this.m_lstQcCheckResult.Where(m => m.MSG_DICT_CODE == qcMsgDict.QC_MSG_CODE).FirstOrDefault();

            if (row.Cells[this.colCheckBox.Index].Value == null)
            {
                return(false);
            }
            bool isCheck = bool.Parse(row.Cells[this.colCheckBox.Index].Value.ToString());

            //如果扣分项未勾选并且系统已经有扣分记录,则删除
            if (!isCheck && qcCheckResult != null)
            {
                shRet = QcCheckResultAccess.Instance.Delete(qcCheckResult.CHECK_RESULT_ID);
                if (!string.IsNullOrEmpty(qcCheckResult.MSG_ID))
                {
                    MedicalQcMsgAccess.Instance.Delete(qcCheckResult.MSG_ID);
                }
                if (shRet != SystemData.ReturnValue.OK)
                {
                    //MessageBoxEx.Show(string.Format("第{0}行取消病历扣分信息保存失败!", row.Index + 1), MessageBoxIcon.Error);
                    return(false);
                }
            }
            if (!isCheck)
            {
                return(false);
            }
            DateTime dtCheckTime = DateTime.Now;
            string   szMessgCode = string.Empty;

            if (qcCheckResult == null)
            {
                qcCheckResult                    = new EMRDBLib.QcCheckResult();
                qcCheckResult.VISIT_ID           = SystemParam.Instance.PatVisitInfo.VISIT_ID;
                qcCheckResult.CHECKER_NAME       = SystemParam.Instance.UserInfo.USER_NAME;
                qcCheckResult.CHECKER_ID         = SystemParam.Instance.UserInfo.USER_ID;
                qcCheckResult.CHECK_DATE         = SysTimeHelper.Instance.Now;
                qcCheckResult.BUG_CLASS          = SystemData.BugClass.ERROR;
                qcCheckResult.CHECK_POINT_ID     = string.Empty;
                qcCheckResult.CHECK_RESULT_ID    = qcCheckResult.MakeID();
                qcCheckResult.CHECK_TYPE         = string.Empty;
                qcCheckResult.CREATE_ID          = string.Empty;
                qcCheckResult.CREATE_NAME        = string.Empty;
                qcCheckResult.DEPT_CODE          = SystemParam.Instance.PatVisitInfo.DEPT_CODE;
                qcCheckResult.DEPT_IN_CHARGE     = SystemParam.Instance.PatVisitInfo.DEPT_NAME;
                qcCheckResult.INCHARGE_DOCTOR    = SystemParam.Instance.PatVisitInfo.INCHARGE_DOCTOR;
                qcCheckResult.INCHARGE_DOCTOR_ID = SystemParam.Instance.PatVisitInfo.INCHARGE_DOCTOR_ID;
                qcCheckResult.DOCTYPE_ID         = string.Empty;
                qcCheckResult.DOC_SETID          = string.Empty;
                qcCheckResult.DOC_TIME           = SysTimeHelper.Instance.DefaultTime;
                qcCheckResult.DOC_TITLE          = string.Empty;
                qcCheckResult.ERROR_COUNT        = int.Parse(row.Cells[this.colErrorCount.Index].Value.ToString());
                qcCheckResult.ISVETO             = false;
                qcCheckResult.MODIFY_TIME        = SysTimeHelper.Instance.DefaultTime;
                qcCheckResult.MR_STATUS          = SystemParam.Instance.PatVisitInfo.MR_STATUS;
                qcCheckResult.MSG_DICT_CODE      = qcMsgDict.QC_MSG_CODE;
                qcCheckResult.MSG_DICT_MESSAGE   = qcMsgDict.MESSAGE;
                qcCheckResult.PATIENT_ID         = SystemParam.Instance.PatVisitInfo.PATIENT_ID;
                qcCheckResult.PATIENT_NAME       = SystemParam.Instance.PatVisitInfo.PATIENT_NAME;
                qcCheckResult.QA_EVENT_TYPE      = qcMsgDict.QA_EVENT_TYPE;
                qcCheckResult.QC_EXPLAIN         = string.Empty;
                qcCheckResult.QC_RESULT          = SystemData.QcResult.UnPass;
                qcCheckResult.SCORE              = qcMsgDict.SCORE;
                qcCheckResult.ORDER_VALUE        = qcMsgDict.SERIAL_NO;
                qcCheckResult.STAT_TYPE          = SystemData.StatType.Artificial;
                qcCheckResult.VISIT_ID           = SystemParam.Instance.PatVisitInfo.VISIT_ID;
                qcCheckResult.VISIT_NO           = SystemParam.Instance.PatVisitInfo.VISIT_NO;
                if (row.Cells[this.colRemark.Index].Value != null)
                {
                    qcCheckResult.REMARKS = row.Cells[this.colRemark.Index].Value.ToString();
                }
                shRet = QcCheckResultAccess.Instance.Insert(qcCheckResult);
                if (shRet != SystemData.ReturnValue.OK)
                {
                    //MessageBoxEx.Show(string.Format("第{0}行病历扣分信息保存失败!", row.Index + 1), MessageBoxIcon.Error);
                    return(false);
                }
            }
            else
            {
                qcCheckResult.CHECKER_ID   = SystemParam.Instance.UserInfo.USER_ID;
                qcCheckResult.CHECKER_NAME = SystemParam.Instance.UserInfo.USER_NAME;
                qcCheckResult.ORDER_VALUE  = qcMsgDict.SERIAL_NO;
                qcCheckResult.MR_STATUS    = SystemParam.Instance.PatVisitInfo.MR_STATUS;
                qcCheckResult.CHECK_DATE   = SysTimeHelper.Instance.Now;
                qcCheckResult.ERROR_COUNT  = int.Parse(row.Cells[this.colErrorCount.Index].Value.ToString());
                if (row.Cells[this.colRemark.Index].Value != null)
                {
                    qcCheckResult.REMARKS = row.Cells[this.colRemark.Index].Value.ToString();
                }
                shRet = QcCheckResultAccess.Instance.Update(qcCheckResult);
                if (shRet != SystemData.ReturnValue.OK)
                {
                    //MessageBoxEx.Show(string.Format("第{0}行病历扣分信息更新失败!", row.Index + 1), MessageBoxIcon.Error);

                    return(false);
                }
            }

            return(true);
        }