コード例 #1
0
        private void getCiDiDtoList(CidiagAggDO ciagg)
        {
            DidtoAggDTO agg     = new DidtoAggDTO();
            Headdto     headdto = new Headdto();

            if (ciagg != null && ciagg.getCiDiagItemDO() != null)
            {
                List <Cidixy>    cidiListxy = new List <Cidixy>();
                List <Cididtozy> cidiListzy = new List <Cididtozy>();
                //int i = 0;

                headdto.Id_ditp            = ciagg.getParentDO().Id_ditp;
                headdto.Id_ditp_code       = ciagg.getParentDO().Sd_ditp;
                headdto.Id_ditp_name       = ciagg.getParentDO().Name_ditp;
                headdto.Dt_di              = ciagg.getParentDO().Dt_di;
                headdto.Id_emp_create      = ciagg.getParentDO().Id_emp_create;
                headdto.Id_emp_create_name = ciagg.getParentDO().Empname;

                //this.CidixyAggDto.AggDO.getParentDO().Id_ditp = ciagg.getParentDO().Id_ditp;
                //this.CidixyAggDto.AggDO.getParentDO().Id_ditp_code = ciagg.getParentDO().Sd_ditp;
                //this.CidixyAggDto.AggDO.getParentDO().Id_ditp_name = ciagg.getParentDO().Name_ditp;
                //this.CidixyAggDto.AggDO.getParentDO().Dt_di = ciagg.getParentDO().Dt_di;
                //this.CidixyAggDto.AggDO.getParentDO().Id_emp_create = ciagg.getParentDO().Id_emp_create;
                //this.CidixyAggDto.AggDO.getParentDO().Id_emp_create_name = ciagg.getParentDO().Empname;

                agg.setParentDO(headdto);
                foreach (CiDiagItemDO item in ciagg.getCiDiagItemDO())
                {
                    if (item.Id_disys == CiDictCodeConst.ID_CI_DISYS_XYZDTX) //判断  西医
                    {
                        getCidixy(cidiListxy, ciagg, item);
                    }
                    else if (item.Id_disys == CiDictCodeConst.ID_CI_DISYS_ZYZDTX) //判断中医
                    {
                        getCidizy(cidiListzy, ciagg, item);
                    }
                    else
                    {
                        //todo 暂时  其它体系
                        getCidixy(cidiListxy, ciagg, item);
                    }
                }

                agg.setCidixy(cidiListxy.ToArray());
                agg.setCididtozy(cidiListzy.ToArray());

                //  this.CidixyAggDto.AggDO.setCididtozy(cidiListzy.ToArray());
                //this.CidixyAggDto.AggDO.setCidixy(cidiListxy.ToArray());
                // this.CidixyAggDto.AggDO.setCidixy(cidiListxy.ToArray());
                // this.CidixyAggDto.AggDO.setCididtozy(cidiListzy.ToArray());
                this.CidixyAggDto = new XapAggDO <DidtoAggDTO>(qrySerice, agg);
            }
        }
コード例 #2
0
        /// <summary>
        /// 根据就诊获取本次就诊对应的诊断
        /// </summary>
        /// <param name="id_en"></param>
        /// <returns></returns>
        public List <CiDiagItemDO> GetCiDiagItemList(String id_en)
        {
            List <CiDiagItemDO> ciDiItemList = new List <CiDiagItemDO>();

            CidiagAggDO cidiAggDO = GetCidiagAggDO(id_en);

            if (cidiAggDO != null)
            {
                CiDiagItemDO[] items = cidiAggDO.getCiDiagItemDO();
                if (items != null)
                {
                    foreach (CiDiagItemDO item in items)
                    {
                        if (FBoolean.True == item.Fg_majdi)
                        {
                            ciDiItemList.Insert(0, item);
                        }
                        else
                        {
                            ciDiItemList.Add(item);
                        }
                    }
                }
            }

            return(ciDiItemList);
        }
コード例 #3
0
        /// <summary>
        /// 通过以保存的CidiagAggDO 构造List<DIDTO>对象
        /// </summary>
        /// <param name="cidiagAggDO">已经保存的诊断对象</param>
        /// <param name="idDidefList">缓存诊断定义id,用于过滤重复诊断</param>
        /// <returns></returns>
        private List <DIDTO> GetSavedDidtoList(CidiagAggDO cidiagAggDO, List <string> idDidefList)
        {
            List <DIDTO> didtoList = new List <DIDTO>();

            CiDiagDO cidiagDO = cidiagAggDO.getParentDO();

            CiDiagItemDO[] cidiagItems = cidiagAggDO.getCiDiagItemDO();

            foreach (CiDiagItemDO itemDO in cidiagItems)
            {
                DIDTO didto = new DIDTO();

                // 从数据库中查询出的诊断不存在重复,用于过滤选取的历史诊断是否存在重复
                idDidefList.Add(itemDO.Id_didef);

                this.setCiDiagItemProperty(itemDO, didto);
                this.setCiDiagDOProperty(cidiagDO, didto);

                //didto.Id_diitm = itemDO.Id_diitm; // 子表主键
                didto.Fg_majdi = itemDO.Fg_majdi;                // 主诊断标识
                didto.Sortno   = (idDidefList.Count).ToString(); // 通过记录数,设置诊断的排序号

                didtoList.Add(didto);
            }
            return(didtoList);
        }
コード例 #4
0
        /// <summary>
        /// 初始化中心诊断列表数据源
        /// </summary>
        /// <param name="cidiagAggDO"></param>
        private void initCiDiDtoModel(CidiagAggDO cidiagAggDO)
        {
            if (cidiagAggDO != null && cidiagAggDO.getCiDiagItemDO() != null)
            {
                HeadDiDiagDO = cidiagAggDO.getParentDO();

                List <Cidixy>    listCidixy = new List <Cidixy>();
                List <Cididtozy> listCidizy = new List <Cididtozy>();
                AllList = new List <string>();
                foreach (CiDiagItemDO item in cidiagAggDO.getCiDiagItemDO())
                {
                    AllList.Add(item.Didef_code);
                    if (item.Id_disys == CiDictCodeConst.ID_CI_DISYS_XYZDTX) //判断  西医
                    {
                        fillCidixyList(listCidixy, cidiagAggDO, item);
                    }
                    else if (item.Id_disys == CiDictCodeConst.ID_CI_DISYS_ZYZDTX) //判断中医
                    {
                        fillCidizyList(listCidizy, cidiagAggDO, item);
                    }
                    else
                    {
                        //todo 暂时  其它体系
                    }
                }

                listCidixy.ForEach(xy => { this.xyCidiList.Add(xy); });
                listCidizy.ForEach(zy => { this.zyCidiList.Add(zy); });

                // 中医和西医诊断条目默认4条
                int xyCidiListCount = this.xyCidiList.Count;
                for (int index = 0; index < nDefaultRowCount - xyCidiListCount; ++index)
                {
                    this.xyCidiList.Add(new Cidixy());
                }
                int zyCididtozyListCount = this.zyCidiList.Count;
                for (int index = 0; index < nDefaultRowCount - zyCididtozyListCount; ++index)
                {
                    this.zyCidiList.Add(new Cididtozy());
                }
            }
        }
コード例 #5
0
        public bool IsEmptyModel(string id_en)
        {
            bool isEmpty = true;

            if (id_en.Length > 0)
            {
                string        sql           = string.Format("a0.id_en='{0}'", id_en);
                CidiagAggDO[] szCidiagAggDO = cidiagCrud.find(sql, "a0.createdtime ", false);
                if (szCidiagAggDO.Length > 0)
                {
                    CidiagAggDO    diAggDo = szCidiagAggDO.LastOrDefault();
                    CiDiagItemDO[] itemDOs = diAggDo.getCiDiagItemDO();
                    isEmpty = itemDOs == null || itemDOs.Length <= 0;
                }
            }
            return(isEmpty);
        }
コード例 #6
0
        /// <summary>
        /// 获取已保存的DIDTO集合
        /// </summary>
        /// <returns></returns>
        private List <DIDTO> GetSavedDIDTOs(string idEn)
        {
            List <DIDTO> didtoList = new List <DIDTO>();

            // 获取已经保存的诊断agg
            CidiagAggDO cidiagAgg = this.GetCidiagAggDO(idEn);

            if (cidiagAgg == null)
            {
                return(didtoList);
            }
            CiDiagDO cidiagDO = cidiagAgg.getParentDO();

            CiDiagItemDO[] cidiItems = cidiagAgg.getCiDiagItemDO();

            // 将已保存的诊断agg转换成DIDTO集合
            foreach (CiDiagItemDO cidiItem in cidiItems)
            {
                DIDTO didto = GetDIDTOBySavedItem(cidiagDO, cidiItem);
                didtoList.Add(didto);
            }

            return(didtoList);
        }