Пример #1
0
        /// <summary>
        /// GetUserBasicInfo TDY 2014-12-4  //WF 20151010
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public UserBasicInfo GetUserBasicInfo(DataConnection pclsCache, string UserId)
        {
            UserBasicInfo ret = new UserBasicInfo();
            try
            {

                if (!pclsCache.Connect())
                {
                    return null;
                }
                InterSystems.Data.CacheTypes.CacheSysList list = null;
                list = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId);
                if (list != null)
                {
                    ret.UserName = list[0];
                    ret.Age = list[1];
                    ret.Gender = list[2];
                    ret.BloodType = list[3];
                    ret.IDNo = list[4];
                    ret.DoctorId = list[5];
                    ret.InsuranceType = list[6];
                    ret.InvalidFlag = list[7];
                }
                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UsersMethod.GetUserBasicInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
Пример #2
0
        //GetUserBasicInfo TDY 2014-12-4  //WF 20151010
        public UserBasicInfo GetUserBasicInfo(DataConnection pclsCache, string UserId)
        {
            UserBasicInfo ret = new UserBasicInfo();
            try
            {

                if (!pclsCache.Connect())
                {
                    return null;
                }
                //Array a = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId);
                ret.UserName = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[0].ToString();
                ret.Birthday = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[1].ToString();
                ret.Gender = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[2].ToString();
                ret.BloodType = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[3].ToString();
                ret.IDNo = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[4].ToString();
                ret.DoctorId = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[5].ToString();
                ret.InsuranceType = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[6].ToString();
                ret.InvalidFlag = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[7].ToString();

                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfo.GetUserBasicInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
Пример #3
0
        public List<AppoitmentPatient> GetAppoitmentPatientList(DataConnection pclsCache, string healthCoachID, string Status)
        {
            List<AppoitmentPatient> list = new List<AppoitmentPatient>();
            List<PatientsByStatus> list1 = new List<PatientsByStatus>();

            if (Status == "{Status}")
            {
                Status = "-1";
            }
            list1 = GetPatientsByStatus(pclsCache, healthCoachID, Status);
            if (list1 != null)
            {
                for (int i = 0; i < list1.Count; i++)
                {
                    AppoitmentPatient app = new AppoitmentPatient();
                    app.PatientID = list1[i].PatientId;
                    app.module = list1[i].Module;
                    app.AppointmentStatus = list1[i].Status;
                    app.Description = list1[i].Description;
                    //app.ApplicationTime = list1[i].ApplicationTime;
                    string[] DateAndTime = list1[i].ApplicationTime.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;
                    }
                    app.ApplicationTime = YMD[0] + "-" + month + "-" + day + " " + DateAndTime[1];

                    string[] DateAndTime1 = list1[i].AppointmentTime.Split(' ');//日期和时间分开
                    string Date1 = DateAndTime1[0];
                    string[] YMD1 = Date1.Split('/');//年月日分开
                    string month1 = YMD1[1];
                    string day1 = YMD1[2];
                    if (month1.Length < 2)
                    {
                        month1 = "0" + month1;
                    }
                    if (day1.Length < 2)
                    {
                        day1 = "0" + day1;
                    }
                    app.AppointmentTime = YMD1[0] + "-" + month1 + "-" + day1 + " " + DateAndTime1[1];
                    app.AppointmentAdd = list1[i].AppointmentAdd;

                    if (app.PatientID != "")
                    {
                        //list[i].imageURL = Ps.DoctorInfoDetail.GetValue(pclsCache.CacheConnectionObject, app.PatientID, "Contact", "Contact001_4", 1);
                        app.imageURL = new UsersMethod().GetPatientValue(pclsCache, app.PatientID, "Contact", "Contact001_4", 1);//病人照片
                        UserBasicInfo ret = new UserBasicInfo();
                        ret = new UsersMethod().GetUserBasicInfo(pclsCache, app.PatientID);
                        if (ret != null)
                        {
                            app.name = ret.UserName;

                            app.age = ret.Age;
                            //app.age = Convert.ToString(Ps.BasicInfo.GetAgeByBirthDay(pclsCache.CacheConnectionObject, Convert.ToInt32(ret.Birthday)));

                            app.sex = ret.Gender;
                        }
                    }
                    list.Add(app);
                }
            }
            return list;
        }
Пример #4
0
        public List<AppoitmentPatient> GetAppoitmentPatientList(DataConnection pclsCache, string healthCoachID, string Status)
        {
            List<AppoitmentPatient> list = new List<AppoitmentPatient>();
            List<PatientsByStatus> list1 = new List<PatientsByStatus>();
            try
            {
                list1 = GetPatientsByStatus(pclsCache, healthCoachID, Status);
                if (list1 != null)
                {
                    for (int i = 0; i < list1.Count; i++)
                    {
                        AppoitmentPatient app = new AppoitmentPatient();
                        app.PatientID = list1[i].PatientId;
                        app.module = list1[i].Module;
                        app.AppointmentStatus = list1[i].Status;
                        app.Description = list1[i].Description;
                        app.ApplicationTime = list1[i].ApplicationTime;
                        app.ApplicationTime = list1[i].ApplicationTime;
                        app.AppointmentAdd = list1[i].AppointmentAdd;

                        if (app.PatientID != "")
                        {
                            //list[i].imageURL = Ps.DoctorInfoDetail.GetValue(pclsCache.CacheConnectionObject, app.PatientID, "Contact", "Contact001_4", 1);
                            app.imageURL = new UsersMethod().GetPatientValue(pclsCache, app.PatientID, "Contact", "Contact001_4", 1);//病人照片
                            UserBasicInfo ret = new UserBasicInfo();
                            ret = new UsersMethod().GetUserBasicInfo(pclsCache, app.PatientID);
                            if (ret != null)
                            {
                                app.name = ret.UserName;

                                app.age = ret.Age;
                                //app.age = Convert.ToString(Ps.BasicInfo.GetAgeByBirthDay(pclsCache.CacheConnectionObject, Convert.ToInt32(ret.Birthday)));

                                app.sex = ret.Gender;
                            }
                        }
                        list.Add(app);
                    }
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UserMethod.GetAppoitmentPatientList", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }