private void setOrdDetail(RouteMark routeMark) { var orService = XapServiceMgr.find <ICiorderCrudService>(); routeMark.MedicalInfoList = new List <MedicalInfo>(); //获取已医嘱信息 CiorderAggDO ciagg = orService.findById(routeMark.IdOr); IOrderedEnumerable <OrdSrvDO> srva = ciagg.getOrdSrvDO().OrderBy(x => x.Sortno); foreach (OrdSrvDO srvDo in srva) { if (srvDo.Fg_or == FBoolean.True && srvDo.Sd_srvtp.StartsWith("01")) { var med = new MedicalInfo(); med.Units = srvDo.Quan_medu + " " + srvDo.Medu_name; med.MedicationModels = srvDo.Route_name; med.Name = srvDo.Name; med.Order = (int)srvDo.Sortno; routeMark.MedicalInfoList.Add(med); } } }
public override CiOrderDO Save2Order() { ciOrder = base.Save2Order(); if (this.ciEmsDTO.Id_or == null) { MedSrvDO medSrcDO = LogicEx.GetInstance().getApBuSrv(); if (medSrcDO != null) { CiorderAggDO ciagg = orService.findById(ciOrder.Id_or); OrdApBtDO[] btdos = btService.find("id_or='" + ciOrder.Id_or + "'", null, FBoolean.False); OrdApBtDO btdo = btdos[0]; uiEmsDTO.CiordubDTO = new CiordubDTO(); uiEmsDTO.CiordubDTO.Id_or_rel = ciOrder.Id_or; uiEmsDTO.CiordubDTO.Applyform = btdo.No_applyform; uiEmsDTO.CiordubDTO.Orsrvname = ciagg.getOrdSrvDO()[0].Name; uiEmsDTO.CiordubDTO.Id_srv = ciOrder.Id_srv; uiEmsDTO.CiordubDTO.Quan_medu = ciagg.getOrdSrvDO()[0].Quan_medu; uiEmsDTO.CiordubDTO.Id_unit = ciagg.getOrdSrvDO()[0].Id_medu; uiEmsDTO.CiordubDTO.Dt_bt_pl = Convert.ToDateTime(btdo.Dt_bt_pl); uiEmsDTO.CiordubDTO.Num_margin_bu = btdo.Num_margin_bu; uiEmsDTO.CiordubDTO.Id_emp_sign = ciOrder.Id_emp_sign; uiEmsDTO.CiordubDTO.Name_emp_sign = ciOrder.Emp_sign_name; uiEmsDTO.CiordubDTO.Id_route = medSrcDO.Id_route; uiEmsDTO.CiordubDTO.Name_route = medSrcDO.Route_name; uiEmsDTO.CiordubDTO.Quan_medu_ub = uiEmsDTO.CiordubDTO.Quan_medu; uiEmsDTO.CiordubDTO.Name_unit = ciagg.getOrdSrvDO()[0].Medu_name; uiEmsDTO.CiordubDTO.Id_unit = uiEmsDTO.MedSrvDO.Id_unit_med; } } return(ciOrder); }
protected void HandleEditLogic(CiEmsDTO ems) { string unitname = ""; var srvCommon = (CiEmsSrvDTO)ems.Emssrvs[0]; var service = XapServiceMgr.find <IMedsrvMDOCrudService>(); ////查询用血对应的服务 //MedSrvDO medSrcDO = service.findById(Apbu_Srv_ID); uiEmsDTO.MedSrvDO = service.findById(ems.Id_srv); if (uiEmsDTO.Emsapbt.BtLabItem.Count == 0) { LoadIndicatorData(); } orCiEmsToUiEms.EditApbt(uiEmsDTO, ems, ref unitname); this.uiEmsDTO.Status = DOStatus.NEW; uiEmsDTO.Emsapbt.Dt_create = ems.Dt_begin; this.uiEmsDTO.Emsapbt.Id_mp_dep = srvCommon.Id_dep; this.uiEmsDTO.Emsapbt.Name_mp_dep = srvCommon.Name_dep; tableDatasource = new XapDataList <EmsBtItemDO>(); tableDatasource.Add(uiEmsDTO.Emsapbt); if (ems.Id_or != null) { CiorderAggDO ciagg = orService.findById(ems.Id_or); this.ciOrder = ciagg.getParentDO(); OrdApBtDO[] btdos = btService.find("id_or='" + ciOrder.Id_or + "'", null, FBoolean.False); OrdApBtDO btdo = btdos[0]; uiEmsDTO.CiordubDTO = new CiordubDTO(); uiEmsDTO.CiordubDTO.Id_or_rel = ciOrder.Id_or; uiEmsDTO.CiordubDTO.Applyform = btdo.No_applyform; uiEmsDTO.CiordubDTO.Orsrvname = ciagg.getOrdSrvDO()[0].Name; uiEmsDTO.CiordubDTO.Id_srv = ciOrder.Id_srv; uiEmsDTO.CiordubDTO.Quan_medu = ciagg.getOrdSrvDO()[0].Quan_medu; uiEmsDTO.CiordubDTO.Id_unit = ciagg.getOrdSrvDO()[0].Id_medu; uiEmsDTO.CiordubDTO.Dt_bt_pl = Convert.ToDateTime(btdo.Dt_bt_pl); uiEmsDTO.CiordubDTO.Num_margin_bu = btdo.Num_margin_bu; uiEmsDTO.CiordubDTO.Id_emp_sign = ciOrder.Id_emp_sign; uiEmsDTO.CiordubDTO.Name_emp_sign = ciOrder.Emp_sign_name; //uiEmsDTO.CiordubDTO.Id_route = medSrcDO.Id_route; //uiEmsDTO.CiordubDTO.Name_route = medSrcDO.Route_name; uiEmsDTO.CiordubDTO.Quan_medu_ub = uiEmsDTO.CiordubDTO.Quan_medu; uiEmsDTO.CiordubDTO.Name_unit = uiEmsDTO.MedSrvDO.Med_name; uiEmsDTO.CiordubDTO.Id_unit = uiEmsDTO.MedSrvDO.Id_unit_med; } CiorappbtAggDO agg = ems.Orapplysheet[((int)EmsType.BT).ToString()] as CiorappbtAggDO; agg.Status = DOStatus.UPDATED; agg.getParentDO().Status = DOStatus.UPDATED; }
/// <summary> /// 保存时提示信息 再次保存 TODO /// </summary> /// <param name="emstype"></param> /// <param name="ciEnContextDTO"></param> /// <returns></returns> public CiOrderDO AgainSaveOrder(String emstype, CiEnContextDTO ciEnContextDTO) { object[] param = new object[] { emstype, ciEnContextDTO }; si.url = url_r; CiorderAggDO rtn = si.invoke <CiorderAggDO>("AgainSaveOrder", param.ToArray()); if (rtn != null) { return(rtn.getParentDO()); } return(null); }
//zzj //OrderSrvSetViewModel srvSetVM = new OrderSrvSetViewModel(); //public CiorderAggDO GetSkinTestAgg(string id_mm, PatientsDTO patDo) //{ // CiorderAggDO agg = new CiorderAggDO(); // string id_srv = srvSet.GetSrvSetId(id_mm); // MedSrvDO srv = new OrderSrvListViewModel("").GetSrvById(id_srv);//获取皮试服务 // List<MedSrvDO> srvList = srvSet.GetInSetSrv(id_srv);//根据服务套id 获取皮试服务套内 服务 // FillPatientDo(agg, srv,patDo);//填充主DO // FillOrSrvDO(agg, srvList,patDo);//填充医嘱服务DO // return agg; //} //private void FillPatientDo(CiorderAggDO agg, MedSrvDO srv, PatientsDTO patDo) //{ // CiOrderDO cior = new CiOrderDO(); // agg.setParentDO(srvSetVM.FillOrDO(srv, patDo)); //} //private void FillOrSrvDO(CiorderAggDO agg, List<MedSrvDO> srvList, PatientsDTO patDo) //{ // List<OrdSrvDO> srvs = srvSetVM.FillOrSrv(srvList, null); // agg.setOrdSrvDO(srvs.ToArray()); //} //public List<OrdSrvDO> GetSkinSrvItem(string id_mm) //{ // //根据物品id 获取服务关联的 皮试服务 // string id_srv = srvSet.GetSrvSetId(id_mm); // List<MedSrvDO> srvList = srvSet.GetInSetSrv(id_srv);//根据服务套id 获取皮试服务套内 服务 // return new OrderSrvSetViewModel().FillOrSrv(srvList, null); // //!!!!!!如果 皮试液关联的有费用信息,还要吧费用信息生成一条srv 存到or_srv 表 // //原液皮试与皮试液的区别 原液不需要 收费,不要插入收费服务 // // if (srvList.Count>0) // //{ // // MedSrvDO srv=srvList[0]; // // CiorderAggDO agg = new CiorderAggDO(); // // CiOrderDO PatientDo = new CiOrderDO(); // // OrdSrvDO orSrv = new OrdSrvDO(); // // agg.ParentDO = PatientDo; // // agg.setOrdSrvDO(new OrdSrvDO[] { orSrv }); // // //srv 对照 patient ,srvskin 对照 orSrv // // //PatientDo.Name_or = srv.Name; // // CiorderAggDO backAgg = new OrderSaveViewModel().SaveAgg(agg)[0]; // // string id_or = backAgg.getParentDO().Id_or; // // } //} public void AddSkinResult(CiorderAggDO backAgg) { CiOrderDO or = backAgg.getParentDO(); //插入皮试结果表一条数据 service.save(new CiSkinTestRstDO[] { new CiSkinTestRstDO { Id_or = or.Id_or, Createdby = UserManager.getInstance().CurrentUser.Id_user, Createdtime = UserManager.getInstance().CurrentUser.Createdtime } }); }
/// <summary> /// 根据id值查找临床医嘱AggDO数据 /// </summary> /// <param name="id"></param> /// <returns></returns> public CiorderAggDO findById(String id) { #region "缓存处理" if (ch.IsCached("findById")) { return(ch.findById(id)); } #endregion List <object> param = new List <object>(); param.Add(id); si.url = url_r; CiorderAggDO rtn = si.invoke <CiorderAggDO>("findById", param.ToArray()); return(rtn); }
/// <summary> /// Sets the会诊的申请单 /// </summary> private void SetCons(EmsUIDTO emsHeadDO, CiorderAggDO Agg) { // OrdApConsDO cons = new OrdApConsDO(); // if (agg != null && agg.getOrdApConsDO() != null) // { // OrdApConsDO sr = agg.getOrdApConsDO().FirstOrDefault(p => p.Id_apcons == emsHeadDO.Emsapcons.Id_emsconsitem); // if (sr != null) // { // cons = sr; // cons.Status = DOStatus.UPDATED; // } // } //agg.setOrdApConsDO(new OrdApConsDO[]{orDataBing.SaveConsDataBing(emsHeadDO, cons)}); }
/// <summary> /// Sets the 输血申请单 /// </summary> /// <param name="emsHeadDO">The ems head do.</param> /// <param name="bt">The bt.</param> /// Author:admin /// Date:2015-10-28 private void SetApBt(EmsUIDTO emsHeadDO, CiorderAggDO agg) { //OrdApBtDO bt = new OrdApBtDO(); //if (agg.getOrdApBtDO() != null) //{ // OrdApBtDO bttmp = agg.getOrdApBtDO().FirstOrDefault(p => p.Id_apbt == emsHeadDO.Emsapbt.Id_emsbt); // if (bttmp != null) // { // bt = bttmp; // bt.Status = DOStatus.UPDATED; // } //} //orDataBing.SaveApBtDataBing(emsHeadDO, bt); //agg.setOrdApBtDO(new OrdApBtDO[] { bt }); }
/// <summary> /// 根据医嘱id_or 取得数据 /// </summary> /// <param name="id_or"></param> /// <returns></returns> //public EmsUIDTO GetEmsHeadDo(string id_or) //{ // EmsUIDTO emsHeadDo = qryService.getEmsUIDTO(id_or,""); // if (emsHeadDo != null) // { // XapDataList<EmsObsLap> list = new XapDataList<EmsObsLap>(); // if (emsHeadDo.Emsapobs.EmsOrObsArrayList != null) // { // foreach (EmsObsLap item in emsHeadDo.Emsapobs.EmsOrObsArrayList) // { // list.Add(item); // } // emsHeadDo.Emsapobs.EmsOrObsList = list; // } // } // return emsHeadDo; //} /// <summary> /// Sets the 手术申请单 /// </summary> public void SetOpSug(EmsUIDTO emsHeadDO, CiorderAggDO agg) { //OrdApOpDO apOp = new OrdApOpDO(); //if (agg.getOrdApOpDO() != null) //{ // OrdApOpDO op = agg.getOrdApOpDO().FirstOrDefault(p => p.Id_apop == emsHeadDO.Emsapop.Id_emsopitem); // if (op != null) // { // apOp = op; // apOp.Status = DOStatus.UPDATED; // } //} //orDataBing.SaveOpSugDataBing(emsHeadDO, apOp); //agg.setOrdApOpDO(new OrdApOpDO[] { apOp }); }
public void SetApOut(EmsUIDTO emsHeadDO, CiorderAggDO agg) { OrdApOutDO apout = new OrdApOutDO(); //if (agg != null && agg.getOrdApConsDO() != null) //{ // OrdApOutDO sr = agg.getOrdApOutDO().FirstOrDefault(p => p.Id_orout == emsHeadDO.Emsapout.Id_emsapout); // if (sr != null) // { // apout = sr; // apout.Status = DOStatus.UPDATED; // } //} //agg.setOrdApOutDO(new OrdApOutDO[] { orDataBing.SaveApOutDataBing(emsHeadDO, apout) }); }
public void SetApTrans(EmsUIDTO emsHeadDO, CiorderAggDO agg) { //OrdApTransDO trans = new OrdApTransDO(); //if (agg != null && agg.getOrdApConsDO() != null) //{ // OrdApTransDO sr = agg.getOrdApTransDO().FirstOrDefault(p => p.Id_ortrans == emsHeadDO.Emsaptrans.Id_emsaptrans); // if (sr != null) // { // trans = sr; // trans.Status = DOStatus.UPDATED; // } //} //agg.setOrdApTransDO(new OrdApTransDO[] { orDataBing.SaveApTransDataBing(emsHeadDO, trans) }); }
private void setOrdDetail(EventLabelCheck labelCheck) { var orService = XapServiceMgr.find <ICiorderCrudService>(); labelCheck.MedicalInfoList = new List <MedicalInfo>(); //获取已医嘱信息 CiorderAggDO ciagg = orService.findById(labelCheck.IdOr); var orcontent = new OrContent(); var medlist = new List <MedicalInfo>(); var med = new MedicalInfo(); med.Name = ciagg.getParentDO().Name_or; med.Order = 1; medlist.Add(med); orcontent.Des = ciagg.getParentDO().Des_or; orcontent.Medlist = medlist; labelCheck.OrCon = orcontent; if (ciagg.getParentDO().Sd_orrsttp == null || ciagg.getParentDO().Sd_orrsttp == "0") { labelCheck.IsShowReportButton = false; } else { labelCheck.IsShowReportButton = true; } //labelCheck.IsShowReportButton=ciagg.getParentDO() // labelCheck.ACName = ciagg.getParentDO().Content_or; //IOrderedEnumerable<OrdSrvDO> srva = ciagg.getOrdSrvDO().OrderBy(x => x.Sortno); //foreach (OrdSrvDO srvDo in srva) //{ // if (srvDo.Fg_or == FBoolean.True && srvDo.Sd_srvtp.StartsWith("03")) // { // var med = new MedicalInfo(); // med.Units = srvDo.Quan_medu + " " + srvDo.Medu_name; // med.MedicationModels = srvDo.Route_name; // med.Name = srvDo.Name; // med.Order = (int)srvDo.Sortno; // labelCheck.MedicalInfoList.Add(med); // } //} }
/// <summary> /// Sets the病理申请单 /// </summary> public void SetPathgy(EmsUIDTO emsHeadDO, CiorderAggDO agg) { //OrdApPathgyDO pathgy = new OrdApPathgyDO(); //if (agg.getOrdApPathgyDO() != null) //{ // OrdApPathgyDO ap = agg.getOrdApPathgyDO().FirstOrDefault(p => p.Id_appathgy == emsHeadDO.Emsappathgy.Id_ordpathgyitem); // if (ap != null) // { // pathgy = ap; // pathgy.Status = DOStatus.UPDATED; // } //} //orDataBing.SavePathgyDataBing(emsHeadDO, pathgy); //agg.setOrdApPathgyDO(new OrdApPathgyDO[] { pathgy }); }
/// <summary> /// Sets手术卫材 /// </summary> /// <param name="emsHeadDO">The ems head do.</param> /// <param name="agg">The aggregate.</param> private void SetOpMm(EmsUIDTO emsHeadDO, CiorderAggDO agg) { // List<OrdOpMmDO> mms = new List<OrdOpMmDO>(); // emsHeadDO.Emsapop.OpMmItem.ToList().ForEach(p => //{ // OrdOpMmDO mm = new OrdOpMmDO(); // if (agg.getOrdOpEmpDO() != null) // { // OrdOpMmDO op = agg.getOrdOpMmDO().FirstOrDefault(px => px.Id_apopmm == p.Id_oropitem); // if (op != null) // { // mm = op; // mm.Status = DOStatus.UPDATED; // } // } // mms.Add(orDataBing.SaveOpSugMmDataBing(p, mm)); //}); // agg.setOrdOpMmDO(mms.ToArray()); }
/// <summary> /// Sets 手术人员 /// </summary> /// <param name="emsHeadDO">The ems head do.</param> /// <param name="agg">The aggregate.</param> /// Author:admin /// Date:2015-11-05 public void SetOpEmp(EmsUIDTO emsHeadDO, CiorderAggDO agg) { List <OrdOpEmpDO> emps = new List <OrdOpEmpDO>(); // emsHeadDO.Emsapop.OpEmpItem.ToList().ForEach(p => // { // OrdOpEmpDO emp = new OrdOpEmpDO(); // if (agg.getOrdOpEmpDO() != null) // { // OrdOpEmpDO op = agg.getOrdOpEmpDO().FirstOrDefault(px => px.Id_apopemp == p.Id_oropitem); // if (op != null) // { // emp = op; // emp.Status = DOStatus.UPDATED; // } // } // emps.Add(orDataBing.SaveOpSugEmpDataBing(p, emp)); //}); //agg.setOrdOpEmpDO(emps.ToArray()); }
/// <summary> /// Sets the病理标本 /// </summary> private void SetPathgySamp(EmsUIDTO emsHeadDO, CiorderAggDO agg) { //List<OrdApPathgySampDO> list = new List<OrdApPathgySampDO>(); //emsHeadDO.Emsappathgy.EmsItemInpathgy.ToList().ForEach(p => //{ // OrdApPathgySampDO samp = new OrdApPathgySampDO(); // if (agg.getOrdApPathgySampDO() != null) // { // OrdApPathgySampDO ap = agg.getOrdApPathgySampDO().FirstOrDefault(px => px.Id_appathgysamp == p.Id_oriteminpathgy); // if (ap != null) // { // samp = ap; // samp.Status = DOStatus.UPDATED; // } // } // list.Add(orDataBing.SavePathgySampDataBing(p, samp)); //}); //agg.setOrdApPathgySampDO(list.ToArray()); }
public void SetCiORSrv(CiorderAggDO agg, EmsUIDTO emsHeadDO, List <OrdSrvDO> srvList) { int i = 1; //emsHeadDO.Emsaplab.EmsOrObsList emsHeadDO.Emsaplab.EmsOrObsList.ToList().ForEach(p => { //把检查的项目 对照成服务 OrdSrvDO srv = new OrdSrvDO(); if (emsHeadDO.Status == DOStatus.UPDATED) { //srv = agg.getOrdSrvDO()[emsHeadDO.Emsdrugs.EmsOrDrugList.IndexOf(p)]; //srv = agg.getOrdSrvDO().First(x => x.Id_orsrv == p.Id_orsrv);//找到数据库已经存在的 if (srv == null)//数据库找不到 可能是修改时候 新增了 药品 { srv = new OrdSrvDO(); } } srv.Id_pat = emsHeadDO.PatInfo.Id_pat; //患者 srv.Id_entp = emsHeadDO.PatInfo.Id_entp; //就诊类型 srv.Code_entp = emsHeadDO.PatInfo.Code_entp; //就诊类型编码 srv.Id_en = emsHeadDO.PatInfo.Id_ent; //就诊 srv.Sortno = i; //TODO: 顺序应该是机制生成的 srv.Id_srvtp = emsHeadDO.MedSrvDO.Id_srvtp; // 服务类型 srv.Sd_srvtp = emsHeadDO.MedSrvDO.Sd_srvtp; //服务类型编码 srv.Id_srv = emsHeadDO.MedSrvDO.Id_srv; //服务项目 srv.Name = emsHeadDO.Emsaplab.Name_srv; //服务项目名称 srv.Name = p.Name_srv; //agg.getParentDO().Content_or = LogicEx.GetInstance().GetOrDes(emsHeadDO); agg.getParentDO().Dt_entry = emsHeadDO.Emsaplab.Dt_plan;//每条检查 不同的属性再进行独立赋值 srv.Name = p.Name_srv; agg.getParentDO().Dt_entry = emsHeadDO.Emsaplab.Dt_plan; agg.getParentDO().Dt_stop = CommonExtentions.NowTime(this); agg.getParentDO().Dt_effe = CommonExtentions.NowTime(this); //agg.getParentDO().Content_or = emsHeadDO.Emsaplab.Name_samptp; //待完善 srvList.Add(srv); i++; }); }
/// <summary> /// 检查的 ci_or_srv 的数据 /// </summary> /// <param name="agg"></param> /// <param name="status"></param> /// <param name="emsHeadDO"></param> /// <param name="srvList"></param> public void SetCiORSrv(CiorderAggDO agg, EmsUIDTO emsHeadDO, List <OrdSrvDO> srvList) { int i = 1; XapDataList <EmsObsLap> list = emsHeadDO.Emsapobs.EmsOrObsList; foreach (EmsObsLap p in list) { //把检查的项目 对照成服务 OrdSrvDO srv = new OrdSrvDO(); if (emsHeadDO.Status == DOStatus.UPDATED) { //srv = agg.getOrdSrvDO()[emsHeadDO.Emsdrugs.EmsOrDrugList.IndexOf(p)]; srv = agg.getOrdSrvDO().FirstOrDefault(x => x.Id_orsrv == p.Id_srv); //找到数据库已经存在的 } if (srv == null) //数据库找不到 可能是修改时候 新增了 药品 { srv = new OrdSrvDO(); } srv.Id_pat = emsHeadDO.PatInfo.Id_pat; //患者 srv.Id_entp = emsHeadDO.PatInfo.Id_entp; //就诊类型 srv.Code_entp = emsHeadDO.PatInfo.Code_entp; //就诊类型编码 srv.Id_en = emsHeadDO.PatInfo.Id_ent; //就诊 srv.Sortno = i; //TODO: 顺序应该是机制生成的 srv.Id_srvtp = emsHeadDO.MedSrvDO.Id_srvtp; // 服务类型 srv.Sd_srvtp = emsHeadDO.MedSrvDO.Sd_srvtp; //服务类型编码 srv.Id_srv = emsHeadDO.MedSrvDO.Id_srv; //服务项目 srv.Name = emsHeadDO.Emsapobs.Name_srv; //服务项目名称 srv.Name = p.Name_srv; agg.getParentDO().Dt_entry = emsHeadDO.Emsapobs.Dt_plan; //每条检查 不同的属性再进行独立赋值 srv.Name = p.Name_srv; agg.getParentDO().Dt_entry = emsHeadDO.Emsapobs.Dt_plan; agg.getParentDO().Dt_stop = emsHeadDO.Emsapobs.Dt_plan; agg.getParentDO().Dt_effe = emsHeadDO.Emsapobs.Dt_plan; //agg.getParentDO().Content_or = cof.GetOrDes(emsHeadDO, emsType); //待完善 srvList.Add(srv); i++; } }
/// <summary> /// 创建用血医嘱元数据 /// </summary> /// <param name="id_or"></param> /// <returns></returns> CiordubDTO creatBuEmsDO(string id_or, MedSrvDO medSrcDO) { CiorderAggDO ciagg = XapServiceMgr.find <ICiorderCrudService>().findById(id_or); CiOrderDO ciOrder = ciagg.getParentDO(); OrdApBtDO[] btdos = XapServiceMgr.find <ICiorappbtMDOCrudService>().find("id_or='" + id_or + "'", null, FBoolean.False); OrdApBtDO btdo = btdos[0]; OrdSrvDO mainSrv = null; foreach (OrdSrvDO ordsrv in ciagg.getOrdSrvDO()) { if (ordsrv.Eu_sourcemd != null && ordsrv.Eu_sourcemd == (int)OrSrvSourceFromEnum.PHYSIAN && ordsrv.Sd_srvtp == BdSrvDictCodeConst.SD_SRVTP_BLOODPROD_BLOODPROD_READYBLOOD) { mainSrv = ordsrv; break; } } (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO = new CiordubDTO(); (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Id_or_rel = ciOrder.Id_or; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Applyform = btdo.No_applyform; if (mainSrv != null) { (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Orsrvname = mainSrv.Name; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Quan_medu = mainSrv.Quan_medu; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Id_unit = mainSrv.Id_medu; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Name_unit = mainSrv.Medu_name; } (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Id_srv = ciOrder.Id_srv; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Dt_bt_pl = Convert.ToDateTime(btdo.Dt_bt_pl); (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Num_margin_bu = btdo.Num_margin_bu; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Id_emp_sign = ciOrder.Id_emp_sign; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Name_emp_sign = ciOrder.Emp_sign_name; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Id_route = medSrcDO.Id_route; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Name_route = medSrcDO.Route_name; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Quan_medu_ub = (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Quan_medu; (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO.Id_unit = (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapbt.Id_unit_med; return((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).CiordubDTO); }
/// <summary> /// 将 OrdSrvDO 列表数据转化为 EmsOrDrug 数据 /// </summary> /// <param name="orAggDO"></param> /// <param name="tmpCacheSrv"></param> /// <returns></returns> protected virtual EmsOrDrug[] ToEmsOrDrugs(CiorderAggDO orAggDO, Dictionary <String, object> tmpCacheSrv = null, FMap srvMmMap = null, FMap blsrvFMap = null) { List <EmsOrDrug> szDrugs = new List <EmsOrDrug>(); // 处理附加项 for (int i = 0; i < orAggDO.ChildrenList.Count; ++i) { for (int index = 0; index < orAggDO.ChildrenList[i].Count; ++index) { OrdSrvDO obj = orAggDO.ChildrenList[i][index] as OrdSrvDO; // 获取医嘱医疗单相关信息 object ordSrvItem = null; // 过滤 Fg_bl = false 的项目 //if (obj.Fg_bl == null || obj.Fg_bl == false) //{ // continue; //} if (obj.Status == DOStatus.DELETED) { continue; } // 检阅 EmsOrDrug 内容,可以根据医疗单数据进行修正 EmsOrDrug drug = HandleEmsOrDrug( // 根据医嘱服务创建 UI EmsOrDrug 对象以及数据 EmsOrDrugWithOrdSrvDO( obj, orAggDO.getParentDO().Days_or != null ? orAggDO.getParentDO().Days_or.Value : 1, (srvMmMap != null && srvMmMap.Keys.Contains(obj.Id_srv)) ? srvMmMap[obj.Id_srv] as OrdSrvMmDO : null ), ordSrvItem ); //费用注意信息 if (blsrvFMap != null && blsrvFMap.Keys.Count != 0) { if (blsrvFMap.Keys.Contains(obj.Id_srv)) { drug.Des = (blsrvFMap[obj.Id_srv] as MedSrvDO).Des; } } // 计算总量和总金额 if (drug.Fg_mm != null && drug.Fg_mm.Value) { if (drug.Quan_cur == null) { GetLogicEx().GetDrugTotal(drug, null, ent4BannerDTO.Code_entp, true); } ////药品的总价=总量*单价 //if (drug.Quan_cur!=null&&drug.Price!=null) // drug.Totalprice = drug.Quan_cur * drug.Price; } else { drug.Quan_cur = obj.Quan_total_medu; if (drug.Quan_cur != null && drug.Price != null) { drug.Totalprice = drug.Quan_cur * drug.Price; } } //只有没有执行科室的时候才查询 if (string.IsNullOrEmpty(drug.Id_mp_dep) || string.IsNullOrEmpty(drug.Name_mp_dep)) { // 计算执行科室 CalculateDeptMp(drug); } szDrugs.Add(drug); } } return(szDrugs.ToArray()); }
/// <summary> /// Saves the aggregate. /// </summary> /// <param name="ciAgg">The ci aggregate.</param> /// <returns></returns> public CiorderAggDO[] SaveAgg(CiorderAggDO ciAgg) { return(service.save(new[] { ciAgg })); }
/// <summary> /// /// </summary> /// <param name="order_id"></param> /// <returns></returns> public CiorderAggDO GetAgg(string order_id) { agg = service.findById(order_id); return(agg); }