示例#1
0
        /// <summary>
        /// 获取某专员的评论列表 SYF 20151026
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="DoctorId"></param>
        /// <param name="CategoryCode"></param>
        /// <returns></returns>
        public List<CommentList> GetCommentList(DataConnection pclsCache, string DoctorId, string CategoryCode)
        {
            List<CommentList> list = new List<CommentList>();
            List<DetailsByDoctorId> list1 = new List<DetailsByDoctorId>();
            try
            {
                list1 = GetDetailsByDoctorId(pclsCache, DoctorId, CategoryCode);//获取健康专员所负责的病人对他的评价及评分信息
                if (list1 != null)
                {
                    for (int i = 0; i < list1.Count; i++)
                    {
                        CommentList clt = new CommentList();
                        clt.CategoryCode = list1[i].CategoryCode;
                        clt.PatientId = list1[i].PatientId;
                        clt.Name = list1[i].Name;
                        clt.Comment = list1[i].Comment;
                        clt.Score = list1[i].Score;
                        string[] DateAndTime = list1[i].CommentTime.Split(' ');//日期和时间分开
                        string Date = DateAndTime[0];
                        string[] YMD = Date.Split('/');//年月日分开
                        string month = YMD[1];
                        string day = YMD[2];
                        if(month.Length<2)
                        {
                            month = "0" + month;
                        }
                        if (day.Length < 2)
                        {
                            day = "0" + day;
                        }
                        clt.CommentTime = YMD[0] + "-" + month + "-" + day + " " + DateAndTime[1];

                        if (clt.PatientId != "")
                        {
                            //PatientDetailInfo1 ret = new PatientDetailInfo1();
                            GetPatientDetailInfo lt = new GetPatientDetailInfo();
                            lt = GetPatientDetailInfo(pclsCache, clt.PatientId);
                            if (lt != null)
                            {
                                clt.imageURL = lt.PhotoAddress;
                            }
                        }
                        list.Add(clt);
                    }
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UserMethod.GetCommentList", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
示例#2
0
        ////GetDoctorsByPatientId 根据PatientId和CategoryCode取对应模块医生列表 SYF 2015-10-26
        //public List<DoctorsByPatientId> GetDoctorsByPatientId(DataConnection pclsCache, string PatientId, string CategoryCode)
        //{
        //    List<DoctorsByPatientId> items = new List<DoctorsByPatientId>();
        //    CacheCommand cmd = null;
        //    CacheDataReader cdr = null;
        //    try
        //    {
        //        if (!pclsCache.Connect())
        //        {
        //            return null;
        //        }
        //        cmd = new CacheCommand();
        //        cmd = Ps.BasicInfoDetail.GetDoctorsByPatientId(pclsCache.CacheConnectionObject);
        //        cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId;
        //        cmd.Parameters.Add("CategoryCode", CacheDbType.NVarChar).Value = CategoryCode;

        //        cdr = cmd.ExecuteReader();
        //        while (cdr.Read())
        //        {
        //            DoctorsByPatientId item = new DoctorsByPatientId();
        //            item.DoctorId = cdr["DoctorId"].ToString();
        //            item.DoctorName = cdr["DoctorName"].ToString();
        //            item.ItemSeq = cdr["ItemSeq"].ToString();
        //            items.Add(item);
        //        }
        //        return items;
        //    }
        //    catch (Exception ex)
        //    {
        //        HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UsersMethod.GetDoctorsByPatientId", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
        //        return null;
        //    }
        //    finally
        //    {
        //        if ((cdr != null))
        //        {
        //            cdr.Close();
        //            cdr.Dispose(true);
        //            cdr = null;
        //        }
        //        if ((cmd != null))
        //        {
        //            cmd.Parameters.Clear();
        //            cmd.Dispose();
        //            cmd = null;
        //        }
        //        pclsCache.DisConnect();
        //    }
        //}

        //GetPatientDetailInfo TDY 2015-04-07
        public GetPatientDetailInfo GetPatientDetailInfo(DataConnection pclsCache, string UserId)
        {
            GetPatientDetailInfo ret = new GetPatientDetailInfo();

            try
            {
                if (!pclsCache.Connect())
                {
                    return ret;
                }
                InterSystems.Data.CacheTypes.CacheSysList list = null;
                list = Ps.BasicInfoDetail.GetDetailInfo(pclsCache.CacheConnectionObject, UserId);
                if (list != null)
                {
                    ret.PhoneNumber = list[0];
                    ret.HomeAddress = list[1];
                    ret.Occupation = list[2];
                    ret.Nationality = list[3];
                    ret.EmergencyContact = list[4];
                    ret.EmergencyContactPhoneNumber = list[5];
                    ret.PhotoAddress = list[6];
                    ret.IDNo = list[7];
                }
                //DataCheck ZAM 2015-1-7
                return ret;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UsersMethod.GetPatientDetailInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
示例#3
0
        /// <summary>
        /// 获取某专员的评论列表 SYF 20151026
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="DoctorId"></param>
        /// <param name="CategoryCode"></param>
        /// <returns></returns>
        public List<CommentList> GetCommentList(DataConnection pclsCache, string DoctorId, string CategoryCode)
        {
            List<CommentList> list = new List<CommentList>();
            List<DetailsByDoctorId> list1 = new List<DetailsByDoctorId>();
            try
            {
                list1 = GetDetailsByDoctorId(pclsCache, DoctorId, CategoryCode);//获取健康专员所负责的病人对他的评价及评分信息
                if (list1 != null)
                {
                    for (int i = 0; i < list1.Count; i++)
                    {
                        CommentList clt = new CommentList();
                        clt.PatientId = list1[i].PatientId;
                        clt.Name = list1[i].Name;
                        clt.Comment = list1[i].Comment;
                        clt.Score = list1[i].Score;
                        clt.CommentTime = list1[i].CommentTime;

                        if (clt.PatientId != "")
                        {
                            //PatientDetailInfo1 ret = new PatientDetailInfo1();
                            GetPatientDetailInfo lt = new GetPatientDetailInfo();
                            lt = GetPatientDetailInfo(pclsCache, clt.PatientId);
                            if (lt != null)
                            {
                                clt.imageURL = lt.PhotoAddress;
                            }
                        }
                        list.Add(clt);
                    }
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UserMethod.GetCommentList", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }