/// <summary> /// 初始化等待框 /// 王冀 2012-10-30 /// </summary> /// <param name="caption"></param> //private void SetWaitDialogCaption(string caption) //{ // try // { // if (m_WaitDialog != null) // { // if (!m_WaitDialog.Visible) // m_WaitDialog.Visible = true; // m_WaitDialog.Caption = caption; // } // } // catch (Exception ex) // { // Common.Ctrs.DLG.MyMessageBox.Show(1, ex); // } //} /// <summary> /// 等待框收起 /// 王冀 2012-10-30 /// </summary> //private void HideWaitDialog() //{ // try // { // if (m_WaitDialog != null) // m_WaitDialog.Hide(); // } // catch (Exception ex) // { // Common.Ctrs.DLG.MyMessageBox.Show(1, ex); // } //} #endregion /// <summary> /// 构建树控件 /// 王冀 2012-10-30 /// </summary> private void MakeTree() { try { DS_Common.SetWaitDialogCaption(m_WaitDialog, "正在构建树控件!"); DataTable Class; DataTable Treatment; m_HaveBindNode.Clear(); treeList_Medicine.ClearNodes(); Class = m_SqlManger.GetTreatmentTreeOne(this.cbClass.SelectedIndex.ToString()); //第一级 foreach (DataRow dr in Class.Rows) { TreeListNode parentNode = null;// parentNode = treeList_Medicine.AppendNode(new object[] { dr["unitmname"].ToString(), "Folder", dr["unitmid"].ToString() }, null); m_HaveBindNode.Add(dr["unitmname"].ToString()); Treatment = m_SqlManger.GetTreatmentTreeTwo(dr["unitmid"].ToString()); //第二级 foreach (DataRow secdr in Treatment.Rows) { TreeListNode node = null; node = treeList_Medicine.AppendNode(new object[] { secdr["jibingmingcheng"].ToString(), "Leaf", secdr["ID"].ToString() }, parentNode); //m_LeafNode.Add(secdr["id"].ToString()); node.Tag = secdr["id"].ToString(); } } DS_Common.HideWaitDialog(m_WaitDialog); } catch (Exception ex) { MyMessageBox.Show(1, ex); } }
/// <summary> /// 设置复选框列表 /// </summary> public void SetCheckBoxList() { try { //SetPreViewVisible(false); DataTable dt = GetEmrRecord(m_CurrentInpatient.NoOfFirstPage.ToString(), ChangeID); if (CheckIfNeedRefresh(dt, CurrentUCEmrInputBody.CurrentTreeList.FocusedNode)) { if (MyMessageBox.Show("数据库中病历有更新,建议您刷新后预览。您是否要刷新病程记录?", "提示", MyMessageBoxButtons.YesNo, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.QuestionIcon) == DialogResult.Yes) { TreeListNode focusedNode = CurrentUCEmrInputBody.CurrentTreeList.FocusedNode; if (null != focusedNode && null != focusedNode.Tag && focusedNode.Tag is EmrModel) { EmrModel model = focusedNode.Tag as EmrModel; m_App.CurrentSelectedEmrID = model.InstanceId.ToString(); } CurrentUCEmrInputBody.RefreshBingChengJiLu(); } } m_WaitDialog = new WaitDialogForm("正在加载病程预览区...", "请稍候"); SetCheckBoxListSource(dt); DefaultCheckItem(); XmlDocument doc = ConcatCheckedEmrContent(); SetEmrContent(doc); SetPreViewVisible(true); CurrentEditorForm.SetCurrentElement(FirstCallRecordDetailCaptionDateTime); DS_Common.HideWaitDialog(m_WaitDialog); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void simpleButtonAddQC_Click(object sender, EventArgs e) { try { m_WaitDialog = new WaitDialogForm("正在创建综合评分", "请您稍后!"); if (m_noofinpat == "") { m_App.CustomMessageBox.MessageShow("请选择一个病人"); DS_Common.HideWaitDialog(m_WaitDialog); return; } m_chiefID = InsertNewAutoRecord("0"); InitUCPoint(); if (m_chiefID == "") { m_App.CustomMessageBox.MessageShow("出错"); DS_Common.HideWaitDialog(m_WaitDialog); return; } m_check = CheckState.NEW; DS_Common.HideWaitDialog(m_WaitDialog); } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex); } }
/// <summary> /// 窗体加载事件 /// by xlb 2012-12-19 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CommonNote_ModelWeiHu_Load(object sender, EventArgs e) { try { DS_Common.SetWaitDialogCaption(m_WaitForm, "正在加载数据"); txtFileName.Focus(); DS_Common.HideWaitDialog(m_WaitForm); } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex); } }
/// <summary> /// .ctor /// </summary> /// <param name="recordDal"></param> /// <param name="model"></param> /// <param name="node"></param> /// <param name="inpatient"></param> public HistoryEmrFormNew(RecordDal recordDal, EmrModel model, TreeListNode node, Inpatient inpatient, IEmrHost app) { WaitDialogForm m_WaitDialog = new WaitDialogForm("正在加载病历...", "请稍候"); InitializeComponent(); this.StartPosition = FormStartPosition.CenterScreen; m_RecordDal = recordDal; m_Node = node; m_CurrentInpatient = inpatient; m_App = app; GetEmrContent(model); AddPadForm(); DS_Common.HideWaitDialog(m_WaitDialog); }
public UCEmrInputPreView(string changeID, string recordDetailID) { try { m_waitForm = new WaitDialogForm("正在加载病历预览区...", "请稍候"); InitializeComponent(); Init(changeID, recordDetailID); InitSize(); this.LocatedDailyEmrForEditEvent += new Action <string, string>(UCEmrInputPreView_LocatedDailyEmrForEditEvent); m_waitForm.Hide(); } catch (Exception ex) { DS_Common.HideWaitDialog(m_waitForm); MessageBox.Show(ex.Message); } }
/// <summary> /// 加载文书录入界面 /// </summary> private void AddEmrInputNew() { try { WaitDialogForm m_WaitDialog = new WaitDialogForm("正在加载病人信息...", "请稍候"); m_app.ChoosePatient(Convert.ToDecimal(nOofinpat));//切换病人 DS_Common.HideWaitDialog(m_WaitDialog); m_UCEmrInputNew = new DrectSoft.Core.MainEmrPad.New.UCEmrInput(m_app.CurrentPatientInfo, m_app, floderState); m_UCEmrInputNew.SetVarData(m_app); xtraEmrInfo.Controls.Add(m_UCEmrInputNew); m_UCEmrInputNew.Dock = DockStyle.Fill; } catch (Exception ex) { throw ex; } }
/// <summary> /// 加载病历 /// edit by Yanqiao.Cai 2012-11-23 /// 1、add try ... catch /// </summary> private void AddEmrInputNew() { try { WaitDialogForm m_WaitDialog = new WaitDialogForm("正在加载病人信息...", "请稍候"); m_Host.ChoosePatient(Convert.ToDecimal(m_NoOfFirstPage), floderState.ToString());//切换病人 DS_Common.HideWaitDialog(m_WaitDialog); m_UCEmrInputNew = new DrectSoft.Core.MainEmrPad.New.UCEmrInput(m_Host.CurrentPatientInfo, m_Host, floderState); m_UCEmrInputNew.SetVarData(m_Host); this.Controls.Add(m_UCEmrInputNew); m_UCEmrInputNew.HideBar(); m_UCEmrInputNew.Dock = DockStyle.Fill; } catch (Exception ex) { throw ex; } }
private void AddEmrInputNew() { try { DS_Common.SetWaitDialogCaption(m_WaitDialog, "正在加载病人信息..."); m_App.ChoosePatient(Convert.ToDecimal(m_noofinpat));//切换病人 DS_Common.HideWaitDialog(m_WaitDialog); m_UCEmrInputNew = new DrectSoft.Core.MainEmrPad.New.UCEmrInput(m_App.CurrentPatientInfo, m_App, FloderState.None); m_UCEmrInputNew.SetVarData(m_App); this.panelControl1.Controls.Add(m_UCEmrInputNew); m_UCEmrInputNew.OnLoad(); m_UCEmrInputNew.HideBar(); m_UCEmrInputNew.Dock = DockStyle.Fill; } catch (Exception) { throw; } }
/// <summary> /// 搜索功能 /// 王冀2012-10-29 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnFind_Click(object sender, EventArgs e) { try { DS_Common.SetWaitDialogCaption(m_WaitDialog, "正在构建树控件!"); m_HaveBindNode.Clear(); treeListFind.ClearNodes(); string key = this.txtFind.Text.Trim().Replace("'", "''").Replace("*", "[*]").Replace("%", "[%]"); if (CheckKey(key)) { this.txtFind.Focus(); return; } if (key == null || key.Trim() == string.Empty) { this.treeListFind.Visible = false; this.treeList_Medicine.Visible = true; } else { this.treeList_Medicine.Visible = false; this.treeListFind.Visible = true; dtMyLeafNode = m_SqlManger.GetMedicaineByKey(sqlGetDrug, key); if (dtMyLeafNode.Rows.Count == 0) { MessageBox.Show("没有查询到结果,请重新输入!"); return; } else { LoadTreeList(dtMyLeafNode); } } DS_Common.HideWaitDialog(m_WaitDialog); txtFind.Focus(); } catch (Exception ex) { MyMessageBox.Show(1, ex); } }
/// <summary> /// 从数据库获取数据 并展现数据。 /// </summary> private void GetData() { try { //m_WaitDialog = new WaitDialogForm("正在加载数据", "请稍后..."); DS_Common.SetWaitDialogCaption(m_WaitDialog, "正在加载数据"); DateTime date = dateEdit1.DateTime; if (date == null) { return; } string dateStr = date.ToString("yyyy-MM-dd"); InCommonNoteItemEntityListAll = m_InCommonNoteBiz.GetIncommNoteItemByDay(m_CommonNoteEntity.CommonNoteFlow, dateStr); BindDate(); //m_WaitDialog.Hide(); DS_Common.HideWaitDialog(m_WaitDialog); } catch (Exception ex) { throw ex; } }
///// <summary> ///// 初始化等待框 ///// edit by 王冀 2012-10-30 ///// </summary> ///// <param name="caption"></param> //private void SetWaitDialogCaption(string caption) //{ // try // { // if (m_WaitDialog != null) // { // if (!m_WaitDialog.Visible) // m_WaitDialog.Visible = true; // m_WaitDialog.Caption = caption; // } // } // catch (Exception ex) // { // Common.Ctrs.DLG.MyMessageBox.Show(1, ex); // } //} //private void HideWaitDialog() //{ // if (m_WaitDialog != null) // m_WaitDialog.Hide(); //} #endregion /// <summary> /// 构建树控件 /// 王冀 2012-10-29 修改 加图标 /// </summary> private void MakeTree() { try { DS_Common.SetWaitDialogCaption(m_WaitDialog, "正在构建树控件!"); //DataTable Doseform; //DataTable DirectTitle2; //已绑定节点 清空 王冀 2012-10-30 //DataTable drug; m_HaveBindNode.Clear(); treeList_Medicine.ClearNodes(); Doseform = m_SqlManger.GetMedicaineDirectTreeOne(); //第一级 foreach (DataRow dr in Doseform.Rows) { TreeListNode parentNode = null;// parentNode = treeList_Medicine.AppendNode(new object[] { dr["Doseform"].ToString(), "Folder", dr["Doseform"].ToString() }, null); m_HaveBindNode.Add(dr["Doseform"].ToString()); DataTable DirectTitle2 = m_SqlManger.GetMedicaineDirectTreeTwo(dr["Doseform"].ToString()); //第二级 foreach (DataRow secdr in DirectTitle2.Rows) { TreeListNode node = null; node = treeList_Medicine.AppendNode(new object[] { secdr["DirectTitle"].ToString(), "Leaf", secdr["ID"].ToString() }, parentNode); //m_LeafNode.Add(secdr["id"].ToString()); node.Tag = secdr["id"].ToString(); } } ntree = treeList_Medicine; DS_Common.HideWaitDialog(m_WaitDialog); } catch (Exception ex) { MyMessageBox.Show(1, ex); } }
/// <summary> /// 批量导入病例 /// </summary> public bool ExecuteBatchIn() { try { m_WaitDialog = new WaitDialogForm("正在处理病历...", "请稍等"); bool boo = BeforeBatchInCheck(); if (!boo) {//检查不通过 return(false); } BeforeProcEMR(); //edit by cyq 2013-03-01 ProcEMRNew(GetPatAllEmr()); //ProcEMR(GetPatAllEmr()); DS_Common.HideWaitDialog(m_WaitDialog); return(true); } catch (Exception ex) { DS_Common.HideWaitDialog(m_WaitDialog); throw new Exception(ex.Message); } }
/// <summary> /// 病案扩展维护编辑事件 /// Add by xlb 2013-04-16 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnExcInfo_Click(object sender, EventArgs e) { try { DrectSoft.Common.DS_Common.SetWaitDialogCaption(waitDialogForm, "正在加载数据"); if (m_UCExtension == null) { m_UCExtension = new FormExtension(CurrentInpatient.NoOfFirstPage.ToString()); } ShowUCForm.ShowUCExtension(CurrentInpatient.NoOfFirstPage.ToString(), m_UCExtension, info); ShowUCForm.StartPosition = FormStartPosition.CenterScreen; DS_Common.HideWaitDialog(waitDialogForm); ShowUCForm.ShowDialog(); info = ShowUCForm.m_info; info.IemMainPageExtension.ExtensionData = m_UCExtension.ExtensionTable; RefreshForm(); } catch (Exception ex) { DS_Common.HideWaitDialog(waitDialogForm); MyMessageBox.Show(1, ex); } }
private void frmChild_Load(object sender, EventArgs e) { try { string config = DS_SqlService.GetConfigValueByKey("IsNewUcInput"); if (null != config && config.Trim() == "1") { AddEmrInputNew(); } else { AddEmrInput(); } } catch (Exception ex) { MyMessageBox.Show(1, ex); } finally { DS_Common.HideWaitDialog(m_WaitDialog); } }
/// <summary> /// 导入前的检查操作 /// </summary> /// 是否可导入历史病历 private bool BeforeBatchInCheck() { try { bool boo = false; DS_Common.SetWaitDialogCaption(m_WaitDialog, "正在检查病历..."); string sqlGetDailyEmrCount = "SELECT COUNT (1) FROM recorddetail WHERE noofinpat = '{0}' AND sortid = 'AC' AND valid = '1'"; DataTable dt = m_App.SqlHelper.ExecuteDataTable(string.Format(sqlGetDailyEmrCount, m_CurrentInpatient.NoOfFirstPage.ToString()), CommandType.Text); string cnt = dt.Rows[0][0].ToString(); if (cnt.Equals("0")) {//无病历 return(true); } string question = "此病人已存在病程 \n\r 选择【是】则删除现有病程,并导入历史病程记录; \n\r 选择【否】则保留现有病程,不导入历史病程记录。"; if (m_App.CustomMessageBox.MessageShow(question, DrectSoft.Core.CustomMessageBoxKind.QuestionYesNo) == System.Windows.Forms.DialogResult.Yes) { m_IsClearAllDailyEmr = true; m_IsNeedBatchInDailyEmr = true; boo = true; } else { m_IsClearAllDailyEmr = false; m_IsNeedBatchInDailyEmr = false; boo = false; } DS_Common.HideWaitDialog(m_WaitDialog); return(boo); } catch (Exception ex) { throw new Exception(ex.Message); } }