public PlanDeatil GetPlanInfo(string PlanNo) { try { PlanDeatil planInfo = new PlanDeatil(); CacheSysList CacheList = PsPlan.GetPlanInfo(_cnCache, PlanNo); if (CacheList != null) { planInfo.PlanNo = CacheList[0]; planInfo.StartDate = Convert.ToInt32(CacheList[2]); planInfo.EndDate = Convert.ToInt32(CacheList[3]); } return planInfo; } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "GetPlanInfo", "WebService调用异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return null; throw (ex); } }
//GetPlanList34ByM 获取某模块患者的正在执行的和结束的计划列表 LS 2015-03-30 public static List<PlanDeatil> GetPlanList34ByM(DataConnection pclsCache, string PatientId, string Module) { List<PlanDeatil> result = new List<PlanDeatil>(); try { InterSystems.Data.CacheTypes.CacheSysList list = null; list = PsPlan.GetExecutingPlanByM(pclsCache, PatientId, Module); if (list != null) { PlanDeatil PlanDeatil = new PlanDeatil(); PlanDeatil.PlanNo = list[0].ToString(); PlanDeatil.StartDate = Convert.ToInt32(list[2]); PlanDeatil.EndDate = Convert.ToInt32(list[3]); string temp = PlanDeatil.StartDate.ToString().Substring(0, 4) + "/" + PlanDeatil.StartDate.ToString().Substring(4, 2) + "/" + PlanDeatil.StartDate.ToString().Substring(6, 2); string temp1 = PlanDeatil.EndDate.ToString().Substring(0, 4) + "/" + PlanDeatil.EndDate.ToString().Substring(4, 2) + "/" + PlanDeatil.EndDate.ToString().Substring(6, 2); PlanDeatil.PlanName = "当前计划:" + temp + "-" + temp1; //PlanDeatil.Module = list[4].ToString(); //PlanDeatil.Status = list[5].ToString(); //PlanDeatil.DoctorId = list[6].ToString(); result.Add(PlanDeatil); } else { PlanDeatil PlanDeatil = new PlanDeatil(); PlanDeatil.PlanNo = ""; PlanDeatil.PlanName = "当前计划"; result.Add(PlanDeatil); } DataTable endingPlanList = new DataTable(); endingPlanList = GetEndingPlan(pclsCache, PatientId, Module); for (int i = 0; i < endingPlanList.Rows.Count; i++) { PlanDeatil PlanDeatil = new PlanDeatil(); PlanDeatil.PlanNo = endingPlanList.Rows[i]["PlanNo"].ToString(); PlanDeatil.StartDate = Convert.ToInt32(endingPlanList.Rows[i]["StartDate"]); PlanDeatil.EndDate = Convert.ToInt32(endingPlanList.Rows[i]["EndDate"]); string temp = PlanDeatil.StartDate.ToString().Substring(0, 4) + "/" + PlanDeatil.StartDate.ToString().Substring(4, 2) + "/" + PlanDeatil.StartDate.ToString().Substring(6, 2); string temp1 = PlanDeatil.EndDate.ToString().Substring(0, 4) + "/" + PlanDeatil.EndDate.ToString().Substring(4, 2) + "/" + PlanDeatil.EndDate.ToString().Substring(6, 2); PlanDeatil.PlanName = "计划:" + temp + "-" + temp1; result.Add(PlanDeatil); } return result; } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsPlan.GetPlanList34ByM", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return null; } finally { } }