示例#1
0
        /// <summary>
        /// 通过Ent4BannerDTO设置DIDTO中主表属性
        /// <para>该方法为未保存过诊断时调用</para>
        ///
        /// </summary>
        /// <param name="bannerDTO">banner数据</param>
        /// <param name="didto"></param>
        private void setCiDiagDOProperty(Ent4BannerDTO bannerDTO, DIDTO didto)
        {
            DeptDO   dept     = context.Dept;
            PsnInfo  psnInfo  = context.PsnInfo;
            DateTime dataTime = CommonExtentions.NowTime(this);

            didto.Id_emp_create      = psnInfo.Id_psndoc; // 开立医生 诊断医生 取当前登录人
            didto.Id_emp_create_name = psnInfo.Name;      // 开立医生姓名 医生姓名 取当前登录人
            didto.Dt_di              = dataTime;          // 诊断时间 (诊断时间与开立时间 Dt_create 重复,暂且都赋值)
            didto.Id_dep_create      = dept.Id_dep;       // 开立科室
            didto.Id_dep_create_name = dept.Name;         // 开立科室名称
            didto.Dt_create          = dataTime;          // 开立时间

            didto.Id_dep    = dept.Id_dep;                // 诊断科室  是否还有用?
            didto.Id_en     = bannerDTO.Id_ent;           // 就诊id
            didto.Id_pat    = bannerDTO.Id_pat;           // 患者id
            didto.Id_entp   = bannerDTO.Id_entp;          // 就诊类型
            didto.Code_entp = bannerDTO.Code_entp;        // 就诊类型编码

            didto.Id_emp_sign   = psnInfo.Id_psndoc;      // 签署人
            didto.Name_emp_sign = psnInfo.Name;           // 签署人名称
            didto.Id_dep_sign   = dept.Id_dep;            // 签署科室
            didto.Dt_sign       = dataTime;               // 签署时间

            didto.Fg_sign = FBoolean.True;                // 签署标志
        }
示例#2
0
        public DIDTO[] GetDIDTO(string id_ent)
        {
            string condition = String.Format("dt_di=(select max(DI.dt_di) from ci_di DI where DI.id_en='{0}')", id_ent);

            CidiagAggDO[] diagAggDO = iCidiagCrudService.find(condition, "", FBoolean.False);
            List <DIDTO>  didtoList = new List <DIDTO>();

            if (diagAggDO.Length <= 0)
            {
                return(didtoList.ToArray());
            }
            CiDiagDO cidiagDO = diagAggDO[0].getParentDO();

            CiDiagItemDO[] ciDiagItemDOs = diagAggDO[0].getCiDiagItemDO();



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

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

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

                didtoList.Add(didto);
            }
            return(didtoList.ToArray());
        }
示例#3
0
        public void saveEmptyDI(Ent4BannerDTO patientsDTO)
        {
            DIDTO diDTO = new DIDTO();

            FillDiInfo(diDTO, patientsDTO);
            try
            {
                CiEnContextDTO ciEnContextDto = CiEnContextUtil.GetCiEnContext(patientsDTO);
                SaveResult = mainService.SaveCiDiDtos(new DIDTO[] { diDTO }, "", ciEnContextDto);
            }
            catch (XapServiceException xapex)
            {
                if (xapex != null)
                {
                    this.ShowMessage(xapex.Message);
                }
                else
                {
                    this.ShowMessage("后台服务异常!");
                }
            }
            catch
            {
            }
        }
示例#4
0
        /// <summary>
        /// 通过已保存的诊断主表设置DIDTO中主表属性
        /// </summary>
        /// <param name="item"></param>
        /// <param name="didto"></param>
        private void setCiDiagDOProperty(CiDiagDO cidiagDO, DIDTO didto)
        {
            //didto.Id_ditp = cidiagDO.Id_ditp; // 诊断类型 诊断过程状态_自定义档案
            //didto.Sd_ditp = cidiagDO.Sd_ditp;// 诊断类型编码
            //didto.Id_ditp_name = cidiagDO.Id_ditp_name; // 诊断类型名称

            didto.Id_di = cidiagDO.Id_di;                               // 诊断主表id

            didto.Id_emp_create      = cidiagDO.Id_emp_create;          // 开立医生 诊断医生 取当前登录人
            didto.Id_emp_create_name = cidiagDO.Empname;                // 开立医生姓名 医生姓名 取当前登录人
            didto.Dt_di              = CommonExtentions.NowTime(this);; // 诊断时间 当前时间
            didto.Id_dep_create      = cidiagDO.Id_dep_create;          // 开立科室
            didto.Id_dep_create_name = cidiagDO.Name_dep_create;        // 开立科室名称
            didto.Dt_create          = cidiagDO.Dt_create;              // 开立时间

            //didto.Id_dep = ""; // 诊断科室
            didto.Id_en     = cidiagDO.Id_en;           // 就诊id
            didto.Id_pat    = cidiagDO.Id_pat;          // 患者id
            didto.Id_entp   = cidiagDO.Id_entp;         // 就诊类型
            didto.Code_entp = cidiagDO.Code_entp;       // 就诊类型编码

            didto.Id_emp_sign   = cidiagDO.Id_emp_sign; // 签署人
            didto.Name_emp_sign = cidiagDO.Signname;    // 签署人名称
            didto.Id_dep_sign   = cidiagDO.Id_dep_sign; // 签署科室
            didto.Dt_sign       = cidiagDO.Dt_sign;     // 签署时间
            didto.Fg_sign       = FBoolean.True;        // 签署标志
        }
示例#5
0
        /// <summary>
        /// 通过诊断列表选择的诊断 构造List<DIDTO>对象
        /// </summary>
        /// <param name="bannerDTO"></param>
        /// <param name="itemDOList"></param>
        /// <returns></returns>
        private List <DIDTO> GetSeledDidtoList(CidiagAggDO cidiagAggDO, Ent4BannerDTO bannerDTO, List <CiDiagItemDO> itemDOList, List <string> idDidefList)
        {
            string idDi = null;

            // 未保存过诊断情况,cidiagAggDO = null
            if (cidiagAggDO != null)
            {
                idDi = cidiagAggDO.getParentDO().Id_di;
            }

            List <DIDTO> didtoList = new List <DIDTO>();

            foreach (CiDiagItemDO itemDO in itemDOList)
            {
                // 列表中已有相同诊断,不重复添加
                if (idDidefList.Contains(itemDO.Id_didef))
                {
                    continue;
                }

                DIDTO didto = new DIDTO();
                idDidefList.Add(itemDO.Id_didef);

                this.setCiDiagItemProperty(itemDO, didto);
                this.setCiDiagDOProperty(bannerDTO, didto);
                didto.Sortno = (idDidefList.Count).ToString();
                didto.Id_di  = idDi;
                didtoList.Add(didto);
            }
            return(didtoList);
        }
示例#6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="didto"></param>
        /// <param name="item"></param>
        /// <param name="ditp_code"></param>
        private void FillDiItemInfo(DIDTO didto, Cidixy item, string ditp_code)
        {
            didto.Id_diitm         = null;
            didto.Id_didef         = item.Id_didef;
            didto.Didef_code       = item.Id_didef_code;
            didto.Didef_name       = item.Id_didef_name;
            didto.Id_ditp          = this.HeadDiDiagDO.Id_ditp;
            didto.Sd_ditp          = this.HeadDiDiagDO.Sd_ditp;
            didto.Id_ditp_name     = item.Id_ditp_name;
            didto.Supplement       = item.Supplement;
            didto.Id_disys         = item.Id_disys;
            didto.Sd_disys         = item.Sd_disys;
            didto.Id_disys_name    = item.Id_disys_name;
            didto.Di_standard      = item.Di_standard;
            didto.Di_standard_name = item.Di_standard_name;
            didto.Fg_suspdi        = item.Fg_suspdi;
            didto.Fg_ur            = item.Fg_ur;
            didto.Id_infectiontp   = item.Id_infectiontp;
            didto.Sd_infectiontp   = item.Sd_infectiontp;
            didto.Fg_majdi         = (ditp_code == CiDictCodeConst.SD_SUPPLY ? false : item.Fg_majdi);

            didto.Dt_di      = CommonExtentions.NowTime(this);
            didto.Supplement = item.Supplement;
            didto.Fg_chronic = item.Fg_chronic;
            didto.Fg_special = item.Fg_special;

            didto.Id_disys_name = "西医诊断";
        }
示例#7
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);
        }
示例#8
0
        /// <summary>
        /// 将诊断属性赋值给DIDTO
        /// <para>不区分itemDO是来源于数据库还是界面选择的历史诊断</para>
        /// </summary>
        /// <param name="itemDO"></param>
        /// <param name="didto"></param>
        private void setCiDiagItemProperty(CiDiagItemDO itemDO, DIDTO didto)
        {
            //didto.Id_diitm = itemDO.Id_diitm; // 子表主键 当诊断明细来源于数据库时设置该值,放到GetSavedDidtoList方法中设置
            didto.Id_par = itemDO.Id_parent; // 上级 父子诊断用 ?
            //didto.Sortno = itemDO.Sortno; // 排序号 重新设置诊断的排序号

            didto.Id_didef   = itemDO.Id_didef;   // 诊断定义主键
            didto.Didef_code = itemDO.Didef_code; // 诊断编码 同 id_didef_code
            didto.Didef_name = itemDO.Didef_name; // 诊断名称 同 id_didef_name

            //didto.Id_ditp = item.Id_ditp; // 诊断类型 诊断过程状态_自定义档案
            //didto.Sd_ditp = item.Sd_ditp;// 诊断类型编码
            //didto.Id_ditp_name = item.Id_ditp_name; // 诊断类型名称
            didto.Id_ditp = CiDictCodeConst.ID_OPDI;            //诊断类型 诊断过程状态 门诊、初步、入院、补充、修正、出院、死亡
            didto.Sd_ditp = CiDictCodeConst.SD_OPDI;            //诊断类型编码

            didto.Id_didef_syn      = itemDO.Id_didef_syn;      // 证候诊断
            didto.Id_didef_syn_code = itemDO.Id_didef_syn_code; // 证候诊断编码
            didto.Id_didef_syn_name = itemDO.Id_didef_syn_name; // 证候诊断名称

            //didto.Fg_majdi = itemDO.Fg_majdi; // 主要诊断 如果是从数据库中查询的诊断,认为已经设置了主诊断,否则将选择的第一条记录设置为主诊断
            didto.Fg_suspdi  = itemDO.Fg_suspdi;  // 疑似诊断标识
            didto.Supplement = itemDO.Supplement; // 补充说明
            didto.Des_di     = itemDO.Des;        // 诊断描述

            //didto.Id_emp_create = itemDO.Id_emp_create; // 开立医生 诊断医生 取当前登录人
            //didto.Id_emp_create_name = itemDO.Id_emp_create_name; // 开立医生姓名 医生姓名 取当前登录人
            //didto.Dt_di = itemDO.Dt_di; // 诊断时间 当前时间
            //didto.Id_dep_create = ""; // 开立科室
            //didto.Id_dep_create_name = ""; // 开立科室名称
            //didto.Dt_create = null; // 开立时间

            //didto.Id_dep = ""; // 诊断科室
            //didto.Id_en = ""; // 就诊id
            //didto.Id_pat = ""; // 患者id
            //didto.Id_entp = ""; // 就诊类型
            //didto.Code_entp = ""; // 就诊类型编码

            //didto.Id_emp_sign = ""; // 签署人
            //didto.Name_emp_sign = ""; // 签署人名称
            //didto.Id_dep_sign = ""; // 签署科室
            //didto.Dt_sign = null; // 签署时间
            //didto.Fg_sign = null; // 签署标志

            didto.Fg_med    = false;                          // 西医标志
            didto.Fg_infedi = itemDO.Fg_infedi;               // 传染病标志

            didto.Id_disys      = itemDO.Id_disys;            // 诊断体系
            didto.Sd_disys      = itemDO.Sd_disys;            // 诊断体系编码
            didto.Id_disys_name = itemDO.Id_disys_name;       // 诊断体系名称

            didto.Di_standard      = itemDO.Di_standard;      // 诊断标准
            didto.Di_standard_code = itemDO.Di_standard_code; // 诊断标准编码
            didto.Di_standard_name = itemDO.Di_standard_name; // 诊断标准名称

            didto.Di_disease      = itemDO.Id_didef;          // 疾病诊断id
            didto.Id_disease_name = itemDO.Didef_code;        // 疾病诊断名称
            didto.Id_disease_code = itemDO.Didef_name;        // 疾病诊断编码
        }
示例#9
0
        private void appendNameStr(StringBuilder builder, Type type, DIDTO diDTO, string nameStr, string displayColumn)
        {
            string tempColName = null;
            string tempVal     = null;


            if (string.IsNullOrEmpty(nameStr) || string.IsNullOrEmpty(displayColumn))
            {
                return;
            }

            // 属性分组 displayColumn="Id_disys_name;Fg_suspdi|Y:?,N:'',default:''"
            string[] columnArr = displayColumn.Split(';');

            // 遍历所有displayColumn中配置的属性,并将属性值赋值给name中匹配的属性
            foreach (string colName in columnArr)
            {
                tempColName = colName;
                // 用于判断属性中是否有需要将值进行转译
                string[] colValOptional = colName.Split('|');

                if (colValOptional.Length > 1)
                {
                    tempColName = colValOptional[0];
                }
                tempVal = this.getPropertyVal(diDTO, type, tempColName);
                // 把结果替换成配置中对应的符号 displayColumn="Id_disys_name;Fg_suspdi|Y:?,N:'',default:''"
                if (!string.IsNullOrEmpty(tempVal) && colValOptional.Length > 1)
                {
                    string[] colValOptionalArr = colValOptional[1].Split(',');
                    foreach (string valOptional in colValOptionalArr)
                    {
                        string[] valDic = valOptional.Split(':');
                        if (valDic[0].Equals(tempVal))
                        {
                            if (valDic[1].Equals("''"))
                            {
                                tempVal = "";
                            }
                            else
                            {
                                tempVal = valDic[1];
                            }

                            break;
                        }
                    }
                }


                // 将name字符串中指定的属性替换成对应的值
                nameStr = nameStr.Replace("{" + tempColName + "}", tempVal);
            }
            builder.Append("name=\"" + nameStr + "\"");
        }
示例#10
0
        /// <summary>
        /// 将组套中的诊断(MkrMsDiDO)转换为医嘱诊断(DIDTO)
        /// </summary>
        /// <param name="mkrMsDIDO">组套诊断</param>
        /// <returns></returns>
        private DIDTO GetMkrMsDiDTO(MkrMsDiDO mkrMsDIDO)
        {
            DIDTO diDTO = new DIDTO();

            //diDTO.Id_di = mkrMsDIDO.Id_di; //诊断ID
            diDTO.Id_didef   = mkrMsDIDO.Id_didef;   //基础数据诊断id
            diDTO.Didef_code = mkrMsDIDO.Didef_code; //诊断编码
            diDTO.Didef_name = mkrMsDIDO.Didef_name; //诊断名称

            //diDTO.Id_didef_syn = mkrmsdido.id_didef_syn; //证候诊断
            //diDTO.id_didef_syn_code = mkrmsdido.id_didef_syn_code; //证候诊断编码
            //diDTO.id_didef_syn_name = mkrMsDIDO.Id_didef_syn_name; //证候诊断名称

            diDTO.Fg_suspdi = FBoolean.False;        //疑似 组套中设置为false

            diDTO.Supplement = mkrMsDIDO.Supplement; //补充说明

            //diDTO.Fg_infedi = null; //传染病标志 怎么来的?
            //diDTO.Id_par = mkrMsDIDO.Id_par; //上级诊断 门诊现在没有父子诊断,不设置该值
            diDTO.Fg_majdi = mkrMsDIDO.Fg_majdi;   //主要诊断

            diDTO.Id_disys = mkrMsDIDO.Id_cdsystp; //诊断体系编码 中医诊断体系、西医诊断体系、(蒙医、手术)
            diDTO.Sd_disys = mkrMsDIDO.Sd_cdsystp; //诊断体系sd
            //diDTO.Id_disys_name = mkrMsDIDO.Id_disys_name; //诊断体系名称(组套中目前不能获取这个属性)

            diDTO.Di_disease      = mkrMsDIDO.Id_didef;   //疾病诊断id
            diDTO.Id_disease_name = mkrMsDIDO.Didef_name; //疾病诊断名称
            diDTO.Id_disease_code = mkrMsDIDO.Didef_code; //疾病诊断编码
            diDTO.Fg_self         = FBoolean.False;       //自定义诊断标识 (组套中诊断来源于诊断定义)

            ////diDTO.Innercode = null; //内部编码 诊断保存时生成

            diDTO.Fg_ur      = FBoolean.False;       //上报标识
            diDTO.Fg_chronic = mkrMsDIDO.Fg_chronic; //慢性病标志
            diDTO.Fg_special = mkrMsDIDO.Fg_special; //特种病标志

            //diDTO.Des_di = mkrMsDIDO.Des_di; //诊断描述 后台保存时生成
            // diDTO.Sortno = mkrMsDIDO.Sortno; //序号 查询出整体的诊断在设置编码

            diDTO.Di_standard_name = mkrMsDIDO.Cdsys_name; //诊断标准名称
            diDTO.Di_standard      = mkrMsDIDO.Id_cdsys;   //诊断标准
            diDTO.Di_standard_code = mkrMsDIDO.Cdsys_code; //标准编码

            //diDTO.Id_diitm = mkrMsDIDO.Id_diitm; //子表主键

            return(SetEnvironmentVariable(diDTO));
        }
示例#11
0
        /// <summary>
        /// 设置诊断与当前环境相关的属性
        /// </summary>
        /// <returns></returns>
        private DIDTO SetEnvironmentVariable(DIDTO diDTO)
        {
            // @@ 诊断映射可以统一优化
            DeptDO  dept    = this.context.Dept;
            PsnInfo user    = this.context.PsnInfo;
            PsnInfo psnInfo = UserManager.getInstance().CurrentPsnInfo; //.Id_psndoc;

            diDTO.Id_en     = this.ent4BannerDTO.Id_ent;                //就诊id
            diDTO.Id_pat    = this.ent4BannerDTO.Id_pat;                //患者id
            diDTO.Id_entp   = this.ent4BannerDTO.Id_entp;               //就诊类型
            diDTO.Code_entp = this.ent4BannerDTO.Code_entp;             //就诊类型编码

            diDTO.Id_ditp      = CiDictCodeConst.ID_OPDI;               //诊断类型 诊断过程状态 门诊、初步、入院、补充、修正、出院、死亡
            diDTO.Sd_ditp      = CiDictCodeConst.SD_OPDI;               //诊断类型编码
            diDTO.Id_ditp_name = "门诊诊断";                                //诊断类型名称

            diDTO.Id_emp_create      = user.Id_psndoc;                  //诊断医生
            diDTO.Id_emp_create_name = user.Name;                       //医生姓名
            diDTO.Id_dep             = dept.Id_dep;                     //诊断科室
            diDTO.Dt_di = CommonExtentions.NowTime(this);               //诊断时间

            diDTO.Id_emp_sign   = user.Id_psndoc;                       //签署人
            diDTO.Name_emp_sign = user.Name;                            //签署人名称
            diDTO.Fg_sign       = FBoolean.True;                        //签署标识
            diDTO.Id_dep_sign   = dept.Id_dep;                          //签署科室
            diDTO.Dt_sign       = CommonExtentions.NowTime(this);       //签署时间

            diDTO.Id_dep_create      = dept.Id_dep;                     //开立科室
            diDTO.Id_dep_create_name = dept.Name;                       //开立科室名称
            diDTO.Dt_create          = CommonExtentions.NowTime(this);  //开立时间

            // 根据诊断体系确定是中医诊断还是西医诊断,目前不是西医诊断都认为是中医诊断,蒙医、手术后续有调整是在判断
            // 西医标志 根据诊断体系判断,如果是西医诊断,设置为true,否则设置为false
            if (CiDictCodeConst.ID_CI_DISYS_XYZDTX.Equals(diDTO.Id_disys))
            {
                diDTO.Fg_med = FBoolean.True;
            }
            else
            {
                diDTO.Fg_med = FBoolean.False;
            }

            return(diDTO);
        }
示例#12
0
        /// <summary>
        /// 根据已经保存的诊断明显获取诊断
        /// </summary>
        /// <param name="cidiagDO">临床诊断</param>
        /// <param name="item">诊断明细</param>
        /// <returns></returns>
        private DIDTO GetDIDTOBySavedItem(CiDiagDO cidiagDO, CiDiagItemDO item)
        {
            DIDTO diDTO = new DIDTO();

            //diDTO.Id_di = cidiagDO.Id_di; //诊断ID
            diDTO.Id_didef   = item.Id_didef;                 //基础数据诊断id
            diDTO.Didef_code = item.Didef_code;               //诊断编码
            diDTO.Didef_name = item.Didef_name;               //诊断名称

            diDTO.Id_didef_syn      = item.Id_didef_syn;      //证候诊断
            diDTO.Id_didef_syn_code = item.Id_didef_syn_code; //证候诊断编码
            diDTO.Id_didef_syn_name = item.Id_didef_syn_name; //证候诊断名称
            diDTO.Fg_suspdi         = item.Fg_suspdi;         //疑似
            diDTO.Supplement        = item.Supplement;        //补充说明

            //diDTO.Fg_infedi = null; //传染病标志 怎么来的?
            //diDTO.Id_par = item.Id_parent; //上级 门诊没有父子诊断不设置

            diDTO.Fg_majdi      = item.Fg_majdi;      //主要诊断
            diDTO.Id_disys      = item.Id_disys;      //诊断体系编码 中医诊断体系、西医诊断体系、(蒙医、手术)
            diDTO.Sd_disys      = item.Sd_disys;      //诊断体系sd
            diDTO.Id_disys_name = item.Id_disys_name; //诊断体系名称

            diDTO.Di_disease      = item.Id_didef;    //疾病诊断id
            diDTO.Id_disease_name = item.Didef_name;  //疾病诊断名称
            diDTO.Id_disease_code = item.Didef_code;  //疾病诊断编码
            diDTO.Fg_self         = item.Fg_self;     //自定义诊断标识
            //diDTO.Innercode = null; //内部编码 诊断保存时生成
            diDTO.Fg_ur      = FBoolean.False;        //上报标识
            diDTO.Fg_chronic = item.Fg_chronic;       //慢性病标志
            diDTO.Fg_special = item.Fg_special;       //特种病标志

            //diDTO.Des_di = mkrMsDIDO.Des_di; //诊断描述 后台保存时生成
            // diDTO.Sortno = mkrMsDIDO.Sortno; //序号 查询出整体的诊断在设置编码

            diDTO.Di_standard_name = item.Di_standard_name; //诊断标准名称
            diDTO.Di_standard      = item.Di_standard_name; //诊断标准
            diDTO.Di_standard_code = item.Di_standard_name; //标准编码
            //diDTO.Id_diitm = item.Id_diitm; //子表主键

            return(SetEnvironmentVariable(diDTO));
        }
示例#13
0
        /// <summary>
        /// DIDTO
        /// </summary>
        /// <param name="didto"></param>
        /// <param name="patientsDTO"></param>
        /// <param name="isSigned"></param>
        private void FillDiInfo(DIDTO didto, Ent4BannerDTO patientsDTO, bool isSigned = true)
        {
            didto.Id_di     = null;
            didto.Id_pat    = patientsDTO.Id_pat;
            didto.Id_en     = patientsDTO.Id_ent;
            didto.Id_entp   = patientsDTO.Id_entp;
            didto.Code_entp = patientsDTO.Code_entp;

            didto.Id_dep_create      = UserManager.getInstance().CurrentDept.Id_dep;
            didto.Id_dep_create_name = UserManager.getInstance().CurrentDept.Name;
            didto.Id_emp_create      = UserManager.getInstance().CurrentPsnInfo.Id_psndoc;
            didto.Id_emp_create_name = UserManager.getInstance().CurrentPsnInfo.Name;
            didto.Dt_create          = CommonExtentions.NowTime(this);
            didto.Fg_sign            = isSigned;
            if (isSigned)
            {
                didto.Id_dep_sign = UserManager.getInstance().CurrentDept.Id_dep;
                didto.Id_emp_sign = UserManager.getInstance().CurrentPsnInfo.Id_psndoc;
                didto.Dt_sign     = CommonExtentions.NowTime(this);
            }
        }
示例#14
0
        private void appendNameStrNew(StringBuilder builder, Type type, DIDTO diDTO, SortedDictionary <string, string> digProperty, string displayColumn)
        {
            string tempColName = null;
            string nameStr     = digProperty["name"];

            if (digProperty == null || string.IsNullOrEmpty(displayColumn))
            {
                return;
            }

            // 属性分组 displayColumn="Id_disys_name;Fg_suspdi;Supplement"
            string[] columnArr = displayColumn.Split(';');
            foreach (string key in digProperty.Keys)
            {
                if (!key.Equals("displayColumn"))
                {
                    bool isMatch = false;

                    foreach (string colName in columnArr)
                    {
                        string tempColname = "{" + colName + "}";
                        if (digProperty[key] == ("{" + colName + "}"))
                        {
                            isMatch     = true;
                            tempColName = colName;
                        }
                    }
                    if (isMatch)
                    {
                        builder.Append(key + "=\"" + this.getPropertyVal(diDTO, type, tempColName) + "\" ");
                    }
                    else
                    {
                        builder.Append(key + "=\"" + digProperty[key] + "\" ");
                    }
                }
            }
        }
示例#15
0
        /// <summary>
        /// 西医 集合
        /// </summary>
        /// <param name="type"></param>
        /// <param name="patientsDTO"></param>
        /// <param name="listDto"></param>
        /// <param name="list"></param>
        private string collectDidtoListFromxyList(string ditp_code, Ent4BannerDTO patDTO, List <DIDTO> didtoList, XapDataList <Cidixy> cidixyList, string xy)
        {
            string str = xy;
            int    i   = 1;

            foreach (Cidixy item in cidixyList)
            {
                // 空模型对象
                if (this.IsEmpty(item))
                {
                    continue;
                }

                DIDTO didto = new DIDTO();

                FillDiInfo(didto, patDTO);
                FillDiItemInfo(didto, item, ditp_code);
                str += ToDescription(item, i);
                didtoList.Add(didto);
                i++;
            }
            return(str);
        }
示例#16
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);
        }
示例#17
0
        /// <summary>
        /// 中医 集合
        /// </summary>
        /// <param name="type"></param>
        /// <param name="patientsDTO"></param>
        /// <param name="listDto"></param>
        /// <param name="list"></param>
        private string collectDidtoListFromzyList(string ditp_code, Ent4BannerDTO patientsDTO, List <DIDTO> lstDIDTOs, XapDataList <Cididtozy> lstCididtozy, string zy)
        {
            string str = zy;

            foreach (Cididtozy item in lstCididtozy)
            {
                if (IsEmpty(item))
                {
                    continue;
                }
                // 判断是 新增 还是修改
                DIDTO didto = new DIDTO();
                didto.Id_diitm = null;
                didto.Id_di    = null;

                didto.Id_didef   = item.Di_disease;
                didto.Didef_code = item.Id_disease_code;
                didto.Didef_name = item.Id_disease_name;

                didto.Id_didef_syn      = item.Id_syndrome;
                didto.Id_didef_syn_code = item.Id_syndrome_code;
                didto.Id_didef_syn_name = item.Id_syndrome_name;
                didto.Di_disease        = item.Di_disease;
                didto.Id_disease_code   = item.Id_disease_code;
                didto.Id_disease_name   = item.Id_disease_name;
                didto.Id_disys          = item.Id_disys;
                didto.Sd_disys          = item.Sd_disys;
                didto.Id_disys_name     = item.Id_disys_name;
                didto.Di_standard       = item.Di_standard;
                didto.Di_standard_name  = item.Di_standard_name;
                didto.Fg_suspdi         = item.Fg_suspdi;
                didto.Fg_ur             = item.Fg_ur;
                didto.Id_infectiontp    = item.Id_infectiontp;
                didto.Sd_infectiontp    = item.Sd_infectiontp;
                didto.Fg_chronic        = item.Fg_chronic;
                didto.Fg_special        = item.Fg_special;
                didto.Fg_majdi          = (ditp_code == CiDictCodeConst.SD_SUPPLY ? false : item.Fg_majdi);

                didto.Dt_di = CommonExtentions.NowTime(this); //this.ciagg.getParentDO().Dt_di;

                didto.Id_disys_name = zy;                     //item.Id_disys_name;

                didto.Id_ditp      = this.HeadDiDiagDO.Id_ditp;
                didto.Sd_ditp      = this.HeadDiDiagDO.Sd_ditp;
                didto.Id_ditp_name = this.HeadDiDiagDO.Name_ditp;

                didto.Id_en  = patientsDTO.Id_ent;
                didto.Id_pat = patientsDTO.Id_pat;

                didto.Id_dep_create      = UserManager.getInstance().CurrentDept.Id_dep;
                didto.Id_dep_create_name = UserManager.getInstance().CurrentDept.Name;
                didto.Id_emp_create      = UserManager.getInstance().CurrentUser.Id_user;
                didto.Id_emp_create_name = UserManager.getInstance().CurrentUser.Name;

                didto.Fg_sign     = true;
                didto.Id_dep_sign = UserManager.getInstance().CurrentDept.Id_dep;
                didto.Id_emp_sign = UserManager.getInstance().CurrentPsnInfo.Id_psndoc;
                didto.Dt_sign     = CommonExtentions.NowTime(this);

                str += ((item.Fg_suspdi != null && (bool)item.Fg_suspdi) ? " ?  \n" : "   \n");

                lstDIDTOs.Add(didto);
            }
            return(str);
        }
示例#18
0
        /// <summary>
        /// 中医 集合
        /// </summary>
        /// <param name="type"></param>
        /// <param name="patientsDTO"></param>
        /// <param name="listDto"></param>
        /// <param name="list"></param>
        private string getzyList(bool type, string ditp_code, Ent4BannerDTO patientsDTO, string id_di, List <DIDTO> listDto, XapDataList <Cididtozy> listzy, string zy)
        {
            string str = zy;
            int    i   = 1;

            foreach (Cididtozy item in listzy)
            {  // 判断是 新增 还是修改
                DIDTO didto = new DIDTO();
                if (id_di != null)
                {
                    didto.Id_diitm = item.Id_diitm;
                }
                else
                {
                    didto.Id_diitm = null;
                }
                didto.Id_di             = id_di;
                didto.Id_didef          = item.Di_disease;
                didto.Didef_code        = item.Id_disease_code;
                didto.Didef_name        = item.Id_disease_name;
                didto.Id_ditp           = this.CidixyAggDto.AggDO.getParentDO().Id_ditp;
                didto.Sd_ditp           = this.CidixyAggDto.AggDO.getParentDO().Id_ditp_code;
                didto.Id_ditp_name      = item.Id_ditp_name;
                didto.Id_didef_syn      = item.Id_syndrome;
                didto.Id_didef_syn_code = item.Id_syndrome_code;
                didto.Id_didef_syn_name = item.Id_syndrome_name;
                didto.Di_disease        = item.Di_disease;
                didto.Id_disease_code   = item.Id_disease_code;
                didto.Id_disease_name   = item.Id_disease_name;
                didto.Id_disys          = item.Id_disys;
                didto.Sd_disys          = item.Sd_disys;
                didto.Id_disys_name     = item.Id_disys_name;
                didto.Di_standard       = item.Di_standard;
                didto.Di_standard_name  = item.Di_standard_name;
                didto.Fg_suspdi         = item.Fg_suspdi;
                if (ditp_code == CiDictCodeConst.SD_SUPPLY)
                {
                    didto.Fg_majdi = FBoolean.False;
                }
                else
                {
                    didto.Fg_majdi = item.Fg_majdi;
                }

                didto.Dt_di = CidixyAggDto.AggDO.getParentDO().Dt_di;
                //didto.Id_disys = CiDictCodeConst.ID_CI_DISYS_ZYZDTX;//item.Id_disys;
                didto.Id_disys_name = zy;//item.Id_disys_name;
                //didto.Sd_disys = CiDictCodeConst.SD_CI_DISYS_ZYZDTX;
                didto.Id_en  = patientsDTO.Id_ent;
                didto.Id_pat = patientsDTO.Id_pat;
                //didto.Id_entp = patientsDTO.Id_entp;
                //didto.Code_entp = patientsDTO.Code_entp;
                didto.Id_dep_create      = item.Id_dep_create;
                didto.Id_dep_create_name = UserManager.getInstance().CurrentUser.Name;
                didto.Id_emp_create      = UserManager.getInstance().CurrentUser.Id_user;
                didto.Id_emp_create_name = UserManager.getInstance().CurrentUser.Name;


                str += "   " + i + "," + item.Id_disease_name + "——" + item.Id_syndrome_name + "";
                if (item.Fg_suspdi != null && (bool)item.Fg_suspdi)
                {
                    str += " ?  \n";
                }
                else
                {
                    str += "   \n";
                }
                if (type)
                {
                    didto.Id_dep_sign = UserManager.getInstance().CurrentDept.Id_dep;
                    didto.Id_emp_sign = UserManager.getInstance().CurrentPsnInfo.Id_psndoc;
                    didto.Dt_sign     = CommonExtentions.NowTime(this);
                }

                didto.Fg_sign = type;
                listDto.Add(didto);
                i++;
            }
            return(str);
        }
示例#19
0
        /// <summary>
        /// 西医 集合
        /// </summary>
        /// <param name="type"></param>
        /// <param name="patientsDTO"></param>
        /// <param name="listDto"></param>
        /// <param name="list"></param>
        private string getxyList(bool type, string ditp_code, Ent4BannerDTO patientsDTO, string id_di, List <DIDTO> listDto, XapDataList <Cidixy> list, string xy)
        {
            string str = xy;
            int    i   = 1;

            foreach (Cidixy item in list)
            {
                DIDTO didto = new DIDTO();
                // 判断是 新增 还是修改
                if (id_di != null)
                {
                    didto.Id_diitm = item.Id_diitm;
                }
                else
                {
                    didto.Id_diitm = null;
                }

                didto.Id_di            = id_di;
                didto.Id_didef         = item.Id_didef;
                didto.Didef_code       = item.Id_didef_code;
                didto.Didef_name       = item.Id_didef_name;
                didto.Id_ditp          = this.CidixyAggDto.AggDO.getParentDO().Id_ditp;
                didto.Sd_ditp          = this.CidixyAggDto.AggDO.getParentDO().Id_ditp_code;
                didto.Id_ditp_name     = item.Id_ditp_name;
                didto.Supplement       = item.Supplement;
                didto.Id_disys         = item.Id_disys;
                didto.Sd_disys         = item.Sd_disys;
                didto.Id_disys_name    = item.Id_disys_name;
                didto.Di_standard      = item.Di_standard;
                didto.Di_standard_name = item.Di_standard_name;
                didto.Fg_suspdi        = item.Fg_suspdi;
                if (ditp_code == CiDictCodeConst.SD_SUPPLY)
                {
                    didto.Fg_majdi = FBoolean.False;
                }
                else
                {
                    didto.Fg_majdi = item.Fg_majdi;
                }
                didto.Dt_di      = CidixyAggDto.AggDO.getParentDO().Dt_di;
                didto.Supplement = item.Supplement;

                didto.Id_disys_name = xy;//item.Id_disys_name;

                str += "   " + i + "," + item.Id_didef_name;
                if (item.Supplement != null && item.Supplement != "")
                {
                    str += "——" + item.Supplement + "";
                }
                if (item.Fg_suspdi != null && (bool)item.Fg_suspdi)
                {
                    str += " ?  \n";
                }
                else
                {
                    str += "\n";
                }
                didto.Id_en     = patientsDTO.Id_ent;
                didto.Code_entp = patientsDTO.Code_entp;
                didto.Id_pat    = patientsDTO.Id_pat;
                didto.Id_entp   = patientsDTO.Id_entp;

                didto.Id_dep_create      = item.Id_dep_create;
                didto.Id_dep_create_name = item.Id_dep_creat_name;
                didto.Id_emp_create      = UserManager.getInstance().CurrentPsnInfo.Id_psndoc;
                didto.Id_emp_create_name = UserManager.getInstance().CurrentPsnInfo.Name;
                if (type)
                {
                    didto.Id_dep_sign = UserManager.getInstance().CurrentDept.Id_dep;
                    didto.Id_emp_sign = UserManager.getInstance().CurrentPsnInfo.Id_psndoc;
                    didto.Dt_sign     = CommonExtentions.NowTime(this);
                }


                didto.Fg_sign = type;
                i++;
                listDto.Add(didto);
            }
            return(str);
        }
示例#20
0
 /// <summary>
 /// 追加cdig节点属性
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="cdigProperty"></param>
 /// <param name="diDTO"></param>
 private void appendCDigProperty(StringBuilder builder, Type type, SortedDictionary <string, string> cdigProperty, DIDTO diDTO)
 {
     builder.Append("<" + CDIG_NODE).Append(SPACE_STR);;
     //this.appendNameStr(builder, type, diDTO, cdigProperty["name"], cdigProperty["displayColumn"]);
     this.appendNameStrNew(builder, type, diDTO, cdigProperty, cdigProperty["displayColumn"]);
     builder.Append("></" + CDIG_NODE + ">");
 }