Пример #1
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.Operation operation = row.Tag as EMRDBLib.Operation;

            if (operation == null)
            {
                return;
            }
            if (SystemParam.Instance.LocalConfigOption.IsNewTheme)
            {
                PatVisitInfo patVisit = new PatVisitInfo()
                {
                    PATIENT_ID = operation.PATIENT_ID, VISIT_ID = operation.VISIT_ID.ToString(), PATIENT_NAME = operation.PATIENT_NAME
                };
                this.MainForm.SwitchPatient(patVisit);
                return;
            }
            this.MainForm.OpenDocument(string.Empty, operation.PATIENT_ID, operation.VISIT_ID.ToString());
        }
Пример #2
0
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;
            //查询是否有检验记录
            string szSQl = string.Format("select b.ITEM_RESULT from LAB_MASTER_V a,LAB_RESULT_V b where a.TEST_ID = b.TEST_ID and b.ITEM_NAME like '%血型%' and a.PATIENT_ID = '{0}' and a.VISIT_ID = '{1}' "
                                         , patVisitLog.PATIENT_ID
                                         , patVisitLog.VISIT_ID);
            DataSet ds    = null;
            short   shRet = CommonAccess.Instance.ExecuteQuery(szSQl, out ds);

            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                qcCheckResult.QC_EXPLAIN = "规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            string ITEM_RESULT = ds.Tables[0].Rows[0]["ITEM_RESULT"].ToString();

            if (string.IsNullOrEmpty(ITEM_RESULT))
            {
                qcCheckResult.QC_EXPLAIN = "规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            //查询首页血型填写情况
            szSQl = string.Format("select BLOOD_TYPE_NAME from pat_visit_v a where  a.PATIENT_ID ='{0}' and a.VISIT_NO ='{1}'"
                                  , patVisitLog.PATIENT_ID
                                  , patVisitLog.VISIT_NO);
            shRet = CommonAccess.Instance.ExecuteQuery(szSQl, out ds);
            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                qcCheckResult.QC_EXPLAIN  = string.Format("检验记录中有血型结果{0}型,但首页未填", ITEM_RESULT);
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            string CODE_NAME = ds.Tables[0].Rows[0]["BLOOD_TYPE_NAME"].ToString();

            if (string.IsNullOrEmpty(CODE_NAME))
            {
                qcCheckResult.QC_EXPLAIN  = string.Format("检验记录中有血型结果{0}型,但首页未填", ITEM_RESULT);
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            if (CODE_NAME != ITEM_RESULT)
            {
                qcCheckResult.QC_EXPLAIN  = string.Format("检验记录中有血型结果{0}型,首页填写血型为{1}型", ITEM_RESULT, CODE_NAME);
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            qcCheckResult.QC_EXPLAIN = "规则通过";
            qcCheckResult.QC_RESULT  = 1;
            return(true);
        }
Пример #3
0
        private void dataTableView2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            MedicalQcMsg medicalQcMsg = this.dataTableView2.Rows[e.RowIndex].Tag as MedicalQcMsg;

            if (medicalQcMsg == null)
            {
                return;
            }
            QcMsgDict qcMsgDict = null;

            QcMsgDictAccess.Instance.GetQcMsgDict(medicalQcMsg.QC_MSG_CODE, ref qcMsgDict);
            PatVisitInfo patVisit = new PatVisitInfo();

            patVisit.PATIENT_ID = medicalQcMsg.PATIENT_ID;
            patVisit.VISIT_ID   = medicalQcMsg.VISIT_ID;
            patVisit.VISIT_NO   = medicalQcMsg.VISIT_NO;
            this.MainForm.SwitchPatient(patVisit);
            PatientPageForm patientPageForm = this.MainForm.GetPatientPageForm(patVisit);

            if (string.IsNullOrEmpty(qcMsgDict.MESSAGE_TITLE) || qcMsgDict.QA_EVENT_TYPE.Contains("入院记录"))
            {
                patientPageForm.LoadModule(medicalQcMsg.QA_EVENT_TYPE);
            }
            else
            {
                patientPageForm.LoadModule(qcMsgDict.MESSAGE_TITLE);
            }
        }
Пример #4
0
        /// <summary>
        /// 运行某患者病案自动检查缺陷内容
        /// </summary>
        public void CheckPatient(PatVisitInfo patVisitLog)
        {
            //初始化患者病案资料
            Heren.MedQC.CheckPoint.CheckPointHelper.Instance.InitPatientInfo(patVisitLog);
            //获取缺陷自动检查配置规则列表
            List <QcCheckPoint> lstQcCheckPoint = null;
            short shRet = QcCheckPointAccess.Instance.GetQcCheckPoints(ref lstQcCheckPoint);

            if (shRet != SystemData.ReturnValue.OK)
            {
                return;
            }
            foreach (var item in lstQcCheckPoint)
            {
                if (string.IsNullOrEmpty(item.HandlerCommand))
                {
                    continue;
                }
                object result = null;
                CommandHandler.Instance.SendCommand(item.HandlerCommand, item, patVisitLog, out result);
                QcCheckResult qcCheckResult = result as QcCheckResult;
                if (qcCheckResult == null)
                {
                    continue;
                }
                QcCheckResultAccess.Instance.SaveQcCheckResult(qcCheckResult);
            }
        }
Пример #5
0
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
                DateTime     startTime   = DateTime.Now;
                PatVisitInfo patVisitLog = new PatVisitInfo();
                patVisitLog.PATIENT_ID = this.txtPatientID.Text;
                patVisitLog.VISIT_ID   = this.txtVisitID.Text;
                CheckPointHelper.Instance.CheckPatient(patVisitLog);

                string time = (DateTime.Now - startTime).TotalSeconds.ToString();
                this.label3.Text = "耗时:" + time;
                List <QcCheckResult> lstQcCheckResult = null;
                this.dataGridView4.Rows.Clear();
                short shRet = QcCheckResultAccess.Instance.GetQcCheckResults(patVisitLog.DefaultTime, patVisitLog.DefaultTime, patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID, null, null, null, 0, ref lstQcCheckResult);

                foreach (var item in lstQcCheckResult)
                {
                    int             rowIndex = this.dataGridView4.Rows.Add();
                    DataGridViewRow row      = this.dataGridView4.Rows[rowIndex];
                    row.Cells[this.col_4_QcResult.Index].Value       = item.QC_RESULT == 0 ? "不通过" : "通过";
                    row.Cells[this.col_4_MsgDictMessage.Index].Value = item.MSG_DICT_MESSAGE;
                    row.Cells[this.colQcExplain.Index].Value         = item.QC_EXPLAIN;
                    row.Tag = item;
                }

                GlobalMethods.UI.SetCursor(this, Cursors.Default);
            }
            catch (Exception ex)
            {
                LogManager.Instance.WriteLog("单患者运行所有规则出错", ex);
                MessageBoxEx.ShowErrorFormat("单患者运行所有规则出错", ex.ToString(), null);
            }
        }
Пример #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            PatVisitInfo patVisitLog = new PatVisitInfo();

            patVisitLog.PATIENT_ID = "P099634";
            patVisitLog.VISIT_ID   = "20150722000000000002";
            patVisitLog.VISIT_TIME = DateTime.Now.AddDays(-2);
            CheckPointHelper.Instance.InitPatientInfo(patVisitLog);
            QcCheckPoint qcCheckPoint = new QcCheckPoint();

            qcCheckPoint.CheckPointID = "P201608261507573079";
            short  shRet  = QcCheckPointAccess.Instance.GetQcCheckPoint(qcCheckPoint.CheckPointID, ref qcCheckPoint);
            Object result = null;

            CommandHandler.Instance.SendCommand(qcCheckPoint.HandlerCommand, qcCheckPoint, patVisitLog, out result);
            QcCheckResult qcCheckResult = result as QcCheckResult;

            shRet = QcCheckResultAccess.Instance.SaveQcCheckResult(qcCheckResult);
            if (qcCheckResult.QC_RESULT == 1)
            {
                MessageBox.Show("检查通过");
                return;
            }
            MessageBox.Show(qcCheckResult.QC_EXPLAIN);
        }
Пример #7
0
        /// <summary>
        /// 切换当前病人窗口中显示的活动病人
        /// </summary>
        /// <param name="patVisit">新的病人信息</param>
        /// <returns>是否成功</returns>
        public bool SwitchPatient(PatVisitInfo patVisit)
        {
            if (patVisit != null &&
                patVisit.IsPatVisitSame(this.m_patientVisit))
            {
                return(true);
            }
            SystemParam.Instance.PatVisitInfo = patVisit;
            PatientInfoChangingEventArgs e =
                new PatientInfoChangingEventArgs(this.m_patientVisit, patVisit);

            this.OnPatientInfoChanging(e);
            if (e.Cancel)
            {
                return(false);
            }

            //仅第1次加载病人时加载各子窗口
            if (this.m_patientVisit == null)
            {
                this.LoadContentModules();
                this.m_patientVisit = new PatVisitInfo();
            }
            if (patVisit == null)
            {
                patVisit = new PatVisitInfo();
            }
            this.m_patientVisit = patVisit;
            this.OnPatientInfoChanged(EventArgs.Empty);
            return(true);
        }
Пример #8
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            string szPId = this.dataGridView1.Rows[e.RowIndex].Cells[this.colPatientID.Index].Value != null ?
                           this.dataGridView1.Rows[e.RowIndex].Cells[this.colPatientID.Index].Value.ToString() : "";
            string szVid = this.dataGridView1.Rows[e.RowIndex].Cells[this.colVisitID.Index].Value != null ?
                           this.dataGridView1.Rows[e.RowIndex].Cells[this.colVisitID.Index].Value.ToString() : "";

            if (string.IsNullOrEmpty(szPId) || string.IsNullOrEmpty(szVid))
            {
                return;
            }

            if (SystemParam.Instance.LocalConfigOption.IsNewTheme)
            {
                PatVisitInfo patVisit = new PatVisitInfo()
                {
                    PATIENT_ID = szPId, VISIT_ID = szVid
                };
                this.MainForm.SwitchPatient(patVisit);
                return;
            }
            this.MainForm.OpenDocument(string.Empty, szPId, szVid);
        }
Пример #9
0
        /// <summary>
        /// 分配病案
        /// </summary>
        /// <param name="patRow"></param>
        private void AddPatVisitLog(DataGridViewRow patRow)
        {
            PatVisitInfo patVisitLog = patRow.Tag as PatVisitInfo;

            if (this.dgvDetailList.SelectedRows.Count <= 0)
            {
                MessageBoxEx.Show("分配病案时请选择病案专家");
                return;
            }
            Specialist specialist = this.dgvDetailList.SelectedRows[0].Tag as Specialist;

            if (specialist == null)
            {
                MessageBoxEx.Show("读取病案专家信息失败");
                return;
            }
            patRow.Cells[this.colSpecialistName.Index].Tag   = specialist;
            patRow.Cells[this.colSpecialistName.Index].Value = specialist.UserName;
            patRow.DefaultCellStyle.BackColor = Color.LightGray;

            List <PatVisitInfo> lstPatVisitLog = this.dgvDetailList.SelectedRows[0].Cells[this.colPatientCount.Index].Tag as List <PatVisitInfo>;

            if (lstPatVisitLog == null)
            {
                lstPatVisitLog = new List <PatVisitInfo>();
            }
            lstPatVisitLog.Add(patVisitLog);
            this.dgvDetailList.SelectedRows[0].Cells[this.colPatientCount.Index].Value = lstPatVisitLog.Count.ToString();
        }
Пример #10
0
        /// <summary>
        /// Called by the <see cref="IScheduler" /> when a <see cref="ITrigger" />
        /// fires that is associated with the <see cref="IJob" />.
        /// </summary>
        /// <remarks>
        /// The implementation may wish to set a  result object on the
        /// JobExecutionContext before this method exits.  The result itself
        /// is meaningless to Quartz, but may be informative to
        /// <see cref="IJobListener" />s or
        /// <see cref="ITriggerListener" />s that are watching the job's
        /// execution.
        /// </remarks>
        /// <param name="context">The execution context.</param>
        public void Execute(IJobExecutionContext context)
        {
            try
            {
                logger.Info("全院病历时效分析开始...");

                if (SystemContext.Instance.QueueTimeCheckPatVisit == null)
                {
                    SystemContext.Instance.QueueTimeCheckPatVisit = new Queue <EMRDBLib.PatVisitInfo>();
                }
                if (SystemContext.Instance.QueueTimeCheckPatVisit.Count <= 0)
                {
                    List <PatVisitInfo> lstPatVisitInfo = null;
                    short shRet = QcTimeRecordAccess.Instance.GetPatsListByInHosptial(ref lstPatVisitInfo);
                    if (shRet != SystemData.ReturnValue.OK && shRet != SystemData.ReturnValue.RES_NO_FOUND)
                    {
                        logger.Error("未查询到在院病人或失败");
                        return;
                    }
                    DateTime dtDischargeBeginTime = DateTime.Parse(DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd 00:00:00"));
                    DateTime dtDischargeEndTime   = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
                    shRet = QcTimeRecordAccess.Instance.GetPatsListByOutHosptial(dtDischargeBeginTime, dtDischargeEndTime,
                                                                                 ref lstPatVisitInfo);
                    if (shRet != SystemData.ReturnValue.OK &&
                        shRet != SystemData.ReturnValue.RES_NO_FOUND &&
                        lstPatVisitInfo == null)
                    {
                        logger.Info("全院病历时效分析获取出院患者列表数据为空...");
                    }
                    //插入队列
                    foreach (var item in lstPatVisitInfo.ToList())
                    {
                        SystemContext.Instance.QueueTimeCheckPatVisit.Enqueue(item);
                    }
                }
                int      index        = 0;
                int      successCount = 0;
                int      errorCount   = 0;
                DateTime now          = DateTime.Now;
                do
                {
                    index++;
                    PatVisitInfo patVisitInfo = SystemContext.Instance.QueueTimeCheckPatVisit.Dequeue();
                    short        shRet        = TimeCheckHelper.Instance.GenerateTimeRecord(patVisitInfo, now);
                    if (shRet == SystemData.ReturnValue.OK)
                    {
                        successCount++;
                    }
                    else if (shRet != SystemData.ReturnValue.RES_NO_FOUND)
                    {
                        errorCount++;
                    }
                } while (SystemContext.Instance.QueueTimeCheckPatVisit.Count > 0 && index < 5);
                logger.Info(string.Format("全院病历时效分析结束 成功:{0}份;错误:{1}份\n", successCount, errorCount));
            }
            catch (Exception ex)
            {
                logger.Info(ex);
            }
        }
Пример #11
0
        /// <summary>
        /// 取消病案分配
        /// </summary>
        /// <param name="patRow"></param>
        private void RemovePatVisitLog(DataGridViewRow patRow)
        {
            if (patRow.Cells[this.colSpecialistName.Index].Tag == null)
            {
                return;
            }
            Specialist specialist = patRow.Cells[this.colSpecialistName.Index].Tag as Specialist;

            foreach (DataGridViewRow row in this.dgvDetailList.Rows)
            {
                if (specialist == (row.Tag as Specialist))
                {
                    patRow.Cells[this.colSpecialistName.Index].Tag   = null;
                    patRow.Cells[this.colSpecialistName.Index].Value = string.Empty;
                    patRow.DefaultCellStyle.BackColor = Color.White;
                    List <PatVisitInfo> lstPatVisitLog = row.Cells[this.colPatientCount.Index].Tag as List <PatVisitInfo>;
                    PatVisitInfo        patVisitLog    = patRow.Tag as PatVisitInfo;
                    if (patVisitLog != null)
                    {
                        lstPatVisitLog.Remove(patVisitLog);
                    }
                    row.Cells[this.colPatientCount.Index].Value = lstPatVisitLog.Count.ToString();
                    break;
                }
            }
        }
Пример #12
0
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;

            string szSQl = string.Format("select t.HBSAG_INDICATOR, t.HCV_AB_INDICATOR, t.HIV_AB_INDICATOR from PAT_VISIT_V t where t.PATIENT_ID = '{0}' and t.VISIT_NO = '{1}' "
                                         , patVisitLog.PATIENT_ID
                                         , patVisitLog.VISIT_ID);
            DataSet ds    = null;
            short   shRet = CommonAccess.Instance.ExecuteQuery(szSQl, out ds);

            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                qcCheckResult.QC_EXPLAIN = "规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            //检验结果乙肝表面抗原、丙肝抗体、艾滋病抗体,还不太清楚如何判断阳性,规则默认为通过
            qcCheckResult.QC_EXPLAIN = "规则通过";
            qcCheckResult.QC_RESULT  = 1;
            return(true);
        }
Пример #13
0
        private void metroTextBox1_TextChanged(object sender, EventArgs e)
        {
            string     szDocID = this.txtCaseNo.Text.Trim();
            MedDocInfo docInfo = null;
            short      shRet   = EmrDocAccess.Instance.GetDocInfo(szDocID, ref docInfo);

            if (docInfo == null)
            {
                return;
            }
            string       szPatientID   = docInfo.PATIENT_ID;
            string       szVisitNo     = docInfo.VISIT_ID;//文书VisitID存了 VisitNo
            PatVisitInfo patVisitInfos = null;

            shRet = PatVisitAccess.Instance.GetPatVisit(szPatientID, szVisitNo, ref patVisitInfos);

            List <MedDocInfo> lstMedDocInfos = null;

            shRet = EmrDocAccess.Instance.GetDocList(szPatientID, szVisitNo, ref lstMedDocInfos);
            if (lstMedDocInfos == null)
            {
                return;
            }
            List <RecPaper> lstRecPapers = new List <RecPaper>();

            shRet = RecPaperAccess.Instance.GetRecPapers(szPatientID, szVisitNo, ref lstRecPapers);

            string[] arrSignKeyName = DataCache.Instance.DicHdpParameter[SystemData.ConfigKey.SignKeyName] != null?null: DataCache.Instance.DicHdpParameter[SystemData.ConfigKey.SignKeyName].Split('|');
            int      rowIndex       = 0;

            this.dataGridView1.Rows.Clear();
        }
Пример #14
0
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;
            //查询患者指定文书类型ID号
            List <MedDocInfo> documentlist = TimeCheckHelper.Instance.GetDocumentList(qcCheckPoint.DocTypeID, patVisitLog.MedDocInfos);

            if (documentlist == null || documentlist.Count == 0)
            {
                qcCheckResult.QC_EXPLAIN = "未写出院记录,规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            //获取文书xml内容
            string szXMLFile = null;

            MedXMLAccess.Instance.GetDocXml(documentlist[0], ref szXMLFile);
            if (string.IsNullOrEmpty(szXMLFile))
            {
                qcCheckResult.QC_EXPLAIN = "未写出院记录,规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            qcCheckResult.DOC_SETID  = documentlist[0].DOC_SETID;
            qcCheckResult.DOC_TITLE  = documentlist[0].DOC_TITLE;
            qcCheckResult.DOCTYPE_ID = documentlist[0].DOC_TYPE;
            qcCheckResult.DOC_TIME   = documentlist[0].DOC_TIME;
            XmlDocument doc = new XmlDocument();

            doc.Load(szXMLFile);
            string[] items =
            {
                "入院情况", "入院诊断", "诊疗经过", "出院诊断", "出院后注意事项"
            };
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < items.Length; i++)
            {
                XmlNode child = doc.SelectSingleNode(string.Format("//Field[@Name='{0}']", items[i]));
                if (child == null || string.IsNullOrEmpty(child.InnerText))//存在一项为空则直接返回不继续判断
                {
                    sb.AppendFormat("{0}为空,", items[i]);
                }
            }
            if (sb.ToString() != string.Empty)
            {
                qcCheckResult.QC_EXPLAIN  = sb.ToString();
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            qcCheckResult.QC_EXPLAIN = "规则通过";
            qcCheckResult.QC_RESULT  = 1;
            return(true);
        }
Пример #15
0
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;
            //查询患者指定文书类型ID号
            List <MedDocInfo> documentlist = TimeCheckHelper.Instance.GetDocumentList(qcCheckPoint.DocTypeID, patVisitLog.MedDocInfos);

            if (documentlist == null || documentlist.Count == 0)
            {
                qcCheckResult.QC_EXPLAIN = "未写围手术期记录,规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            string 手术记录输血量   = string.Empty;
            string 术后首次病程输血量 = string.Empty;

            foreach (var docinfo in documentlist)
            {
                //获取文书xml内容
                string szXMLFile = null;
                MedXMLAccess.Instance.GetDocXml(docinfo, ref szXMLFile);
                if (string.IsNullOrEmpty(szXMLFile))
                {
                    qcCheckResult.QC_EXPLAIN = "未写围手术期记录,规则通过";
                    qcCheckResult.QC_RESULT  = 1;
                    return(true);
                }
                XmlDocument doc = new XmlDocument();
                doc.Load(szXMLFile);
                XmlNode node = doc.SelectSingleNode(string.Format("/EmrDoc/Body/Section[@ID='{0}']//Field[@Name='术中输血量']", docinfo.DOC_ID));

                if (node != null && !string.IsNullOrEmpty(node.InnerText))
                {
                    if (docinfo.DOC_TITLE == "手术记录")
                    {
                        手术记录输血量 = node.InnerText;
                    }
                    else if (docinfo.DOC_TITLE == "术后首次病程")
                    {
                        术后首次病程输血量 = node.InnerText;
                    }
                }
            }
            if (手术记录输血量 != 术后首次病程输血量)
            {
                qcCheckResult.QC_EXPLAIN  = string.Format("手术记录内填写{0}ml输血量,术后首次病程内填写{1}ml输血量,两者不一致", 手术记录输血量, 术后首次病程输血量);
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            qcCheckResult.QC_EXPLAIN = "规则通过";
            qcCheckResult.QC_RESULT  = 1;
            return(true);
        }
 /// <summary>
 /// 获取指定元素的值
 /// </summary>
 /// <param name="szElementName">元素名称</param>
 /// <param name="szElementValue">返回的元素值</param>
 /// <returns>执行结果</returns>
 protected virtual bool GetElementValue(QcCheckPoint qcCheckPoint, PatVisitInfo patVisitInfo, string szElementName, out string szElementValue)
 {
     szElementValue = string.Empty;
     if (this.m_getElementValueCallback != null)
     {
         return(this.m_getElementValueCallback.Invoke(qcCheckPoint, patVisitInfo, szElementName, out szElementValue));
     }
     return(false);
 }
Пример #17
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            DeptInfo deptInfo   = this.cboDeptName.SelectedItem as  DeptInfo;
            string   szDeptCode = null;

            if (deptInfo != null)
            {
                szDeptCode = deptInfo.DEPT_CODE;
            }
            if (string.IsNullOrEmpty(this.cboDeptName.Text))
            {
                szDeptCode = null;
            }
            string szOrderText = this.txtOrderText.Text.Trim();

            if (string.IsNullOrEmpty(szDeptCode))
            {
                MessageBoxEx.Show("医嘱数据量过大,请先选择科室!");
                return;
            }
            if (string.IsNullOrEmpty(szOrderText))
            {
                MessageBoxEx.Show("检索必须输入医嘱内容!");
                return;
            }

            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在查询数据,请稍候...");
            this.dataGridView1.Rows.Clear();
            List <PatVisitInfo> lstPatVisitLog = null;
            short shRet = OrdersAccess.Instance.GetPatientListByOrderText(szOrderText, szDeptCode, ref lstPatVisitLog);

            if (shRet != SystemData.ReturnValue.OK)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("查询数据失败!");
                this.ShowStatusMessage(null);
                return;
            }
            if (lstPatVisitLog == null || lstPatVisitLog.Count <= 0)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information);
                this.ShowStatusMessage(null);
                return;
            }
            for (int index = 0; index < lstPatVisitLog.Count; index++)
            {
                PatVisitInfo    patVisitLog = lstPatVisitLog[index];
                int             nRowIndex   = this.dataGridView1.Rows.Add();
                DataGridViewRow row         = this.dataGridView1.Rows[nRowIndex];
                this.SetRowData(row, patVisitLog);
            }
            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Пример #18
0
        /// <summary>
        /// 初始化规则检查前的患者资料基础数据
        /// </summary>
        public void InitPatientInfo(PatVisitInfo patVisitLog)
        {
            //1.患者基本信息
            short shRet = PatVisitAccess.Instance.GetPatVisitInfo(patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID, ref patVisitLog);
            //2.初始化文书列表
            List <MedDocInfo> lstMedDocInfo = new List <MedDocInfo>();

            shRet = EmrDocAccess.Instance.GetDocList(patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID, ref lstMedDocInfo);
            patVisitLog.MedDocInfos = lstMedDocInfo;
        }
Пример #19
0
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;
            //查询患者指定文书类型ID号
            List <MedDocInfo> documentlist = TimeCheckHelper.Instance.GetDocumentList(qcCheckPoint.DocTypeID, patVisitLog.MedDocInfos);

            if (documentlist == null || documentlist.Count == 0)
            {
                qcCheckResult.QC_EXPLAIN = "未写入院记录,规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            //获取文书xml内容
            string szXMLFile = null;

            MedXMLAccess.Instance.GetDocXml(documentlist[0], ref szXMLFile);
            if (string.IsNullOrEmpty(szXMLFile))
            {
                qcCheckResult.QC_EXPLAIN = "未写入院记录,规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            qcCheckResult.DOC_SETID  = documentlist[0].DOC_SETID;
            qcCheckResult.DOC_TITLE  = documentlist[0].DOC_TITLE;
            qcCheckResult.DOCTYPE_ID = documentlist[0].DOC_TYPE;
            qcCheckResult.DOC_TIME   = documentlist[0].DOC_TIME;
            XmlDocument doc = new XmlDocument();

            doc.Load(szXMLFile);

            XmlNode node = doc.SelectSingleNode(string.Format("//Field[@Name='{0}']", "现病史"));

            if (node == null || string.IsNullOrEmpty(node.InnerText))//存在一项为空则直接返回不继续判断
            {
                qcCheckResult.QC_EXPLAIN  = string.Format("{0}为空", "现病史");
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }

            if (node.InnerText.IndexOf("食") < 0 || node.InnerText.IndexOf("眠") < 0 && node.InnerText.IndexOf("便") < 0)
            {
                qcCheckResult.QC_EXPLAIN  = string.Format("缺食欲、睡眠或大便情况描述信息");
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            qcCheckResult.QC_EXPLAIN = "规则通过";
            qcCheckResult.QC_RESULT  = 1;
            return(true);
        }
Пример #20
0
        private void QueryByDept(PatVisitInfo patVisitLog)
        {
            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);

            string  szSql   = string.Format("select d.creator_id,d.creator_Name  from emr_doc_t d where d.patient_id='{0}' and d.visit_id={1} group by d.creator_id,d.creator_name", patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID);
            DataSet dataSet = new DataSet();
            short   shRet   = CommonAccess.Instance.ExecuteQuery(szSql, out dataSet);

            if (shRet != SystemData.ReturnValue.OK)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("用户列表查询下载失败!");
                return;
            }
            List <UserInfo> lstUserInfos = new List <UserInfo>();

            if (dataSet.Tables[0].Rows.Count > 0)
            {
                for (int index = 0; index < dataSet.Tables[0].Rows.Count; index++)
                {
                    UserInfo userInfo = new UserInfo();
                    userInfo.USER_NAME = dataSet.Tables[0].Rows[index]["creator_id"].ToString();
                    userInfo.USER_ID   = dataSet.Tables[0].Rows[index]["creator_Name"].ToString();
                    lstUserInfos.Add(userInfo);
                }
            }
            else
            {
                szSql = string.Format("SELECT b.name,b.user_name FROM staff_vs_group@link_emr a,staff_dict@link_emr b,dept_dict@link_emr c WHERE b.emp_no=a.emp_no AND a.group_code='{0}' AND a.group_class='病区医生' and b.dept_code=c.DEPT_CODE and c.clinic_attr = '0' and c.OUTP_OR_INP = '1'and c.internal_or_sergery = '0' order by b.name", patVisitLog.DEPT_CODE);
                shRet = CommonAccess.Instance.ExecuteQuery(szSql, out dataSet);
                if (shRet != SystemData.ReturnValue.OK)
                {
                    GlobalMethods.UI.SetCursor(this, Cursors.Default);
                    MessageBoxEx.Show("用户列表查询下载失败!");
                    return;
                }
                else
                {
                    if (dataSet.Tables[0].Rows.Count > 0)
                    {
                        for (int index = 0; index < dataSet.Tables[0].Rows.Count; index++)
                        {
                            UserInfo userInfo = new UserInfo();
                            userInfo.USER_NAME = dataSet.Tables[0].Rows[index]["name"].ToString();
                            userInfo.USER_ID   = dataSet.Tables[0].Rows[index]["user_name"].ToString();
                            lstUserInfos.Add(userInfo);
                        }
                    }
                }
            }

            this.LoadDoctors(lstUserInfos);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Пример #21
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex > this.dataGridView1.Rows.Count - 1)
            {
                return;
            }
            if (e.ColumnIndex > this.dataGridView1.Columns.Count - 1)
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }

            DataGridViewRow row             = this.dataGridView1.Rows[e.RowIndex];
            TimeCheckResult checkResultInfo = row.Tag as TimeCheckResult;

            if (checkResultInfo == null || GlobalMethods.Misc.IsEmptyString(checkResultInfo.DocID))
            {
                return;
            }
            if (this.MainForm == null || this.MainForm.IsDisposed)
            {
                return;
            }
            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在准备打开病历,请稍候...");

            MedDocInfo docInfo = null;
            short      shRet   = EmrDocAccess.Instance.GetDocInfo(checkResultInfo.DocID, ref docInfo);

            if (shRet == SystemData.ReturnValue.OK)
            {
                PatVisitInfo patVisitInfo = null;
                shRet = PatVisitAccess.Instance.GetPatVisit(docInfo.PATIENT_ID, docInfo.VISIT_ID, ref patVisitInfo);
                if (shRet != SystemData.ReturnValue.OK)
                {
                    MessageBoxEx.Show("患者信息查找失败,无法打开病历!");
                    this.ShowStatusMessage(null);
                    GlobalMethods.UI.SetCursor(this, Cursors.Default);
                    return;
                }
                this.MainForm.SwitchPatient(patVisitInfo, docInfo);
            }
            //this.MainForm.OpenDocument(docInfo);
            else
            {
                MessageBoxEx.Show("病历详细信息下载失败,无法打开病历!");
            }

            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Пример #22
0
        private void button7_Click(object sender, EventArgs e)
        {
            PatVisitInfo patVisitInfo = new PatVisitInfo();

            patVisitInfo.PATIENT_ID   = "P101210";
            patVisitInfo.VISIT_NO     = "20170300005";
            patVisitInfo.VISIT_ID     = "2";
            patVisitInfo.PATIENT_NAME = "孔明";

            short shRet = MedDocSys.QCEngine.TimeCheck.TimeCheckHelper.Instance.GenerateTimeRecord(patVisitInfo, DateTime.Now);
        }
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;

            string szSQl = string.Format("select a.DIAGNOSIS_CODE,a.DIAG_TYPE,a.DIAGNOSIS_DESC from DIAGNOSIS_V a where  a.VISIT_NO ='{1}' and a.PATIENT_ID ='{0}' and a.DIAG_TYPE = 7 "
                                         , patVisitLog.PATIENT_ID
                                         , patVisitLog.VISIT_NO);
            DataSet ds    = null;
            short   shRet = CommonAccess.Instance.ExecuteQuery(szSQl, out ds);

            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                qcCheckResult.QC_EXPLAIN = "规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            string DIAGNOSIS_CODE = ds.Tables[0].Rows[0]["DIAGNOSIS_CODE"].ToString();
            string DIAG_TYPE      = ds.Tables[0].Rows[0]["DIAG_TYPE"].ToString();
            string DIAG_DESC      = ds.Tables[0].Rows[0]["DIAGNOSIS_DESC"].ToString();

            if (DIAGNOSIS_CODE != "X59.801" && DIAGNOSIS_CODE != "W28.801")
            {
                qcCheckResult.QC_EXPLAIN = "规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            szSQl = string.Format("select TRAINING_INJURY from pat_visit_v a where a.PATIENT_ID='{0}' and a.VISIT_NO='{1}'"
                                  , patVisitLog.PATIENT_ID
                                  , patVisitLog.VISIT_NO);
            shRet = CommonAccess.Instance.ExecuteQuery(szSQl, out ds);
            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                qcCheckResult.QC_EXPLAIN = "规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            string TRAINING_INJURY = ds.Tables[0].Rows[0]["TRAINING_INJURY"].ToString();

            if (string.IsNullOrEmpty(TRAINING_INJURY) || TRAINING_INJURY == "0")
            {
                qcCheckResult.QC_EXPLAIN  = string.Format("外部损伤原因诊断编码为{0},但军事训练上不为是", DIAGNOSIS_CODE);
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            qcCheckResult.QC_RESULT  = 1;
            qcCheckResult.QC_EXPLAIN = "规则通过";
            return(true);
        }
Пример #24
0
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;

            string szSQl = string.Format("select t.SPEC_LEVEL_NURS_DAYS,t.FIRST_LEVEL_NURS_DAYS,t.SECOND_LEVEL_NURS_DAYS,t.ADMISSION_DATE_TIME,t.DISCHARGE_DATE_TIME from PAT_VISIT_V t where t.PATIENT_ID = '{0}' and t.VISIT_NO = '{1}' "
                                         , patVisitLog.PATIENT_ID
                                         , patVisitLog.VISIT_NO);
            DataSet ds    = null;
            short   shRet = CommonAccess.Instance.ExecuteQuery(szSQl, out ds);

            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                qcCheckResult.QC_EXPLAIN = "规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            string SPEC_LEVEL_NURS_DAYS   = ds.Tables[0].Rows[0]["SPEC_LEVEL_NURS_DAYS"].ToString();
            string FIRST_LEVEL_NURS_DAYS  = ds.Tables[0].Rows[0]["FIRST_LEVEL_NURS_DAYS"].ToString();
            string SECOND_LEVEL_NURS_DAYS = ds.Tables[0].Rows[0]["SECOND_LEVEL_NURS_DAYS"].ToString();
            string ADMISSION_DATE_TIME    = ds.Tables[0].Rows[0]["ADMISSION_DATE_TIME"].ToString();
            string DISCHARGE_DATE_TIME    = ds.Tables[0].Rows[0]["DISCHARGE_DATE_TIME"].ToString();

            if (string.IsNullOrEmpty(DISCHARGE_DATE_TIME) || string.IsNullOrEmpty(ADMISSION_DATE_TIME))
            {
                qcCheckResult.QC_EXPLAIN = "患者未出院,规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            DateTime dtAdmisson  = DateTime.Parse(ADMISSION_DATE_TIME);
            DateTime dtDischarge = DateTime.Parse(DISCHARGE_DATE_TIME);
            int      period      = (dtDischarge - dtAdmisson).Days;
            int      nspec       = 0;
            int      nfirst      = 0;
            int      nsecond     = 0;

            int.TryParse(SPEC_LEVEL_NURS_DAYS, out nspec);
            int.TryParse(FIRST_LEVEL_NURS_DAYS, out nfirst);
            int.TryParse(SECOND_LEVEL_NURS_DAYS, out nsecond);
            if (period < (nspec + nfirst + nsecond))
            {
                qcCheckResult.QC_EXPLAIN  = "特级、一级护理、二级护理、三级护理之和大于住院天数";
                qcCheckResult.QC_RESULT   = 0;
                qcCheckResult.ERROR_COUNT = 1;
                return(true);
            }
            qcCheckResult.QC_EXPLAIN = "规则通过";
            qcCheckResult.QC_RESULT  = 1;
            return(true);
        }
Пример #25
0
        public override bool Execute(object param, object data, out object result)
        {
            QcCheckPoint qcCheckPoint = param as QcCheckPoint;
            PatVisitInfo patVisitLog  = data as PatVisitInfo;

            result = CheckPointHelper.Instance.InitQcCheckResult(qcCheckPoint, patVisitLog);
            QcCheckResult qcCheckResult = result as QcCheckResult;

            string szSQl = string.Format("select a.ANAESTHESIA_METHOD_NAME,a.ANESTHESIA_DOCTOR,a.OPERATING_DATE,a.operation_desc from operation_v a where a.VISIT_NO = '{1}' and a.PATIENT_ID = '{0}' "
                                         , patVisitLog.PATIENT_ID
                                         , patVisitLog.VISIT_NO);
            DataSet ds    = null;
            short   shRet = CommonAccess.Instance.ExecuteQuery(szSQl, out ds);

            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                qcCheckResult.QC_EXPLAIN = "未找到手术记录,规则通过";
                qcCheckResult.QC_RESULT  = 1;
                return(true);
            }
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string ANAESTHESIA_METHOD_NAME = ds.Tables[0].Rows[i]["ANAESTHESIA_METHOD_NAME"].ToString();
                string ANESTHESIA_DOCTOR       = ds.Tables[0].Rows[i]["ANESTHESIA_DOCTOR"].ToString();
                string OPERATING_DATE          = ds.Tables[0].Rows[i]["OPERATING_DATE"].ToString();
                string operation_desc          = ds.Tables[0].Rows[i]["operation_desc"].ToString();

                if (ANAESTHESIA_METHOD_NAME.IndexOf("全麻") >= 0 || ANAESTHESIA_METHOD_NAME.IndexOf("全身麻醉") >= 0)
                {
                    if (string.IsNullOrEmpty(ANESTHESIA_DOCTOR))
                    {
                        sb.AppendFormat("{0}行{1}手术,使用{2},未记录麻醉医师姓名"
                                        , OPERATING_DATE
                                        , operation_desc
                                        , ANAESTHESIA_METHOD_NAME
                                        );
                    }
                }
            }
            if (sb.Length == 0)
            {
                qcCheckResult.QC_RESULT  = 1;
                qcCheckResult.QC_EXPLAIN = "规则通过";
                return(true);
            }

            qcCheckResult.QC_RESULT   = 0;
            qcCheckResult.QC_EXPLAIN  = sb.ToString();
            qcCheckResult.ERROR_COUNT = 1;
            return(true);
        }
Пример #26
0
        private void btnArchiveTime_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count <= 0)
            {
                return;
            }
            PatVisitInfo patVisitInfo = this.dataGridView1.SelectedRows[0].Tag as PatVisitInfo;
            QcMrIndex    qcMrIndex    = this.dataGridView1.SelectedRows[0].Cells[this.col_ARCHIVE_TIME.Index].Tag as QcMrIndex;

            if (patVisitInfo == null)
            {
                MessageBoxEx.ShowMessage("取消催送失败");
                return;
            }
            short shRet = SystemData.ReturnValue.OK;

            if (qcMrIndex == null)
            {
                qcMrIndex = new QcMrIndex();
                qcMrIndex.ARCHIVE_DOCTOR    = SystemParam.Instance.UserInfo.USER_NAME;
                qcMrIndex.ARCHIVE_DOCTOR_ID = SystemParam.Instance.UserInfo.USER_ID;
                qcMrIndex.ARCHIVE_TIME      = SysTimeHelper.Instance.Now;
                qcMrIndex.PATIENT_ID        = patVisitInfo.PATIENT_ID;
                qcMrIndex.VISIT_ID          = patVisitInfo.VISIT_ID;
                qcMrIndex.VISIT_NO          = patVisitInfo.VISIT_NO;
                shRet = QcMrIndexAccess.Instance.Insert(qcMrIndex);
            }
            else
            {
                qcMrIndex.ARCHIVE_TIME = SysTimeHelper.Instance.Now;
                shRet = QcMrIndexAccess.Instance.Update(qcMrIndex);
            }
            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.ShowMessage("取消催送失败");
                return;
            }
            //更新mrIndex表,将病案设为归档状态
            MrIndex mrIndex = new MrIndex();

            mrIndex.PATIENT_ID = qcMrIndex.PATIENT_ID;
            mrIndex.VISIT_ID   = qcMrIndex.VISIT_ID;
            mrIndex.VISIT_NO   = qcMrIndex.VISIT_NO;
            mrIndex.MR_STATUS  = SystemData.MrStatus.Archive;
            shRet = MrIndexAccess.Instance.UpdateMrStatus(mrIndex);
            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.ShowMessage("更新病案状态失败");
                return;
            }
            this.dataGridView1.SelectedRows[0].Cells[this.col_ARCHIVE_TIME.Index].Value = qcMrIndex.ARCHIVE_TIME.ToString("yyyy-MM-dd HH:mm");
            MessageBoxEx.ShowMessage("取消催送成功");
        }
Пример #27
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex < 0)
                {
                    return;
                }
                DataGridViewColumn column = dataGridView1.Columns[e.ColumnIndex];
                if (!(column is DataGridViewButtonColumn))
                {
                    return;
                }
                QcCheckPoint qcCheckPoint = this.dataGridView1.Rows[e.RowIndex].Tag as QcCheckPoint;
                if (string.IsNullOrEmpty(qcCheckPoint.HandlerCommand))
                {
                    return;
                }
                Object result = null;

                DateTime     startTime   = DateTime.Now;
                PatVisitInfo patVisitLog = new PatVisitInfo()
                {
                    PATIENT_ID = this.txtPatientID.Text, VISIT_ID = this.txtVisitID.Text
                };

                Heren.MedQC.CheckPoint.CheckPointHelper.Instance.InitPatientInfo(patVisitLog);
                CommandHandler.Instance.SendCommand(qcCheckPoint.HandlerCommand, qcCheckPoint, patVisitLog, out result);
                //这里可以编写你需要的任意关于按钮事件的操作~
                QcCheckResult qcCheckResult = result as QcCheckResult;
                short         shRet         = QcCheckResultAccess.Instance.SaveQcCheckResult(qcCheckResult);

                string time = (DateTime.Now - startTime).TotalSeconds.ToString();
                this.label3.Text = "耗时:" + time;

                if (qcCheckResult == null)
                {
                    return;
                }
                if (qcCheckResult.QC_RESULT == 1)
                {
                    MessageBoxEx.ShowMessage("规则通过");
                    return;
                }
                MessageBox.Show(qcCheckResult.QC_EXPLAIN);
            }
            catch (Exception ex)
            {
                LogManager.Instance.WriteLog("单规则测试出错", ex);
                MessageBoxEx.ShowErrorFormat("单规则测试出错", ex.ToString(), null);
            }
        }
Пример #28
0
        private void tsBrowseRequest_Click(object sender, EventArgs e)
        {
            if (this.dataTableView1.SelectedRows.Count <= 0)
            {
                MessageBoxEx.ShowMessage("请选择申请浏览病历");
                return;
            }
            PatVisitInfo patVisitInfo = this.dataTableView1.SelectedRows[0].Tag as PatVisitInfo;

            if (patVisitInfo == null)
            {
                return;
            }
            string szPatientID   = patVisitInfo.PATIENT_ID;
            string szVisitID     = patVisitInfo.VISIT_ID;
            string szPatientName = patVisitInfo.PATIENT_NAME;
            string szRequestID   = SystemParam.Instance.UserInfo.USER_ID;
            List <RecBrowseRequest> lstRecBrowseRequest = null;
            short shRet = RecBrowseRequestAccess.Instance.GetList(szPatientID, szVisitID, szRequestID, ref lstRecBrowseRequest);

            if (lstRecBrowseRequest != null &&
                lstRecBrowseRequest.Count > 0 &&
                lstRecBrowseRequest[0].STATUS == 1)
            {
                MessageBoxEx.ShowMessage("审核已经通过,可直接打开浏览");
                return;
            }

            RecBrowseRequestDialog dialog           = new RecBrowseRequestDialog();
            RecBrowseRequest       recBrowseRequest = null;

            if (lstRecBrowseRequest == null)
            {
                recBrowseRequest = new RecBrowseRequest();
                recBrowseRequest.DISCHARGE_TIME = patVisitInfo.DISCHARGE_TIME;
                recBrowseRequest.PATIENT_ID     = patVisitInfo.PATIENT_ID;
                recBrowseRequest.VISIT_ID       = patVisitInfo.VISIT_ID;
                recBrowseRequest.VISIT_NO       = patVisitInfo.VISIT_NO;
                recBrowseRequest.PATIENT_NAME   = patVisitInfo.PATIENT_NAME;
                recBrowseRequest.REQUEST_ID     = SystemParam.Instance.UserInfo.USER_ID;
                recBrowseRequest.REQUEST_NAME   = SystemParam.Instance.UserInfo.USER_NAME;
                recBrowseRequest.REQUEST_TIME   = SysTimeHelper.Instance.Now;
            }
            else
            {
                recBrowseRequest = lstRecBrowseRequest[0];
            }
            dialog.RecBrowseRequest = recBrowseRequest;
            if (dialog.ShowDialog() == DialogResult.OK)
            {
            }
        }
Пример #29
0
        private void PatientPageControl_PatientInfoChanged(object sender, EventArgs e)
        {
            PatVisitInfo patVisit = SystemParam.Instance.PatVisitInfo;

            if (patVisit != null)
            {
                this.m_bNeedRefreshView = true;
                if (!this.DockHandler.IsHidden)
                {
                    this.OnPatientInfoChanged();
                }
            }
        }
Пример #30
0
        private void txtUserID_ButtonClick(object sender, EventArgs e)
        {
            this.LoadPatientListGridData();
            if (this.dgvPatients.Rows.Count > 0)
            {
                //默认选中最后一次就诊
                this.dgvPatients.Rows[this.dgvPatients.Rows.Count - 1].Selected = true;

                PatVisitInfo patVisitLog = this.dgvPatients.Rows[this.dgvPatients.Rows.Count - 1].Tag as PatVisitInfo;
                //加载患者所在科室医生列表
                this.QueryByDept(patVisitLog);
                this.dgvDoctors.ClearSelection();
            }
        }