Beispiel #1
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            string szCheckerID = string.Empty;

            if (this.cboUserList.Text != string.Empty &&
                this.cboUserList.SelectedItem != null)
            {
                UserInfo user = this.cboUserList.SelectedItem as UserInfo;
                szCheckerID = user.USER_ID;
            }
            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在统计工作量,请稍候...");
            this.dataGridView1.Rows.Clear();
            DateTime       dtHosDateTimeBegin = DateTime.Parse(this.dtpTimeBegin.Value.ToString("yyyy-MM-dd 00:00:00"));
            DateTime       dtHosDateTimeEnd   = DateTime.Parse(this.dtpTimeEnd.Value.ToString("yyyy-MM-dd 23:59:59"));
            List <QCScore> lstQcScores        = null;
            short          shRet = QcScoreAccess.Instance.GetQcScores(dtHosDateTimeBegin, dtHosDateTimeEnd, szCheckerID, ref lstQcScores);

            if (shRet != SystemData.ReturnValue.OK &&
                shRet != SystemData.ReturnValue.RES_NO_FOUND
                )
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("查询数据失败!");
                return;
            }
            if (lstQcScores == null || lstQcScores.Count <= 0)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information);
                return;
            }
            string szPreCheckName = string.Empty;
            int    nOrderNo       = 0;

            for (int index = 0; index < lstQcScores.Count; index++)
            {
                EMRDBLib.QCScore qcScore = lstQcScores[index];
                if (string.IsNullOrEmpty(qcScore.HOS_QCMAN_ID))
                {
                    continue;
                }
                int             nRowIndex = this.dataGridView1.Rows.Add();
                DataGridViewRow row       = this.dataGridView1.Rows[nRowIndex];
                if (szPreCheckName == string.Empty || szPreCheckName != qcScore.HOS_QCMAN)
                {
                    szPreCheckName = qcScore.HOS_QCMAN;
                    nOrderNo       = 0;
                }
                nOrderNo++;
                row.Cells[this.colOrderNo.Index].Value        = nOrderNo;
                row.Cells[this.col_DEPT_NAME.Index].Value     = qcScore.DEPT_NAME;
                row.Cells[this.col_HOS_ASSESS.Index].Value    = qcScore.HOS_ASSESS;
                row.Cells[this.col_HOS_DATE.Index].Value      = qcScore.HOS_DATE.ToString("yyyy-MM-dd HH:mm");
                row.Cells[this.col_PATIENT_ID.Index].Value    = qcScore.PATIENT_ID;
                row.Cells[this.col_PATIENT_NAME.Index].Value  = qcScore.PATIENT_NAME;
                row.Cells[this.col_SUBMIT_DOCTOR.Index].Value = qcScore.SUBMIT_DOCTOR;
                row.Cells[this.col_VISIT_ID.Index].Value      = qcScore.VISIT_ID;
                row.Cells[this.col_HOS_QCMAN.Index].Value     = qcScore.HOS_QCMAN;
                row.Tag = qcScore;
            }

            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Beispiel #2
0
        /// <summary>
        /// 加载患者的就诊日志信息
        /// </summary>
        /// <param name="patVisitLog">患者就诊日志信息</param>
        /// <param name="backColor">行背景色</param>
        /// <returns>是否需要换背景色、过滤</returns>
        private bool LoadQCQuestionInfo(EMRDBLib.PatVisitInfo patVisitLog, Color backColor)
        {
            List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfo = null;
            short shRet = MedicalQcMsgAccess.Instance.GetMedicalQcMsgList(patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID, ref lstQCQuestionInfo);

            if (shRet != SystemData.ReturnValue.OK && shRet != SystemData.ReturnValue.RES_NO_FOUND)
            {
                return(false);
            }
            #region 是否需要被过滤判断
            //获取患者的病历得分
            EMRDBLib.QCScore qcScore = null;
            shRet = QcScoreAccess.Instance.GetQCScore(patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID, ref qcScore);
            if (shRet != SystemData.ReturnValue.OK || qcScore == null)
            {
                return(false);
            }

            float fScore = -1;
            //院评分数HosAssess默认值为-1,如果HosAssess>=0代表此患者的病历已经被评分。
            if (qcScore.HOS_ASSESS >= 0)
            {
                fScore = qcScore.HOS_ASSESS;
            }
            //筛选已评分的分数
            if (this.cbx.SelectedIndex == 1)
            {
                if (fScore >= 0)
                {
                    float scoreLow = 0.0f;
                    float.TryParse(this.cbbScoreLow.Text.ToString(), out scoreLow);
                    float scoreHigh = 0.0f;
                    float.TryParse(this.cbbScoreHigh.Text.ToString(), out scoreHigh);
                    if (fScore > scoreHigh || fScore < scoreLow)
                    {
                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
            else if (this.cbx.SelectedIndex == 2)//未评分
            {
                if (fScore > 0)
                {
                    return(false);
                }
            }

            //提交状态 字母o为未提交
            if (this.cbbMrStatus.SelectedItem.ToString() == "未提交" && patVisitLog.MR_STATUS.ToUpper() != "O")
            {
                return(false);
            }
            else if (this.cbbMrStatus.SelectedItem.ToString() == "已提交" && patVisitLog.MR_STATUS.ToUpper() == "O")
            {
                return(false);
            }

            #endregion

            #region 加载未被审查的患者基本信息
            if (lstQCQuestionInfo == null || lstQCQuestionInfo.Count <= 0)
            {
                int             nRowIndex = this.dataGridView1.Rows.Add();
                DataGridViewRow row       = this.dataGridView1.Rows[nRowIndex];
                row.DefaultCellStyle.BackColor                   = backColor;
                row.Cells[this.colPatientID.Index].Value         = patVisitLog.PATIENT_ID;
                row.Cells[this.col_BED_CODE.Index].Value         = patVisitLog.BED_CODE;
                row.Cells[this.colPatName.Index].Value           = patVisitLog.PATIENT_NAME;
                row.Cells[this.colDoctorInCharge.Index].Value    = patVisitLog.INCHARGE_DOCTOR;
                row.Cells[this.colPARENT_DOCTOR.Index].Value     = patVisitLog.AttendingDoctor;
                row.Cells[this.colDeptAdmissionTo.Index].Value   = patVisitLog.DEPT_NAME;
                row.Cells[this.colAdmissionDate.Index].Value     = patVisitLog.VISIT_TIME;
                row.Cells[this.colDeptDischargeFrom.Index].Value = patVisitLog.DischargeDeptCode;
                row.Cells[this.colMrStatus.Index].Value          = patVisitLog.MR_STATUS.ToUpper() == "O" ? "未提交" : "已提交";
                if (patVisitLog.DISCHARGE_TIME != patVisitLog.DefaultTime)
                {
                    row.Cells[this.colDischargeDate.Index].Value = patVisitLog.DISCHARGE_TIME;
                }
                //显示权限改到质控权限控制
                //if (SystemConfig.Instance.Get(SystemData.ConfigKey.STAT_SHOW_CHECKER_NAME, false))

                row.Cells[this.colDocChecker.Index].Value = qcScore.HOS_QCMAN;

                row.Cells[this.colScore.Index].Value    = fScore >= 0 ? fScore.ToString() : string.Empty;
                row.Cells[this.colDocLevel.Index].Value = qcScore.DOC_LEVEL;
                row.Tag = patVisitLog;
                if (!this.m_htPatVisitLog.ContainsKey(patVisitLog))
                {
                    this.m_htPatVisitLog.Add(patVisitLog, row);
                }
                return(true);
            }
            #endregion

            #region 加载质控信息
            for (int index = 0; index < lstQCQuestionInfo.Count; index++)
            {
                int             nRowIndex = this.dataGridView1.Rows.Add();
                DataGridViewRow row       = this.dataGridView1.Rows[nRowIndex];
                row.DefaultCellStyle.BackColor = backColor;
                row.Tag = patVisitLog;
                if (index == 0)
                {
                    row.Cells[this.colPatientID.Index].Value         = patVisitLog.PATIENT_ID;
                    row.Cells[this.colPatName.Index].Value           = patVisitLog.PATIENT_NAME;
                    row.Cells[this.colDeptAdmissionTo.Index].Value   = patVisitLog.DEPT_NAME;
                    row.Cells[this.colAdmissionDate.Index].Value     = patVisitLog.VISIT_TIME.ToString("yyyy-MM-dd");
                    row.Cells[this.colDoctorInCharge.Index].Value    = patVisitLog.INCHARGE_DOCTOR;
                    row.Cells[this.colPARENT_DOCTOR.Index].Value     = patVisitLog.AttendingDoctor;
                    row.Cells[this.colDeptDischargeFrom.Index].Value = patVisitLog.DischargeDeptCode;
                    row.Cells[this.colMrStatus.Index].Value          = patVisitLog.MR_STATUS.ToUpper() == "O" ? "未提交" : "已提交";
                    if (patVisitLog.DISCHARGE_TIME != patVisitLog.DefaultTime)
                    {
                        row.Cells[this.colDischargeDate.Index].Value = patVisitLog.DISCHARGE_TIME.ToString("yyyy-MM-dd");
                    }
                    row.Cells[this.colScore.Index].Value    = fScore >= 0 ? fScore.ToString() : string.Empty;
                    row.Cells[this.colDocLevel.Index].Value = qcScore.DOC_LEVEL;
                    if (!this.m_htPatVisitLog.ContainsKey(patVisitLog))
                    {
                        this.m_htPatVisitLog.Add(patVisitLog, row);
                    }
                    //如果是精简版跳过
                    if (!chboxSimple.Checked)
                    {
                        break;
                    }
                }
                row.Cells[this.colDocChecker.Index].Value   = lstQCQuestionInfo[index].ISSUED_BY;
                row.Cells[this.colDocName.Index].Value      = lstQCQuestionInfo[index].TOPIC;
                row.Cells[this.colQuestionList.Index].Value = lstQCQuestionInfo[index].MESSAGE;
                row.Cells[this.colDocSetID.Index].Value     = lstQCQuestionInfo[index].TOPIC_ID;
            }
            #endregion
            return(true);
        }