public AddFeeDTO getEmsdrug(AddFeeDTO fee, OrConfirm or) { var dto = new OrWfExDeptParamDTO(); dto.Eu_wftp = Convert.ToInt32(EnumFlow.NULL); // 0执行与物资 1执行科室 2物资流向 dto.Code_entp = or.Code_entp; // 就诊类型 dto.Id_dept_ns = or.Id_dep_nur; //就诊护理病区 dto.Id_dept_or = or.Id_dep_phy; //开单科室 // dto.Id_dept_en = or.id; //id_dept_en;//就诊科室 dto.Id_srv = fee.Id_srv; //服务 dto.Sd_srvtp = fee.Sd_srvtp; //服务类型sd dto.Id_srvca = fee.Id_srvca; //服务分类 dto.Recurstr = or.Fg_long.ToString(); //长临标志 //dto.Innercode_srvca =;//服务分类内码 // dto.Id_mm = id_mm; // 服务选取的关联物品 // dto.Id_usage = ; //用法 //dto.Weekno = "2";//生效日期时间相关的 周#与时间 dto.Timestr = new DateTime(); //dto.Reserv1 = ""; //暂时无用途 //预留项 //dto.Reserv2 = ""; //暂时无用途 //dto.Reserv3 = ""; //套内项目时: BD套内项目的科室计算方式sd值,BD套内项目的固定执行科室ID值,所属套的执行科室ID值 AddFeeDTO dgs = qryservice.getEmsfee(fee, dto); copydrug(fee, dgs); fee.Amt_cur = fee.Price * fee.Quan_med; return(fee); }
public void HandleRefResult(object sender, RefResultEventArgs e, OrConfirm or, FreqDefDO freq) { //throw new NotImplementedException(); if (e.BindingFieldName.Equals("Name_bed")) { // this.FireSelected(this.model.orConfirm); } else if (e.BindingFieldName.Equals("Name_dep_nur")) { // this.FireSelected(this.model.orConfirm); } if (e.BindingFieldName.Equals("Name_srv")) { // this.FireSelected(this.model.orConfirm); var drugs = e.DataObject as AddFeeDTO; if (drugs == null || drugs.Id_srv == null) { return; } //如果频次为临时 则不修改频次 //if (freq != null && freq.Id_frequnitct == "0001AA1000000000ELM4") //{ // drugs.Id_freq = freq.Id_freq; // drugs.Name_freq = freq.Name; //} if (drugs != null) { //or.Id_dep_nur = or.Id_dep_nur; //?????? //or.Id_dep_phy = or.Id_dep_phy; getEmsdrug(drugs, or); } } }
public void GetOrConfirmList(OrConfirm orfirm) { OrderList.Clear(); OrConfirm[] orfirms = qryservice.getCiOrdConfirmedQry(orfirm); if (orfirms == null || orfirms.Count() == 0) { return; } var notshowList = new List <OrConfirm>(); nowtime = LogicEx.GetInstance().GetSystemDateTime(); foreach (OrConfirm confirm in orfirms) { if (SetSorNameValue(confirm)) { notshowList.Add(confirm); } } IOrderedEnumerable <OrConfirm> gg = orfirms.OrderBy(item => item.Name_su_or); IOrderedEnumerable <OrConfirm> ff = gg.OrderBy(item => item.Name_bed); OrderList = ff.ToArray(); foreach (OrConfirm confirm in notshowList) { OrderList.Remove(confirm); } }
private void xapFormControl_AfterFocused(object sender, DataFocusedEventArgs e) { var oc = e.Data as OrConfirm; if (oc != null) { if (or == null || (or != null && or.Id_confirm != oc.Id_confirm)) { if (model.IsDrugEdit() && !flag) { if (MessageBoxEx.Show("是否保存修改?", "提示", MessageBoxButtons.YesNo) != DialogResult.No) { save(); } flag = true; // xapFormControl.CloseTiol(flag); model.AddFeeDTOList.Clear(); } else { flag = true; // xapFormControl.CloseTiol(flag); model.AddFeeDTOList.Clear(); } model.GetFeeList(oc); gv_cost.DataTable.DataSource = model.AddFeeDTOList; or = oc; setFeeEditable(false); } } }
public override void OnSelected(object sender, TargetEventArgs e) { var orcofir = e.Object as OrConfirm; if (orcofir != null) { if (orcofir.Id_confirm != null) { orcofirm = orcofir; model.GetFeeList(orcofirm); OnFillData(); } else { this.reFreshData(); } this.FireSelected(this); } else { ConfirmEvent uiEvent = e.Object as ConfirmEvent; if (uiEvent == null) { return; } if (uiEvent.UIEVENT == "addfee") { this.setFeeEditable(true); } else if (uiEvent.UIEVENT == "uneditable") { this.setFeeEditable(false); } } }
/// <summary> /// 获取执行科室 /// </summary> /// <param name="drug"></param> /// <param name="or"></param> /// <returns></returns> public FArrayList getMpDept(AddFeeDTO drug, OrConfirm or) { var dto = getwfparam(drug, or); dto.Id_mm = drug.Id_mm; var wf = new ICiOrdQryServiceImpl().getExeDepts4CiOrSrvN(dto); return(wf.Orwfexedepts); }
public OrderConfirmCardViewModel() { orConfirm = new OrConfirm(); orConfirm.Fg_sign = FBoolean.False; orConfirm.Fg_canc = FBoolean.False; orConfirm.Fg_stop = FBoolean.False; qryservice = XapServiceMgr.find <ICiOrdQryService>(); usService = XapServiceMgr.find <IUdidocServiceExt>(); }
public void GetFeeList(OrConfirm orfirm) { AddFeeDTOList.Clear(); if (orfirm != null) { AddFeeDTO[] orfirms = qryservice.getCiOrdFee(orfirm); editFeeVal(orfirms); AddFeeDTOList = orfirms; } }
//**************************************************构造函数************************************************************* public OrderConfirmFeeViewModel(OrConfirm orfirm, XapFormControl xapFormControl) { this.xapFormControl = xapFormControl; maintainService = XapServiceMgr.find <ICiOrdMaintainService>(); freqservice = XapServiceMgr.find <IFreqdefMDOCrudService>(); qryservice = XapServiceMgr.find <ICiOrdQryService>(); ordservice = XapServiceMgr.find <ICiorderMDOCrudService>(); AddFeeDTOList = new XapDataList <AddFeeDTO>(); GetFeeList(orfirm); }
public AddFeeDTO getEmsdrug(AddFeeDTO fee, OrConfirm or) { var dto = getwfparam(fee, or); AddFeeDTO dgs = qryservice.getEmsfee(fee, dto); OrderConfirmUtils.copydrug(fee, dgs); //fee = qryservice.getEmsfee(fee, dto); //fee.SetUpdated(); fee.Amt_cur = fee.Price * fee.Quan_med; return(fee); }
/// <summary> /// 获取执行科室 /// </summary> /// <param name="drug"></param> /// <param name="or"></param> /// <returns></returns> public OrWfExDeptDTO[] getMpDept(EmsOrDrug drug, OrConfirm or) { var orWf = new OrWfExDeptParamDTO(); orWf.Id_dept_ns = UserManager.getInstance().CurrentDept.Id_dep; orWf.Id_srv = drug.Id_srv; orWf.Id_srvca = drug.Id_srvca; orWf.Code_entp = or.Code_entp; orWf.Sd_srvtp = drug.Sd_srvtp; return(qryservice.getMpDept(orWf)); }
public void HandleRefFilter(object sender, RefActivatingEventArgs e, OrConfirm or, FreqDefDO freq) { var drug = e.DataObject as AddFeeDTO; if (e.BindingFieldName.Equals("Name_mm")) { e.WherePart = " bd_mm.id_srv = '" + drug.Id_srv + "'"; } if (e.BindingFieldName.Equals("Name_srv")) { // this.FireSelected(this.model.orConfirm); if (or != null && or.Id_hp != null) { e.RefParams.AddParam("hp", or.Id_hp); } string sql = " BD_SRV.Fg_Use_Ip='Y' "; if (srvScopeSql != null) { e.WherePart = sql + " and " + srvScopeSql; } //如果医嘱的频次为持续,该医嘱只能补时间量纲的服务 if (or.Id_freq == "0001AA1000000006AEHV")//##???? 持续 { e.WherePart = sql + " and " + srvScopeSql + " and " + " bd_measdoc.sd_oppdimen='07' "; } } if (e.BindingFieldName.Equals("Name_dep")) { var drugs = e.DataObject as AddFeeDTO; FArrayList ow = null; string depis = ""; if (drugs != null) { ow = getMpDept(drugs, or); } if (ow != null) { foreach (OrWfExDeptDTO o in ow) { depis += "'" + o.Id_dept + "',"; } e.WherePart = " bd_dep.id_dep in (" + depis.Substring(0, depis.Count() - 1) + ")"; } } if (e.BindingFieldName.Equals("Name_freq")) { e.Cancel = false; e.WherePart = " bd_freq.fg_active ='Y'"; } }
public override void OnSelected(object sender, TargetEventArgs e) { // base.OnSelected(sender, e); dto = e.Object as OrConfirm; if (dto != null) { if (dto.Fg_sign != FBoolean.False || dto.Fg_stop != FBoolean.False || dto.Fg_canc != FBoolean.False) { model.GetOrConfirmList(dto); model.GetFeeList(null); } else { model.OrderList.Clear(); model.GetFeeList(null); } OnFillData(); if (xapFormControl.Created) { // xapFormControl.CloseTiol(true); } } }
private OrWfExDeptParamDTO getwfparam(AddFeeDTO fee, OrConfirm or) { var dto = new OrWfExDeptParamDTO(); dto.Eu_wftp = Convert.ToInt32(EnumFlow.NULL); // 0执行与物资 1执行科室 2物资流向 dto.Code_entp = or.Code_entp; // 就诊类型 dto.Id_dept_ns = or.Id_dep_nur; //就诊护理病区 dto.Id_dept_or = or.Id_dep_phy; //开单科室 // dto.Id_dept_en = or.id; //id_dept_en;//就诊科室 dto.Id_srv = fee.Id_srv; //服务 dto.Sd_srvtp = fee.Sd_srvtp; //服务类型sd dto.Id_srvca = fee.Id_srvca; //服务分类 dto.Recurstr = or.Fg_long.ToString(); //长临标志 dto.Id_dept_ex = or.Id_dep_mp; //dto.Innercode_srvca =;//服务分类内码 // dto.Id_mm = id_mm; // 服务选取的关联物品 // dto.Id_usage = ; //用法 //dto.Weekno = "2";//生效日期时间相关的 周#与时间 dto.Timestr = new DateTime(); //dto.Reserv1 = ""; //暂时无用途 //预留项 //dto.Reserv2 = ""; //暂时无用途 //dto.Reserv3 = ""; //套内项目时: BD套内项目的科室计算方式sd值,BD套内项目的固定执行科室ID值,所属套的执行科室ID值 return(dto); }
private bool SetSorNameValue(OrConfirm confirm) { if (confirm.Fg_stop == FBoolean.True && confirm.Fg_chk_stop == FBoolean.False && confirm.Fg_canc == FBoolean.False) { if (num != 0) { DateTime?end1 = confirm.Dt_end; TimeSpan span = end1.Value - nowtime; int a = span.Days * 24 * 60 + span.Hours * 60 + span.Minutes; if (a > num) { return(true); } } } //else if (confirm.Fg_stop == FBoolean.False) //{ // confirm.Dt_end = null; // confirm.Name_emp_stop = null; //} //if (confirm.Fg_sign == FBoolean.True && confirm.Fg_chk == FBoolean.False) //{ // confirm.Name_su_or = "签署"; //} //else if (confirm.Fg_canc == FBoolean.True && confirm.Fg_chk_canc == FBoolean.False) //{ // confirm.Name_su_or = "医生废除"; //} //else //{ // confirm.Name_su_or = "核对通过"; //} //if (confirm.Sd_sex != null && confirm.Sd_sex.Equals("1")) //{ // confirm.Name_sex_pat = "男"; //} //else if (confirm.Sd_sex != null && confirm.Sd_sex.Equals("2")) //{ // confirm.Name_sex_pat = "女"; //} //else //{ // confirm.Name_sex_pat = "未知性别"; //} //if (confirm.Fg_long != null && confirm.Fg_long == FBoolean.True) //{ // confirm.Str_long = "长期"; //} //else //{ // confirm.Str_long = "临时"; //} //string agestr = null; //if (confirm.Age_pat != null) //{ // if (confirm.Age_pat.Length != 0) // { // DateTime dt; // if (DateTime.TryParse(confirm.Age_pat, out dt)) // { // agestr = XapFunc.GetAge(dt); // } // } //} //confirm.Name_pat = confirm.Name_pat + "|" + confirm.Name_sex_pat + "|" + agestr; return(false); }