Example #1
0
        /// <summary>
        /// GetBasicInfo WF 2014-12-2  //WF 20151010
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public PatientBasicInfo GetPatientBasicInfo(DataConnection pclsCache, string UserId)
        {
            PatientBasicInfo ret = new PatientBasicInfo();
            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.Birthday = list[7];
                    ret.GenderText = list[8];
                    ret.BloodTypeText = list[9];
                    ret.InsuranceTypeText = list[10];
                }
                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UsersMethod.GetPatientBasicInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }

        }
Example #2
0
        //GetBasicInfo WF 2014-12-2  //WF 20151010
        public PatientBasicInfo GetPatientBasicInfo(DataConnection pclsCache, string UserId)
        {
            PatientBasicInfo ret = new PatientBasicInfo();
            try
            {

                if (!pclsCache.Connect())
                {
                    return null;
                }
                ret.UserName = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[0].ToString();
                ret.Age = 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.Birthday = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[7].ToString();
                ret.GenderText = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[8].ToString();
                ret.BloodTypeText = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[9].ToString();
                ret.InsuranceTypeText = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[10].ToString();

                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfo.GetPatientBasicInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }