/// <summary> /// 初始化已写病历字典表 /// </summary> /// <returns>SystemData.ReturnValue</returns> private short InitDocumentDict() { if (TimeEventHandler.Instance.TimeCheckQuery == null) { return(SystemData.ReturnValue.OK); } if (this.m_dicDocInfos != null) { return(SystemData.ReturnValue.OK); } if (this.m_dicDocInfos != null && this.m_dicDocInfos.Count <= 0) { return(SystemData.ReturnValue.CANCEL); } this.m_dicDocInfos = new Dictionary <string, MedDocList>(); string szPatientID = TimeEventHandler.Instance.TimeCheckQuery.PatientID; string szVisitID = TimeEventHandler.Instance.TimeCheckQuery.VisitNO;//编辑器将visit_id存成了visit_no MedDocList lstDocInfos = null; short shRet = EmrDocAccess.Instance.GetDocInfos(szPatientID, szVisitID , SystemData.VisitType.IP, DateTime.Now, null, ref lstDocInfos); if (shRet != SystemData.ReturnValue.OK) { return(shRet); } if (lstDocInfos == null || lstDocInfos.Count <= 0) { return(SystemData.ReturnValue.CANCEL); } lstDocInfos.SortByTime(false); for (int index = 0; index < lstDocInfos.Count; index++) { string szDocTypeID = lstDocInfos[index].DOC_TYPE; MedDocList lstCurrTypeDocInfos = null; if (this.m_dicDocInfos.ContainsKey(szDocTypeID)) { lstCurrTypeDocInfos = this.m_dicDocInfos[szDocTypeID]; lstCurrTypeDocInfos.Add(lstDocInfos[index]); } else { lstCurrTypeDocInfos = new MedDocList(); lstCurrTypeDocInfos.Add(lstDocInfos[index]); this.m_dicDocInfos.Add(szDocTypeID, lstCurrTypeDocInfos); } } return(SystemData.ReturnValue.OK); }
/// <summary> /// 打开医生或护士创建的所有病历 /// <param name="parentNode">双击的节点</param> /// </summary> private void OpenAllDocList(VirtualNode parentNode) { if (parentNode == null || parentNode.Nodes.Count <= 0) { return; } MedDocList lstDocInfos = new MedDocList(); DateTime dtCheckTime = SysTimeHelper.Instance.Now; for (int index = 0; index < parentNode.Nodes.Count; index++) { if (!parentNode.Nodes[index].Data.Equals(COMBIN_NODE_TAG)) { continue; } if (index > 0) { dtCheckTime = dtCheckTime.AddSeconds(1); } for (int ii = 0; ii < parentNode.Nodes[index].Nodes.Count; ii++) { VirtualNode childNode = parentNode.Nodes[index].Nodes[ii]; MedDocInfo docInfo = childNode.Data as MedDocInfo; if (docInfo == null) { continue; } if (ii > 0) { dtCheckTime = dtCheckTime.AddSeconds(1); } this.SaveReadLogInfo(docInfo, dtCheckTime, childNode); lstDocInfos.Add(docInfo); } } this.Update(); this.MainForm.OpenDocument(lstDocInfos); }
private void mnuOpenAllDoc_Click(object sender, EventArgs e) { if (this.MainForm == null || this.MainForm.IsDisposed) { return; } if (this.dgvDetailList.Rows.Count <= 0) { return; } DataGridViewRow selectRow = this.dgvDetailList.SelectedRows[0]; if (selectRow == null) { return; } MedDocList lstDocInfo = new MedDocList(); MedDocInfo docInfo = null; for (int index = 0; index < this.dgvDetailList.Rows.Count; index++) { selectRow = this.dgvDetailList.Rows[index]; docInfo = selectRow.Tag as MedDocInfo; if (docInfo == null) { continue; } lstDocInfo.Add(docInfo); } if (lstDocInfo.Count <= 0) { return; } GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.ShowStatusMessage("正在下载并打开病历,请稍候..."); this.MainForm.OpenDocument(lstDocInfo); this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); }
private void virtualTree1_NodeMouseDoubleClick(object sender, VirtualTreeEventArgs e) { if (this.MainForm == null || this.MainForm.IsDisposed) { return; } if (e.Node == null || e.Type == HitTestType.None) { return; } GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.ShowStatusMessage("正在下载并打开病历,请稍候..."); MedDocInfo docInfo = e.Node.Data as MedDocInfo; DateTime dtCheckTime = SysTimeHelper.Instance.Now; if (docInfo != null) { GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.Update(); this.MainForm.OpenDocument(docInfo); this.SaveReadLogInfo(docInfo, dtCheckTime, e.Node); this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); return; } //打开合并病历 if (COMBIN_NODE_TAG.Equals(e.Node.Data)) { int count = e.Node.Nodes.Count; if (count <= 0) { return; } GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); MedDocList lstDocInfos = new MedDocList(); for (int index = 0; index < count; index++) { docInfo = e.Node.Nodes[index].Data as MedDocInfo; if (docInfo == null) { continue; } if (index > 0) { dtCheckTime = dtCheckTime.AddSeconds(1); } this.SaveReadLogInfo(docInfo, dtCheckTime, e.Node.Nodes[index]); lstDocInfos.Add(docInfo); } this.Update(); this.MainForm.OpenDocument(lstDocInfos); this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); } else { if (DOCTOR_NODE_TAG.Equals(e.Node.Data)) { this.OpenAllDocList(e.Node); } else if (NURSE_NODE_TAG.Equals(e.Node.Data)) { this.OpenAllDocList(e.Node); } this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); } }
private void virtualTree1_NodeMouseDoubleClick(object sender, VirtualTreeEventArgs e) { if (this.MainForm == null || this.MainForm.IsDisposed) { return; } if (e.Node == null || e.Type == HitTestType.None) { return; } GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.ShowStatusMessage("正在下载并打开病历,请稍候..."); DateTime dtCheckTime = SysTimeHelper.Instance.Now; MedDocInfo docInfo = e.Node.Data as MedDocInfo; //如果是和仁编辑器,暂不支持合并打开 if ((SystemParam.Instance.LocalConfigOption.DefaultEditor == "2") && docInfo == null) { return; } if (docInfo != null) { GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.Update(); this.MainForm.OpenDocument(docInfo); //提示已经被质控过,确认后才更新质控阅读记录 //提示文档被质控过的信息,如果最新质控记录为当前用户,则不提示,如果为其他用户,则提示。 MedicalQcLog qcActionLog = null; short shRet = MedicalQcLogAccess.Instance.GetQCLogInfo(docInfo.DOC_SETID, 1, ref qcActionLog); if (shRet == SystemData.ReturnValue.OK) { if (qcActionLog.CHECKED_ID != SystemParam.Instance.UserInfo.USER_ID) { string msg = string.Format("当前病历已经被{0}于{1}质控阅读过!\t\n如需重新质控,请单击【确定】按钮" , qcActionLog.CHECKED_BY , qcActionLog.CHECK_DATE.ToString("yyyy-MM-dd HH:mm:ss")); if (MessageBoxEx.ShowConfirm(msg) != DialogResult.OK) { this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); return; } } } this.SaveReadLogInfo(docInfo, dtCheckTime, e.Node); } this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); return; //打开合并病历 if (COMBIN_NODE_TAG.Equals(e.Node.Data)) { int count = e.Node.Nodes.Count; if (count <= 0) { return; } GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); MedDocList lstDocInfos = new MedDocList(); for (int index = 0; index < count; index++) { docInfo = e.Node.Nodes[index].Data as MedDocInfo; if (docInfo == null) { continue; } if (index > 0) { dtCheckTime = dtCheckTime.AddSeconds(1); } this.SaveReadLogInfo(docInfo, dtCheckTime, e.Node.Nodes[index]); lstDocInfos.Add(docInfo); } this.Update(); this.MainForm.OpenDocument(lstDocInfos); this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); } else { if (DOCTOR_NODE_TAG.Equals(e.Node.Data)) { this.OpenAllDocList(this.m_DoctorNode); } else if (NURSE_NODE_TAG.Equals(e.Node.Data)) { this.OpenAllDocList(this.m_NurseNode); } this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); } }