예제 #1
0
        //CheckPhoneNumber WF 2014-12-2 TDY 2015-1-14
        public static int CheckPatientPhoneNumber(DataConnection pclsCache, string UserId, string piPhoneNumber)
        {
            int ret = 0;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(ret);
                }
                ret = (int)Ps.BasicInfoDetail.CheckPatientPhoneNumber(pclsCache.CacheConnectionObject, UserId, piPhoneNumber);
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfoDetail.CheckPatientPhoneNumber", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #2
0
        /// <summary>
        /// syf 20151029
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="NumberingType"></param>
        /// <param name="TargetDate"></param>
        /// <returns></returns>
        public string GetNo(DataConnection pclsCache, int NumberingType, string TargetDate)
        {
            string number = "";

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(number);
                }
                number = Cm.MstNumbering.GetNo(pclsCache.CacheConnectionObject, NumberingType, TargetDate);
                return(number);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取编号失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DictMethod.GetNo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(number);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #3
0
        //SetData CSQ 2014-12-01
        public static bool SetData(DataConnection pclsCache, string Type, string Code, string TypeName, string Name, string InputCode, int SortNo, string Redundance, int InvalidFlag)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Cm.MstVitalSigns.SetData(pclsCache.CacheConnectionObject, Type, Code, TypeName, Name, InputCode, SortNo, Redundance, InvalidFlag);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstVitalSigns.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #4
0
 //GetAgeByBirthDay SYF 2015-04-23
 public static int GetAgeByBirthDay(DataConnection pclsCache, int Birthday)
 {
     try
     {
         if (!pclsCache.Connect())
         {
             //MessageBox.Show("Cache数据库连接失败");
             return(0);
         }
         else
         {
             int Age = (int)Ps.BasicInfo.GetAgeByBirthDay(pclsCache.CacheConnectionObject, Birthday);
             return(Age);
         }
     }
     catch (Exception ex)
     {
         //MessageBox.Show(ex.ToString(), "获取名称失败!");
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfo.GetUserBasicInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return(0);
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
예제 #5
0
        //SetData LY 2015-06-25
        public static bool SetData(DataConnection pclsCache, string Code, string Name, string InputCode, string Redundance, int InvalidFlag)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    return(IsSaved);
                }
                int flag = (int)Cm.MstInsurance.SetData(pclsCache.CacheConnectionObject, Code, Name, InputCode, Redundance, InvalidFlag);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstInsurance.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #6
0
        //GetMaxCode YDS 2014-12-22
        public static string GetMaxCode(DataConnection pclsCache, string Type)
        {
            string ret = string.Empty;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(ret);
                }
                ret = Cm.MstLabTestItems.GetMaxCode(pclsCache.CacheConnectionObject, Type);
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstLabTestItems.GetMaxCode", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #7
0
        public static int SetData(DataConnection pclsCache, string UserId, string VisitId, int SortNo, string ExamType, string ExamDate, string ItemCode, string ExamPara, string Description, string Impression, string Recommendation, int IsAbnormal, string Status, string ReportDate, string ImageURL, string DeptCode, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            int ret = 0;

            try
            {
                if (!pclsCache.Connect())
                {
                    return(ret);
                }
                DateTime Exam_Date   = Convert.ToDateTime(ExamDate);
                DateTime Report_Date = new DateTime();
                if (ReportDate != "")
                {
                    Report_Date = Convert.ToDateTime(ReportDate);
                }
                else
                {
                    Report_Date = Convert.ToDateTime("1900/01/01 0:00:00");
                }
                ret = (int)Ps.Examination.SetData(pclsCache.CacheConnectionObject, UserId, VisitId, SortNo, ExamType, Exam_Date, ItemCode, ExamPara, Description, Impression, Recommendation, IsAbnormal, Status, Report_Date, ImageURL, DeptCode, revUserId, TerminalName, TerminalIP, DeviceType);

                return(ret);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Examination.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #8
0
        // GetDoctorInfo返回医生基本信息 ZYF 2014-12-4
        public DoctorInfo GetDoctorInfo(DataConnection pclsCache, string DoctorId)
        {
            DoctorInfo ret = new DoctorInfo();

            try
            {
                if (!pclsCache.Connect())
                {
                    return(null);
                }
                ret.DoctorId    = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId)[0].ToString();
                ret.DoctorName  = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId)[1].ToString();
                ret.Birthday    = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId)[2].ToString();
                ret.Gender      = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId)[3].ToString();
                ret.IDNo        = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId)[4].ToString();
                ret.InvalidFlag = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId)[5].ToString();
                //DataCheck ZAM 2015-1-7

                //
                //list.Rows.Add(CacheList[0].ToString(), CacheList[1].ToString(), CacheList[2].ToString(), CacheList[3].ToString(), CacheList[4], CacheList[5]);
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsDoctorInfo.GetDoctorInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(null);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #9
0
        //ChangePassword ZAM 2014-12-01 //WF 20151010
        public int ChangePassword(DataConnection pclsCache, string UserId, string OldPassword, string newPassword, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            int ret = 0;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(ret);
                }
                ret = (int)Cm.MstUser.ChangePassword(pclsCache.CacheConnectionObject, UserId, OldPassword, newPassword, revUserId, TerminalName, TerminalIP, DeviceType);
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstUser.ChangePassword", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #10
0
        //GetBasicInfo WF 2014-12-2  //WF 20151010
        public BasicInfo GetBasicInfo(DataConnection pclsCache, string UserId)
        {
            BasicInfo ret = new BasicInfo();

            try
            {
                if (!pclsCache.Connect())
                {
                    return(null);
                }
                ret.UserName = Ps.BasicInfo.GetBasicInfo(pclsCache.CacheConnectionObject, UserId)[0].ToString();
                ret.Birthday = Ps.BasicInfo.GetBasicInfo(pclsCache.CacheConnectionObject, UserId)[1].ToString();
                ret.IDNo     = Ps.BasicInfo.GetBasicInfo(pclsCache.CacheConnectionObject, UserId)[2].ToString();
                ret.Gender   = Ps.BasicInfo.GetBasicInfo(pclsCache.CacheConnectionObject, UserId)[3].ToString();
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfo.GetBasicInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(null);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #11
0
        //SetData  LS 2014-12-1
        public int PsDoctorInfoSetData(DataConnection pclsCache, string UserId, string UserName, int Birthday, int Gender, string IDNo, int InvalidFlag, string piUserId, string piTerminalName, string piTerminalIP, int piDeviceType)
        {
            int IsSaved = 2;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                IsSaved = (int)Ps.DoctorInfo.SetData(pclsCache.CacheConnectionObject, UserId, UserName, Birthday, Gender, IDNo, InvalidFlag, piUserId, piTerminalName, piTerminalIP, piDeviceType);

                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsDoctorInfo.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #12
0
        //SetData CSQ 20150710
        public static bool SetData(DataConnection pclsCache, string UserId, string HUserId, string HospitalCode, string Description, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    return(IsSaved);
                }
                int flag = (int)Ps.UserIdMatch.SetData(pclsCache.CacheConnectionObject, UserId, HUserId, HospitalCode, Description, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsUserIdMatch.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #13
0
        //GetName YDS 2014-12-01
        public static string GetName(DataConnection pclsCache, string Type, string Code)
        {
            string Name = "";

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(Name);
                }
                Name = Cm.MstTreatment.GetName(pclsCache.CacheConnectionObject, Type, Code);
                return(Name);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "删除失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstTreatment.GetName", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(Name);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #14
0
        // 获取需要知道的项目的值 SYF 20150423
        public static string GetValue(DataConnection pclsCache, string UserId, string CategoryCode, string ItemCode, int ItemSeq)
        {
            string ret = "";

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(ret);
                }
                ret = (string)Ps.BasicInfoDetail.GetValue(pclsCache.CacheConnectionObject, UserId, CategoryCode, ItemCode, ItemSeq);
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfoDetail.GetValue", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #15
0
        //SetData WY 2015-07-13
        public static bool SetData(DataConnection pclsCache, string HospitalCode, string Code, string Name, string InputCode, string Description, int Status, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Tmp.ExamDict.SetData(pclsCache.CacheConnectionObject, HospitalCode, Code, Name, InputCode, Description, Status, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Tmp.ExamDict.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #16
0
 /// <summary>
 /// 获取最新一条消息 GL 2015-10-10
 /// </summary>
 /// <param name="DoctorId"></param>
 /// <param name="PatientId"></param>
 /// <returns></returns>
 public Message GetLatestSMS(DataConnection pclsCache, string DoctorId, string PatientId)
 {
     try
     {
         Message Meg = new Message();
         if (!pclsCache.Connect())
         {
             return(null);
         }
         InterSystems.Data.CacheTypes.CacheSysList list = null;
         list = Mb.MessageRecord.GetLatestSMS(pclsCache.CacheConnectionObject, DoctorId, PatientId);
         if (list != null)
         {
             Meg.MessageNo    = list[0];
             Meg.Content      = list[1];
             Meg.SendDateTime = list[2];
             Meg.SendByName   = list[3];
             Meg.Flag         = list[4];
         }
         return(Meg);
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "MessageMethod.GetLatestSMS", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return(null);
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
예제 #17
0
        // ChangeStatus WY 2015-07-13
        public static bool ChangeStatus(DataConnection pclsCache, string HospitalCode, string Code, int Status)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Tmp.ExamDict.ChangeStatus(pclsCache.CacheConnectionObject, HospitalCode, Code, Status);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Tmp.ExamDict.ChangeStatus", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #18
0
        //SetData ZC 2014-12-2
        public static bool SetData(DataConnection pclsCache, string UserId, string VisitId, int SortNo, string Code, string Value, int IsAbnormal, string Unit, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    return(IsSaved);
                }
                string LabTest = UserId + "||" + VisitId + "||" + SortNo.ToString();
                int    flag    = (int)Ps.LabTestDetails.SetData(pclsCache.CacheConnectionObject, LabTest, Code, Value, IsAbnormal, Unit, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsLabTestDetails.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #19
0
        public static int DeleteAll(DataConnection pclsCache, string piUserId, string piVisitId)
        {
            int ret = 0;

            try
            {
                if (!pclsCache.Connect())
                {
                    return(ret);
                }

                ret = (int)Ps.Examination.DeleteAll(pclsCache.CacheConnectionObject, piUserId, piVisitId);

                return(ret);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Examination.DeleteAll", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #20
0
        // ChangeStatus WY 2015-07-10
        public static bool Delete(DataConnection pclsCache, string HospitalCode, string HZCode)
        {
            bool IsSaved = false;

            try
            {
                //if (!pclsCache.Connect())
                //{
                //    //MessageBox.Show("Cache数据库连接失败");
                //    return IsSaved;
                //}
                //int flag = (int)Mp.LabTestItemsCmp.Delete(pclsCache.CacheConnectionObject, HospitalCode, HZCode);
                //if (flag == 1)
                //{
                //    IsSaved = true;
                //}
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "LabTestItemsCmp.Delete", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #21
0
        //SetData WF 2014-12-2
        public static bool SetData(DataConnection pclsCache, string UserId, string UserName, int Birthday, int Gender, int BloodType, string IDNo, string DoctorId, string InsuranceType, int InvalidFlag, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Ps.BasicInfo.SetData(pclsCache.CacheConnectionObject, UserId, UserName, Birthday, Gender, BloodType, IDNo, DoctorId, InsuranceType, InvalidFlag, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfo.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #22
0
        //SetData YDS 2014-12-01
        public static bool SetData(DataConnection pclsCache, string AlertItemCode, string AlertItemName, decimal Min, decimal Max, string Units, string Remarks, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Wn.MstBasicAlert.SetData(pclsCache.CacheConnectionObject, AlertItemCode, AlertItemName, Min, Max, Units, Remarks, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "WnMstBasicAlert.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #23
0
        //SetData WF 2014-12-2
        public static bool SetPatName(DataConnection pclsCache, string UserId, string UserName)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Ps.BasicInfo.SetPatName(pclsCache.CacheConnectionObject, UserId, UserName);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfo.SetPatName", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #24
0
        /// <summary>
        /// 得到所有试剂类型
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <returns></returns>
        public List <TypeAndName> MstReagentTypeGetAll(DataConnection pclsCache)
        {
            List <TypeAndName> list = new List <TypeAndName>();

            try
            {
                if (!pclsCache.Connect())
                {
                    return(list);
                }
                InterSystems.Data.CacheTypes.CacheSysList Result = Cm.MstReagentType.GetAll(pclsCache.CacheConnectionObject);
                int count = Result.Count;
                int i     = 1;
                while (i < count)
                {
                    string[]    ret  = Result[i].Split('|');
                    TypeAndName info = new TypeAndName();
                    info.Type = ret[0];
                    info.Name = ret[1];
                    list.Add(info);
                    i++;
                }
                return(list);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UserInfoMethod.MstReagentTypeGetAll", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(list);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #25
0
        public int CmMstTaskSetData(DataConnection pclsCache, string CategoryCode, string Code, string Name, string ParentCode, string Description, int StartDate, int EndDate, int GroupHeaderFlag, int ControlType, string OptionCategory, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            int IsSaved = 2;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                IsSaved = (int)Cm.MstTask.SetData(pclsCache.CacheConnectionObject, CategoryCode, Code, Name, ParentCode, Description, StartDate, EndDate, GroupHeaderFlag, ControlType, OptionCategory, revUserId, TerminalName, TerminalIP, DeviceType);

                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DictMethod.CmMstTaskSetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #26
0
        //SetData  LS 2014-12-1
        public static bool SetData(DataConnection pclsCache, string UserId, int VisitId, int VisitType, int AdmissionDate, int DischargeDate, string HospitalCode, string Department, string piUserId, string piTerminalName, string piTerminalIP, int piDeviceType)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Ps.ClinicalInfo.SetData(pclsCache.CacheConnectionObject, UserId, VisitId, VisitType, AdmissionDate, DischargeDate, HospitalCode, Department, piUserId, piTerminalName, piTerminalIP, piDeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsClinicalInfo.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #27
0
 public CmMonitorMethod GetMonitorMethodData(DataConnection pclsCache, string Type, string Code)
 {
     try
     {
         CmMonitorMethod item = new CmMonitorMethod();
         if (!pclsCache.Connect())
         {
             return(null);
         }
         InterSystems.Data.CacheTypes.CacheSysList list = null;
         list = Cm.MonitorMethod.GetData(pclsCache.CacheConnectionObject, Type, Code);
         if (list != null)
         {
             item.TypeName    = list[0];
             item.Name        = list[1];
             item.Method      = list[2];
             item.Description = list[3];
             item.SortNo      = Convert.ToInt32(list[4]);
             item.Redundance  = list[5];
         }
         return(item);
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DictMethod.GetMonitorMethodData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return(null);
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
예제 #28
0
        //Delete   LS 2014-12-1
        public static int Delete(DataConnection pclsCache, string UserId, int VisitId)
        {
            int ret = 0;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(ret);
                }
                ret = (int)Ps.ClinicalInfo.Delete(pclsCache.CacheConnectionObject, UserId, VisitId);
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsClinicalInfo.Delete", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #29
0
        //DeleteData CSQ 2014-12-01
        public static int DeleteData(DataConnection pclsCache, string Type, string Code)
        {
            int ret = 0;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(ret);
                }
                ret = (int)Cm.MstVitalSigns.DeleteData(pclsCache.CacheConnectionObject, Type, Code);
                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstVitalSigns.DeleteData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(ret);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
예제 #30
0
        //SetData WF 2014-12-2
        public static bool SetData(DataConnection pclsCache, string Patient, string CategoryCode, string ItemCode, int ItemSeq, string Value, string Description, int SortNo, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return(IsSaved);
                }
                int flag = (int)Ps.BasicInfoDetail.SetData(pclsCache.CacheConnectionObject, Patient, CategoryCode, ItemCode, ItemSeq, Value, Description, SortNo, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return(IsSaved);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfoDetail.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(IsSaved);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }