Exemplo n.º 1
0
 /// <summary>
 /// 将数据信息加载到DataGridView中
 /// </summary>
 /// <param name="row"></param>
 /// <param name="qcWorkloadStatInfo"></param>
 private void SetRowData(DataGridViewRow row, EMRDBLib.MedicalQcMsg qcQuesiontionInfo, EMRDBLib.PatDoctorInfo patDoctorInfo)
 {
     if (row == null || qcQuesiontionInfo == null)
     {
         return;
     }
     if (row.DataGridView == null)
     {
         return;
     }
     row.Tag = qcQuesiontionInfo;
     row.Cells[this.col_BED_CODE.Index].Value     = qcQuesiontionInfo.BED_CODE;
     row.Cells[this.colInpNO.Index].Value         = qcQuesiontionInfo.InpNo;
     row.Cells[this.colPatientName.Index].Value   = qcQuesiontionInfo.PATIENT_NAME;
     row.Cells[this.colPatientID.Index].Value     = qcQuesiontionInfo.PATIENT_ID;
     row.Cells[this.colVisitID.Index].Value       = qcQuesiontionInfo.VISIT_ID;
     row.Cells[this.colTopic.Index].Value         = qcQuesiontionInfo.TOPIC;
     row.Cells[this.colCheckName.Index].Value     = qcQuesiontionInfo.ISSUED_BY;
     row.Cells[this.colDeptName.Index].Value      = qcQuesiontionInfo.DEPT_NAME;
     row.Cells[this.colDiagnosis.Index].Value     = qcQuesiontionInfo.Diagnosis;
     row.Cells[this.colContent.Index].Value       = qcQuesiontionInfo.MESSAGE;
     row.Cells[this.colQaEventType.Index].Value   = qcQuesiontionInfo.QA_EVENT_TYPE;
     row.Cells[this.colLogDesc.Index].Value       = qcQuesiontionInfo.LogDesc == null? "质控者添加质检信息":qcQuesiontionInfo.LogDesc;
     row.Cells[this.colRequestDoctor.Index].Value = qcQuesiontionInfo.DOCTOR_IN_CHARGE;
     if (patDoctorInfo != null)
     {
         row.Cells[this.colRequestDoctor.Index].Value = patDoctorInfo.RequestDoctorName;
         row.Cells[this.colPARENT_DOCTOR.Index].Value = patDoctorInfo.ParentDoctorName;
         row.Cells[this.colSuperDoctor.Index].Value   = patDoctorInfo.SuperDoctorName;
     }
 }
Exemplo n.º 2
0
        //更新内容质检问题质检人和质检时间
        private void UpdateQCContentRecord(string szDocSetId)
        {
            if (string.IsNullOrEmpty(szDocSetId))
            {
                return;
            }
            string   szUserID   = SystemParam.Instance.UserInfo.USER_ID;
            string   szUserName = SystemParam.Instance.UserInfo.USER_NAME;
            DateTime now        = DateTime.Now;
            short    shRet      = QcContentRecordAccess.Instance.UpdateQCContentRecord(szDocSetId, szUserID, szUserName, now);

            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.Show("更新内容质检问题失败!");
            }
            foreach (DataGridViewRow row in this.dataGridView1.Rows)
            {
                EMRDBLib.MedicalQcMsg info = row.Tag as EMRDBLib.MedicalQcMsg;
                if (info == null)
                {
                    continue;
                }
                if (info.TOPIC_ID == szDocSetId)
                {
                    info.ISSUED_ID        = szUserID;
                    info.ISSUED_BY        = szUserName;
                    info.ISSUED_DATE_TIME = now;
                    row.Cells[this.colCheckName.Index].Value = info.ISSUED_BY;
                    row.Cells[this.colCheckTime.Index].Value = info.ISSUED_DATE_TIME;
                }
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 是否需要显示同一患者的相同列
 /// </summary>
 /// <param name="row"></param>
 /// <returns></returns>
 private bool IsNeedShowSamePatientColumn(int rowIndex, EMRDBLib.MedicalQcMsg currentQCQuestionInfo)
 {
     if (SystemParam.Instance.LocalConfigOption.IsShowSameColumn)
     {
         return(true);
     }
     else//判断是否是同一个患者,是则不需要显示
     {
         if (rowIndex == 0 || currentQCQuestionInfo == null)
         {
             return(true);
         }
         EMRDBLib.MedicalQcMsg preQCQuestionInfo = this.dataGridView1.Rows[rowIndex - 1].Tag as EMRDBLib.MedicalQcMsg;
         if (preQCQuestionInfo == null)
         {
             return(true);
         }
         if (preQCQuestionInfo.PATIENT_ID == currentQCQuestionInfo.PATIENT_ID &&
             preQCQuestionInfo.VISIT_ID == currentQCQuestionInfo.VISIT_ID)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 质控人员打开历史病历
        /// </summary>
        /// <returns>DataLayer.SystemData.ReturnValue</returns>
        public short OpenHistoryDocument(EMRDBLib.MedicalQcMsg questionInfo)
        {
            MedDocInfo docInfo = new MedDocInfo();

            docInfo.PATIENT_ID   = questionInfo.PATIENT_ID;
            docInfo.VISIT_ID     = questionInfo.VISIT_ID;
            docInfo.DOC_SETID    = questionInfo.TOPIC_ID;
            docInfo.DOC_TITLE    = questionInfo.TOPIC;
            docInfo.CREATOR_NAME = questionInfo.ISSUED_BY;
            docInfo.DOC_TIME     = questionInfo.ISSUED_DATE_TIME;
            docInfo.DOC_ID       = questionInfo.TOPIC_ID;
            this.m_documents     = new MedDocList();
            this.m_documents.Add(docInfo);
            this.RefreshFormTitle(null);
            byte[] byteSmdfData = null;
            string szRemoteFile = SystemParam.Instance.GetQCFtpDocPath(questionInfo, "smdf");
            short  shRet        = EmrDocAccess.Instance.GetFtpHistoryDocByID(docInfo.DOC_SETID, questionInfo.ISSUED_DATE_TIME, szRemoteFile, ref byteSmdfData);

            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.Show("无法打开文档!文档数据下载失败!");
                return(shRet);
            }
            //编辑器控件加载文档
            bool result = textEditor1.LoadDocument2(byteSmdfData);

            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.Show("无法打开文档!文档数据加载失败!");
                return(shRet);
            }
            this.textEditor1.ReviseEnabled = true;
            return(SystemData.ReturnValue.OK);
        }
Exemplo n.º 5
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            EMRDBLib.QaEventTypeDict qcEventType = this.cboEventType.SelectedItem as EMRDBLib.QaEventTypeDict;
            string szTypeDesc = null;

            if (qcEventType != null)
            {
                szTypeDesc = qcEventType.QA_EVENT_TYPE;
            }
            UserInfo userInfo = this.cboDoctor.SelectedItem as UserInfo;
            string   szUserID = null;

            if (userInfo != null)
            {
                szUserID = userInfo.USER_ID;
            }
            if (szTypeDesc == null && szUserID == null)
            {
                MessageBoxEx.Show("请指定质量问题分类或者医生!", MessageBoxIcon.Information);
                return;
            }
            string szDeptName = null;

            if (!string.IsNullOrEmpty(this.cboDeptName.Text))
            {
                szDeptName = this.cboDeptName.Text.Trim();
            }
            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在统计质检问题,请稍候...");
            this.dataGridView1.Rows.Clear();
            List <EMRDBLib.MedicalQcMsg> lstQuestionInfo = null;
            short shRet = MedicalQcMsgAccess.Instance.GetQCQuestionListByQaEventType(szDeptName, szTypeDesc, szUserID, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")),
                                                                                     DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), ref lstQuestionInfo);

            if (shRet != SystemData.ReturnValue.OK &&
                shRet != SystemData.ReturnValue.RES_NO_FOUND)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("查询数据失败!");
                this.ShowStatusMessage(null);
                return;
            }
            if (lstQuestionInfo == null || lstQuestionInfo.Count <= 0)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information);
                this.ShowStatusMessage(null);
                return;
            }
            for (int index = 0; index < lstQuestionInfo.Count; index++)
            {
                EMRDBLib.MedicalQcMsg questionInfo = lstQuestionInfo[index];
                int             nRowIndex          = this.dataGridView1.Rows.Add();
                DataGridViewRow row = this.dataGridView1.Rows[nRowIndex];
                this.SetRowData(row, questionInfo);
            }
            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Exemplo n.º 6
0
        private int CompareDinosByDeptCode(EMRDBLib.MedicalQcMsg x, EMRDBLib.MedicalQcMsg y)
        {
            if (x == null)
            {
                if (y == null)
                {
                    // If x is null and y is null, they're
                    // equal.
                    return(0);
                }
                else
                {
                    // If x is null and y is not null, y
                    // is greater.
                    return(-1);
                }
            }
            else
            {
                // If x is not null...
                //
                if (y == null)
                // ...and y is null, x is greater.
                {
                    return(1);
                }
                else
                {
                    // ...and y is not null, compare the
                    // lengths of the two strings.
                    //
                    int retval = x.DEPT_STAYED.CompareTo(y.DEPT_STAYED);

                    if (retval != 0)
                    {
                        // If the strings are not of equal length,
                        // the longer string is greater.
                        //
                        return(retval);
                    }
                    else
                    {
                        // If the strings are of equal length,
                        // sort them with ordinary string comparison.
                        //
                        //科室一样,按患者姓名比较
                        int retval2 = x.PATIENT_NAME.CompareTo(y.PATIENT_NAME);
                        if (retval2 != 0)
                        {
                            return(retval2);
                        }
                        else
                        {
                            return(x.QA_EVENT_TYPE.CompareTo(y.QA_EVENT_TYPE));
                        }
                    }
                }
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 将数据信息加载到DataGridView中
        /// </summary>
        /// <param name="row"></param>
        /// <param name="qcQuestionInfo"></param>
        private void SetRowData(DataGridViewRow row, EMRDBLib.MedicalQcMsg qcQuestionInfo)
        {
            if (row == null || qcQuestionInfo == null)
            {
                return;
            }
            if (row.DataGridView == null)
            {
                return;
            }
            if (IsNeedShowSamePatientColumn(row.Index, qcQuestionInfo))
            {
                row.Cells[this.colPatientID.Index].Value   = qcQuestionInfo.PATIENT_ID;
                row.Cells[this.colVisitID.Index].Value     = qcQuestionInfo.VISIT_ID;
                row.Cells[this.colPatientName.Index].Value = qcQuestionInfo.PATIENT_NAME;
            }

            row.Cells[this.colQuestionContent.Index].Value = qcQuestionInfo.MESSAGE;
            row.Cells[this.colDoctorInCharege.Index].Value = qcQuestionInfo.DOCTOR_IN_CHARGE;
            row.Cells[this.colPARENT_DOCTOR.Index].Value   = qcQuestionInfo.PARENT_DOCTOR;
            row.Cells[this.col_BED_CODE.Index].Value       = qcQuestionInfo.BED_CODE;

            //显示权限改到质控权限控制
            //if (SystemConfig.Instance.Get(SystemData.ConfigKey.STAT_SHOW_CHECKER_NAME, false))
            if (qcQuestionInfo.ISSUED_BY == "系统自动")
            {
                row.Cells[this.colCheckName.Index].Value = qcQuestionInfo.ISSUED_BY;
            }
            else
            {
                if (qcQuestionInfo.ISSUED_BY == SystemParam.Instance.UserInfo.USER_NAME)
                {
                    row.Cells[this.colCheckName.Index].Value = qcQuestionInfo.ISSUED_BY;
                }
            }

            row.Cells[this.colQuestionCount.Index].Value = "1";
            row.Cells[this.colQuestionType.Index].Value  = qcQuestionInfo.QA_EVENT_TYPE;
            if (qcQuestionInfo.ISSUED_DATE_TIME != qcQuestionInfo.DefaultTime)
            {
                row.Cells[this.colCheckTime.Index].Value = qcQuestionInfo.ISSUED_DATE_TIME.ToString("yyyy-MM-dd HH:mm");
            }
            if (qcQuestionInfo.ASK_DATE_TIME != qcQuestionInfo.DefaultTime)
            {
                row.Cells[this.colConfirmDate.Index].Value = qcQuestionInfo.ASK_DATE_TIME.ToString("yyyy-MM-dd");
            }
            row.Cells[this.colQuestionStatus.Index].Value = SystemData.MsgStatus.GetCnMsgState(qcQuestionInfo.MSG_STATUS);
            row.Tag = qcQuestionInfo;
        }
Exemplo n.º 8
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex];

            EMRDBLib.MedicalQcMsg info = row.Tag as EMRDBLib.MedicalQcMsg;
            if (info == null)
            {
                return;
            }
            this.MainForm.OpenDocument(info.TOPIC_ID, info.PATIENT_ID, info.VISIT_ID);
        }
Exemplo n.º 9
0
 /// <summary>
 /// 南总显示格式
 /// </summary>
 /// <param name="lstQCQuestionInfos"></param>
 private void ShowAsNormalBugs(List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfos)
 {
     for (int index = 0; index < lstQCQuestionInfos.Count; index++)
     {
         EMRDBLib.MedicalQcMsg qcQuestionInfo = lstQCQuestionInfos[index];
         int    nRowIndex       = 0;
         string szQuestionCount = null;
         nRowIndex = this.dataGridView1.Rows.Add();
         DataGridViewRow parentRow = this.dataGridView1.Rows[nRowIndex];
         parentRow.Cells[this.colDeptName.Index].Value      = qcQuestionInfo.DEPT_NAME;
         parentRow.Cells[this.colQuestionType.Index].Value  = qcQuestionInfo.QA_EVENT_TYPE;
         parentRow.Cells[this.colQuestionCount.Index].Value = szQuestionCount;
         this.SetRowData(parentRow, qcQuestionInfo);
     }
 }
Exemplo n.º 10
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex];

            EMRDBLib.MedicalQcMsg info = row.Tag as EMRDBLib.MedicalQcMsg;
            if (info == null)
            {
                return;
            }
            //切换当前患者
            PatVisitInfo patVisitLog = null;
            short        shRet       = PatVisitAccess.Instance.GetPatVisitInfo(info.PATIENT_ID, info.VISIT_ID, ref patVisitLog);

            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.ShowError("患者信息查询失败!");
                return;
            }
            SystemParam.Instance.PatVisitInfo = patVisitLog;
            this.MainForm.OnPatientInfoChanged(EventArgs.Empty);
            //如果是系统自动检查,则将内容检查者设置为当前用户和检查时间为当前时间,代表质控已确认自动查出的问题
            if (!string.IsNullOrEmpty(info.TOPIC_ID) &&
                info.ISSUED_BY == "系统自动")
            {
                UpdateQCContentRecord(info.TOPIC_ID);
            }
            if (!string.IsNullOrEmpty(info.DOC_ID))
            {
                MedDocInfo docInfo = null;
                shRet = EmrDocAccess.Instance.GetDocInfo(info.DOC_ID, ref docInfo);

                this.MainForm.SwitchPatient(patVisitLog, docInfo);
                //this.MainForm.OpenDocument(info.TOPIC_ID, info.PATIENT_ID, info.VISIT_ID);
            }
            else
            {
                this.MainForm.SwitchPatient(patVisitLog);
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// 将数据信息加载到DataGridView中
        /// </summary>
        /// <param name="row">数据行</param>
        /// <param name="questionInfo">质检问题类</param>
        private void SetRowData(DataGridViewRow row, EMRDBLib.MedicalQcMsg questionInfo)
        {
            if (row == null || questionInfo == null)
            {
                return;
            }
            if (row.DataGridView == null)
            {
                return;
            }
            if (IsNeedShowSamePatientColumn(row.Index, questionInfo))
            {
                row.Cells[this.colPatID.Index].Value   = questionInfo.PATIENT_ID;
                row.Cells[this.colPatName.Index].Value = questionInfo.PATIENT_NAME;
                row.Cells[this.colVisitID.Index].Value = questionInfo.VISIT_ID;
            }
            row.Cells[this.colPatDeptName.Index].Value    = questionInfo.DEPT_NAME;
            row.Cells[this.colDoctorInCharge.Index].Value = questionInfo.DOCTOR_IN_CHARGE;
            row.Cells[this.colPARENT_DOCTOR.Index].Value  = questionInfo.PARENT_DOCTOR;
            row.Cells[this.colQaEventType.Index].Value    = questionInfo.QA_EVENT_TYPE;
            row.Cells[this.colMessage.Index].Value        = questionInfo.MESSAGE;
            row.Cells[this.col_BED_CODE.Index].Value      = questionInfo.BED_CODE;
            row.Cells[this.colCheckerName.Index].Value    = questionInfo.ISSUED_BY;

            row.Cells[this.colCheckDataTime.Index].Value = questionInfo.ISSUED_DATE_TIME;
            row.Cells[this.colMsgStatus.Index].Value     = questionInfo.MSG_STATUS;
            if (questionInfo.ASK_DATE_TIME != questionInfo.DefaultTime)
            {
                row.Cells[this.colDateConfirmed.Index].Value = questionInfo.ASK_DATE_TIME;
            }
            if (questionInfo.MSG_STATUS == 1)
            {
                row.Cells[this.colMsgStatus.Index].Value = "已确认";
            }

            else
            {
                row.Cells[this.colMsgStatus.Index].Value = "未确认";
            }
            row.Tag = questionInfo;
        }
Exemplo n.º 12
0
        /// <summary>
        /// 将数据信息加载到DataGridView中
        /// </summary>
        /// <param name="row"></param>
        /// <param name="qcQuestionInfo"></param>
        private void SetRowData(DataGridViewRow row, EMRDBLib.MedicalQcMsg qcQuestionInfo)
        {
            if (row == null || qcQuestionInfo == null)
            {
                return;
            }
            if (row.DataGridView == null)
            {
                return;
            }
            if (IsNeedShowSamePatientColumn(row.Index, qcQuestionInfo))
            {
                row.Cells[this.patientIDDataGridViewTextBoxColumn.Index].Value   = qcQuestionInfo.PATIENT_ID;
                row.Cells[this.patientNameDataGridViewTextBoxColumn.Index].Value = qcQuestionInfo.PATIENT_NAME;
                row.Cells[this.colInpNO.Index].Value = qcQuestionInfo.InpNo;
            }
            row.Cells[this.col_BED_CODE.Index].Value = qcQuestionInfo.BED_CODE;
            row.Cells[this.deptStayedNameDataGridViewTextBoxColumn.Index].Value = qcQuestionInfo.DEPT_NAME;
            row.Cells[this.deptStayedIDDataGridViewTextBoxColumn.Index].Value   = qcQuestionInfo.DEPT_STAYED;
            row.Cells[this.colQaEventType.Index].Value = qcQuestionInfo.QA_EVENT_TYPE;
            row.Cells[this.questionContentDataGridViewTextBoxColumn.Index].Value = qcQuestionInfo.MESSAGE;
            row.Cells[this.doctorInchargeDataGridViewTextBoxColumn.Index].Value  = qcQuestionInfo.DOCTOR_IN_CHARGE;
            row.Cells[this.colPARENT_DOCTOR.Index].Value = qcQuestionInfo.PARENT_DOCTOR;
            row.Cells[this.col_BED_CODE.Index].Value     = qcQuestionInfo.BED_CODE;
            //显示权限改到质控权限控制
            //if (SystemConfig.Instance.Get(SystemData.ConfigKey.STAT_SHOW_CHECKER_NAME, false))

            row.Cells[this.checkerDataGridViewTextBoxColumn.Index].Value = qcQuestionInfo.ISSUED_BY;

            if (qcQuestionInfo.ISSUED_DATE_TIME != qcQuestionInfo.DefaultTime)
            {
                row.Cells[this.dateCheckedDataGridViewTextBoxColumn.Index].Value = qcQuestionInfo.ISSUED_DATE_TIME;
            }
            if (qcQuestionInfo.ASK_DATE_TIME != qcQuestionInfo.DefaultTime)
            {
                row.Cells[this.dateConfirmedDataGridViewTextBoxColumn.Index].Value = qcQuestionInfo.ASK_DATE_TIME;
            }
            row.Tag = qcQuestionInfo;
        }
Exemplo n.º 13
0
        /// <summary>
        /// 绑定关联MSG_ID的质检问题
        /// </summary>
        private void SetQCMsg()
        {
            EMRDBLib.MedicalQcMsg qCQuestionInfo = null;
            short shRet = MedicalQcMsgAccess.Instance.GetMedicalQcMsg(this.MsgID, ref qCQuestionInfo);

            if (shRet != SystemData.ReturnValue.OK || qCQuestionInfo == null)
            {
                return;
            }

            this.txtDocTitle.Text     = qCQuestionInfo.TOPIC;
            this.txtQuestionType.Text = qCQuestionInfo.QA_EVENT_TYPE;
            EMRDBLib.QcMsgDict qcMessageTemplet = ListQCMessageTemplets.Find(
                delegate(EMRDBLib.QcMsgDict q)
            {
                return(q.QC_MSG_CODE == qCQuestionInfo.QC_MSG_CODE);
            }
                );
            this.txtMesssageTitle.Text = qcMessageTemplet != null ? qcMessageTemplet.MESSAGE : "";
            this.txtContent.Text       = qCQuestionInfo.MESSAGE;
            this.txtBoxScore.Text      = qCQuestionInfo.POINT.ToString();
            this.txtMessage.Focus();
        }
Exemplo n.º 14
0
        /// <summary>
        /// 质控人员打开历史病历
        /// </summary>
        /// <returns>DataLayer.SystemData.ReturnValue</returns>
        public short OpenHistoryDocument(EMRDBLib.MedicalQcMsg questionInfo)
        {
            MedDocInfo docInfo = new MedDocInfo();

            docInfo.PATIENT_ID   = questionInfo.PATIENT_ID;
            docInfo.VISIT_ID     = questionInfo.VISIT_ID;
            docInfo.DOC_SETID    = questionInfo.TOPIC_ID;
            docInfo.DOC_TITLE    = questionInfo.TOPIC;
            docInfo.CREATOR_NAME = questionInfo.ISSUED_BY;
            docInfo.DOC_TIME     = questionInfo.ISSUED_DATE_TIME;
            docInfo.DOC_ID       = questionInfo.TOPIC_ID;
            this.m_documents     = new MedDocList();
            this.m_documents.Add(docInfo);
            this.RefreshFormTitle(null);
            byte[] byteSmdfData = null;
            string szRemoteFile = SystemParam.Instance.GetQCFtpDocPath(questionInfo, "smdf");
            short  shRet        = EmrDocAccess.Instance.GetFtpHistoryDocByID(docInfo.DOC_SETID, questionInfo.ISSUED_DATE_TIME, szRemoteFile, ref byteSmdfData);

            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.Show("无法打开文档!文档数据下载失败!");
                return(shRet);
            }
            //编辑器控件加载文档
            shRet = this.medEditor1.OpenDocument(byteSmdfData, null, true);
            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.Show("无法打开文档!文档数据加载失败!");
                return(shRet);
            }
            //打开文档后是否显示为只读状态
            if (!SystemConfig.Instance.Get(SystemData.ConfigKey.DOCUMENT_READONLY, false))
            {
                this.MedEditor.Readonly = false;
            }
            return(SystemData.ReturnValue.OK);
        }
Exemplo n.º 15
0
        private void mnuRollbackDocument_Click(object sender, EventArgs e)
        {
            //判断是否是已归档患者的病历,C 表示已归档
            if (SystemParam.Instance.PatVisitInfo.MR_STATUS.ToUpper() == "C")
            {
                MessageBoxEx.Show(this, "该患者病案已归档,不能再退回,请医生到医生站回退病历", MessageBoxIcon.Warning);
                return;
            }
            else if (this.m_ClickDocument.SIGN_CODE == MedDocSys.DataLayer.SystemData.SignState.QC_ROLLBACK)
            {
                MessageBoxEx.Show(this, "该病历处于质控人员退回状态,不用重新退回!", MessageBoxIcon.Warning);
                return;
            }

            RollbackDocument rbForm = new RollbackDocument();

            if (rbForm.ShowDialog() == DialogResult.OK)
            {
                //获取文档信息
                MedDocInfo docInfo = this.m_ClickDocument;
                this.m_ClickDocument.SIGN_CODE = MedDocSys.DataLayer.SystemData.SignState.QC_ROLLBACK;
                byte[] temp = null;
                if (this.Document.DOC_ID == this.m_ClickDocument.DOC_ID)
                {
                    this.textEditor1.SaveDocument2(out temp);
                }
                short shRet = EmrDocAccess.Instance.UpdateDoc(this.m_ClickDocument.DOC_ID, this.m_ClickDocument, rbForm.Reason, temp);
                if (shRet == SystemData.ReturnValue.OK)
                {
                    //向医生站发送消息
                    //1.向Medical_QC_LOG表插入反馈信息记录
                    EMRDBLib.MedicalQcLog qcActionLog = new EMRDBLib.MedicalQcLog();
                    if (!QuestionListForm.MakeQCActionLog(ref qcActionLog))
                    {
                        GlobalMethods.UI.SetCursor(this, Cursors.Default);
                        return;
                    }
                    qcActionLog.LOG_DESC      = "质控人员退回病历";
                    qcActionLog.CHECK_TYPE    = 6;
                    qcActionLog.AddQCQuestion = false;
                    qcActionLog.DOC_SETID     = this.Document.DOC_SETID;
                    shRet = MedicalQcLogAccess.Instance.Insert(qcActionLog);

                    //2.向Medical_QC_MSG表插入质控人员质检记录

                    EMRDBLib.MedicalQcMsg qcQuestionInfo = new EMRDBLib.MedicalQcMsg();
                    qcQuestionInfo.QC_MODULE  = "DOCTOR_MR";
                    qcQuestionInfo.TOPIC_ID   = this.Document.DOC_SETID;
                    qcQuestionInfo.TOPIC      = this.Document.DOC_TITLE;
                    qcQuestionInfo.PATIENT_ID = SystemParam.Instance.PatVisitInfo.PATIENT_ID;
                    qcQuestionInfo.VISIT_ID   = SystemParam.Instance.PatVisitInfo.VISIT_ID;
                    if (!GlobalMethods.Misc.IsEmptyString(SystemParam.Instance.PatVisitInfo.DEPT_CODE))
                    {
                        qcQuestionInfo.DEPT_STAYED = SystemParam.Instance.PatVisitInfo.DEPT_CODE;
                    }
                    else
                    {
                        qcQuestionInfo.DEPT_STAYED = SystemParam.Instance.PatVisitInfo.DischargeDeptCode;
                    }
                    string inChargeDoctor = string.Empty;
                    //DataAccess.GetPatChargeDoctorID(SystemParam.Instance.PatVisitLog.PatientID, SystemParam.Instance.PatVisitLog.VisitID, ref inChargeDoctor);
                    qcQuestionInfo.DOCTOR_IN_CHARGE = this.Document.CREATOR_NAME;
                    qcQuestionInfo.PARENT_DOCTOR    = SystemParam.Instance.PatVisitInfo.AttendingDoctor;
                    qcQuestionInfo.SUPER_DOCTOR     = SystemParam.Instance.PatVisitInfo.SUPER_DOCTOR;
                    qcQuestionInfo.QC_MSG_CODE      = "Q1";
                    //将退回原因作为质检问题描述
                    if (string.IsNullOrEmpty(rbForm.Reason))
                    {
                        qcQuestionInfo.MESSAGE = "存在其他对病历质量造成严重影响的问题";
                    }
                    else
                    {
                        qcQuestionInfo.MESSAGE = rbForm.Reason;
                    }
                    qcQuestionInfo.MSG_STATUS       = 0;
                    qcQuestionInfo.QA_EVENT_TYPE    = "质控退回原因";
                    qcQuestionInfo.POINT_TYPE       = 1;
                    qcQuestionInfo.ISSUED_BY        = SystemParam.Instance.UserInfo.USER_NAME;
                    qcQuestionInfo.ISSUED_DATE_TIME = SysTimeHelper.Instance.Now;
                    qcQuestionInfo.ISSUED_ID        = SystemParam.Instance.UserInfo.USER_ID;
                    qcQuestionInfo.POINT_TYPE       = 0;
                    qcQuestionInfo.POINT            = 0;

                    shRet = MedicalQcMsgAccess.Instance.Insert(qcQuestionInfo);
                    if (shRet == SystemData.ReturnValue.OK)
                    {
                        MessageBoxEx.Show(this, "已成功退回病历", MessageBoxIcon.Information);
                    }
                }
            }
        }
Exemplo n.º 16
0
 /// <summary>
 /// 质控人员打开历史病历
 /// </summary>
 /// <returns>DataLayer.SystemData.ReturnValue</returns>
 public short OpenHistoryDocument(EMRDBLib.MedicalQcMsg questionInfo)
 {
     return(SystemData.ReturnValue.OK);
 }
Exemplo n.º 17
0
        /// <summary>
        /// 按照科室问题类型分组显示
        /// </summary>
        /// <param name="lstQCQuestionInfos"></param>
        private void ShowAsDeptBugs(List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfos)
        {
            if (lstQCQuestionInfos == null || lstQCQuestionInfos.Count == 0)
            {
                return;
            }
            this.dataGridView1.Rows.Clear();
            string    szDeptName      = null;
            string    szQuestionType  = null;
            int       nQuestionCount  = 0;
            string    szKey           = null;
            Hashtable htQuestionInfos = new Hashtable();
            //统计病历份数ht
            Hashtable htPidVid = new Hashtable();

            for (int index = 0; index < lstQCQuestionInfos.Count; index++)
            {
                EMRDBLib.MedicalQcMsg qcQuestionInfo = lstQCQuestionInfos[index];
                if (qcQuestionInfo.DEPT_NAME != szDeptName)
                {
                    szDeptName = qcQuestionInfo.DEPT_NAME;
                }
                if (qcQuestionInfo.QA_EVENT_TYPE != szQuestionType)
                {
                    szQuestionType = qcQuestionInfo.QA_EVENT_TYPE;
                }
                if (szKey == null)
                {
                    szKey = szDeptName + szQuestionType;
                    nQuestionCount++;
                }
                else if (szKey == (szDeptName + szQuestionType))
                {
                    nQuestionCount++;
                }
                else
                {
                    if (!htQuestionInfos.ContainsKey(szKey))
                    {
                        htQuestionInfos.Add(szKey, nQuestionCount);
                    }
                    szKey          = szDeptName + szQuestionType;
                    nQuestionCount = 1;
                }
                if (index == lstQCQuestionInfos.Count - 1 && !htQuestionInfos.ContainsKey(szKey))
                {
                    htQuestionInfos.Add(szKey, nQuestionCount);
                }
                if (!htPidVid.ContainsKey(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID))
                {
                    htPidVid.Add(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID, lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID);
                }
            }
            szKey = null;
            for (int index = 0; index < lstQCQuestionInfos.Count; index++)
            {
                EMRDBLib.MedicalQcMsg qcQuestionInfo = lstQCQuestionInfos[index];
                int nRowIndex = 0;
                if (szKey != (qcQuestionInfo.DEPT_NAME + qcQuestionInfo.QA_EVENT_TYPE))
                {
                    szKey = qcQuestionInfo.DEPT_NAME + qcQuestionInfo.QA_EVENT_TYPE;
                    string szQuestionCount = null;
                    if (htQuestionInfos.Contains(szKey))
                    {
                        szQuestionCount = htQuestionInfos[szKey].ToString();
                    }
                    nRowIndex = this.dataGridView1.Rows.Add();
                    DataGridViewRow parentRow = this.dataGridView1.Rows[nRowIndex];
                    parentRow.Cells[this.colDeptName.Index].Value      = qcQuestionInfo.DEPT_NAME;
                    parentRow.Cells[this.colQuestionType.Index].Value  = qcQuestionInfo.QA_EVENT_TYPE;
                    parentRow.Cells[this.colQuestionCount.Index].Value = szQuestionCount;
                    parentRow.DefaultCellStyle.BackColor = Color.FromArgb(200, 200, 200);
                }
                nRowIndex = this.dataGridView1.Rows.Add();
                DataGridViewRow childRow = this.dataGridView1.Rows[nRowIndex];
                this.SetRowData(childRow, qcQuestionInfo);
            }
            int             nIndex = this.dataGridView1.Rows.Add();
            DataGridViewRow row    = this.dataGridView1.Rows[nIndex];

            row.Cells[this.colDeptName.Index].Value = "合计";
            row.Cells[1].Value             = "检查例数:";
            row.Cells[2].Value             = lstQCQuestionInfos.Count;
            row.Cells[4].Value             = "病历份数:";
            row.Cells[5].Value             = htPidVid.Count;
            row.DefaultCellStyle.BackColor = Color.FromArgb(200, 200, 200);
        }
Exemplo n.º 18
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            string szChecker = this.cboUserList.Text;

            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在按检查者统计质检问题,请稍候...");
            this.dataGridView1.Rows.Clear();
            List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfos = null;
            short shRet = MedicalQcMsgAccess.Instance.GetQCQuestionListByChecker(szChecker, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")),
                                                                                 DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), ref lstQCQuestionInfos);

            if (shRet != SystemData.ReturnValue.OK &&
                shRet != SystemData.ReturnValue.RES_NO_FOUND)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("查询数据失败!");
                this.ShowStatusMessage(null);
                return;
            }
            if (lstQCQuestionInfos == null || lstQCQuestionInfos.Count <= 0)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information);
                this.ShowStatusMessage(null);
                return;
            }
            //按照检查者,患者姓名,检查时间排序
            lstQCQuestionInfos = lstQCQuestionInfos.OrderBy(m => m.ISSUED_ID)
                                 .ThenBy(m => m.PATIENT_NAME)
                                 .ThenBy(m => m.ISSUED_DATE_TIME).ToList();
            //检查者检查的例数
            int       iCount   = 0;
            Hashtable htPidVid = new Hashtable();

            for (int index = 0; index < lstQCQuestionInfos.Count; index++)
            {
                iCount++;
                if (!htPidVid.ContainsKey(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID))
                {
                    htPidVid.Add(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID,
                                 lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID);
                }
                EMRDBLib.MedicalQcMsg qcQuestionInfo = lstQCQuestionInfos[index];
                int             nRowIndex            = this.dataGridView1.Rows.Add();
                DataGridViewRow row = this.dataGridView1.Rows[nRowIndex];
                this.SetRowData(row, qcQuestionInfo);
                if ((index + 1) == lstQCQuestionInfos.Count ||
                    (lstQCQuestionInfos[index].ISSUED_BY != lstQCQuestionInfos[index + 1].ISSUED_BY))
                {
                    DataGridViewRow sumrow = this.dataGridView1.Rows[this.dataGridView1.Rows.Add()];
                    sumrow.Cells[0].Value             = "合计";
                    sumrow.Cells[1].Value             = "检查例数:";
                    sumrow.Cells[2].Value             = iCount;
                    sumrow.Cells[3].Value             = "病历份数:";
                    sumrow.Cells[4].Value             = htPidVid.Count;
                    sumrow.DefaultCellStyle.BackColor = Color.FromArgb(200, 200, 200);
                    iCount = 0;
                    htPidVid.Clear();
                }
            }
            this.dataGridView1.Tag = this.cboUserList.Text;

            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Exemplo n.º 19
0
        /// <summary>
        /// 合并系统时效检查
        /// </summary>
        private void JoinTimeCheck(List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfo)
        {
            try
            {
                this.ShowStatusMessage("正在加载系统时效检查...");
                GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
                DateTime dtBeginTime = DateTime.Parse(this.dtpStatTimeBegin.Value.ToShortDateString());
                DateTime dtEndTime   = DateTime.Parse(this.dtpStatTimeEnd.Value.AddDays(1).ToShortDateString());
                DeptInfo deptInfo    = this.cboDeptName.SelectedItem as DeptInfo;
                string   szDeptCode  = null;
                if (deptInfo != null && !string.IsNullOrEmpty(this.cboDeptName.Text))
                {
                    szDeptCode = deptInfo.DEPT_CODE;
                }
                List <EMRDBLib.QcTimeRecord> lstQcTimeRecord = null;
                string szTimeType = "CHECK_DATE";
                short  shRet      = QcTimeRecordAccess.Instance.GetQcTimeRecords(dtBeginTime, dtEndTime, szTimeType, "1,3", szDeptCode, null, ref lstQcTimeRecord);
                if (shRet != SystemData.ReturnValue.OK ||
                    lstQcTimeRecord == null ||
                    lstQcTimeRecord.Count <= 0)
                {
                    GlobalMethods.UI.SetCursor(this, Cursors.Default);
                    return;
                }
                if (lstQCQuestionInfo == null)
                {
                    lstQCQuestionInfo = new List <EMRDBLib.MedicalQcMsg>();
                }
                foreach (EMRDBLib.QcTimeRecord item in lstQcTimeRecord)
                {
                    EMRDBLib.MedicalQcMsg qcQuestionInfo = new EMRDBLib.MedicalQcMsg();
                    qcQuestionInfo.ISSUED_BY        = item.CheckName;
                    qcQuestionInfo.ISSUED_DATE_TIME = item.EndDate;
                    qcQuestionInfo.DEPT_STAYED      = item.DeptInCharge;
                    qcQuestionInfo.DEPT_NAME        = item.DeptStayed;
                    string szQuestionContent = string.Empty;

                    if (item.QcResult == EMRDBLib.SystemData.WrittenState.Timeout)
                    {
                        szQuestionContent = EMRDBLib.SystemData.WrittenState.GetCnWrittenState(item.QcResult) + " 已超" + Math.Round((item.RecordTime - item.EndDate).TotalHours, 0, MidpointRounding.ToEven) + "小时" + " " + item.QcExplain;
                    }
                    else
                    {
                        szQuestionContent = EMRDBLib.SystemData.WrittenState.GetCnWrittenState(item.QcResult) + " " + item.QcExplain;
                    }
                    qcQuestionInfo.MESSAGE          = szQuestionContent;
                    qcQuestionInfo.PATIENT_ID       = item.PatientID;
                    qcQuestionInfo.VISIT_ID         = item.VisitID;
                    qcQuestionInfo.PATIENT_NAME     = item.PatientName;
                    qcQuestionInfo.QA_EVENT_TYPE    = "时效要求";
                    qcQuestionInfo.DOCTOR_IN_CHARGE = item.DoctorInCharge;
                    lstQCQuestionInfo.Add(qcQuestionInfo);
                }


                GlobalMethods.UI.SetCursor(this, Cursors.Default);
            }
            catch (Exception ex)
            {
                MessageBoxEx.ShowError("问题清单加载时效记录失败", ex.ToString());
                LogManager.Instance.WriteLog("问题清单加载时效记录失败", ex);
            }
        }
Exemplo n.º 20
0
        /// <summary>
        /// 合并系统内容缺陷检查
        /// </summary>
        private void JoinContentBugsCheck(List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfo)
        {
            try
            {
                this.ShowStatusMessage("正在加载系统内容缺陷检查...");
                GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
                DateTime dtBeginTime = DateTime.Parse(this.dtpStatTimeBegin.Value.ToShortDateString());
                DateTime dtEndTime   = DateTime.Parse(this.dtpStatTimeEnd.Value.AddDays(1).ToShortDateString());
                DeptInfo deptInfo    = this.cboDeptName.SelectedItem as DeptInfo;
                string   szDeptCode  = null;
                if (deptInfo != null && !string.IsNullOrEmpty(this.cboDeptName.Text))
                {
                    szDeptCode = deptInfo.DEPT_CODE;
                }
                List <EMRDBLib.Entity.QcContentRecord> lstQcContentRecord = null;
                short shRet = QcContentRecordAccess.Instance.GetQcContentRecord(dtBeginTime, dtEndTime, szDeptCode, ref lstQcContentRecord);
                if (shRet != SystemData.ReturnValue.OK ||
                    lstQcContentRecord == null ||
                    lstQcContentRecord.Count <= 0)
                {
                    GlobalMethods.UI.SetCursor(this, Cursors.Default);
                    return;
                }
                if (lstQCQuestionInfo == null)
                {
                    lstQCQuestionInfo = new List <EMRDBLib.MedicalQcMsg>();
                }
                foreach (EMRDBLib.Entity.QcContentRecord item in lstQcContentRecord)
                {
                    EMRDBLib.MedicalQcMsg qcQuestionInfo = new EMRDBLib.MedicalQcMsg();
                    if (string.IsNullOrEmpty(item.CheckerName))
                    {
                        qcQuestionInfo.ISSUED_BY        = "系统自动";
                        qcQuestionInfo.ISSUED_DATE_TIME = item.BugCreateTime;
                    }
                    else
                    {
                        qcQuestionInfo.ISSUED_BY        = item.CheckerName;
                        qcQuestionInfo.ISSUED_DATE_TIME = item.CheckDate;
                        qcQuestionInfo.ISSUED_ID        = item.CheckerID;
                    }

                    qcQuestionInfo.DEPT_STAYED      = item.DeptCode;
                    qcQuestionInfo.DEPT_NAME        = item.DeptIncharge;
                    qcQuestionInfo.TOPIC_ID         = item.DocSetID;
                    qcQuestionInfo.DOCTOR_IN_CHARGE = item.DocIncharge;
                    string szQuestionContent = string.Empty;
                    if (item.BugClass == 0)
                    {
                        szQuestionContent = string.Format("出现警告:{0}", item.QCExplain);
                    }
                    else
                    {
                        szQuestionContent = string.Format("出现错误:{0}", item.QCExplain);
                    }
                    qcQuestionInfo.MESSAGE       = szQuestionContent;
                    qcQuestionInfo.PATIENT_ID    = item.PatientID;
                    qcQuestionInfo.VISIT_ID      = item.VisitID;
                    qcQuestionInfo.PATIENT_NAME  = item.PatientName;
                    qcQuestionInfo.QA_EVENT_TYPE = string.Format("自动检查-{0}", item.DocTitle);
                    lstQCQuestionInfo.Add(qcQuestionInfo);
                }


                GlobalMethods.UI.SetCursor(this, Cursors.Default);
            }
            catch (Exception ex)
            {
                MessageBoxEx.ShowError("问题清单加载时效记录失败", ex.ToString());
                LogManager.Instance.WriteLog("问题清单加载时效记录失败", ex);
            }
        }
Exemplo n.º 21
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            string szCheckerName = this.cboUserList.Text;

            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在统计工作量,请稍候...");
            this.dataGridView1.Rows.Clear();

            List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfos = null;
            short shRet = MedicalQcMsgAccess.Instance.GetQCQuestionListByChecker(szCheckerName, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")),
                                                                                 DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), ref lstQCQuestionInfos);

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

            List <EMRDBLib.PatDoctorInfo> lstPatDoctorInfos = new List <EMRDBLib.PatDoctorInfo>();

            Hashtable hashtable = new Hashtable();

            for (int index = 0; index < lstQCQuestionInfos.Count; index++)
            {
                EMRDBLib.MedicalQcMsg questionInfo = lstQCQuestionInfos[index];
                if (!hashtable.ContainsKey(questionInfo.PATIENT_ID + questionInfo.VISIT_ID))
                {
                    EMRDBLib.PatDoctorInfo patDoctorInfo = new EMRDBLib.PatDoctorInfo();
                    patDoctorInfo.PatientID = questionInfo.PATIENT_ID;
                    patDoctorInfo.VisitID   = questionInfo.VISIT_ID;
                    hashtable.Add(questionInfo.PATIENT_ID + questionInfo.VISIT_ID, patDoctorInfo);
                    lstPatDoctorInfos.Add(patDoctorInfo);
                }
            }
            //获取三级医生信息
            shRet = PatVisitAccess.Instance.GetPatSanjiDoctors(ref lstPatDoctorInfos);
            //按检查者、患者姓名、检查时间排序
            lstQCQuestionInfos = lstQCQuestionInfos.OrderBy(m => m.ISSUED_BY).ThenBy(m => m.PATIENT_NAME)
                                 .ThenBy(m => m.ISSUED_DATE_TIME).ToList();
            //检查者检查的例数
            int       iCount   = 0;
            Hashtable htPidVid = new Hashtable();

            for (int index = 0; index < lstQCQuestionInfos.Count; index++)
            {
                iCount++;
                if (!htPidVid.ContainsKey(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID))
                {
                    htPidVid.Add(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID,
                                 lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID);
                }
                EMRDBLib.MedicalQcMsg questionInfo   = lstQCQuestionInfos[index];
                int                    nRowIndex     = this.dataGridView1.Rows.Add();
                DataGridViewRow        row           = this.dataGridView1.Rows[nRowIndex];
                EMRDBLib.PatDoctorInfo patDoctorInfo = lstPatDoctorInfos.Find(delegate(EMRDBLib.PatDoctorInfo p)
                {
                    if (p.PatientID == lstQCQuestionInfos[index].PATIENT_ID && p.VisitID == lstQCQuestionInfos[index].VISIT_ID)
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                });
                this.SetRowData(row, questionInfo, patDoctorInfo);
                if ((index + 1) == lstQCQuestionInfos.Count ||
                    (lstQCQuestionInfos[index].ISSUED_BY != lstQCQuestionInfos[index + 1].ISSUED_BY))
                {
                    DataGridViewRow sumrow = this.dataGridView1.Rows[this.dataGridView1.Rows.Add()];
                    sumrow.Cells[0].Value             = "合计";
                    sumrow.Cells[1].Value             = "检查例数:";
                    sumrow.Cells[2].Value             = iCount;
                    sumrow.Cells[3].Value             = "病历份数:";
                    sumrow.Cells[4].Value             = htPidVid.Count;
                    sumrow.DefaultCellStyle.BackColor = Color.FromArgb(200, 200, 200);
                    iCount = 0;
                    htPidVid.Clear();
                }
            }

            if (this.dataGridView1.Rows.Count > 0)
            {
                this.dataGridView1.ClearSelection();
            }

            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }