Exemplo n.º 1
0
 protected void CalculateDeptMp(EmsOrDrug 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_mp_dep   = wf.Firstid_mp_dept;
             newDrug.Name_mp_dep = wf.Firstname_mp_dept;
             newDrug.setAttrVal("str_id_mp_deps", wf.Id_mp_depts);
         }
     }
     #endregion
 }
Exemplo n.º 2
0
        public override void EditEms(CiEmsDTO ems)
        {
            base.EditEms(ems);

            OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(this.uiEmsDTO.PatInfo.Code_entp,
                                                                   this.uiEmsDTO.PatInfo.Id_entp,
                                                                   this.uiEmsDTO.MedSrvDO.Sd_srvtp,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srvca,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srv,
                                                                   this.uiEmsDTO.MedSrvDO.Id_route,
                                                                   "id_mm", this.uiEmsDTO.PatInfo.Id_dep_nur, this.uiEmsDTO.PatInfo.Id_dep_phy);

            idDepMps = wf.Id_mp_depts;

            orCiEmsToUiEms.EditApop(uiEmsDTO, ems);

            this.uiEmsDTO.Status           = DOStatus.NEW;
            this.uiEmsDTO.Emsapop.Status   = DOStatus.NEW;
            this.uiEmsDTO.Emsapop.Dt_creat = ems.Dt_begin;

            // 附加手术信息转换
            this.OpAppendItem2OpexInfo();

            tableDatasource.Add(uiEmsDTO.Emsapop);
        }
Exemplo n.º 3
0
        private void DefaultDepInfo(EmsOrDrug item, MedSrvDO med)
        {
            OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(GetEnt4BannerDTO().Code_entp, GetEnt4BannerDTO().Id_entp, med.Sd_srvtp, med.Id_srvca, med.Id_srv, med.Id_route, "id_mm", GetEnt4BannerDTO().Id_dep_nur, GetEnt4BannerDTO().Id_dep_phy);

            this.strID_Dep_Mps = wf == null ? "" : wf.Id_mp_depts;
            item.Id_mp_dep     = wf == null ? "" : wf.Firstid_mp_dept;
            item.Name_mp_dep   = wf == null ? "" : wf.Firstname_mp_dept;

            uiEmsDTO.Emsapobs.Id_mp_dep   = item.Id_mp_dep;
            uiEmsDTO.Emsapobs.Name_mp_dep = item.Name_mp_dep;
        }
Exemplo n.º 4
0
        protected EmsOrDrug fillSameInfoForEmsOrDrug(EmsOrDrug defEmsOrdrug, EmsDrugItemDO emsdrugs)
        {
            if (GetCountWithOutDelete() /*emsdrugs.EmsOrDrugList.Count*/ == 1)
            {
                if (emsdrugs.Use_days == null || emsdrugs.Use_days == 0)
                {
                    emsdrugs.Use_days = 1;
                }
            }

            // 相同的频次
            {
                defEmsOrdrug.Id_freq       = emsdrugs.Id_freq;
                defEmsOrdrug.Name_freq     = emsdrugs.Name_freq;
                defEmsOrdrug.Sd_frequnitct = emsdrugs.Sd_frequnitct;
                defEmsOrdrug.Freqct        = emsdrugs.Freqct;
            }

            // 相同的用法
            {
                defEmsOrdrug.Id_route   = emsdrugs.Id_route;
                defEmsOrdrug.Name_route = emsdrugs.Name_route;
            }
            // 计算不同的执行科室
            {
                OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(GetEnt4BannerDTO().Code_entp, GetEnt4BannerDTO().Id_entp, defEmsOrdrug.Sd_srvtp, defEmsOrdrug.Id_srvca, defEmsOrdrug.Id_srv, defEmsOrdrug.Id_route, "", GetEnt4BannerDTO().Id_dep_nur, GetEnt4BannerDTO().Id_dep_phy);

                if (defEmsOrdrug.Id_mp_dep == null)
                {
                    defEmsOrdrug.Id_mp_dep   = wf == null ? "" : wf.Firstid_mp_dept;
                    defEmsOrdrug.Name_mp_dep = wf == null ? "" : wf.Firstname_mp_dept;
                }
                if (defEmsOrdrug.Id_dep_wh == null)
                {
                    defEmsOrdrug.Id_dep_wh = wf == null ? "" : wf.Id_dept_wh;
                }
            }

            if (defEmsOrdrug.Use_days == null)
            {
                defEmsOrdrug.Use_days = (emsdrugs.Use_days == null ? 0 : emsdrugs.Use_days);
            }

            if (defEmsOrdrug.Quan_cur == null)
            {
                defEmsOrdrug.Quan_cur = 0;
            }

            return(defEmsOrdrug);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 优化前编辑方法
        /// </summary>
        /// <param name="ord"></param>
        private void Old_EditOrder(CiOrderDO ord)
        {
            OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(this.uiEmsDTO.PatInfo.Code_entp,
                                                                   this.uiEmsDTO.PatInfo.Id_entp,
                                                                   this.uiEmsDTO.MedSrvDO.Sd_srvtp,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srvca,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srv,
                                                                   this.uiEmsDTO.MedSrvDO.Id_route,
                                                                   "", this.uiEmsDTO.PatInfo.Id_dep_nur, this.uiEmsDTO.PatInfo.Id_dep_phy);

            idDepMps = (wf == null ? "" : wf.Id_mp_depts);
            base.EditOrder(ord);
            orCiEmsToUiEms.EditPathgy(this.uiEmsDTO, this.ciEmsDTO);
            // 价格
            uiEmsDTO.Emsappathgy.Price = this.logicEx.getSrvNotMMPri(uiEmsDTO.MedSrvDO, null);
            this.lstEmsPathgyItemDO.Add(uiEmsDTO.Emsappathgy);
        }
Exemplo n.º 6
0
        public override void EditEms(CiEmsDTO ems)
        {
            base.EditEms(ems);

            orCiEmsToUiEms.EditCommon(this.ciEmsDTO, uiEmsDTO);
            this.uiEmsDTO.Status = DOStatus.NEW;
            EmsOrDrug drug = new EmsOrDrug();

            drug.Id_srv   = this.ciEmsDTO.Id_srv;
            drug.Name_srv = this.ciEmsDTO.Name;
            CiEmsSrvDTO emssrv = this.ciEmsDTO.Emssrvs[0] as CiEmsSrvDTO;

            drug.Id_unit_med   = emssrv.Id_unit_med;
            drug.Name_unit_med = emssrv.Name_unit_med;
            drug.Id_freq       = emssrv.Id_freq;
            drug.Name_freq     = emssrv.Name_freq;
            drug.Sd_frequnitct = emssrv.Sd_frequnitct;
            drug.Freqct        = emssrv.Freqct;
            drug.Id_mp_dep     = emssrv.Id_dep;
            drug.Name_mp_dep   = emssrv.Name_dep;
            drug.Note_or       = ciEmsDTO.Note;
            drug.Fg_treat      = emssrv.Fg_indic;
            drug.Use_days      = this.ciEmsDTO.Days_or;
            drug.Quan_med      = (emssrv.Quan_med == null ? 1 : emssrv.Quan_med);
            drug.Quan_cur      = (emssrv.Quan_cur == null ? this.logicEx.getNotDrugTotal(drug.Quan_med.ToDouble(), drug.Id_freq, drug.Freqct.Value, drug.Use_days.Value) : emssrv.Quan_cur);;
            drug.Price         = emssrv.Price;
            drug.Totalprice    = drug.Price * drug.Quan_cur;
            drug.Fg_bl         = emssrv.Fg_bl;
            drug.Id_srvtp      = ciEmsDTO.Id_srvtp;
            drug.Sd_srvtp      = ciEmsDTO.Sd_srvtp;
            drug.Eu_sourcemd   = emssrv.Eu_sourcemd;
            uiEmsDTO.Emsdrugs.EmsOrDrugList.Add(drug);
            //执行科室
            OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(this.uiEmsDTO.PatInfo.Code_entp,
                                                                   this.uiEmsDTO.PatInfo.Id_entp,
                                                                   this.uiEmsDTO.MedSrvDO.Sd_srvtp,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srvca,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srv,
                                                                   this.uiEmsDTO.MedSrvDO.Id_route,
                                                                   "", this.uiEmsDTO.PatInfo.Id_dep_nur, this.uiEmsDTO.PatInfo.Id_dep_phy);

            if (wf != null)
            {
                strMpDepFilter = wf.Id_mp_depts;
            }
        }
Exemplo n.º 7
0
        public override void EditEms(CiEmsDTO ems)
        {
            base.EditEms(ems);
            orCiEmsToUiEms.EditDrug(ems, this.uiEmsDTO);
            this.uiEmsDTO.Status = DOStatus.NEW;

            foreach (EmsOrDrug item in this.uiEmsDTO.Emsdrugs.EmsOrDrugList)
            {
                if (String.IsNullOrEmpty(this.uiEmsDTO.Emsdrugs.Id_route))
                {
                    this.uiEmsDTO.Emsdrugs.Name_route = null;
                }
                if (String.IsNullOrEmpty(this.uiEmsDTO.Emsdrugs.Id_freq))
                {
                    this.uiEmsDTO.Emsdrugs.Name_freq = null;
                    this.uiEmsDTO.Emsdrugs.Freqct    = null;
                }
                this.fillSameInfoForEmsOrDrug(item, this.uiEmsDTO.Emsdrugs);

                // 计算 明细总金额
                item.Totalprice = item.Quan_cur * item.Price;
            }
            if (this.uiEmsDTO.Emsdrugs.EmsOrDrugList != null && this.uiEmsDTO.Emsdrugs.EmsOrDrugList.Count > 0 && this.uiEmsDTO.Emsdrugs.EmsOrDrugList[0].Id_route != "")
            {
                id_dosages = this.logicEx.getDrugRouteOfDoSages(this.uiEmsDTO.Emsdrugs.EmsOrDrugList[0].Id_route);
            }

            // 物质流向
            OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(this.GetEnt4BannerDTO().Code_entp, this.GetEnt4BannerDTO().Id_entp, ems.Sd_srvtp, ems.Id_srvca, ems.Id_srv, ems.Id_route, "id_mm", this.GetEnt4BannerDTO().Id_dep_nur, this.GetEnt4BannerDTO().Id_dep_phy);

            this.uiEmsDTO.Emsdrugs.Str_mp_dep_ids = wf == null ? "" : wf.Id_mp_depts;
            if (this.uiEmsDTO.Emsdrugs.Id_dep == null)
            {
                this.uiEmsDTO.Emsdrugs.Id_dep   = wf == null ? "" : wf.Firstid_mp_dept;
                this.uiEmsDTO.Emsdrugs.Name_dep = wf == null ? "" : wf.Firstname_mp_dept;
            }
            if (null != wf)
            {
                foreach (EmsOrDrug drug in uiEmsDTO.Emsdrugs.EmsOrDrugList)
                {
                    //皮试判断逻辑
                    AssToolEx.CheckTestSkinSrv(null, drug, this.GetEnt4BannerDTO());
                    drug.Id_dep_wh = wf.Id_dept_wh;
                }
            }
        }
Exemplo n.º 8
0
        public override string OnRefFilterData(string filedName, StringObjectMap sbm)
        {
            if (filedName.Equals("Name_srv"))
            {
                if (!sbm.ContainsKey("code_entp"))
                {
                    sbm.Add("code_entp", "00");
                }
                if (!sbm.ContainsKey("id_pripat"))
                {
                    sbm.Add("id_pripat", this.ent4BannerDTO.Id_pripat);
                }
                CiEnContextDTO ciEnContextDTO = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO;
                string         id_hp          = ciEnContextDTO.Id_hp_default;
                if (!string.IsNullOrEmpty(id_hp))
                {
                    if (!sbm.ContainsKey("id_hp"))
                    {
                        sbm.Add("id_hp", id_hp);
                    }
                }
                return(string.Format(" Sd_srvtp ='{0}' and quan_med is not null", strSd_srvtp));
            }
            else if (filedName.Equals("Name_diag"))
            {
                if (sbm != null && !sbm.ContainsKey("id_ent"))
                {
                    sbm.Add("id_ent", (GetEnt4BannerDTO().Id_ent));
                }
                return("");
            }
            else if (filedName.Equals("Name_mp_dep"))
            {
                if (string.IsNullOrEmpty(strID_Dep_Mps))
                {
                    OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(GetEnt4BannerDTO().Code_entp, GetEnt4BannerDTO().Id_entp, this.uiEmsDTO.MedSrvDO.Sd_srvtp, this.uiEmsDTO.MedSrvDO.Id_srvca, this.uiEmsDTO.MedSrvDO.Id_srv, this.uiEmsDTO.MedSrvDO.Id_route, "id_mm", GetEnt4BannerDTO().Id_dep_nur, GetEnt4BannerDTO().Id_dep_phy);

                    this.strID_Dep_Mps = wf == null ? "" : wf.Id_mp_depts;
                }
                return(string.Format("id_dep in ({0})", strID_Dep_Mps));
            }
            else
            {
                return(base.OnRefFilterData(filedName, sbm));
            }
        }
Exemplo n.º 9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ems"></param>
        public override void EditEms(CiEmsDTO ems)
        {
            base.EditEms(ems);

            OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(this.uiEmsDTO.PatInfo.Code_entp,
                                                                   this.uiEmsDTO.PatInfo.Id_entp,
                                                                   this.uiEmsDTO.MedSrvDO.Sd_srvtp,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srvca,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srv,
                                                                   this.uiEmsDTO.MedSrvDO.Id_route,
                                                                   "", this.uiEmsDTO.PatInfo.Id_dep_nur, this.uiEmsDTO.PatInfo.Id_dep_phy);

            idDepMps = (wf == null ? "" : wf.Id_mp_depts);

            orCiEmsToUiEms.EditPathgy(this.uiEmsDTO, ems);
            this.uiEmsDTO.Status = DOStatus.NEW;
            // 价格
            uiEmsDTO.Emsappathgy.Price = this.logicEx.getSrvNotMMPri(uiEmsDTO.MedSrvDO, null);
            this.lstEmsPathgyItemDO.Add(uiEmsDTO.Emsappathgy);
        }
Exemplo n.º 10
0
        /// <summary>
        /// 优化前方法
        /// </summary>
        /// <param name="emsCreateParameter"></param>
        /// <param name="pos"></param>
        /// <returns></returns>
        private bool Old_LoadMedSrv(EmsCreatedParameter emsCreateParameter, int pos)
        {
            base.LoadMedSrv(emsCreateParameter, pos);
            MedSrvDO med = emsCreateParameter.getMedSrvDO();

            med = XapServiceMgr.find <IMedsrvMDOCrudService>().findById(med.Id_srv);
            this.uiEmsDTO.MedSrvDO = med;
            orDataBing.AddBtDataBing(this.uiEmsDTO, med);
            var ub = GetCustomParam() as CiordubDTO;

            this.uiEmsDTO.CiordubDTO             = ub;
            this.uiEmsDTO.CiordubDTO.Dt_bu_pl_ub = CommonExtentions.NowTime(this);
            tableDatasource = new XapDataList <CiordubDTO>();
            //执行科室
            OrWfDeptInfoDTO wf = new GetDeptMpImp().GetDept_mp_ids(this.uiEmsDTO.PatInfo.Code_entp,
                                                                   this.uiEmsDTO.PatInfo.Id_entp,
                                                                   this.uiEmsDTO.MedSrvDO.Sd_srvtp,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srvca,
                                                                   this.uiEmsDTO.MedSrvDO.Id_srv,
                                                                   this.uiEmsDTO.MedSrvDO.Id_route,
                                                                   "", this.uiEmsDTO.PatInfo.Id_dep_nur, this.uiEmsDTO.PatInfo.Id_dep_phy);

            if (wf != null)
            {
                uiEmsDTO.CiordubDTO.Id_mp_dep   = wf.Firstid_mp_dept;
                uiEmsDTO.CiordubDTO.Name_mp_dep = wf.Firstname_mp_dept;
            }
            this.uiEmsDTO.CiordubDTO.Dt_bu_pl_ub = this.uiEmsDTO.CiordubDTO.Dt_begin_ui = this.uiEmsDTO.CiordubDTO.Dt_bu_pl_ub == null?this.NowTime() : this.uiEmsDTO.CiordubDTO.Dt_bu_pl_ub;

            this.uiEmsDTO.CiordubDTO.Use_days  = 1;
            this.uiEmsDTO.CiordubDTO.Dt_end_ui = ((DateTime)this.uiEmsDTO.CiordubDTO.Dt_begin_ui).AddDays((int)this.uiEmsDTO.CiordubDTO.Use_days);
            this.uiEmsDTO.CiordubDTO.Times_cur = CalQuantumUtil.GetInstance().getTotalTimes(med.Id_freq, this.uiEmsDTO.CiordubDTO.Use_days);

            tableDatasource.Add(this.uiEmsDTO.CiordubDTO);
            //*/

            // ++


            return(true);
        }