Example #1
0
        /// <summary>
        /// 针对一个医疗单的方法
        /// </summary>
        /// <param name="xapDataList"></param>
        /// <param name="id_route"></param>
        /// <param name="ent4BannerDTO"></param>
        public static void fillExecDetps(XapDataList <EmsOrDrug> xapDataList, string id_route, Ent4BannerDTO ent4BannerDTO)
        {
            List <string> idlist = new List <string>();

            xapDataList.ToList().ForEach(p => {
                if (!idlist.Contains(p.Id_srv))
                {
                    OrWfExDeptParamDTO param = new OrWfExDeptParamDTO();
                    param.Eu_wftp            = Convert.ToInt32(EnumFlow.NULL);               //    0执行与物资   1执行科室 2物资流向
                    param.Code_entp          = ent4BannerDTO.Code_entp;                      //     就诊类型
                    param.Id_dept_ns         = ent4BannerDTO.Id_dep_nur;                     //就诊护理病区
                    param.Id_dept_or         = UserManager.getInstance().CurrentDept.Id_dep; //开单科室
                    param.Id_dept_en         = ent4BannerDTO.Id_dep_phy;                     //id_dept_en;//就诊科室
                    param.Id_srv             = p.Id_srv;                                     //服务
                    param.Sd_srvtp           = p.Sd_srvtp;                                   //服务类型sd
                    param.Id_srvca           = p.Id_srvca;                                   //服务分类
                    //dto.Innercode_srvca = "";//服务分类内码
                    // param.Id_mm = emsordrug.Id_mm; 传物品id_mm没有用
                    param.Id_usage       = id_route; //用法
                    OrWfDeptInfoDTO deps = new ICiOrdQryServiceImpl().getExeDepts4CiOrSrvN(param);
                    if (deps != null && deps.Orwfexedepts != null && deps.Orwfexedepts.Count != 0)
                    {
                        xapDataList.ToList().ForEach(drug => {
                            if (drug.Id_srv == p.Id_srv)
                            {
                                drug.Id_mp_dep   = (deps.Orwfexedepts[0] as OrWfExDeptDTO).Id_dept;
                                drug.Name_mp_dep = (deps.Orwfexedepts[0] as OrWfExDeptDTO).Name_dept;
                                if (deps != null && deps.Pharmwfwhdepts != null && deps.Pharmwfwhdepts.Count > 0)
                                {
                                    drug.Id_dep_wh   = (deps.Pharmwfwhdepts[0] as OrWfExDeptDTO).Id_dept;
                                    drug.Name_dep_wh = (deps.Pharmwfwhdepts[0] as OrWfExDeptDTO).Name_dept;
                                }
                                drug.Str_mp_dep_ids = deps.Id_mp_depts;
                                drug.Str_wh_dep_ids = deps.Id_dept_whs;
                            }
                        });
                    }

                    idlist.Add(p.Id_srv);
                }
            });
        }
Example #2
0
        public override int GetCountWithOutDelete()
        {
            XapDataList <EmsBtItemDO> itemList = this.GetTableDataSource() as XapDataList <EmsBtItemDO>;

            if (itemList.Count == 0)
            {
                return(0);
            }

            return(itemList.ToList().Count(p => !p.IsDELETED));
        }
Example #3
0
        public override void DeleteItemData(int index)
        {
            // 由于列表中可能存在逻辑删除项目,所以此处传递过来的索引值不再是列表的数组索引。而是不包含逻辑删除项目的列表的索引值
            XapDataList <EmsOrDrug> itemList = this.GetTableDataSource() as XapDataList <EmsOrDrug>;

            if (index >= 0 && index < GetCountWithOutDelete() /*itemList.Count*/)
            {
                List <Object> tmpList = new List <Object>();
                itemList.ToList().ForEach(p => { if (!p.IsDELETED)
                                                 {
                                                     tmpList.Add(p);
                                                 }
                                          });
                if (tmpList.Count > 0)
                {
                    this.DeleteItemData(tmpList.ElementAt(index));
                }
            }
        }
Example #4
0
        protected void handleExpenseDataChanged(object sender, DictionaryEventArgs e)
        {
            if (e == null || e.Data == null)
            {
                return;
            }
            if (AssToolEx.ObjectOfEventArgs(e, "Fg_treat") != null)
            {
                var       obj      = AssToolEx.ObjectOfEventArgs(e, "Fg_treat");
                EmsOrDrug drug     = obj as EmsOrDrug;
                EmsUIDTO  emsUIDTO = this.GetViewModel().GetEmsUIDTO() as EmsUIDTO;
                XapDataList <EmsOrDrug> drugList = emsUIDTO.Emsdrugs.EmsOrDrugList;
                EmsOrDrug matchDrug = drugList.ToList().FirstOrDefault(p => p.Id_srv == drug.Id_srv);
                if (matchDrug != null)
                {
                    matchDrug.Fg_treat         = drug.Fg_treat;
                    matchDrug.Fg_selfpay       = matchDrug.Fg_treat == false ? true : matchDrug.Fg_selfpay;
                    matchDrug.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;//0不需要判断,1待判断,2已判断;
                }
            }
            else if (AssToolEx.ObjectOfEventArgs(e, "Fg_selfpay") != null)
            {
                var       obj      = AssToolEx.ObjectOfEventArgs(e, "Fg_selfpay");
                EmsOrDrug drug     = obj as EmsOrDrug;
                EmsUIDTO  emsUIDTO = this.GetViewModel().GetEmsUIDTO() as EmsUIDTO;
                XapDataList <EmsOrDrug> drugList = emsUIDTO.Emsdrugs.EmsOrDrugList;
                EmsOrDrug matchDrug = drugList.ToList().FirstOrDefault(p => p.Id_srv == drug.Id_srv);
                if (matchDrug != null)
                {
                    matchDrug.Fg_selfpay       = drug.Fg_selfpay;
                    matchDrug.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED;//0不需要判断,1待判断,2已判断;
                }
            }
            EmsOrDrug drugitem = this.GetViewModel().GetSelectedObject() as EmsOrDrug;

            this.GetXapFormControl().DataChanged -= OnXapFormControl_DataChanged;
            updateDrugInfo(drugitem);
            this.GetXapFormControl().DataChanged += OnXapFormControl_DataChanged;
        }