Пример #1
0
        /// <summary>
        /// 根据筛选条件查询病人诊断数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <CD_PatientDiagnosis> GetAll(PatientDiagnosisFilter iFilter)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(iFilter.keyword))
            {
                filter += string.Format(" and DiagnosisName like '%{0}%'", iFilter.keyword);
            }
            filter += iFilter.GetQueryString();
            List <CD_PatientDiagnosis> list = EntityOperate <CD_PatientDiagnosis> .GetEntityList(filter, "SortOrder,OrganID");

            if (list == null || list.Count <= 0)
            {
                return(new List <CD_PatientDiagnosis>());
            }
            list.ForEach((f) =>
            {
                var Inpatient   = new InpatientService().GetInfoByInpatientId(f.InpatientId);
                f.InpatientName = Inpatient != null ? Inpatient.Name : "";//病人名字
                if (f.DiagnosisFlag != null)
                {
                    f.DiagnosisFlagName = codedictService.GetCodeDictByDictCodeAndEName(f.DiagnosisFlag.ToString(), "DiagnosisFlag").DictName;
                }                                                                                              //确诊标志中文
                GI_UserInfo RecordUser = EntityOperate <GI_UserInfo> .GetEntityById(f.RecordUserId, "USERID"); //记录医生实体类
                f.RecordUserESign      = RecordUser?.ESign;                                                    //电子签名
            });
            return(list);
        }
Пример #2
0
        public int GetConsulationCountByUser(string userID)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(userID))
            {
                GI_UserInfo user = EntityOperate <GI_UserInfo> .GetEntityById(userID, "USERID");

                if (user != null)
                {
                    filter += string.Format(" and ( ApplyDoctorCode = '{0}'", userID);
                    filter += string.Format(" or ( ApplyDepartCode = '{0}' and ApplyDoctorCode is null ))", user.DpetID);
                    //      filter += string.Format(" and ApplyWardCode = '{0}'", user.InpatientID);
                }
            }
            DataTable dt = dataProvider.GetDataSet("select count(consultationid) as cnt  from CD_Consultation a where del=0 and consultationstate = 1 and " + filter).Tables[0];

            if (dt.Rows.Count > 0)
            {
                return(Extend.HandleNull(dt.Rows[0]["cnt"], 0));
            }
            else
            {
                return(0);
            }
        }
Пример #3
0
        public string SaveConsultationInfo()
        {
            return(base.ExecuteActionJsonResult("会诊单信息保存", () =>
            {
                CD_Consultation entity = base.GetPageData <CD_Consultation>(0);
                if (!string.IsNullOrWhiteSpace(entity.InpatientId))
                {
                    CD_Inpatient inpatient = EntityOperate <CD_Inpatient> .GetEntityById(Request["InpatientId"], "InpatientId");
                    if (string.IsNullOrWhiteSpace(entity.ConsultationId) || entity.ConsultationId == "null")
                    {
                        entity.ConsultationState = "1";
                        entity.DeptId = inpatient.CurrentDeptID;
                        entity.WardId = inpatient.CurrentWardID;
                        entity.RequesterCode = UserTokenManager.GetUserToken(Request["token"]).UserId;
                        GI_UserInfo user = EntityOperate <GI_UserInfo> .GetEntityById(entity.RequesterCode, "USERID");
                        entity.RequestDepartCode = user.DpetID;
                        entity.OrganID = UserTokenManager.GetUserToken(Request["token"]).ORGANID;
                    }

                    entity.Del = 0;
                    service.SaveInfo(entity);
                    msgHub hub = new msgHub();
                    // hub.SendGroup(entity.ApplyDepartCode, "Con", "",  "");
                }
                return new WebApi_Result();
            }));
        }
Пример #4
0
        /// <summary>
        /// 保存反馈单和反馈单数据
        /// </summary>
        /// <param name="fkdModel"></param>
        /// <param name="fkdSourceModel"></param>
        /// <returns></returns>
        public void Save(BUS_YGDCFKD fkdModel, BUS_YGDCFKD_SOURCE fkdSourceModel)
        {
            if (string.IsNullOrWhiteSpace(fkdModel.FKDID))
            {
                fkdModel.FKDID = CommonService.GetPrimaryId(new GI_SerialInfo()
                {
                    Name = "BUS_YGDCFKD", ColumnName = "FKDID", OrganID = fkdModel.ORGANID
                }) + "";
                fkdModel.SaveModelM();
            }

            if (string.IsNullOrWhiteSpace(fkdSourceModel.FKDSOURCEID))
            {
                fkdSourceModel.FKDSOURCEID = CommonService.GetPrimaryId(new GI_SerialInfo()
                {
                    Name = "BUS_YGDCFKD_SOURCE", ColumnName = "FKDSOURCEID", OrganID = fkdSourceModel.ORGANID
                }) + "";
                fkdSourceModel.FKDID = fkdModel.FKDID;
                fkdSourceModel.SaveModelM();
            }
            else
            {
                var model = EntityOperate <BUS_YGDCFKD_SOURCE> .GetEntityById(fkdSourceModel.FKDSOURCEID, "FKDSOURCEID");

                model.CZWT   = fkdSourceModel.CZWT;
                model.XCZP   = fkdSourceModel.XCZP;
                model.ZGJY   = fkdSourceModel.ZGJY;
                model.KSYYFX = fkdSourceModel.KSYYFX;
                model.KSZGCS = fkdSourceModel.KSZGCS;
                model.XGPJ   = fkdSourceModel.XGPJ;
                model.BZ     = fkdSourceModel.BZ;
                model.UpdateM("FKDSOURCEID");
            }
        }
Пример #5
0
        /// <summary>
        /// 根据ID获得用户实体类
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        public GI_UserInfo GetInfoById(string userid)
        {
            GI_UserInfo info = EntityOperate <GI_UserInfo> .GetEntityById(userid, "USERID");

            //职位
            GI_CodeDict job = new CodeDictService().GetCodeDictByDictCodeAndEName(info.Job, "Job");

            info.JobName = job == null ? "" : job.DictName;
            //职称
            GI_CodeDict userPosition = new CodeDictService().GetCodeDictByDictCodeAndEName(info.UserPosition, "Position");

            info.UserPositionName = userPosition == null ? "" : userPosition.DictName;
            //职务级别
            GI_CodeDict joblevel = new CodeDictService().GetCodeDictByDictCodeAndEName(info.JobLevel, "JobLevel");

            info.JobLevelName = joblevel == null ? "" : joblevel.DictName;

            #region 科室和病区组
            List <AI_DeptInfo> userDepts = deptinfoservice.GetDeptInfoByUserId(info.UserID);
            //科室
            info.DpetList = (from u in userDepts where u.IsInpatient == 0 select u).ToList();
            //病区
            info.InpatientList = (from u in userDepts where u.IsInpatient == 1 select u).ToList();
            #endregion
            //用户医疗组
            info.MedicalList = new DoctorGroupService().GetDoctorGroupByUserId(info.UserID);

            return(info);
        }
Пример #6
0
        /// <summary>
        /// 增加和保存
        /// </summary>
        /// <param name="info"></param>
        public void SaveInfo(CN_TemperatureChart info)
        {
            //如果体温单id不为空则修改
            if (!string.IsNullOrWhiteSpace(info.ChartId) && info.ChartId != "null")
            {
                info.UpdaterTime = DateTime.Now;
                info.CreateTime  = null;
                info.UpdateM("ChartId");
            }
            else
            {
                //如果体温单id为空,但是病人id不为空则保存
                if (!string.IsNullOrWhiteSpace(info.InpatientId) && info.InpatientId != "null")
                {
                    //获得病人
                    CD_Inpatient inpatient = EntityOperate <CD_Inpatient> .GetEntityById(info.InpatientId, "InpatientId");

                    //获得新的体温单id
                    info.ChartId = CommonService.GetPrimaryId(new GI_SerialInfo()
                    {
                        Name = "CN_TemperatureChart", ColumnName = "ChartId", OrganID = info.OrganID
                    }) + "";
                    info.DepartmentId = inpatient.CurrentDeptID; //当前科室
                    info.WardId       = inpatient.CurrentWardID; //当前病区
                    info.Creator      = info.Updater;            //添加的情况下创建医生就是修改医生
                    info.CreateTime   = DateTime.Now;            //添加情况下
                    info.UpdaterTime  = DateTime.Now;
                    info.BedNum       = inpatient.BedNumber;     //床号
                    info.SaveModelM();
                }
            }
        }
 /// <summary>
 /// 排序
 /// </summary>
 /// <returns></returns>
 public string Order()
 {
     return(base.ExecuteActionJsonResult("排序上移或下移", () =>
     {
         CD_PatientDiagnosis entity = EntityOperate <CD_PatientDiagnosis> .GetEntityById(Request["DiagnosisId"], "DiagnosisId");
         patientDiagnosisService.Order(entity, Request["orderType"]);
         return new WebApi_Result();
     }));
 }
Пример #8
0
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取医生分组信息", () =>
     {
         AI_DoctorGroup entity = EntityOperate <AI_DoctorGroup> .GetEntityById(Request["DOCTORGROUPID"], "DOCTORGROUPID");
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Пример #9
0
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取组织机构信息", () =>
     {
         GI_OrganInfo info = EntityOperate <GI_OrganInfo> .GetEntityById(Request["ORGANID"], "ORGANID");
         return new WebApi_Result()
         {
             data = info
         };
     }));
 }
Пример #10
0
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取系统功能定义信息", () =>
     {
         GI_FunInfo list = EntityOperate <GI_FunInfo> .GetEntityById(Request["FUNID"], "FUNID");
         return new WebApi_Result()
         {
             data = list
         };
     }));
 }
Пример #11
0
 /// <summary>
 /// 获取表单病历信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取表单病历信息", () =>
     {
         V_FormEmr entity = EntityOperate <V_FormEmr> .GetEntityById(Request["FormEmrId"], "FormEmrId");
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Пример #12
0
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取公用代码字典信息", () =>
     {
         GI_CodeDict entity = EntityOperate <GI_CodeDict> .GetEntityById(Request["DICTID"], "DICTID", true);
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Пример #13
0
 /// <summary>
 /// 获取住院病人信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取住院病人信息", () =>
     {
         CD_Inpatient list = EntityOperate <CD_Inpatient> .GetEntityById(Request["HealthCard"], "HealthCard");
         return new WebApi_Result()
         {
             data = list
         };
     }));
 }
Пример #14
0
 /// <summary>
 /// 获取模板信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取模板信息", () =>
     {
         AI_StructuredTemplate entity = EntityOperate <AI_StructuredTemplate> .GetEntityById(Request["TemplateId"], "TemplateId");
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
 /// <summary>
 /// 获取手术记录信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取手术记录信息", () =>
     {
         CD_OperationRecord entity = EntityOperate <CD_OperationRecord> .GetEntityById(Request["OperationId"], "OperationId");
         entity.OperationLevelName = CommonService.GetDictNameByID("170", entity.OperationLevel + "");
         entity.AnesthesiaWayName = CommonService.GetDictNameByID("450", entity.AnesthesiaWayCode + "");
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Пример #16
0
 /// <summary>
 /// 获取住院病人信息
 /// </summary>
 /// <returns></returns>
 public string GetInpatientInfoById()
 {
     return(base.ExecuteActionJsonResult("获取住院病人信息", () =>
     {
         CD_Inpatient entity = EntityOperate <CD_Inpatient> .GetEntityById(Request["InpatientId"], "InpatientId");
         entity.CurrentDeptName = EntityOperate <AI_DeptInfo> .GetEntityById(entity.CurrentDeptID, "DeptID").DeptName;
         entity.CurrentWardName = EntityOperate <AI_DeptInfo> .GetEntityById(entity.CurrentWardID, "DeptID").DeptName;
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
 /// <summary>
 /// 获取诊断信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取诊断信息", () =>
     {
         CD_PatientDiagnosis entity = EntityOperate <CD_PatientDiagnosis> .GetEntityById(Request["DiagnosisId"], "DiagnosisId");
         entity.DiagnosisFlagName = CommonService.GetDictNameByID("489", entity.DiagnosisFlag + "");
         entity.DiagnosisTypeName = CommonService.GetDictNameByID("468", entity.DiagnosisType + "");
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Пример #18
0
 /// <summary>
 /// 获取病程记录信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取病程记录信息", () =>
     {
         CD_ProgressNote entity = EntityOperate <CD_ProgressNote> .GetEntityById(Request["ProgressNoteId"], "ProgressNoteId");
         entity.WardRoundUserName = EntityOperate <GI_UserInfo> .GetEntityById(entity.WardRoundUserId, "USERID").UserName;
         entity.ProgressTypeName = CommonService.GetDictNameByID("824", entity.ProgressTypeId + "");
         entity.CreatorName = EntityOperate <GI_UserInfo> .GetEntityById(entity.Creator, "USERID").UserName;
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Пример #19
0
        public List <CD_Consultation> GetConsultationByUser(string userID, string consultationType = null)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(userID))
            {
                GI_UserInfo user = EntityOperate <GI_UserInfo> .GetEntityById(userID, "USERID");

                if (user != null)
                {
                    if (consultationType == "1")
                    {
                        filter += string.Format(" and ( ApplyDoctorCode = '{0}'", userID);
                        filter += string.Format(" or ( ApplyDepartCode = '{0}' and ApplyDoctorCode is null ))", user.DpetID);
                        //   filter += string.Format(" and ApplyWardCode = '{0}'", user.InpatientID);
                    }
                    else
                    {
                        filter += string.Format(" and ( RequesterCode = '{0}'", userID);
                        filter += string.Format(" or RequestDepartCode = '{0}')", user.DpetID);
                    }
                }
            }
            filter += " order by a.consultationtype desc,a.applytime";
            List <CD_Consultation> list = EntityOperate <CD_Consultation> .GetEntityListBySQL(@"select a.consultationid,a.organid,a.inpatientid,a.deptid,
                a.wardid,a.bednum,a.consultationstate,a.consultationtype,a.hospitaltype,a.hospitalname,a.applytime,a.diseasesummary,a.applydepartcode,
                a.applydepartname,a.applywardcode,a.applywardname,a.applydoctorcode,a.applydoctorname,a.requestdepartcode,a.requestercode,a.verifiertime,
                a.verifiercode,a.replytime,a.replycontent,a.replydepartcode,a.replydepartname,a.replywardcode,a.replywardname,a.replydoctorcode,
                a.replydoctorname,a.del,a.creator,a.createtime,a.updater,a.updatetime, b.name as inpatientname,b.HEALTHCARD as InpatientCode,
                dept.DeptName as requestdepartName,ward.DeptName as InpatientWardName
                from CD_Consultation a ,cd_inpatient b,ai_deptinfo dept,ai_deptinfo ward where a.inpatientid=b.inpatientid and dept.isinpatient=0 and ward.isinpatient=1 and a.requestdepartcode=dept.DeptID and a.wardID=ward.DeptID and " + filter);

            if (list == null || list.Count <= 0)
            {
                return(new List <CD_Consultation>());
            }
            list.ForEach((f) =>
            {
                f.ConsultationStateName = f.ConsultationState == "2" ? "已回复" : "新开";
                f.ConsultationTypeName  = f.ConsultationType == "2" ? "<label style='color:red'>紧急</label>" : "普通";
                f.HospitalName          = f.HospitalType == "2" ? f.HospitalName : "本院";
                if (!string.IsNullOrWhiteSpace(f.RequesterCode))
                {
                    GI_UserInfo Requester = EntityOperate <GI_UserInfo> .GetEntityById(f.RequesterCode, "UserID");
                    f.RequesterName       = Requester.UserName;
                }
            });

            return(list);
        }
Пример #20
0
        /// <summary>
        /// 根据洗手考核ID获取单个洗手考核数据
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <BUS_DISINFECTION, List <AI_DeptInfo> > GetDisInfectionModel(CommonFilter iFilter, string DISID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            // if (!string.IsNullOrWhiteSpace(DISID)) { filter += " and DISID=" + DISID + ""; }

            BUS_DISINFECTION model = EntityOperate <BUS_DISINFECTION> .GetEntityById(DISID, "DISID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.DEPTID + "'"), "ParentID,DeptID");

            var tupe = new Tuple <BUS_DISINFECTION, List <AI_DeptInfo> >(model, departList);

            return(tupe);
        }
Пример #21
0
        /// <summary>
        /// 根据洗手考核ID获取单个洗手考核数据
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <BUS_WASHHANDOPERATION, List <AI_DeptInfo> > GetWashHandModel(CommonFilter iFilter, string WHOID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            //  if (!string.IsNullOrWhiteSpace(WHOID)) { filter += " and WHOID=" + WHOID + ""; }

            BUS_WASHHANDOPERATION model = EntityOperate <BUS_WASHHANDOPERATION> .GetEntityById(WHOID, "WHOID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.DEPTID + "'"), "ParentID,DeptID");

            var tupe = new Tuple <BUS_WASHHANDOPERATION, List <AI_DeptInfo> >(model, departList);

            return(tupe);
        }
Пример #22
0
 /// <summary>
 /// 获取出院证明信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取出院证明信息", () =>
     {
         CD_OuthospitalCard entity = EntityOperate <CD_OuthospitalCard> .GetEntityById(Request["InpatientId"], "InpatientId");
         if (entity != null && string.IsNullOrWhiteSpace(entity.Creator))
         {
             entity.Creator = EntityOperate <GI_UserInfo> .GetEntityById(entity.Creator, "USERID").UserName;
         }
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Пример #23
0
        /// <summary>
        /// 保存住院病人授权
        /// </summary>
        /// <param name="entity"></param>
        public void SaveInfo(CD_InpatientAuthorized entity)
        {
            var cur_entity = EntityOperate <CD_InpatientAuthorized> .GetEntityById(entity.InpatientId, "InpatientId");

            if (cur_entity != null)
            {
                entity.Creator    = null;
                entity.CreateTime = null;
                entity.UpdateM("InpatientId");
            }
            else
            {
                entity.SaveModelM();
            }
        }
Пример #24
0
        /// <summary>
        /// 根据ID获取环境检测列表数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <List <BUS_ENVIRONMENTTEST_SOURCE>, List <AI_DeptInfo>, BUS_ENVIRONMENTTEST> GetEnvironmentTestSourceList(CommonFilter iFilter, string ENVID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();

            List <BUS_ENVIRONMENTTEST_SOURCE> list = EntityOperate <BUS_ENVIRONMENTTEST_SOURCE> .GetEntityList(filter + (string.IsNullOrWhiteSpace(ENVID) == true ? "" : " and ENVID='" + ENVID + "'"));

            var model = EntityOperate <BUS_ENVIRONMENTTEST> .GetEntityById(ENVID, "ENVID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.DEPTID + "'"), "ParentID,DeptID");

            var tupe = new Tuple <List <BUS_ENVIRONMENTTEST_SOURCE>, List <AI_DeptInfo>, BUS_ENVIRONMENTTEST>(list, departList, model);

            return(tupe);
        }
Пример #25
0
        /// <summary>
        /// 根据ID获取多重耐药菌隔离措施数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <List <BUS_DRUGRESISTQUAR_SOURCE>, List <AI_DeptInfo>, BUS_DRUGRESISTQUAR> GetDrugResistQuarSourceList(CommonFilter iFilter, string DCID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();

            List <BUS_DRUGRESISTQUAR_SOURCE> list = EntityOperate <BUS_DRUGRESISTQUAR_SOURCE> .GetEntityList(filter + (string.IsNullOrWhiteSpace(DCID) == true ? "" : " and DCID='" + DCID + "'"));

            var model = EntityOperate <BUS_DRUGRESISTQUAR> .GetEntityById(DCID, "DCID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.DEPTID + "'"), "ParentID,DeptID");

            var tupe = new Tuple <List <BUS_DRUGRESISTQUAR_SOURCE>, List <AI_DeptInfo>, BUS_DRUGRESISTQUAR>(list, departList, model);

            return(tupe);
        }
Пример #26
0
        /// <summary>
        /// 更新病历查阅状态
        /// </summary>
        /// <param name="AccessIDs">需要更新的id(多个以逗号分隔)</param>
        /// <param name="AccessState">查阅状态0审阅1已审阅</param>
        public void UpdateAccessState(string AccessIDs, string AccessState)
        {
            if (!string.IsNullOrWhiteSpace(AccessIDs))
            {
                foreach (string AccessID in AccessIDs.Trim(',').Split(','))
                {
                    CD_MedicalRecordAccessRecord entity = EntityOperate <CD_MedicalRecordAccessRecord> .GetEntityById(AccessID, "AccessID");

                    if (entity != null)
                    {
                        entity.AccessState = int.Parse(AccessState);
                        entity.UpdateTime  = DateTime.Now;
                        entity.UpdateM("AccessID");
                    }
                }
            }
        }
Пример #27
0
        /// <summary>
        /// 根据ID获取手卫生依从性及正确性现场调查评分数据表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <List <BUS_HANDHYGIENE_SOURCE>, List <AI_DeptInfo>, BUS_HANDHYGIENE> GetHandHygieneSourceList(CommonFilter iFilter, string HANDID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            //if (!string.IsNullOrWhiteSpace(RISKID)) { filter += " and RISKID='" + RISKID + "'"; }

            List <BUS_HANDHYGIENE_SOURCE> list = EntityOperate <BUS_HANDHYGIENE_SOURCE> .GetEntityList(filter + (string.IsNullOrWhiteSpace(HANDID) == true ? "" : " and HANDID='" + HANDID + "'"));

            var model = EntityOperate <BUS_HANDHYGIENE> .GetEntityById(HANDID, "HANDID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.DEPTID + "'"), "ParentID,DeptID");

            var tupe = new Tuple <List <BUS_HANDHYGIENE_SOURCE>, List <AI_DeptInfo>, BUS_HANDHYGIENE>(list, departList, model);

            return(tupe);
        }
Пример #28
0
        /// <summary>
        /// 根据ID获取医院感染病例个案调查和血清学和病原学检测 数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns>依次返回:感染调查表数据,血清学病原学检测列表,发生感染时所在科室,曾住科室</returns>
        public Tuple <BUS_INFECTIONEXAMINE, List <BUS_INFECTIONEXAMINE_BLOOD>, List <AI_DeptInfo>, List <AI_DeptInfo> > GetInfectionExamineSource(CommonFilter iFilter, string EXID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();

            var model = EntityOperate <BUS_INFECTIONEXAMINE> .GetEntityById(EXID, "EXID");

            List <BUS_INFECTIONEXAMINE_BLOOD> bloodList = EntityOperate <BUS_INFECTIONEXAMINE_BLOOD> .GetEntityList(filter + (string.IsNullOrWhiteSpace(EXID) == true ? "" : " and EXID='" + EXID + "'"));

            var departList1 = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.SZKSID + "'"), "ParentID,DeptID");  //所在科室

            var departList2 = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.CZKSID + "'"), "ParentID,DeptID");  //曾住科室

            var tupe = new Tuple <BUS_INFECTIONEXAMINE, List <BUS_INFECTIONEXAMINE_BLOOD>, List <AI_DeptInfo>, List <AI_DeptInfo> >(model, bloodList, departList1, departList2);

            return(tupe);
        }
Пример #29
0
        /// <summary>
        /// 根据反馈单数据ID 查询单条反馈单数据
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <BUS_YGDCFKD, BUS_YGDCFKD_SOURCE> GetFkdSourceModel(CommonFilter iFilter, string fkdSourceId)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            // if (string.IsNullOrWhiteSpace(fkdSourceId)) { filter += " and FKDSOURCEID=" + fkdSourceId + ""; }

            BUS_YGDCFKD_SOURCE bus_ygdcfkd_source = EntityOperate <BUS_YGDCFKD_SOURCE> .GetEntityById(fkdSourceId, "FKDSOURCEID");

            BUS_YGDCFKD bus_ygdcfkd = EntityOperate <BUS_YGDCFKD> .GetEntityById((bus_ygdcfkd_source == null ? "" : bus_ygdcfkd_source.FKDID), "FKDID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (bus_ygdcfkd_source == null ? "" : " and deptid='" + bus_ygdcfkd.DEPTID + "'"), "ParentID,DeptID");

            bus_ygdcfkd_source.DpetList = departList;

            var tupe = new Tuple <BUS_YGDCFKD, BUS_YGDCFKD_SOURCE>(bus_ygdcfkd, bus_ygdcfkd_source);

            return(tupe);
        }
        /// <summary>
        /// 根据住院病人id获得病案首页
        /// </summary>
        /// <returns></returns>
        public CD_MedicalRecordHomePage GetInfoByInpatientId(string InpatientId)
        {
            CD_MedicalRecordHomePage info = EntityOperate <CD_MedicalRecordHomePage> .GetEntityById(InpatientId, "InpatientId");

            if (info != null)
            {
                if (!string.IsNullOrWhiteSpace(info.Creator))
                {
                    GI_UserInfo Creator = EntityOperate <GI_UserInfo> .GetEntityById(info.Creator, "UserID");

                    info.CreatorName = Creator?.UserName;
                }
                if (!string.IsNullOrWhiteSpace(info.Updater))
                {
                    GI_UserInfo Updater = EntityOperate <GI_UserInfo> .GetEntityById(info.Updater, "UserID");

                    info.UpdaterName = Updater?.UserName;
                }
            }
            return(info);
        }