Example #1
0
        //通过PID得到模块 LY 2015-10-10
        public List<TypeAndName> PsBasicInfoDetailGetModulesByPID(DataConnection pclsCache, string PatientId)
        {
            List<TypeAndName> list = new List<TypeAndName>();
            CacheCommand cmd = null;
            CacheDataReader cdr = null;
            try
            {
                if (!pclsCache.Connect())
                {
                    return null;
                }
                cmd = new CacheCommand();
                cmd = Ps.BasicInfoDetail.GetModulesByPID(pclsCache.CacheConnectionObject);
                cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId;
                cdr = cmd.ExecuteReader();
                while (cdr.Read())
                {
                    TypeAndName NewLine = new TypeAndName();
                    NewLine.Type = cdr["CategoryCode"].ToString();
                    NewLine.Name = cdr["Modules"].ToString();
                    list.Add(NewLine);
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfoDetail.GetModulesByPID", "数据库操作异常! 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();
            }
        }
 /// <summary>
 /// 浙大输出接口 LY 2015-10-29
 /// </summary>
 /// <param name="PatientId"></param>
 /// <returns></returns>
 public List<TypeAndName> GetPatientInfo(DataConnection pclsCache, string PatientId)
 {
     List<TypeAndName> List = new List<TypeAndName>();
     PatBasicInfo BasicInfo = new UsersRepository().GetPatBasicInfo(pclsCache, PatientId);
     TypeAndName NewLine1 = new TypeAndName
     {
         Type = "name",
         Name = BasicInfo.UserName
     };
     List.Add(NewLine1);
     TypeAndName NewLine2 = new TypeAndName
     {
         Type = "age",
         Name = BasicInfo.Age
     };
     List.Add(NewLine2);
     TypeAndName NewLine3 = new TypeAndName
     {
         Type = "sex",
         Name = BasicInfo.Gender
     };
     List.Add(NewLine3);
     string Height = new VitalInfoRepository().GetLatestPatientVitalSigns(pclsCache, PatientId, "Height", "Height_1");
     TypeAndName NewLine4 = new TypeAndName
     {
         Type = "height",
         Name = Height
     };
     List.Add(NewLine4);
     string Weight = new VitalInfoRepository().GetLatestPatientVitalSigns(pclsCache, PatientId, "Weight", "Weight_1");
     TypeAndName NewLine5 = new TypeAndName
     {
         Type = "weight",
         Name = Weight
     };
     List.Add(NewLine5);
     string PhoneNumber = new UsersMethod().GetPhoneNoByUserId(pclsCache, PatientId);
     TypeAndName NewLine6 = new TypeAndName
     {
         Type = "mobilephone",
         Name = PhoneNumber
     };
     List.Add(NewLine6);
     return List;
 }
Example #3
0
 //得到专员信息 LY 2015-10-10
 public TypeAndName PsBasicInfoDetailGetSDoctor(DataConnection pclsCache, string PatientId)
 {
     TypeAndName ret = new TypeAndName();
     try
     {
         if (!pclsCache.Connect())
         {
             return ret;
         }
         ret.Type = Ps.BasicInfoDetail.GetSDoctor(pclsCache.CacheConnectionObject, PatientId)[0].ToString();
         ret.Name = Ps.BasicInfoDetail.GetSDoctor(pclsCache.CacheConnectionObject, PatientId)[1].ToString();
         return ret;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfoDetail.GetSDoctor", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return ret;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
 /// <summary>
 /// 得到专员信息 LY 2015-10-10
 /// </summary>
 /// <param name="pclsCache"></param>
 /// <param name="PatientId"></param>
 /// <returns></returns>
 public TypeAndName PsBasicInfoDetailGetSDoctor(DataConnection pclsCache, string PatientId)
 {
     TypeAndName ret = new TypeAndName();
     try
     {
         if (!pclsCache.Connect())
         {
             return ret;
         }
         InterSystems.Data.CacheTypes.CacheSysList list = null;
         list = Ps.BasicInfoDetail.GetSDoctor(pclsCache.CacheConnectionObject, PatientId);
         if (list != null)
         {
             ret.Type = list[0];
             ret.Name = list[1];
         }
         return ret;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "ModuleInfoMethod.PsBasicInfoDetailGetSDoctor", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return ret;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }