/// <summary> /// 数量字段显示 总量信息 /// </summary> /// <param name="row"></param> /// <param name="feeSrv"></param> void UpdateCustomerControlInfo(XDataRow row, CiOrdFeeSrvDTO feeSrv) { if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_med_unit")) { if (feeSrv.Fg_mm == null || !feeSrv.Fg_mm.Value) { if (feeSrv.Quan_total_medu == null) { feeSrv.Quan_total_medu = 0; } if (feeSrv.Name_unit_sale == null) { feeSrv.Name_unit_sale = ""; } string strMed_unit = feeSrv.Quan_total_medu + feeSrv.Name_unit_sale; row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit); } else { if (feeSrv.Quan_cur == null) { feeSrv.Quan_cur = 0; } if (feeSrv.Name_unit_sale == null) { feeSrv.Name_unit_sale = ""; } string strMed_unit = feeSrv.Quan_cur + feeSrv.Name_unit_sale; row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit); } } }
/// <summary> /// 计算执行科室 /// </summary> /// <param name="newDrug"></param> protected void CalculateDeptMp(CiOrdFeeSrvDTO newDrug) { #region 计算执行科室 // if (newDrug.Id_mp_dep == null || newDrug.Id_mp_dep.Length == 0) { //执行科室 OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids( this.ent4BannerDTO.Code_entp, this.ent4BannerDTO.Id_entp, newDrug.Sd_srvtp, newDrug.Id_srvca, newDrug.Id_srv, newDrug.Id_route, "", this.ent4BannerDTO.Id_dep_nur, this.ent4BannerDTO.Id_dep_phy, GetOrdDeptMp()); if (wf != null) { newDrug.Id_dep = wf.Firstid_mp_dept; newDrug.Name_dep = wf.Firstname_mp_dept; newDrug.setAttrVal <String>("str_id_mp_deps", wf.Id_mp_depts); } } #endregion }
void UpdateCustomerControlInfo_1(XDataRow row, CiOrdFeeSrvDTO drug) { if (drug == null) { return; } if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_med_unit")) { if (drug.Quan_med == null) { drug.Quan_med = 0; } if (drug.Name_unit_med == null) { drug.Name_unit_med = ""; } string strMed_unit = drug.Quan_med + drug.Name_unit_med; row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit); } if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_sale_unit")) { if (drug.Quan_cur == null) { drug.Quan_cur = 0; } if (drug.Name_unit_sale == null) { drug.Name_unit_sale = ""; } string strMed_unit = drug.Quan_cur + drug.Name_unit_sale; row.ColumnCellDict["customercolumn_sale_unit"].SetValue(strMed_unit); } }
/// <summary> /// 允许编辑医保列 /// </summary> /// <param name="o"></param> /// <returns></returns> private Boolean DisableEditHP(string propName, CiOrdFeeSrvDTO dataSource, bool def) { if (propName.Equals("Fg_selfpay")) { FArrayList bdhpdtos = dataSource.BdHpIndicationList; if (bdhpdtos == null) { bdhpdtos = new FArrayList(); BdHpIndicationDTO dto = HpJudgeUtil.getInstance().getBdHpIndicationDTO(dataSource.Id_srv, dataSource.Id_mm, this.GetModel().GetEnt4BannerDTO()); if (dto != null) { bdhpdtos.Add(dto); } dataSource.BdHpIndicationList = bdhpdtos; } //符合医保判断条件,并且医保使用症为true的时候才可以操作 if (CanEditHp() && dataSource.BdHpIndicationList == null || dataSource.BdHpIndicationList.Count == 0 || string.IsNullOrEmpty((dataSource.BdHpIndicationList[0] as BdHpIndicationDTO).Code_hpindicjudged)) { return(true); } else { return(dataSource.Fg_indic == null ? true : !(bool)dataSource.Fg_indic); } } return(def); }
/// <summary> /// 计算费用项目执行科室 /// </summary> /// <param name="newDrug"></param> protected void CalculateFeeDeptMp(CiOrdFeeSrvDTO newDrug) { #region 计算执行科室 { //执行科室 OrWfDeptInfoDTO wf = new ciorder.viewmodel.impext.GetDeptMpImp().GetDept_mp_ids( this.ent4BannerDTO.Code_entp, this.ent4BannerDTO.Id_entp, newDrug.Sd_srvtp, newDrug.Id_srvca, newDrug.Id_srv, newDrug.Id_route, "", this.ent4BannerDTO.Id_dep_nur, this.ent4BannerDTO.Id_dep_phy, GetOrdDeptMp(newDrug.Id_or)); if (wf != null) { newDrug.Id_dep = wf.Firstid_mp_dept; newDrug.Name_dep = wf.Firstname_mp_dept; newDrug.setAttrVal("str_id_mp_deps", wf.Id_mp_depts); } } #endregion }
/// <summary> /// 处理表格的显示规则 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void OnXapFormControl_DataVisible(object sender, DataVisibleEventArgs e) { CiOrdFeeSrvDTO ordFeeBill = e.Data as CiOrdFeeSrvDTO; if (null != ordFeeBill) { e.Visible = !ordFeeBill.IsDELETED && ordFeeBill.Fg_bl != null && ordFeeBill.Fg_bl.Value; } }
protected override void cellWillAppear(object rowDataSource, XCellRender cell) { CiOrdFeeSrvDTO drug = rowDataSource as CiOrdFeeSrvDTO; if (null != drug && drug.Id_srv != null && drug.Id_srv.Length != 0) { cell.SetValue(drug.Quan_med.ToString() + drug.Name_unit_med); } }
/// <summary> /// 计算费用总量 /// </summary> /// <param name="newDrug"></param> protected void CalculateAmtCur(CiOrdFeeSrvDTO newDrug) { CiOrderDO ord = GetOrderDO(newDrug.Id_or); if (ord != null) { logicEx.GetMmTotal(newDrug, GetEnt4BannerDTO().Code_entp, ord.Days_or ?? 1); } }
/// <summary> /// 删除空行事件处理 /// </summary> public void OnDelete() { // 判断是否处于异步数据加载中,如果是,则返回停止删除动作 if (IsLoading) { return; } // 定义错误变量 String errInfo = ""; // 判断当前是否选中了列表中的条目,且只选择了一条 if (tableGridControl.DataTable.SelectedRows.Count == 1) { // 获取选中的元数据对象 CiOrdFeeSrvDTO b = tableGridControl.DataTable.SelectedRows[0].RowDataSource as CiOrdFeeSrvDTO; // 判断是否允许编辑 if (model.AllowEdit(b)) { // 暂存分组信息 string id_or = b.Id_or; // 删除选中的元数据对象 this.model.Delete(b); // 获取所删除分组的医嘱的费用集合的最后一条记录,并作为删除操作后的选中条目 var srv = this.model.GetLastOfFeeSrv(id_or); if (null != srv) { var rowObj = tableGridControl.DataTable.GetRow(srv) as XDataRow; if (rowObj != null) { rowObj.Selected = true; } } // 设置编辑标志 isDirty = true; } else { errInfo = ("不能删除临床项目费用"); } } else if (tableGridControl.DataTable.SelectedRows.Count == 0) { errInfo = ("请选择一条治疗操作费用记录"); } else { errInfo = "不能删除多个费用"; } if (!String.IsNullOrEmpty(errInfo)) { this.ShowInfo(errInfo); } }
/// <summary> /// 装载费用项目信息 /// </summary> /// <param name="newDrug"></param> /// <returns></returns> public virtual EmsFeebillViewModel LoadEmsFeeSrv(CiOrdFeeSrvDTO newDrug) { { // 填充默认值 newDrug.setAttrVal <int>("Use_days", 1); newDrug.Id_unit_sale = newDrug.Id_unit_med; newDrug.Name_unit_sale = newDrug.Name_unit_med; newDrug.Fg_or = false; newDrug.Fg_bl = true; newDrug.Eu_sourcemd = (int)OrSrvSourceFromEnum.PHYSIANFEEADD; #region 计算总量和价格 newDrug.Quan_total_medu = this.GetLogicEx().getNotDrugTotal( newDrug.Quan_med.ToDouble(), newDrug.Id_freq, newDrug.Freqct == null ? 1 : newDrug.Freqct.Value, newDrug.getAttrVal <int>("Use_days")); newDrug.Price = this.GetLogicEx().getSrvNotMMPri(newDrug.Id_srv, newDrug.Id_primd, null, GetEnt4BannerDTO().Id_pripat); newDrug.Amt_cur = newDrug.Price * newDrug.Quan_cur; #endregion FArrayList list = new FArrayList(); //判断是否是保外诊断 CiEnContextDTO ciEnContextDTO = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO; //保外诊断标识 string eu_hpbeyond = ciEnContextDTO.Eu_hpbeyond; if (ent4BannerDTO != null && true == ent4BannerDTO.Fg_hpfundpay && HpBeyondEnum.HPDIAG.Equals(ciEnContextDTO.Eu_hpbeyond) /*保内诊断*/) { BdHpIndicationDTO bdhpindication = HpJudgeUtil.getInstance().getBdHpIndicationDTO(newDrug.Id_srv, newDrug.Id_mm, this.ent4BannerDTO); if (bdhpindication != null) { newDrug.Fg_treat = bdhpindication.Fg_indic; newDrug.Id_hp = bdhpindication.Id_hp; newDrug.Sd_hpsrvtp = bdhpindication.Sd_hpsrvtp; newDrug.Id_hpsrvtp = bdhpindication.Id_hpsrvtp; if (string.IsNullOrEmpty(bdhpindication.Id_hpsrvtp)) { newDrug.Id_hpsrvtp = HpJudgeUtil.IdHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp); } newDrug.Name_hpsrvtp = HpJudgeUtil.NameHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp); newDrug.Fg_selfpay = HpJudgeUtil.getInstance().isSelfPay(bdhpindication); list.Add(bdhpindication); } } else if (ciEnContextDTO.Fg_hpfundpay == null || !(bool)ciEnContextDTO.Fg_hpfundpay || (ciEnContextDTO.Eu_hpbeyond != null && !ciEnContextDTO.Eu_hpbeyond.Equals(HpBeyondEnum.HPDIAG))) { newDrug.Fg_treat = false; newDrug.Fg_selfpay = true; } newDrug.setAttrVal <FArrayList>("BdHpIndicationDTO", list); #region 计算执行科室 CalculateDeptMp(newDrug); #endregion } return(this); }
protected override void cellWillAppear(object rowDataSource, XCellRender cell) { CiOrdFeeSrvDTO drug = rowDataSource as CiOrdFeeSrvDTO; if (null != drug && drug.Id_srv != null && drug.Id_srv.Length != 0) { System.Diagnostics.Debug.WriteLine("总量:" + drug.Quan_total_medu.ToString() + "/" + drug.Name_unit_sale); cell.SetValue(drug.Quan_total_medu.ToString() + drug.Name_unit_sale); } }
protected override void editorWillDisappear(object rowDataSource, XBaseUserRender ctrl) { XComboBoxUnit xComboBoxUnit = ctrl as XComboBoxUnit; CiOrdFeeSrvDTO drug = rowDataSource as CiOrdFeeSrvDTO; if (null != drug) { double quan_med = ((xComboBoxUnit.ValueText == null || xComboBoxUnit.ValueText.Length == 0) ? 0 : Double.Parse(xComboBoxUnit.ValueText)); drug.Quan_med = quan_med == 0 ? 0.001 : quan_med; drug.Name_unit_med = xComboBoxUnit.ValueUnit; } }
protected override void editorWillDisappear(object rowDataSource, XBaseUserRender ctrl) { XComboBoxUnit xComboBoxUnit = ctrl as XComboBoxUnit; CiOrdFeeSrvDTO drug = rowDataSource as CiOrdFeeSrvDTO; if (null != drug) { drug.Quan_total_medu = ((xComboBoxUnit.ValueText == null || xComboBoxUnit.ValueText.Length == 0) ? 0 : Double.Parse(xComboBoxUnit.ValueText)); drug.Name_unit_sale = xComboBoxUnit.ValueUnit; drug.Id_unit_sale = xComboBoxUnit.SelectKey.ToString(); } }
public void showHpDialog(object sender) { var row = sender as XDataRow; CiOrdFeeSrvDTO emsordrug = row.DataSource as CiOrdFeeSrvDTO; if (emsordrug != null) { if (row.ClickCell.FieldName.Equals("Fg_indic")) { FArrayList bdhpdtos = emsordrug.BdHpIndicationList; if (bdhpdtos == null) { bdhpdtos = new FArrayList(); BdHpIndicationDTO dto = HpJudgeUtil.getInstance().getBdHpIndicationDTO(emsordrug.Id_srv, emsordrug.Id_mm, this.GetModel().GetEnt4BannerDTO()); if (dto != null) { bdhpdtos.Add(dto); } emsordrug.BdHpIndicationList = bdhpdtos; } if (bdhpdtos != null && bdhpdtos.Count > 0) { BdHpIndicationDTO bdhpdto = bdhpdtos[0] as BdHpIndicationDTO; string code_hpindicjudged = bdhpdto.Code_hpindicjudged; bool?isDefault = null; if (code_hpindicjudged == "12") { isDefault = emsordrug.Fg_treat; } if (code_hpindicjudged != null) { switch (code_hpindicjudged) { case "12": case "21": BdHpIndicationDTOForm dialog = new BdHpIndicationDTOForm(emsordrug.Limit, emsordrug.Name_srv, isDefault); if (dialog.ShowDialog() == DialogResult.OK) { emsordrug.Fg_indic = true; emsordrug.Fg_selfpay = false; } else { emsordrug.Fg_indic = false; emsordrug.Fg_selfpay = true; } break; } } } } } }
void UpdateCustomerControlInfo(XDataRow row, CiOrdFeeSrvDTO drug) { if (drug == null) { return; } String spltStr = ""; // 非物品的总量单位默认都为 医学计量单位 if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_med_unit")) { if (drug.Fg_mm == null || !drug.Fg_mm.Value) { if (drug.Quan_total_medu == null) { drug.Quan_total_medu = 0; } if (drug.Name_unit_med == null) { drug.Name_unit_med = ""; } if (drug.Name_unit_med.Length > 0 && IsNumberic(drug.Name_unit_med.Substring(0, 1))) { spltStr = "*"; } string strMed_unit = drug.Quan_total_medu + spltStr + drug.Name_unit_med; row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit); } else { if (drug.Quan_cur == null) { drug.Quan_cur = 0; } if (drug.Name_unit_med == null) { drug.Name_unit_med = ""; } if (drug.Name_unit_med.Length > 0 && IsNumberic(drug.Name_unit_med.Substring(0, 1))) { spltStr = "*"; } string strMed_unit = drug.Quan_cur + spltStr + drug.Name_unit_sale; row.ColumnCellDict["customercolumn_med_unit"].SetValue(strMed_unit); } } if (row != null && row.ColumnCellDict.ContainsKey("customercolumn_ord_colligate")) { row.ColumnCellDict["customercolumn_ord_colligate"].SetValue(drug.getAttrVal("Ord_colligate")); } }
private void ClearRowData(CiOrdFeeSrvDTO o) { o.Eu_sourcemd = null; o.Id_dep = null; o.Id_dep_srv = null; o.Id_emp_srv = null; o.Id_org_srv = null; o.Id_unit_sale = null; o.Name_unit_sale = null; o.Name_dep = null; o.Quan_total_medu = null; o.Amt_total = null; o.Id_srv = null; o.Name_srv = null; }
/// <summary> /// 在向数据源中新增一行空记录时候的事件处理,主要做一些初始化数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void OnXapFormControl_DataInitNew(object sender, DataInitNewEventArgs e) { base.OnXapFormControl_DataInitNew(sender, e); CiOrdFeeSrvDTO feeSrv = e.Object as CiOrdFeeSrvDTO; CiOrdFeeSrvDTO b = tableGridControl.DataTable.SelectedRows[0].RowDataSource as CiOrdFeeSrvDTO; { feeSrv.Id_or = b.Id_or; feeSrv.Content_or = b.Content_or; feeSrv.Dt_effe = b.Dt_effe; // feeSrv.setAttrVal("Ord_colligate",b.getAttrVal("Ord_colligate")); feeSrv.Eu_sourcemd = (int)OrSrvSourceFromEnum.PHYSIANFEEADD; } }
/// <summary> /// 处理表格的编辑规则 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void OnXapFormControl_AllowEditing(object sender, AllowEditingEventArgs e) { // 由于网络延迟加载数据缓慢,此时禁止用户的所有操作 if (this.IsLoading) { e.Cancel = true; return; } if (isReadOnly) { e.Cancel = true; return; } if (this.model.GetEnt4BannerDTO() != null && this.model.GetEnt4BannerDTO().Sd_status == EnDictCodeConst.SD_ENSTATUS_OP_FINISH) { e.Cancel = true; return; } // 费用描述字段不能编辑 if (e.PropName.Equals("Des_srv") || e.PropName.Equals("Code_or")) { e.Cancel = true; return; } CiOrdFeeSrvDTO ordFeeBill = e.Object as CiOrdFeeSrvDTO; if (null != ordFeeBill) { CiOrderDO ord = this.model.GetOrderDO(ordFeeBill.Id_or); if (null != ord && ord.Fg_sign != null && ord.Fg_sign.Value) { e.Cancel = true; return; } if (string.IsNullOrEmpty(ordFeeBill.Id_srv) && !e.PropName.Equals("Name_srv")) { e.Cancel = true; return; } e.Cancel = DisableEditHP(e.PropName, ordFeeBill, DisableEditSrv(e.PropName, ordFeeBill)); //!EnableAllowEdit(e.PropName,ordFeeBill); } }
public Boolean AllowEdit(CiOrdFeeSrvDTO o) { CiOrderDO ord = GetOrderDO(o.Id_or); if (null != ord) { return((String.IsNullOrEmpty(ord.Sd_su_or) || ord.Sd_su_or.Equals("0")) && (!(o.Eu_sourcemd == (int)OrSrvSourceFromEnum.PHYSIAN || o.Eu_sourcemd == (int)OrSrvSourceFromEnum.AGENTFROMPRIMD || o.Eu_sourcemd == (int)OrSrvSourceFromEnum.AGENTFROMCOMPPRIMD))); } else { return(false); } }
/// <summary> /// 计算总量和价格 /// </summary> /// <param name="newDrug"></param> public void ReCalculateInfo(CiOrdFeeSrvDTO newDrug) { #region 计算总量和价格 if (null != newDrug) { newDrug.Quan_total_medu = this.GetLogicEx().getNotDrugTotal( newDrug.Quan_med.ToDouble(), newDrug.Id_freq, newDrug.Freqct == null ? 1 : newDrug.Freqct.Value, newDrug.getAttrVal("Use_days") == null ? 1 : newDrug.getAttrVal <int>("Use_days") ); newDrug.Price = this.GetLogicEx().getSrvNotMMPri(newDrug.Id_srv, newDrug.Id_primd, null, GetEnt4BannerDTO().Id_pripat); newDrug.Amt_cur = newDrug.Price * newDrug.Quan_cur; } #endregion }
protected void OnTableGridControl_SelectedRowChanged(object sender, XSelectedRowChangedEventArgs e) { CiOrdFeeSrvDTO feeSrv = e.Data as CiOrdFeeSrvDTO; if (null != feeSrv && e.Selected) { CiOrderDO ord = this.model.GetOrderDO(feeSrv.Id_or); if (null != ord) { if (this.model.GetEnt4BannerDTO() != null && this.model.GetEnt4BannerDTO().Sd_status == EnDictCodeConst.SD_ENSTATUS_OP_FINISH) { return; } this.SentMessage(ord.Sd_su_or.Equals("0") && LogicEx.GetInstance().isIdEmpOrEqualIdpsn(ord.Id_emp_or) ? EventCodeType.EVENT_FEEBILL_ALLOWEDIT : EventCodeType.EVENT_FEEBILL_FORBIDEDIT); return; } this.SentMessage(EventCodeType.EVENT_FEEBILL_FORBIDEDIT); } }
protected override void OnXapFormControl_DataChanged(object sender, DataChangedEventArgs e) { base.OnXapFormControl_DataChanged(sender, e); this.isDirty = true; if (e.PropName.Equals("customercolumn_med_unit")) { CiOrdFeeSrvDTO ordFeeBill = e.Data as CiOrdFeeSrvDTO; if (ordFeeBill.Price == null) { ordFeeBill.Price = 0; } if (ordFeeBill.Quan_total_medu == null) { ordFeeBill.Quan_total_medu = 0; } ordFeeBill.Amt_total = ordFeeBill.Price * ordFeeBill.Quan_total_medu; } }
protected override void editorWillAppear(object rowDataSource, XBaseUserRender ctrl) { CiOrdFeeSrvDTO drug = rowDataSource as CiOrdFeeSrvDTO; if (null != drug) { XComboBoxUnit xComboBoxUnit = ctrl as XComboBoxUnit; xComboBoxUnit.ValueText = (drug.Quan_med == null ? "0" : drug.Quan_med.ToString()); xComboBoxUnit.ValueUnit = (drug.Name_unit_med == null ? "" : drug.Name_unit_med); if (xComboBoxUnit.ValueUnit.Length > 0) { Dictionary <object, string> items = new Dictionary <object, string>(); items.Add(drug.Id_unit_med, drug.Name_unit_med); if (drug.Id_unit_base != null && !drug.Id_unit_base.Equals(drug.Id_unit_med)) { items.Add(drug.Id_unit_base, drug.Name_unit_base); } xComboBoxUnit.DataSource = items; } } }
/// <summary> /// 总量单位 /// </summary> /// <param name="rowDataSource"></param> /// <param name="ctrl"></param> protected override void editorWillAppear(Object rowDataSource, XBaseUserRender ctrl) { XComboBoxUnit xComboBoxUnit = ctrl as XComboBoxUnit; CiOrdFeeSrvDTO drug = rowDataSource as CiOrdFeeSrvDTO; if (null != drug) { Dictionary <object, string> items = new Dictionary <object, string>(); FMap fmap = null;// drug.Relativefieldmap; if (fmap == null) { if (!string.IsNullOrEmpty(drug.Id_unit_sale)) { items.Add(drug.Id_unit_sale, drug.Name_unit_sale); } } else { string idstr = (string)fmap[CiDictCodeConst.EMSORDRUG_RELATIVE_FIELD_ID_MEASDOC]; string namestr = (string)fmap[CiDictCodeConst.EMSORDRUG_RELATIVE_FIELD_MEASDOC_NAME]; if (!string.IsNullOrEmpty(idstr)) { string[] ids = idstr.Split(new char[] { ',' }); string[] names = namestr.Split(new char[] { ',' }); for (int i = 0; i < ids.Length; i++) { items.Add(ids[i], names[i]); } } } xComboBoxUnit.DataSource = items; xComboBoxUnit.ValueText = (drug.Quan_total_medu == null ? "0" : drug.Quan_total_medu.ToString()); xComboBoxUnit.ValueUnit = (drug.Name_unit_sale == null ? "" : drug.Name_unit_sale); } }
/// <summary> /// 判定允许编辑单元格 /// </summary> /// <param name="propName"></param> /// <param name="ds"></param> /// <returns></returns> bool EnableAllowEdit(String propName, CiOrdFeeSrvDTO ds) { return(model.AllowEdit(ds)); }
public virtual bool LoadFeeSrv(CiOrdFeeSrvDTO newDrug) { #region 效性检查 if (CheckRepeatFeeSrv(newDrug)) { this.errorMsgString = String.Format("【{0}】 在该医嘱中存在,请选择其它服务", newDrug.Name_srv); return(false); } #endregion #region 填充默认值 int nUseDays = GetOrderDO(newDrug.Id_or).Days_or ?? 1; newDrug.Id_unit_sale = newDrug.Id_unit_med; newDrug.Name_unit_sale = newDrug.Name_unit_med; newDrug.Fg_or = false; newDrug.Fg_bl = true; newDrug.Eu_sourcemd = (int)OrSrvSourceFromEnum.PHYSIANFEEADD; #endregion #region 计算总量和价格 newDrug.Price = this.GetLogicEx().getSrvNotMMPri(newDrug.Id_srv, newDrug.Id_primd); #endregion #region 计算总量 this.CalculateAmtCur(newDrug); #endregion #region 总价 if (newDrug.Fg_mm != null && newDrug.Fg_mm.Value) { newDrug.Amt_total = newDrug.Price * newDrug.Quan_cur; } else { newDrug.Amt_total = newDrug.Price * newDrug.Quan_total_medu; } #endregion FArrayList list = new FArrayList(); //判断是否是保外诊断 CiEnContextDTO ciEnContextDTO = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO; //保外诊断标识 string eu_hpbeyond = ciEnContextDTO.Eu_hpbeyond; if (ent4BannerDTO != null && true == ent4BannerDTO.Fg_hpfundpay && HpBeyondEnum.HPDIAG.Equals(ciEnContextDTO.Eu_hpbeyond) /*保内诊断*/) { BdHpIndicationDTO bdhpindication = HpJudgeUtil.getInstance().getBdHpIndicationDTO(newDrug.Id_srv, newDrug.Id_mm, this.ent4BannerDTO); if (bdhpindication != null) { newDrug.Fg_treat = bdhpindication.Fg_indic; newDrug.Fg_indic = bdhpindication.Fg_indic; newDrug.Id_hp = bdhpindication.Id_hp; newDrug.Sd_hpsrvtp = bdhpindication.Sd_hpsrvtp; newDrug.Id_hpsrvtp = bdhpindication.Id_hpsrvtp; if (string.IsNullOrEmpty(bdhpindication.Id_hpsrvtp)) { newDrug.Id_hpsrvtp = HpJudgeUtil.IdHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp); } newDrug.Name_hpsrvtp = HpJudgeUtil.NameHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp); newDrug.Name_hp = HpJudgeUtil.NameHpSrvtpFromSdHpSrvtp(bdhpindication.Sd_hpsrvtp); newDrug.Fg_selfpay = HpJudgeUtil.getInstance().isSelfPay(bdhpindication); newDrug.Fg_hpindicjudged = HpJudgeUtil.getInstance().getFg_hpindicjudged(bdhpindication); list.Add(bdhpindication); } } else if (ciEnContextDTO.Fg_hpfundpay == null || !(bool)ciEnContextDTO.Fg_hpfundpay || (ciEnContextDTO.Eu_hpbeyond != null && !ciEnContextDTO.Eu_hpbeyond.Equals(HpBeyondEnum.HPDIAG))) { newDrug.Fg_treat = false; newDrug.Fg_selfpay = true; } newDrug.setAttrVal <FArrayList>("BdHpIndicationDTO", list); #region 计算执行科室 CalculateFeeDeptMp(newDrug); #endregion return(true); }
/// <summary> /// 允许编辑项目 /// </summary> /// <param name="o"></param> /// <returns></returns> private Boolean DisableEditSrv(String fn, CiOrdFeeSrvDTO o) { return(!EnableAllowEdit(fn, o) || fn.Equals("Price") || fn.Equals("Amt_total")); }
protected bool CheckRepeatFeeSrv(CiOrdFeeSrvDTO feeSrv) { return(tableDatasource.Count(p => !p.IsDELETED && p.Id_or.Equals(feeSrv.Id_or) && p.Id_srv.Equals(feeSrv.Id_srv)) > 1); }
/// <summary> /// 删除给定的费用清单数据 /// </summary> /// <param name="o"></param> public void Delete(CiOrdFeeSrvDTO o) { this.tableDatasource.Delete(o, o.IsNEW); }
/// <summary> /// 将医嘱数据和医疗单数据整合成一组费用清单数据 /// </summary> /// <param name="ord"></param> /// <param name="ems"></param> /// <returns></returns> private CiOrdFeeSrvDTO[] OrdFeeBillListFrom(CiOrderDO ord, CiEmsDTO ems, FMap blsrvFMap) { List <CiOrdFeeSrvDTO> OrdFeeBillList = new List <CiOrdFeeSrvDTO>(); ems.Emssrvs.Cast <CiEmsSrvDTO>().OrderBy(p => p.Sortno).Where(srvdto => (!String.IsNullOrEmpty(srvdto.Code_srv) && !String.IsNullOrEmpty(srvdto.Name_srv)) && srvdto.Fg_bl != null && srvdto.Fg_bl.Value).ToList().ForEach(srvdto => { CiOrdFeeSrvDTO ordFeeBill = new CiOrdFeeSrvDTO(); ordFeeBill.deSerializeJson(srvdto.serializeJson()); ordFeeBill.Content_or = ord.Content_or; ordFeeBill.Dt_effe = ord.Dt_effe; ordFeeBill.setAttrVal("Ord_colligate", ord.Ord_colligate); ordFeeBill.Code_or = ord.Code_or; if (String.IsNullOrEmpty(ordFeeBill.Id_unit_sale)) { ordFeeBill.Id_unit_sale = ordFeeBill.Id_unit_med; ordFeeBill.Name_unit_sale = ordFeeBill.Name_unit_med; } if (ordFeeBill.Price == null) { ordFeeBill.Price = FDouble.ZERO_DBL; } // 物品标志 if (ordFeeBill.Fg_mm != null && ordFeeBill.Fg_mm.Value) { ordFeeBill.Amt_total = ordFeeBill.Price * (ordFeeBill.Quan_cur == null ? 0 : ordFeeBill.Quan_cur); //且非草药时 if (ordFeeBill.Sd_srvtp != null && !ordFeeBill.Sd_srvtp.StartsWith(BdSrvDictCodeConst.SD_SRVTP_HERBDRUG) && ordFeeBill.Name_mm != null) { ordFeeBill.Name_srv = ordFeeBill.Name_srv + "(" + ordFeeBill.Name_mm + ")"; } } else { ordFeeBill.Amt_total = ordFeeBill.Price * (ordFeeBill.Quan_total_medu == null ? 0 : ordFeeBill.Quan_total_medu); } { //执行科室 OrWfDeptInfoDTO wf = new ciorder.viewmodel.impext.GetDeptMpImp().GetDept_mp_ids( this.ent4BannerDTO.Code_entp, this.ent4BannerDTO.Id_entp, ordFeeBill.Sd_srvtp, ordFeeBill.Id_srvca, ordFeeBill.Id_srv, ordFeeBill.Id_route, "", this.ent4BannerDTO.Id_dep_nur, this.ent4BannerDTO.Id_dep_phy, GetOrdDeptMp(ordFeeBill.Id_or)); if (wf != null) { ordFeeBill.setAttrVal("str_id_mp_deps", wf.Id_mp_depts); } if (blsrvFMap.Keys.Contains(ordFeeBill.Id_srv)) { ordFeeBill.Des_srv = (blsrvFMap[ordFeeBill.Id_srv] as MedSrvDO).Des; } } ordFeeBill.Name_hp = ordFeeBill.Name_hpsrvtp; OrdFeeBillList.Add(ordFeeBill); }); // 处理医保类型 String[] szId_srv = OrdFeeBillList.Select(p => p.Id_srv).ToArray(); String[] szId_mm = OrdFeeBillList.Select(p => p.Id_mm).ToArray(); bl.hp.bdhpindicationdto.d.BdHpIndicationDTO[] szHpIndication = HpJudgeUtil.getInstance().getBdHpIndicationDTO(szId_srv, szId_mm, this.ent4BannerDTO); if (null != szHpIndication) { OrdFeeBillList.ForEach(p => { bl.hp.bdhpindicationdto.d.BdHpIndicationDTO dto = null; if (p.Fg_mm != null && p.Fg_mm == true) { if ((dto = szHpIndication.FirstOrDefault(item => item.Id_mm.Equals(p.Id_mm) && item.Id_srv.Equals(p.Id_srv))) != null) { p.Name_hp = idHpSrvtpFromSdHpSrvtp(dto.Sd_hpsrvtp); } } else { if ((dto = szHpIndication.FirstOrDefault(item => item.Id_srv.Equals(p.Id_srv))) != null) { p.Name_hp = idHpSrvtpFromSdHpSrvtp(dto.Sd_hpsrvtp); } } }); } return(OrdFeeBillList.ToArray()); }