/// <summary> /// /// </summary> public void Save() { var list = new List <OrTplNItmDO>(); if (this.SelectOrderDic == null || this.SelectOrderDic.Count == 0) { this.ShowInfo("请选择一条数据"); return; } if (this.SelectOrderDic.Count > 0) { foreach (string str in this.SelectOrderDic.Keys) { //Args.listObj.Add(OrTplDodic[str]); list.Add(OrTplDodic[str]); } } OnFillData();//清空选中的数据 // 设置医嘱来源属性,用于保存到ci_order中 this.ciEnContext.Eu_orsrcmdtp = OrSourceFromEnum.IIHORTMPLHELPER; var moreEmsDto = Buttonmodel.getMoreEmsParamDTO(this.ciEnContext, list.ToArray()); if (moreEmsDto != null) { xapBaseControl.FireEventSent(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_TMPL_EDIT, EventCodeType.ARGKEY_EMS_TMPL_EDIT, moreEmsDto)); } }
public override void HandleState(object sender, DictionaryEventArgs eventArgs) { string uiEvent = eventArgs.Data[UIConst.UI_EVENT] as string; //string newState = eventArgs.Data[UIConst.NEW_STATE] as string; switch (uiEvent) { case UIEvent.LOAD: break; case "All_Print": isPrtSucc = this.rpt_viewer.PrintRptFile(); //打印病历 Object objData = AssToolEx.ObjectOfEventArgs(eventArgs, "Print_Mr"); if (OwnerView != null && null != objData && (objData as String).Equals("true")) { AssToolEx.SentMessage(OwnerView, AssToolEx.DictionaryEventArgsWith(AssistantConstant.CI_EMR_PRINT_EVENT)); } break; case "All_Export": this.rpt_viewer.ExportRptFile(); break; default: break; } }
/// <summary> /// 创建医疗单 /// </summary> /// <param name="emsCreatedParams"></param> /// <returns></returns> protected bool EventCreateMultiEmsHandle(EmsCreatedParamList emsCreatedParams) { if (emsCreatedParams != null && emsCreatedParams.Count > 0) { if (multiEmsGroup.ButtonCount == 1) { if (!GetSelectedEmsView().IsEmptyEmsViewType()) { GetSelectedEmsView().OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_CLOSE)); } GetSelectedEmsView().OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_CREATE, EmsCreatedParameter.TAGKEY, emsCreatedParams[0])); } else { ClearEmsEditorView(); GetSelectedEmsView().OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_CREATE, EmsCreatedParameter.TAGKEY, emsCreatedParams[0])); for (int index = 1; index < emsCreatedParams.Count; ++index) { var o = this.AddTabEmsView(); o.GetEmsView().OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_CREATE, EmsCreatedParameter.TAGKEY, emsCreatedParams[index])); } } this.SwitchEmsContainer(this.multiEmsGroup.SelectedButton.ValueObj as TabEmsView); } return(true); }
private void onMouseClick(string uiEventCode, string dataTag) { string sd_sheettp = datasource.Sd_ciprnsheettp; if (String.IsNullOrEmpty(sd_sheettp)) { return; } AssToolEx.SentMessage(this, AssToolEx.DictionaryEventArgsWith(uiEventCode, dataTag, sd_sheettp.Contains(CiDictCodeConst.SD_CIPRNSHEETTP_MR_OP) ? "true" : "false")); }
/// <summary> /// 编辑单医疗单 /// </summary> /// <param name="emsEditParamList"></param> /// <returns></returns> protected bool EventEditSingleOrderHandle(OrderEditParamList emsEditParamList) { if (emsEditParamList != null && emsEditParamList.Count > 0) { if (CheckNewEmsView()) { return(true); } if (beLoading) { return(true); } OrderEditParameter ordEditParam = emsEditParamList[0]; if (GetSelectedEmsView().UID.Equals(ordEditParam.OrderItem.Id_or)) { return(true); } beLoading = true; bool hasError = false; try { // NAppWaiting.Instance.Show(this); ClearEmsEditorView(); var emsView = GetSelectedEmsView(); emsView.UID = ordEditParam.OrderItem.Id_or; emsView.OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_ORDER_EDIT, OrderEditParameter.TAGKEY, ordEditParam) ); this.SwitchEmsContainer(this.GetSelectedEmsView()); } catch (XapServiceException e) { this.SetStatusMsg(e.ErrorMsg.Message ?? e.ErrorMsg.data); hasError = true; } catch (Exception e) { this.SetStatusMsg(e.StackTrace); hasError = true; } finally { beLoading = false; // NAppWaiting.Instance.Close(); if (hasError) { EventCloseEmsHandle(null); this.ShowInfo("打开医嘱出现异常情况,请查看日志"); } } } return(true); }
protected bool EventEditMultiEditHandle(OrderEditParamList emsEditParamList) { if (emsEditParamList != null && emsEditParamList.Count > 0) { int nCanOpenNum = 6 - this.multiEmsGroup.ButtonCount; // RemoveAllTabEms(); emsEditParamList.ToList().ForEach(order => { if (!hasOpenedOrderList.Contains(order.OrderItem.Id_or)) { if (nCanOpenNum-- > 0) { var emsView = this.multiEmsGroup.SelectedButton.ValueObj as TabEmsView; if (this.multiEmsGroup.ButtonCount == 1 && emsView.UID == "") { } else { emsView = this.AddTabEmsView(); } emsView.OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_ORDER_EDIT, OrderEditParameter.TAGKEY, order) ); emsView.UID = order.OrderItem.Id_or; hasOpenedOrderList.Add(emsView.UID); } } }); this.SwitchEmsContainer(this.multiEmsGroup.SelectedButton.ValueObj as TabEmsView); if (null != this.GetSelectedEmsView()) { this.GetSelectedEmsView().SelectedIndex = 0; // 显示医嘱页签 } // 当只有一个医疗单时候,不显示多医疗单按钮 if (this.multiEmsGroup.ButtonCount == 1) { this.multiEmsGroup.SetButtonVisible(0, false); // 0, 第一个,隐藏唯一的一个按钮 } else { this.multiEmsGroup.SetButtonVisible(-1, true); // -1, 全部 } if (emsEditParamList.Count > 6) { this.SetStatusMsg("最多只能同时打开 6 个医疗单"); } } return(true); }
public bool saveToDb(List <OrTplNItmDO> selectList) { var moreEmsDto = Buttonmodel.getMoreEmsParamDTO(this.ciEnContext, selectList.ToArray()); if (moreEmsDto != null) { xapBaseControl.FireEventSent(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_TMPL_EDIT, EventCodeType.ARGKEY_EMS_TMPL_EDIT, moreEmsDto)); } xapBaseControl.SetStatusMsg("保存成功!"); parentFrame.close(); return(true); }
/// <summary> /// 删除行 /// </summary> /// <param name="param"></param> /// <returns></returns> public override BaseFormBizView DeleteRow(object param = null) { if (this.GetViewModel().GetCountWithOutDelete() == 1) { this.ShowInfo("不允许删除最后一个,请直接修改服务名称或者取消"); return(this); } base.DeleteRow(param); this.SentNotify(EventCodeType.NM_EMS_ORSRV_DATACHANGED); this.GetCardViewControl().OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_ORSRV_DATACHANGED)); return(AdjustLayout()); }
public void Save() { string msg = "请选择服务后再点击确定按钮!"; if (string.IsNullOrEmpty(this.Id_srv) || this.medSrvDodic == null || this.medSrvDodic.Count == 0) { BizAssMessageBoxUtil.ShowInforMsg(msg); return; } var list = new List <OrTplNItmDO>(); if (this.medSrvDodic.ContainsKey(this.Id_srv)) { MedSrvDO tempmedsrv = medSrvDodic[this.Id_srv]; if (tempmedsrv.Fg_set.Value) { MedSrvConvertSetItem(list, tempmedsrv); } else { OrTplNItmDO rtplItem = convertOrTplNItmDO(tempmedsrv); list.Add(rtplItem); } } else { BizAssMessageBoxUtil.ShowInforMsg(msg); return; } //OnFillData(); //重新加载当前页的数据 FillData(selectedAlphabetRender); //清空选中的数据 this.Id_srv = string.Empty; // 设置医嘱来源属性,用于保存到ci_order中 this.ciEnContext.Eu_orsrcmdtp = OrSourceFromEnum.IIHSRVCAHELPER; this.ciEnContext.Assistant_type = "medsrv";//医疗服务 if (Buttonmodel != null) { var moreEmsDto = Buttonmodel.getMoreEmsParamDTO(this.ciEnContext, list.ToArray()); if (null != moreEmsDto) { xapBaseControl.FireEventSent(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_TMPL_EDIT, EventCodeType.ARGKEY_EMS_TMPL_EDIT, moreEmsDto)); } } }
private bool saveToDb(List <OrTplNItmDO> selectList) { AssCostTimeTool costTimeTool = new AssCostTimeTool("执行医嘱模板保存" + selectList.Count + "条记录", false); var moreEmsDto = this.buttonViewModel.getMoreEmsParamDTO(this.ciEnContext, selectList.ToArray()); costTimeTool.SaveTimeLog(); if (moreEmsDto != null) { xapBaseControl.FireEventSent(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_TMPL_EDIT, EventCodeType.ARGKEY_EMS_TMPL_EDIT, moreEmsDto)); if (moreEmsDto.Errormap2 == null || moreEmsDto.Errormap2.Values.Count == 0) { return(true); } } return(false); }
private void xapFormControl_RefResult(object sender, RefResultEventArgs e) { if (e.BindingFieldName.Equals("Name_ciprnsheettp")) { var dto = e.DataObject as OrdPresDTO; string sd_sheettp = dto.Sd_ciprnsheettp; var dic = new Dictionary <string, string>(); dic.Add("Sd_sheettp", sd_sheettp); this.FireSelected(dic); // 之前没有选择病历,但本次操作选择了病历时候,需要发送打印病历 if (sd_sheettp != null && (sd_sheettp_org == null || !sd_sheettp_org.Contains(CiDictCodeConst.SD_CIPRNSHEETTP_MR_OP)) && sd_sheettp.Contains(CiDictCodeConst.SD_CIPRNSHEETTP_MR_OP)) { AssToolEx.SentMessage(this.OwnerView, AssToolEx.DictionaryEventArgsWith(AssistantConstant.CI_EMR_PRINT_PRIVEW_EVENT)); } this.sd_sheettp_org = sd_sheettp; } }
/// <summary> /// 关闭医疗单 /// </summary> /// <param name="emsView"></param> /// <returns></returns> protected bool EventCloseEmsHandle(TabEmsView emsView) { if (emsView == null) { ClearEmsEditorView(); hasOpenedOrderList.Clear(); } else if (this.emsLayout.RenderControls.Contains(emsView)) { // 如果当前只有一个医疗单视图,则复用该视图 if (this.multiEmsGroup.ButtonCount == 1) { emsView.OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_CLOSE)); SwitchEmsContainer(emsView); } else // 多个医疗单视图,将传入的医疗单删除 { this.multiEmsGroup.RemoveButton(this.multiEmsGroup.SelectedButton); this.emsLayout.RemoveRender(emsView); if (!String.IsNullOrEmpty(emsView.UID) && this.hasOpenedOrderList.Contains(emsView.UID)) { this.hasOpenedOrderList.Remove(emsView.UID); } if (this.multiEmsGroup.ButtonCount > 0) { SwitchEmsContainer(GetSelectedEmsView()); } emsView.Dispose(); } } //if (this.multiEmsGroup.ButtonCount == 0) //{ // SwitchEmsContainer(AddEmsView()); //} return(true); }
/// <summary> /// 清除医疗单编辑器上下文,恢复原状 /// </summary> private void ClearEmsEditorView() { for (int index = this.multiEmsGroup.ButtonCount - 1; index >= 1; --index) { var emsView = this.multiEmsGroup.GetButtonParamAt(index) as TabEmsView; this.multiEmsGroup.RemoveButtonAt(index); this.emsLayout.RemoveRender(emsView); if (emsView != null) { emsView.Dispose(); } } this.multiEmsGroup.GetButtonAt(0).Text = "1"; this.multiEmsGroup.GetButtonAt(0).ToolTipText = ""; var firstView = this.multiEmsGroup.GetButtonParamAt(0) as TabEmsView; if (!firstView.IsEmptyEmsViewType()) { firstView.OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_CLOSE)); } this.buttonGroupView.ShowEmsButtonGroup(firstView.GetEmsViewType()); }
public bool SentNotify(string uiEventCode, string dataTag = null, Object objData = null, object param = null) { return(this.OnChildNotify(this, AssToolEx.DictionaryEventArgsWith(uiEventCode, dataTag, objData, param))); }
/// <summary> /// 医嘱模板处理 /// </summary> /// <param name="o"></param> /// <returns></returns> protected bool EventOrderTmplHandle(MoreEmsParamDTO o) { if (!string.IsNullOrEmpty(o.Prompt_msg)) { BizAssMessageBoxUtil.ShowInforMsg(o.Prompt_msg); } // 有效性检查 if (o.Errormap2 == null || o.Errormap2.Values.Count == 0) { return(false); } //var waitting = new AssWaittingTool(this.FindForm()); bool hasError = false; // 异常处理 try { // 建立等待标志 NAppWaiting.Instance.Show(this); ClearEmsEditorView(); var emsList = o.Errormap2.Values.Cast <CiEmsDTO>().ToList(); GetSelectedEmsView().OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_DIRECT_EDIT, EmsEditParameter.TAGKEY, new EmsEditParameter { EmsDTO = emsList[0] as CiEmsDTO })); SetSelectedEmsViewTooltip(o.Errormap2.Keys.Cast <String>().ToList()[0]); for (int index = 1; index < emsList.Count; ++index) { var te = this.AddTabEmsView(); try { te.OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_DIRECT_EDIT, EmsEditParameter.TAGKEY, new EmsEditParameter { EmsDTO = emsList[index] as CiEmsDTO })); } catch (Exception e) { this.SetStatusMsg(e.StackTrace); EventCloseEmsHandle(te); } SetSelectedEmsViewTooltip(o.Errormap2.Keys.Cast <String>().ToList()[index]); } this.SwitchEmsContainer(GetSelectedEmsView()); // GetEmsButtonGroupView().OnEventHandle(this, AssToolEx.DictionaryEventArgsWith(EventCodeType.EVENT_EMS_ALLOW_EDIT)); } catch (XapServiceException e) { this.SetStatusMsg(e.ErrorMsg.Message); hasError = true; } catch (Exception e) { this.SetStatusMsg(e.StackTrace); hasError = true; } finally { NAppWaiting.Instance.Close(); if (hasError) { EventCloseEmsHandle(null); this.ShowInfo("医疗单中存在错误,打开失败!"); } } //this.ResumeLayout(false); //this.PerformLayout(); return(true); }