Ejemplo n.º 1
0
        // GetUserInfoByUserId ZAM 2014-11-26
        public static CacheSysList GetUserInfoByUserId(DataConnection pclsCache, string UserId)
        {
            //DataTable list = new DataTable();
            //list.Columns.Add(new DataColumn("UserId", typeof(string)));
            //list.Columns.Add(new DataColumn("UserName", typeof(string)));
            //list.Columns.Add(new DataColumn("Password", typeof(string)));
            //list.Columns.Add(new DataColumn("Class", typeof(string)));
            //list.Columns.Add(new DataColumn("StartDate", typeof(string)));
            //list.Columns.Add(new DataColumn("EndDate", typeof(string)));
            try
            {
                CacheSysList CacheList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
                if (!pclsCache.Connect())
                {
                    return null;
                }
                CacheList = Cm.MstUser.GetUserInfoByUserId(pclsCache.CacheConnectionObject, UserId);
                return CacheList;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstUser.GetUserInfoByUserId", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }

        }
Ejemplo n.º 2
0
 //GetExecutingPlan 获取正在执行的计划 LS 2015-03-30
 public static CacheSysList GetExecutingPlan(DataConnection pclsCache, string PatientId)
 {
     try
     {
         CacheSysList CacheList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
         if (!pclsCache.Connect())
         {
             return null;
         }
         CacheList = Ps.Plan.GetExecutingPlan(pclsCache.CacheConnectionObject, PatientId);
         return CacheList;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsPlan.GetExecutingPlan", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return null;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
Ejemplo n.º 3
0
 //GetDoctorDetailInfo TDY 2015-01-12
 public static CacheSysList GetDoctorDetailInfo(DataConnection pclsCache, string UserId)
 {
     try
     {
         CacheSysList CacheList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
         if (!pclsCache.Connect())
         {
             return null;
         }
         CacheList = Ps.DoctorInfoDetail.GetDoctorDetailInfo(pclsCache.CacheConnectionObject, UserId);
         return CacheList;
     }
     catch (Exception ex)
     {
         //MessageBox.Show(ex.ToString(), "获取名称失败!");
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsDoctorInfoDetail.GetDoctorDetailInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return null;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
Ejemplo n.º 4
0
        // GetWnMstPersonalAlert GL 2014-12-01 获取最新一条警告
        public static CacheSysList GetWnMstPersonalAlert(DataConnection pclsCache, string UserId, string AlertItemCode, int CheckDate)
        {
            try
            {
                CacheSysList AlertList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
                if (!pclsCache.Connect())
                {
                    return null;
                }
                AlertList = Wn.MstPersonalAlert.GetWnMstPersonalAlert(pclsCache.CacheConnectionObject, UserId, AlertItemCode, CheckDate);
                return AlertList;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "WnMstPersonalAlert.GetWnMstPersonalAlert", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }

        }
Ejemplo n.º 5
0
        //GetTargetById TDY 2015-04-07
        public static CacheSysList GetTargetById(DataConnection pclsCache, string Plan, string Id)
        {
            CacheSysList ret = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);

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

                ret = Ps.Target.GetTargetById(pclsCache.CacheConnectionObject, Plan, Id);
                return ret;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Target.GetTargetById", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
Ejemplo n.º 6
0
        // GetDoctorInfoWithMod, 返回包含模块信息的医生信息 ZYF 2014-12-4
        public static DataTable GetDoctorInfoWithMod(DataConnection pclsCache, string DoctorId)
        {
            DataTable list = new DataTable();
            list.Columns.Add(new DataColumn("DoctorId", typeof(string)));
            list.Columns.Add(new DataColumn("DoctorName", typeof(string)));
            list.Columns.Add(new DataColumn("Birthday", typeof(int)));
            list.Columns.Add(new DataColumn("Gender", typeof(int)));
            list.Columns.Add(new DataColumn("IDNo", typeof(string)));
            list.Columns.Add(new DataColumn("InvalidFlag", typeof(int)));
            list.Columns.Add(new DataColumn("ModuleString", typeof(string)));
            string strMod = "";
            DataTable DTMod = new DataTable();
            try
            {
                CacheSysList CacheList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
                if (!pclsCache.Connect())
                {
                    return null;
                }
                CacheList = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId);
                DTMod = GetDoctorModuleList(pclsCache, DoctorId);
                foreach (DataRow dr in DTMod.Rows)
                {
                    if (dr["Value"] != null)
                    {
                        if (dr["Value"].ToString() == "0")
                        {
                            if (strMod == "")
                            {
                                strMod = strMod + dr["CategoryName"].ToString();
                            }
                            else
                            {
                                strMod = strMod + "," + dr["CategoryName"].ToString();
                            }
                        }
                    }
                }
                if (CacheList != null)       //value check ZAM 2015-1-7
                {
                    list.Rows.Add(CacheList[0].ToString(), CacheList[1].ToString(), CacheList[2].ToString(), CacheList[3].ToString(), CacheList[4], CacheList[5], strMod);

                }
                //list.Rows.Add(CacheList[0].ToString(), CacheList[1].ToString(), CacheList[2].ToString(), CacheList[3].ToString(), CacheList[4], CacheList[5], strMod);
                return list;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsDoctorInfo.GetDoctorInfoWithMod", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
Ejemplo n.º 7
0
 // GetDoctorInfo返回医生基本信息 ZYF 2014-12-4
 public static DataTable GetDoctorInfo(DataConnection pclsCache, string DoctorId)
 {
     DataTable list = new DataTable();
     list.Columns.Add(new DataColumn("DoctorId", typeof(string)));
     list.Columns.Add(new DataColumn("DoctorName", typeof(string)));
     list.Columns.Add(new DataColumn("Birthday", typeof(int)));
     list.Columns.Add(new DataColumn("Gender", typeof(int)));
     list.Columns.Add(new DataColumn("IDNo", typeof(string)));
     list.Columns.Add(new DataColumn("InvalidFlag", typeof(int)));
     try
     {
         CacheSysList CacheList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
         if (!pclsCache.Connect())
         {
             return null;
         }
         CacheList = Ps.DoctorInfo.GetDoctorInfo(pclsCache.CacheConnectionObject, DoctorId);
         //DataCheck ZAM 2015-1-7
         if (CacheList != null)
         {
             list.Rows.Add(CacheList[0].ToString(), CacheList[1].ToString(), CacheList[2].ToString(), CacheList[3].ToString(), CacheList[4], CacheList[5]);
         }
         //
         //list.Rows.Add(CacheList[0].ToString(), CacheList[1].ToString(), CacheList[2].ToString(), CacheList[3].ToString(), CacheList[4], CacheList[5]);
         return list;
     }
     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();
     }
 }
Ejemplo n.º 8
0
        //WF 20150514
        public static DataTable GetAll(DataConnection pclsCache, string Module, string HealthId)
        {
            DataTable list = new DataTable();
            list.Columns.Add(new DataColumn("Module", typeof(string)));
            list.Columns.Add(new DataColumn("HealthId", typeof(string)));
            list.Columns.Add(new DataColumn("Type", typeof(int)));
            list.Columns.Add(new DataColumn("TypeName", typeof(string)));
            list.Columns.Add(new DataColumn("FileName", typeof(string)));
            list.Columns.Add(new DataColumn("Path", typeof(string)));
            list.Columns.Add(new DataColumn("Introduction", typeof(string)));
            list.Columns.Add(new DataColumn("Redundance", typeof(string)));
            list.Columns.Add(new DataColumn("ReUserId", typeof(string)));
            list.Columns.Add(new DataColumn("ReUserName", typeof(string)));
            try
            {
                CacheSysList CacheList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
                if (!pclsCache.Connect())
                {
                    return null;
                }
                CacheList = Cm.MstHealthEducation.GetAll(pclsCache.CacheConnectionObject, Module, HealthId);
                if (CacheList != null)
                {
                    list.Rows.Add(CacheList[0].ToString(), CacheList[1].ToString(), CacheList[2], CacheList[3].ToString(), CacheList[4].ToString(), CacheList[5].ToString(), CacheList[6].ToString(), CacheList[7].ToString(), CacheList[8].ToString(), CacheList[9].ToString());
                }
                return list;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Cm.MstHealthEducation.GetAll", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }

        }
Ejemplo n.º 9
0
 public static CacheSysList GetCmTaskItemInfo(DataConnection pclsCache, string CategoryCode, string Code)
 {
     try
     {
         CacheSysList CacheList = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
         if (!pclsCache.Connect())
         {
             return null;
         }
         CacheList = Cm.MstTask.GetCmTaskItemInfo(pclsCache.CacheConnectionObject, CategoryCode, Code);
         return CacheList;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstTask.GetCmTaskItemInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return null;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
Ejemplo n.º 10
0
        // GetPatientVitalSignsAndThreshold   LS  2014-12-4
        public static DataTable GetPatientVitalSignsAndThreshold(DataConnection pclsCache, string UserId, string ItemType, string ItemCode)
        {
            DataTable list = new DataTable();

            list.Columns.Add(new DataColumn("RecordDate", typeof(int)));
            list.Columns.Add(new DataColumn("RecordTime", typeof(int)));
            list.Columns.Add(new DataColumn("Value", typeof(string)));
            list.Columns.Add(new DataColumn("Unit", typeof(string)));
            list.Columns.Add(new DataColumn("ThreholdMin", typeof(decimal)));
            list.Columns.Add(new DataColumn("ThreholdMax", typeof(decimal)));

            CacheCommand    cmd = null;
            CacheDataReader cdr = null;

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

                cmd = new CacheCommand();
                cmd = Ps.VitalSigns.GetPatientVitalSigns(pclsCache.CacheConnectionObject);
                cmd.Parameters.Add("piUserId", CacheDbType.NVarChar).Value   = UserId;
                cmd.Parameters.Add("piItemType", CacheDbType.NVarChar).Value = ItemType;
                cmd.Parameters.Add("piItemCode", CacheDbType.NVarChar).Value = ItemCode;
                cdr = cmd.ExecuteReader();
                while (cdr.Read())
                {
                    int    RecordDate = Convert.ToInt32(cdr["RecordDate"]);
                    int    RecordTime = Convert.ToInt32(cdr["RecordTime"]);
                    string Value      = cdr["Value"].ToString();
                    string Unit       = cdr["Unit"].ToString();
                    InterSystems.Data.CacheTypes.CacheSysList Threholdlist = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
                    Threholdlist = Wn.MstPersonalAlert.GetWnMstPersonalAlert(pclsCache.CacheConnectionObject, UserId, ItemCode, RecordDate);
                    //ZAM 2015-1-12
                    //if (Threholdlist == null)
                    if ((Threholdlist == null) || (Threholdlist.Count == 0))
                    {
                        Threholdlist = Wn.MstBasicAlert.GetWnMstBasicAlert(pclsCache.CacheConnectionObject, ItemCode);
                    }
                    if (Threholdlist != null)
                    {
                        list.Rows.Add(RecordDate, RecordTime, Value, Unit, Threholdlist[1], Threholdlist[2]);
                    }
                    //
                    //if (Threholdlist == null)
                    //{
                    //    Threholdlist = Wn.MstBasicAlert.GetWnMstBasicAlert(pclsCache.CacheConnectionObject, ItemCode);
                    //}
                    //list.Rows.Add(RecordDate, RecordTime, Value, Unit, Threholdlist[1], Threholdlist[2]);
                    //
                }
                return(list);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsVitalSigns.GetPatientVitalSignsAndThreshold", "数据库操作异常! 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();
            }
        }
Ejemplo n.º 11
0
        //GetSignByDay TDY 2015-04-07
        public static CacheSysList GetSignByDay(DataConnection pclsCache, string UserId, string ItemType, string ItemCode, int RecordDate)
        {
            CacheSysList ret = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);

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

                ret = Ps.VitalSigns.GetSignByDay(pclsCache.CacheConnectionObject, UserId, ItemType, ItemCode, RecordDate);
                return ret;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.VitalSigns.GetSignByDay", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
Ejemplo n.º 12
0
        // GetPatientVitalSignsAndThreshold   LS  2014-12-4
        public static DataTable GetPatientVitalSignsAndThreshold(DataConnection pclsCache, string UserId, string ItemType, string ItemCode)
        {
            DataTable list = new DataTable();
            list.Columns.Add(new DataColumn("RecordDate", typeof(int)));
            list.Columns.Add(new DataColumn("RecordTime", typeof(int)));
            list.Columns.Add(new DataColumn("Value", typeof(string)));
            list.Columns.Add(new DataColumn("Unit", typeof(string)));
            list.Columns.Add(new DataColumn("ThreholdMin", typeof(decimal)));
            list.Columns.Add(new DataColumn("ThreholdMax", typeof(decimal)));

            CacheCommand cmd = null;
            CacheDataReader cdr = null;

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

                cmd = new CacheCommand();
                cmd = Ps.VitalSigns.GetPatientVitalSigns(pclsCache.CacheConnectionObject);
                cmd.Parameters.Add("piUserId", CacheDbType.NVarChar).Value = UserId;
                cmd.Parameters.Add("piItemType", CacheDbType.NVarChar).Value = ItemType;
                cmd.Parameters.Add("piItemCode", CacheDbType.NVarChar).Value = ItemCode;
                cdr = cmd.ExecuteReader();
                while (cdr.Read())
                {
                    int RecordDate = Convert.ToInt32(cdr["RecordDate"]);
                    int RecordTime = Convert.ToInt32(cdr["RecordTime"]);
                    string Value = cdr["Value"].ToString();
                    string Unit = cdr["Unit"].ToString();
                    InterSystems.Data.CacheTypes.CacheSysList Threholdlist = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true);
                    Threholdlist = Wn.MstPersonalAlert.GetWnMstPersonalAlert(pclsCache.CacheConnectionObject, UserId, ItemCode, RecordDate);
                    //ZAM 2015-1-12
                    //if (Threholdlist == null)
                    if ((Threholdlist == null) || (Threholdlist.Count == 0))
                    {
                        Threholdlist = Wn.MstBasicAlert.GetWnMstBasicAlert(pclsCache.CacheConnectionObject, ItemCode);
                    }
                    if (Threholdlist != null)
                    {
                        list.Rows.Add(RecordDate, RecordTime, Value, Unit, Threholdlist[1], Threholdlist[2]);
                    }
                    //
                    //if (Threholdlist == null)
                    //{
                    //    Threholdlist = Wn.MstBasicAlert.GetWnMstBasicAlert(pclsCache.CacheConnectionObject, ItemCode);
                    //}
                    //list.Rows.Add(RecordDate, RecordTime, Value, Unit, Threholdlist[1], Threholdlist[2]);
                    //
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsVitalSigns.GetPatientVitalSignsAndThreshold", "数据库操作异常! 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();
            }
        }