public List <CmMstTask> GetMstTaskByParentCode(DataConnection pclsCache, string ParentCode) { List <CmMstTask> list = new List <CmMstTask>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Cm.MstTask.GetMstTaskByParentCode(pclsCache.CacheConnectionObject); cmd.Parameters.Add("DoctorId", CacheDbType.NVarChar).Value = ParentCode; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Add(new CmMstTask { CategoryCode = cdr["CategoryCode"].ToString(), Code = cdr["Code"].ToString(), Name = cdr["Name"].ToString(), ParentCode = cdr["ParentCode"].ToString(), Description = cdr["Description"].ToString(), StartDate = Convert.ToInt32(cdr["StartDate"]), EndDate = Convert.ToInt32(cdr["EndDate"]), GroupHeaderFlag = Convert.ToInt32(cdr["GroupHeaderFlag"]), ControlType = Convert.ToInt32(cdr["ControlType"]), OptionCategory = cdr["OptionCategory"].ToString(), }); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UsersMethod.GetMstTaskByParentCode", "数据库操作异常! 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(); } }
public List <BedInfo> getBedInfoList(DataConnection pclsCache, string id) { List <BedInfo> bedInfoList = new List <BedInfo>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Vs.DeckBed.GetBedInfoList(pclsCache.CacheConnectionObject); //cmd = Vs.MstDeckInfo.SetData(pclsCache.CacheConnectionObject); cmd.Parameters.Add("DeckId", CacheDbType.NVarChar).Value = id; cdr = cmd.ExecuteReader(); while (cdr.Read()) { BedInfo bedInfo = new BedInfo(); bedInfo.DeckId = cdr["DeckId"].ToString(); bedInfo.DeckSectionId = cdr["DeckSectionId"].ToString(); bedInfo.WardCode = cdr["WardCode"].ToString(); bedInfo.RoomCode = cdr["RoomCode"].ToString(); bedInfo.BedCode = cdr["BedCode"].ToString(); bedInfo.Status = Convert.ToInt32(cdr["Status"]); bedInfo.PatientName = cdr["PatientId"].ToString(); bedInfoList.Add(bedInfo); } return(bedInfoList); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DeckInfoMethod.getBedInfoList", "数据库操作异常! 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(); } }
// GetTrnAlertRecordList GL 2014-12-26 根据PatientId获取警报列表 (ZAM 12-26: + SortNo ) public static DataTable GetTrnAlertRecordList(DataConnection pclsCache, string PatientId) { DataTable AlertRecordList = new DataTable(); AlertRecordList.Columns.Add(new DataColumn("AlertType", typeof(string))); AlertRecordList.Columns.Add(new DataColumn("AlertTypeName", typeof(string))); AlertRecordList.Columns.Add(new DataColumn("AlertItemCode", typeof(string))); AlertRecordList.Columns.Add(new DataColumn("AlertItem", typeof(string))); AlertRecordList.Columns.Add(new DataColumn("AlertDateTime", typeof(string))); AlertRecordList.Columns.Add(new DataColumn("PushFlag", typeof(string))); AlertRecordList.Columns.Add(new DataColumn("ProcessFlag", typeof(string))); AlertRecordList.Columns.Add(new DataColumn("SortNo", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Wn.TrnAlertRecord.GetTrnAlertRecordList(pclsCache.CacheConnectionObject); cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId; cdr = cmd.ExecuteReader(); while (cdr.Read()) { AlertRecordList.Rows.Add(cdr["AlertType"].ToString(), cdr["AlertTypeName"].ToString(), cdr["AlertItemCode"].ToString(), cdr["AlertItem"].ToString(), cdr["AlertDateTime"].ToString(), cdr["PushFlag"].ToString(), cdr["ProcessFlag"].ToString(), cdr["SortNo"].ToString()); } return(AlertRecordList); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "WnTrnAlertRecord.GetTrnAlertRecordList", "数据库操作异常! 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(); } }
// GetListByStatus WY 2015-07-10 public static DataTable GetMpDrugCmp(DataConnection pclsCache) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("HospitalCode", typeof(string))); list.Columns.Add(new DataColumn("HospitalName", typeof(string))); list.Columns.Add(new DataColumn("DrugCode", typeof(string))); list.Columns.Add(new DataColumn("DrugName", typeof(string))); list.Columns.Add(new DataColumn("DrugSpec", typeof(string))); list.Columns.Add(new DataColumn("HZCode", typeof(string))); list.Columns.Add(new DataColumn("HZName", typeof(string))); list.Columns.Add(new DataColumn("Redundance", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Mp.DrugCmp.GetMpDrugCmp(pclsCache.CacheConnectionObject); //cmd.Parameters.Add("InvalidFlag", CacheDbType.Int).Value = InvalidFlag; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["HospitalCode"].ToString(), cdr["HospitalName"].ToString(), cdr["DrugCode"], cdr["DrugName"].ToString(), cdr["DrugSpec"].ToString(), cdr["HZCode"].ToString(), cdr["HZName"].ToString(), cdr["Redundance"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "MpDrugCmp.GetMpDrugCmp", "数据库操作异常! 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(); } }
//public bool Update(CmMstInfoItem item) //{ // if (item == null) // { // throw new ArgumentNullException("item"); // } // bool ret = SetData(item); // return ret; //} //public bool AddItem(CmMstInfoItem item) //{ // if (item == null) // { // throw new ArgumentNullException("item"); // } // bool ret = SetData(item); // return ret; //} #region functions private void GetCmMstInfoItem(DataConnection pclsCache, List <CmMstInfoItem> CmMstInfoItemList) { CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return; } //cmd = new CacheCommand(); cmd = Cm.MstInfoItem.GetInfoItem(pclsCache.CacheConnectionObject); cdr = cmd.ExecuteReader(); while (cdr.Read()) { CmMstInfoItemList.Add(new CmMstInfoItem { CategoryCode = cdr["CategoryCode"].ToString(), Code = cdr["Code"].ToString(), Name = cdr["Name"].ToString(), ParentCode = cdr["ParentCode"].ToString(), SortNo = Convert.ToInt32(cdr["SortNo"].ToString()), StartDate = Convert.ToInt32(cdr["StartDate"].ToString()), EndDate = Convert.ToInt32(cdr["EndDate"].ToString()), GroupHeaderFlag = Convert.ToInt32(cdr["GroupHeaderFlag"].ToString()), ControlType = cdr["ControlType"].ToString(), OptionCategory = cdr["OptionCategory"].ToString(), RevUserId = "", TerminalName = "", TerminalIP = "", DeviceType = 0 }); } } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstInfoItem.GetInfoItem", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return; } finally { if ((cdr != null)) { cdr.Close(); cdr.Dispose(true); cdr = null; } if ((cmd != null)) { cmd.Parameters.Clear(); cmd.Dispose(); cmd = null; } pclsCache.DisConnect(); } }
/// <summary> /// 获取病人住院信息 施宇帆 2016-04-28 /// </summary> /// <param name="pclsCache"></param> /// <param name="PatientId"></param> /// <returns></returns> public List <PsTrnInpatient> GetInPByPID(DataConnection pclsCache, string PatientId) { List <PsTrnInpatient> items = new List <PsTrnInpatient>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = Ps.TrnInpatient.GetInPByPID(pclsCache.CacheConnectionObject); cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId; cdr = cmd.ExecuteReader(); while (cdr.Read()) { PsTrnInpatient item = new PsTrnInpatient(); item.AdmissionDate = cdr["AdmissionDate"].ToString(); item.AdDays = Convert.ToInt32(cdr["AdDays"]); item.DoctorName = cdr["DoctorName"].ToString(); item.NurseName = cdr["NurseName"].ToString(); item.RoomName = cdr["RoomName"].ToString(); item.BedName = cdr["BedName"].ToString(); item.WardName = cdr["WardName"].ToString(); item.Diagnosis = cdr["Diagnosis"].ToString(); items.Add(item); } return(items); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsTrnOutpatientMethod.GetInPByPID", "数据库操作异常! 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(); } }
// GetListByStatus WY 2015-07-13 public static DataTable GetListByStatus(DataConnection pclsCache, int Status) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("HospitalCode", typeof(string))); list.Columns.Add(new DataColumn("HospitalName", typeof(string))); list.Columns.Add(new DataColumn("Code", typeof(string))); list.Columns.Add(new DataColumn("Name", typeof(string))); list.Columns.Add(new DataColumn("InputCode", typeof(string))); list.Columns.Add(new DataColumn("Description", typeof(string))); list.Columns.Add(new DataColumn("Status", typeof(int))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Tmp.ExaminationItemDict.GetListByStatus(pclsCache.CacheConnectionObject); cmd.Parameters.Add("Status", CacheDbType.Int).Value = Status; //cmd.Parameters.Add("InvalidFlag", CacheDbType.Int).Value = InvalidFlag; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["HospitalCode"].ToString(), cdr["HospitalName"].ToString(), cdr["Code"].ToString(), cdr["Name"].ToString(), cdr["InputCode"].ToString(), cdr["Description"].ToString(), cdr["Status"]); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Tmp.ExaminationItemDict.GetListByStatus", "数据库操作异常! 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(); } }
// GetAuthorityDetail TDY 2014-12-1 public static DataTable GetAuthorityDetail(DataConnection pclsCache) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("Code", typeof(string))); list.Columns.Add(new DataColumn("Name", typeof(string))); list.Columns.Add(new DataColumn("SortNo", typeof(int))); list.Columns.Add(new DataColumn("Redundance", typeof(string))); list.Columns.Add(new DataColumn("InvalidFlag", typeof(int))); list.Columns.Add(new DataColumn("Authority", typeof(string))); list.Columns.Add(new DataColumn("AuthorityName", typeof(string))); //ZYF 2015-1-21 CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Cm.MstAuthorityDetail.GetAuthorityDetail(pclsCache.CacheConnectionObject); //cmd.Parameters.Add("AuthorityCode", CacheDbType.NVarChar).Value = AuthorityCode; //cmd.Parameters.Add("InvalidFlag", CacheDbType.Int).Value = InvalidFlag; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["Code"].ToString(), cdr["Name"].ToString(), cdr["SortNo"].ToString(), cdr["Redundance"].ToString(), cdr["InvalidFlag"].ToString(), cdr["Authority"].ToString(), cdr["AuthorityName"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstAuthorityDetail.GetAuthorityDetail", "数据库操作异常! 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(); } }
//WF 2015-1-21 public static DataTable GetSymptomsListByPId(DataConnection pclsCache, string UserId) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("VisitId", typeof(string))); list.Columns.Add(new DataColumn("SynptomsNo", typeof(string))); list.Columns.Add(new DataColumn("SymptomsType", typeof(string))); list.Columns.Add(new DataColumn("SymptomsTypeName", typeof(string))); list.Columns.Add(new DataColumn("SymptomsCode", typeof(string))); list.Columns.Add(new DataColumn("SymptomsName", typeof(string))); list.Columns.Add(new DataColumn("Description", typeof(string))); list.Columns.Add(new DataColumn("RecordDate", typeof(string))); list.Columns.Add(new DataColumn("RecordTime", typeof(string))); list.Columns.Add(new DataColumn("ReInUserId", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.Symptoms.GetSymptomsListByPId(pclsCache.CacheConnectionObject); cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["VisitId"].ToString(), cdr["SynptomsNo"].ToString(), cdr["SymptomsType"].ToString(), cdr["SymptomsTypeName"].ToString(), cdr["SymptomsCode"].ToString(), cdr["SymptomsName"].ToString(), cdr["Description"].ToString(), cdr["RecordDate"].ToString(), cdr["RecordTime"].ToString(), cdr["ReInUserId"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Symptoms.GetSymptomsListByPId", "数据库操作异常! 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(); } }
// GetReceiveList GL 2015-01-28 获取已收到的消息列表 public static DataTable GetReceiveList(DataConnection pclsCache, string UserId) { DataTable ReceiveList = new DataTable(); ReceiveList.Columns.Add(new DataColumn("MessageNo", typeof(string))); ReceiveList.Columns.Add(new DataColumn("SendBy", typeof(string))); ReceiveList.Columns.Add(new DataColumn("SendByName", typeof(string))); ReceiveList.Columns.Add(new DataColumn("Title", typeof(string))); ReceiveList.Columns.Add(new DataColumn("SendDateTime", typeof(string))); ReceiveList.Columns.Add(new DataColumn("Content", typeof(string))); ReceiveList.Columns.Add(new DataColumn("ReadStatus", typeof(int))); ReceiveList.Columns.Add(new DataColumn("Flag", typeof(int))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Mb.MessageRecord.GetReceiveList(pclsCache.CacheConnectionObject); cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId; cdr = cmd.ExecuteReader(); while (cdr.Read()) { ReceiveList.Rows.Add(cdr["MessageNo"].ToString(), cdr["SendBy"].ToString(), cdr["SendByName"].ToString(), cdr["Title"].ToString(), cdr["SendDateTime"].ToString(), cdr["Content"].ToString(), Convert.ToInt32(cdr["ReadStatus"]), Convert.ToInt32(cdr["Flag"])); } return(ReceiveList); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "MbMessageRecord.GetReceiveList", "数据库操作异常! 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(); } }
//ZC 2015-1-21 public static DataTable GetReminder(DataConnection pclsCache, string PatientId) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("ReminderNo", typeof(string))); list.Columns.Add(new DataColumn("ReminderType", typeof(string))); list.Columns.Add(new DataColumn("ReminderTypeName", typeof(string))); list.Columns.Add(new DataColumn("Content", typeof(string))); list.Columns.Add(new DataColumn("AlertMode", typeof(string))); list.Columns.Add(new DataColumn("AlertModeName", typeof(string))); list.Columns.Add(new DataColumn("StartDateTime", typeof(string))); list.Columns.Add(new DataColumn("NextDate", typeof(string))); list.Columns.Add(new DataColumn("NextTime", typeof(string))); list.Columns.Add(new DataColumn("Description", typeof(string))); list.Columns.Add(new DataColumn("CreatedBy", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.Reminder.GetReminder(pclsCache.CacheConnectionObject); cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["ReminderNo"].ToString(), cdr["ReminderType"].ToString(), cdr["ReminderTypeName"].ToString(), cdr["Content"].ToString(), cdr["AlertMode"].ToString(), cdr["AlertModeName"].ToString(), cdr["StartDateTime"].ToString(), cdr["NextDate"].ToString(), cdr["NextTime"].ToString(), cdr["Description"].ToString(), cdr["CreatedBy"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Reminder.GetReminder", "数据库操作异常! 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(); } }
// GetUserList ZAM 2014-12-03 public static DataTable GetUserList(DataConnection pclsCache) { 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("ClassName", typeof(string))); list.Columns.Add(new DataColumn("StartDate", typeof(int))); list.Columns.Add(new DataColumn("EndDate", typeof(int))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Cm.MstUser.GetUserList(pclsCache.CacheConnectionObject); //cmd.Parameters.Add("Category", CacheDbType.NVarChar).Value = Category; //cmd.Parameters.Add("InvalidFlag", CacheDbType.Int).Value = InvalidFlag; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["UserId"].ToString(), cdr["UserName"].ToString(), cdr["Password"].ToString(), cdr["Class"].ToString(), cdr["ClassName"].ToString(), cdr["StartDate"], cdr["EndDate"]); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstUser.GetUserList", "数据库操作异常! 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> /// SYF 20151010 获取健康专员负责的所有患者列表 /// </summary> /// <param name="pclsCache"></param> /// <param name="DoctorId"></param> /// <param name="Module"></param> /// <returns></returns> public List <PatientPlan> GetPatientsPlanByDoctorId(DataConnection pclsCache, string DoctorId, string Module) { List <PatientPlan> list = new List <PatientPlan>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.Plan.GetPatientsPlanByDoctorId(pclsCache.CacheConnectionObject); cmd.Parameters.Add("DoctorId", CacheDbType.NVarChar).Value = DoctorId; cmd.Parameters.Add("Module", CacheDbType.NVarChar).Value = Module; cdr = cmd.ExecuteReader(); while (cdr.Read()) { if (cdr["PatientId"].ToString() == string.Empty) { continue; } PatientPlan NewLine = new PatientPlan(); NewLine.PatientId = cdr["PatientId"].ToString(); NewLine.PlanNo = cdr["PlanNo"].ToString(); NewLine.StartDate = cdr["StartDate"].ToString(); NewLine.EndDate = cdr["EndDate"].ToString(); NewLine.TotalDays = cdr["TotalDays"].ToString(); NewLine.RemainingDays = cdr["RemainingDays"].ToString(); NewLine.Status = cdr["Status"].ToString(); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PlanInfoMethod.GetPatientsPlanByDoctorId", "数据库操作异常! 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(); } }
//GetSignByPeriod LS 2015-03-30 只针对一种参数 public static DataTable GetSignByPeriod(DataConnection pclsCache, string UserId, string ItemType, string ItemCode, int StartDate, int EndDate) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("RecordDate", typeof(string))); list.Columns.Add(new DataColumn("RecordTime", typeof(string))); list.Columns.Add(new DataColumn("Value", typeof(string))); list.Columns.Add(new DataColumn("Unit", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.VitalSigns.GetSignByPeriod(pclsCache.CacheConnectionObject); cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId; cmd.Parameters.Add("ItemType", CacheDbType.NVarChar).Value = ItemType; cmd.Parameters.Add("ItemCode", CacheDbType.NVarChar).Value = ItemCode; cmd.Parameters.Add("StartDate", CacheDbType.NVarChar).Value = StartDate; cmd.Parameters.Add("EndDate", CacheDbType.NVarChar).Value = EndDate; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["RecordDate"].ToString(), cdr["RecordTime"].ToString(), cdr["Value"].ToString(), cdr["Unit"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsVitalSigns.GetSignByPeriod", "数据库操作异常! 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(); } }
public static DataTable GetInfobyDate(DataConnection pclsCache, string UserId, DateTime ClinicDate, int Num) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("VisitId", typeof(string))); list.Columns.Add(new DataColumn("ClinicDate", typeof(string))); list.Columns.Add(new DataColumn("HospitalCode", typeof(string))); list.Columns.Add(new DataColumn("HospitalName", typeof(string))); list.Columns.Add(new DataColumn("Department", typeof(string))); list.Columns.Add(new DataColumn("DepartmentName", typeof(string))); list.Columns.Add(new DataColumn("Doctor", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.OutPatientInfo.GetInfobyDate(pclsCache.CacheConnectionObject); cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId; cmd.Parameters.Add("ClinicDate", CacheDbType.DateTime).Value = ClinicDate; cmd.Parameters.Add("Num", CacheDbType.Int).Value = Num; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["VisitId"].ToString(), cdr["ClinicDate"].ToString(), cdr["HospitalCode"].ToString(), cdr["HospitalName"].ToString(), cdr["Department"].ToString(), cdr["DepartmentName"].ToString(), cdr["Doctor"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.OutPatientInfo.GetInfobyDate", "数据库操作异常! 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(); } }
public List <LifeStyleDetail> GetLifeStyleDetail(DataConnection pclsCache, string Module) { List <LifeStyleDetail> list = new List <LifeStyleDetail>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Cm.MstLifeStyleDetail.GetLifeStyleDetail(pclsCache.CacheConnectionObject); cmd.Parameters.Add("Module", CacheDbType.NVarChar).Value = Module; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Add(new LifeStyleDetail { StyleId = cdr["StyleId"].ToString(), Module = cdr["Module"].ToString(), CurativeEffect = cdr["CurativeEffect"].ToString(), SideEffect = cdr["SideEffect"].ToString(), Instruction = cdr["Instruction"].ToString(), HealthEffect = cdr["HealthEffect"].ToString(), Unit = cdr["Unit"].ToString(), Redundance = cdr["Redundance"].ToString() }); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Cm.MstLifeStyleDetail.GetLifeStyleDetail", "数据库操作异常! 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> /// 某段时间所有任务的依从情况 DataTable数据库形式 SYF 20151010 /// </summary> /// <param name="pclsCache"></param> /// <param name="PatientId"></param> /// <param name="PlanNo"></param> /// <param name="StartDate"></param> /// <param name="EndDate"></param> /// <returns></returns> public List <TasksComByPeriodDT> GetTasksComByPeriodDT(DataConnection pclsCache, string PatientId, string PlanNo, int StartDate, int EndDate) { List <TasksComByPeriodDT> list = new List <TasksComByPeriodDT>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.Compliance.GetTasksComByPeriod(pclsCache.CacheConnectionObject); cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId; cmd.Parameters.Add("PlanNo", CacheDbType.NVarChar).Value = PlanNo; cmd.Parameters.Add("StartDate", CacheDbType.Int).Value = StartDate; cmd.Parameters.Add("EndDate", CacheDbType.Int).Value = EndDate; cdr = cmd.ExecuteReader(); while (cdr.Read()) { TasksComByPeriodDT NewLine = new TasksComByPeriodDT(); NewLine.Date = cdr["Date"].ToString(); NewLine.ComplianceValue = cdr["ComplianceValue"].ToString(); NewLine.TaskType = cdr["TaskType"].ToString(); NewLine.TaskId = cdr["TaskId"].ToString(); NewLine.TaskName = cdr["TaskName"].ToString(); NewLine.Status = cdr["Status"].ToString(); NewLine.Type = cdr["Type"].ToString(); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PlanInfoMethod.GetTasksComByPeriodDT", "数据库操作异常! 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(); } }
////GetTargetByCode TDY 2015-04-07 //public static CacheSysList GetTargetByCode(DataConnection pclsCache, string Plan, string Type, string Code) //{ // CacheSysList ret = new InterSystems.Data.CacheTypes.CacheSysList(System.Text.Encoding.Unicode, true, true); // try // { // if (!pclsCache.Connect()) // { // return ret; // } // ret = Ps.Target.GetTargetByCode(pclsCache.CacheConnectionObject, Plan, Type, Code); // return ret; // } // catch (Exception ex) // { // HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Target.GetTargetByCode", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); // return ret; // } // finally // { // pclsCache.DisConnect(); // } //} //GetPsTarget TDY 2015-04-07 public static DataTable GetPsTarget(DataConnection pclsCache, string PlanNo) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("Id", typeof(string))); list.Columns.Add(new DataColumn("Type", typeof(string))); list.Columns.Add(new DataColumn("TypeName", typeof(string))); list.Columns.Add(new DataColumn("Code", typeof(string))); list.Columns.Add(new DataColumn("CodeName", typeof(string))); list.Columns.Add(new DataColumn("Value", typeof(string))); list.Columns.Add(new DataColumn("Origin", typeof(string))); list.Columns.Add(new DataColumn("Instruction", typeof(string))); list.Columns.Add(new DataColumn("Unit", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.Target.GetPsTarget(pclsCache.CacheConnectionObject); cmd.Parameters.Add("PlanNo", CacheDbType.NVarChar).Value = PlanNo; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["Id"].ToString(), cdr["Type"].ToString(), cdr["TypeName"].ToString(), cdr["Code"].ToString(), cdr["CodeName"].ToString(), cdr["Value"].ToString(), cdr["Origin"].ToString(), cdr["Instruction"].ToString(), cdr["Unit"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Target.GetPsTarget", "数据库操作异常! 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(); } }
//输出一段时间中记录的所有体征信息 public List <VitalInfo> GetAllSignsByPeriod(DataConnection pclsCache, string UserId, int StartDate, int EndDate) { { List <VitalInfo> items = new List <VitalInfo>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.VitalSigns.GetAllSignsByPeriod(pclsCache.CacheConnectionObject); cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId; cmd.Parameters.Add("StartDate", CacheDbType.NVarChar).Value = StartDate; cmd.Parameters.Add("EndDate", CacheDbType.NVarChar).Value = EndDate; cdr = cmd.ExecuteReader(); while (cdr.Read()) { VitalInfo item = new VitalInfo(); item.RecordDate = cdr["RecordDate"].ToString(); item.RecordTime = cdr["RecordTime"].ToString(); item.ItemType = cdr["ItemType"].ToString(); item.ItemCode = cdr["ItemCode"].ToString(); item.Value = cdr["Value"].ToString(); item.Unit = cdr["Unit"].ToString(); item.Name = cdr["VitalName"].ToString(); items.Add(item); } return(items); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "VitalInfoMethod.GetAllSignsByPeriod", "数据库操作异常! 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(); } } }
//GetDoctorListByName LS 2014-12-1 public static DataTable GetDoctorListByName(DataConnection pclsCache, string DoctorName) { 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))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Ps.DoctorInfo.GetDoctorListByName(pclsCache.CacheConnectionObject); cmd.Parameters.Add("DoctorName", CacheDbType.NVarChar).Value = DoctorName; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["DoctorId"].ToString(), cdr["DoctorName"].ToString(), Convert.ToInt32(cdr["Birthday"]), Convert.ToInt32(cdr["Gender"]), cdr["IDNo"].ToString(), Convert.ToInt32(cdr["InvalidFlag"])); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsDoctorInfo.GetDoctorListByName", "数据库操作异常! 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(); } }
// ZAM 2015-4-24 获取健康专员负责的所有患者最新结束(status = 4)计划列表 public static DataTable GetOverDuePlanByDoctorId(DataConnection pclsCache, string DoctorId, string Module) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("PatientId", typeof(string))); list.Columns.Add(new DataColumn("PlanNo", typeof(string))); list.Columns.Add(new DataColumn("StartDate", typeof(string))); list.Columns.Add(new DataColumn("EndDate", typeof(string))); list.Columns.Add(new DataColumn("TotalDays", typeof(string))); list.Columns.Add(new DataColumn("RemainingDays", typeof(string))); list.Columns.Add(new DataColumn("Status", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.Plan.GetOverDuePlanByDoctorId(pclsCache.CacheConnectionObject); cmd.Parameters.Add("DoctorId", CacheDbType.NVarChar).Value = DoctorId; cmd.Parameters.Add("Module", CacheDbType.NVarChar).Value = Module; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["PatientId"].ToString(), cdr["PlanNo"].ToString(), cdr["StartDate"].ToString(), cdr["EndDate"].ToString(), cdr["TotalDays"].ToString(), cdr["RemainingDays"].ToString(), cdr["Status"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.Plan.GetOverDuePlanByDoctorId", "数据库操作异常! 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(); } }
// GetHospital 返回所有医院信息 ZYF 2014-12-01 public static DataTable GetHospital(DataConnection pclsCache) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("Code", typeof(string))); list.Columns.Add(new DataColumn("Type", typeof(int))); list.Columns.Add(new DataColumn("Name", typeof(string))); list.Columns.Add(new DataColumn("SortNo", typeof(int))); list.Columns.Add(new DataColumn("StartDate", typeof(int))); list.Columns.Add(new DataColumn("EndDate", typeof(int))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Cm.MstHospital.GetHospital(pclsCache.CacheConnectionObject); cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["Code"].ToString(), Convert.ToInt32(cdr["Type"]), cdr["Name"].ToString(), Convert.ToInt32(cdr["SortNo"]), Convert.ToInt32(cdr["StartDate"]), Convert.ToInt32(cdr["EndDate"])); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstHospital.GetHospital", "数据库操作异常! 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(); } }
public List <PsTreatmentIndicators> GetPsTreatmentIndicators(DataConnection pclsCache, string UserId) { List <PsTreatmentIndicators> list = new List <PsTreatmentIndicators>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.TreatmentIndicators.GetPsTreatmentIndicators(pclsCache.CacheConnectionObject); cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Add(new PsTreatmentIndicators { SortNo = Convert.ToInt32(cdr["SortNo"]), AssessmentType = cdr["AssessmentType"].ToString(), AssessmentName = cdr["AssessmentName"].ToString(), AssessmentTime = Convert.ToDateTime(cdr["AssessmentTime"]).ToString("yyyy-MM-dd HH:mm:ss"), Result = cdr["Result"].ToString(), DocName = cdr["DocName"].ToString(), }); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "RiskInfoMethod.GetPsTreatmentIndicators", "数据库操作异常! 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(); } }
// GetNameList CSQ 2015-06-25 public static DataTable GetNameList(DataConnection pclsCache) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("CodeSubCode", typeof(string))); //list.Columns.Add(new DataColumn("SubCode", typeof(string))); list.Columns.Add(new DataColumn("Name", typeof(string))); list.Columns.Add(new DataColumn("InputCode", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Cm.MstLabTestSubItems.GetNameList(pclsCache.CacheConnectionObject); //cmd.Parameters.Add("Code", CacheDbType.NVarChar).Value = Code; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["Code"].ToString(), cdr["Name"].ToString(), cdr["InputCode"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstLabTestSubItems.GetNameList", "数据库操作异常! 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(); } }
// GetParameters ZAM 2014-12-4 public static DataTable GetParameters(DataConnection pclsCache, string Indicators) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("Id", typeof(string))); list.Columns.Add(new DataColumn("Name", typeof(string))); list.Columns.Add(new DataColumn("Value", typeof(string))); list.Columns.Add(new DataColumn("Unit", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Ps.Parameters.GetParameters(pclsCache.CacheConnectionObject); cmd.Parameters.Add("Indicators", CacheDbType.NVarChar).Value = Indicators; //cmd.Parameters.Add("InvalidFlag", CacheDbType.Int).Value = InvalidFlag; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["Id"].ToString(), cdr["Name"].ToString(), cdr["Value"].ToString(), cdr["Unit"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsParameters.GetParameters", "数据库操作异常! 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(); } }
//获取所有数据 2015-05-29 GL public static DataTable GetLifeStyleDetailList(DataConnection pclsCache) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("StyleId", typeof(string))); list.Columns.Add(new DataColumn("Module", typeof(string))); list.Columns.Add(new DataColumn("CurativeEffect", typeof(string))); list.Columns.Add(new DataColumn("SideEffect", typeof(string))); list.Columns.Add(new DataColumn("Instruction", typeof(string))); list.Columns.Add(new DataColumn("HealthEffect", typeof(string))); list.Columns.Add(new DataColumn("Unit", typeof(string))); list.Columns.Add(new DataColumn("Redundance", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Cm.MstLifeStyleDetail.GetLifeStyleDetailList(pclsCache.CacheConnectionObject); cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["StyleId"].ToString(), cdr["Module"].ToString(), cdr["CurativeEffect"].ToString(), cdr["SideEffect"].ToString(), cdr["Instruction"].ToString(), cdr["HealthEffect"].ToString(), cdr["Unit"].ToString(), cdr["Redundance"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Cm.MstLifeStyleDetail.GetLifeStyleDetailList", "数据库操作异常! 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(); } }
//获取血压表全部信息 2015-05-29 GL public static DataTable GetBloodPressureList(DataConnection pclsCache) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("Code", typeof(string))); list.Columns.Add(new DataColumn("Name", typeof(string))); list.Columns.Add(new DataColumn("Description", typeof(string))); list.Columns.Add(new DataColumn("SBP", typeof(string))); list.Columns.Add(new DataColumn("DBP", typeof(string))); list.Columns.Add(new DataColumn("PatientClass", typeof(string))); list.Columns.Add(new DataColumn("Redundance", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Cm.MstBloodPressure.GetBPGrades(pclsCache.CacheConnectionObject); cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["Code"].ToString(), cdr["Name"].ToString(), cdr["Description"].ToString(), cdr["SBP"].ToString(), cdr["DBP"].ToString(), cdr["PatientClass"].ToString(), cdr["Redundance"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Cm.MstBloodPressure.GetBPGrades", "数据库操作异常! 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(); } }
//GetSMSList GL 2015-04-07 根据专员Id获取患者消息列表 public static DataTable GetSMSList(DataConnection pclsCache, string DoctorId, string CategoryCode) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("PatientId", typeof(string))); list.Columns.Add(new DataColumn("PatientName", typeof(string))); list.Columns.Add(new DataColumn("Count", typeof(string))); list.Columns.Add(new DataColumn("Content", typeof(string))); list.Columns.Add(new DataColumn("SendDateTime", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Mb.MessageRecord.GetSMSList(pclsCache.CacheConnectionObject); cmd.Parameters.Add("DoctorId", CacheDbType.NVarChar).Value = DoctorId; cmd.Parameters.Add("CategoryCode", CacheDbType.NVarChar).Value = CategoryCode; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["PatientId"].ToString(), cdr["PatientName"].ToString(), cdr["Count"].ToString(), cdr["Content"].ToString(), cdr["SendDateTime"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Mb.MessageRecord.GetSMSList", "数据库操作异常! 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(); } }
// GetDrugNameList 获取所有药品名称列表 CSQ 2015-05-12 public static DataTable GetDrugNameList(DataConnection pclsCache) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("DrugCode", typeof(string))); list.Columns.Add(new DataColumn("DrugName", typeof(string))); list.Columns.Add(new DataColumn("DrugSpec", typeof(string))); list.Columns.Add(new DataColumn("Units", typeof(string))); list.Columns.Add(new DataColumn("InputCode", typeof(string))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } cmd = new CacheCommand(); cmd = Cm.MstDrug.GetNameListByCode(pclsCache.CacheConnectionObject); cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["DRUGCODE"].ToString(), cdr["DRUGNAME"].ToString(), cdr["DRUGSPEC"].ToString(), cdr["UNITS"].ToString(), cdr["INPUTCODE"].ToString()); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstDrug.GetDrugNameList", "数据库操作异常! 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(); } }
//GetNewLabTest CSQ 20150714 public static DataTable GetNewLabTestForM1(DataConnection pclsCache, string UserId) { DataTable list = new DataTable(); list.Columns.Add(new DataColumn("Code", typeof(string))); list.Columns.Add(new DataColumn("Name", typeof(string))); list.Columns.Add(new DataColumn("Value", typeof(string))); list.Columns.Add(new DataColumn("Date", typeof(DateTime))); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(null); } cmd = new CacheCommand(); cmd = Ps.LabTestDetails.GetNewLabTestForM1(pclsCache.CacheConnectionObject); cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId; //cmd.Parameters.Add("ItemCode", CacheDbType.NVarChar).Value = ItemCode; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Rows.Add(cdr["Code"].ToString(), cdr["Name"].ToString(), cdr["Value"].ToString(), Convert.ToDateTime(cdr["Date"])); } return(list); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsLabTestDetails.GetNewLabTest", "数据库操作异常! 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(); } }