Exemplo n.º 1
0
        public HealthAssessExamModel GetModel(int PID)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(" select * ");
            builder.Append(" from HEALTHHOUSE_ASSESS_EXAM ");
            builder.Append(" where PID=@PID ");

            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@PID", PID)
            };
            DataSet set = MySQLHelper.Query(builder.ToString(), cmdParms);

            if (set != null)
            {
                // 将DataTable转为List
                IList <HealthAssessExamModel> list = CommonExtensions.DataTableToList <HealthAssessExamModel>(set.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取体检数据类型的异常信息
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public HealthOverviewSetModel GetModel(string strWhere)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(" select * ");
            builder.Append(" from HEALTHHOUSE_OVERVIEW_SET ");
            builder.Append(" where 1=1 ");

            if (!string.IsNullOrEmpty(strWhere))
            {
                builder.Append(strWhere);
            }

            DataSet set = MySQLHelper.Query(builder.ToString());

            if (set != null)
            {
                // 将DataTable转为List
                IList <HealthOverviewSetModel> list = CommonExtensions.DataTableToList <HealthOverviewSetModel>(set.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 取得代码档选项资料
        /// </summary>
        /// <param name="pCategory">代码类别</param>
        /// <param name="bIncludeNo">是否包含选项</param>
        /// <returns></returns>
        public IList <CodeBaseModel> GetCodeBaseByCategory(string pCategory, bool bIncludeNo = false)
        {
            DataSet ds = this.dal.GetCodeBaseByCategory(pCategory, bIncludeNo);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                // 将DataTable转为List
                IList <CodeBaseModel> list = CommonExtensions.DataTableToList <CodeBaseModel>(ds.Tables[0]);

                return(list);
            }

            return(null);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 健康指导 根据身份证取得资料
        /// </summary>
        /// <param name="idCardNo"></param>
        /// <returns></returns>
        public HealthHouseGuideModel GetGuideData(string idCardNo)
        {
            DataSet ds = this.dal.GetGuideData(idCardNo);

            if (ds != null && ds.Tables != null && ds.Tables[0].Rows.Count > 0)
            {
                IList <HealthHouseGuideModel> list = CommonExtensions.DataTableToList <HealthHouseGuideModel>(ds.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 获取最新一笔体检的体检问询
        /// </summary>
        /// <param name="IDCardNo">身份证</param>
        /// <returns></returns>
        public HealthAssessExamModel GetMaxModel(string IDCardNo)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(@"SELECT a.PID,a.IDCardNo,
                                    a.MedicalHistory,
                                    a.FamilyHistory,
                                    a.HospitalHistory,
                                    a.TakingMedicine,
                                    a.DietaryHabit,
                                    a.DietaryNum,
                                    a.DietaryLaw,
                                    a.DietaryOther,
                                    a.ExerciseExistense,
                                    a.IsSmoke,
                                    a.IsDrink,
                                    a.ExerciseExistenseOther,
                                    a.ExerciseRate,
                                    a.ExerciseTimes,
                                    a.OldSelfCareability,
                                    a.GloomyScore,
                                    a.MedicalOther,
                                    a.FamilyOther ");
            builder.Append(" From HEALTHHOUSE_ASSESS_EXAM a ");
            builder.Append(" Left Join ARCHIVE_HEALTH_HOUSE b ON a.IDCardNo = b.IDCardNo and a.PID=b.ID ");
            builder.Append(" where a.IDCardNo=@IDCardNo ");
            builder.Append(" order by b.CheckDate DESC LIMIT 0,1  ");

            MySqlParameter[] cmdParms = new MySqlParameter[] {
                new MySqlParameter("@IDCardNo", IDCardNo)
            };
            cmdParms[0].Value = IDCardNo;
            DataSet set = MySQLHelper.Query(builder.ToString(), cmdParms);

            if (set != null)
            {
                // 将DataTable转为List
                IList <HealthAssessExamModel> list = CommonExtensions.DataTableToList <HealthAssessExamModel>(set.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 体检画面 根据身份证及检查日期取得资料
        /// </summary>
        /// <param name="idCardNo"></param>
        /// <param name="checkDate"></param>
        /// <returns></returns>
        public HealthHouseModel GetData(string idCardNo, string checkDate)
        {
            DataSet ds = this.dal.GetData(idCardNo, checkDate);

            if (ds.Tables[0].Rows.Count > 0)
            {
                // 将DataTable转为List
                IList <HealthHouseModel> list = CommonExtensions.DataTableToList <HealthHouseModel>(ds.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 根据ID取得资料
        /// </summary>
        /// <param name="idCardNo"></param>
        /// <param name="checkDate"></param>
        /// <returns></returns>
        public HealthHouseModel GetDataByID(int ID)
        {
            DataSet ds = this.dal.GetDataByID(ID);

            if (ds.Tables[0].Rows.Count > 0)
            {
                // 将DataTable转为List
                IList <HealthHouseModel> list = CommonExtensions.DataTableToList <HealthHouseModel>(ds.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
Exemplo n.º 8
0
        public HealthHouseEcgModel GetModel(int PID)
        {
            DataSet ds = this.dal.GetModel(PID);

            if (ds != null)
            {
                // 将DataTable转为List
                IList <HealthHouseEcgModel> list = CommonExtensions.DataTableToList <HealthHouseEcgModel>(ds.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
        public HealthHousePhysicalAssistCheckModel GetModel(int OutKey)
        {
            DataSet ds = this.dal.GetModel(OutKey);

            if (ds != null)
            {
                // 将DataTable转为List
                IList <HealthHousePhysicalAssistCheckModel> list = CommonExtensions.DataTableToList <HealthHousePhysicalAssistCheckModel>(ds.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }
Exemplo n.º 10
0
        /// <summary>
        /// 获取健康指导 - 根据身份证号
        /// </summary>
        /// <param name="idCardNo"></param>
        /// <returns></returns>
        public HealthHouseGuideModel GetHealthGuideByIdCardNo(int ID)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(@"SELECT b.CustomerName
				                                    ,b.Sex
				                                    ,b.Birthday
				                                    ,c.CheckDate
				                                    ,a.Summary
				                                    ,a.HealthGuid
				                                    ,a.MedGuid 
                                    FROM HEALTHHOUSE_HEALTH_GUIDE a
                                    LEFT JOIN ARCHIVE_BASEINFO b
                                    ON a.IDCardNo=b.IDCardNo
                                    LEFT JOIN ARCHIVE_CUSTOMERBASEINFO c
                                    ON a.IDCardNo=c.IDCardNo
                                    Where a.ID=@ID");

            List <MySqlParameter> cmdParms = new List <MySqlParameter>();

            cmdParms.Add(new MySqlParameter("@ID", ID));

            DataSet ds = MySQLHelper.Query(builder.ToString(), cmdParms.ToArray());

            if (ds != null)
            {
                IList <HealthHouseGuideModel> list = CommonExtensions.DataTableToList <HealthHouseGuideModel>(ds.Tables[0]);

                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }

            return(null);
        }