Пример #1
0
 }                                                     //图上体征切换显示
 public ImplementationPhone()
 {
     ChartData = new ChartData();
     SignList  = new List <SignShow>();
 }
Пример #2
0
 public ImplementationInfo()
 {
     PatientInfo = new PatientInfo1();          //初始化
     PlanList = new List<PlanDeatil>();
     TaskList = new List<Task>();
     ChartData = new ChartData();
     SignList = new List<SignShow>();
 }
Пример #3
0
 public ImplementationPhone()
 {
     ChartData = new ChartData();
     SignList = new List<SignShow>();
 }
Пример #4
0
        //获取某体征的数据和画图信息(收缩压、舒张压、脉率) Pad和Phone都要用 GL 2015-10-13
        //关于输入 StartDate,EndDate  Pad首次没有拿出StartDate,EndDate    Phone拿出了 这样规划比较好
        public ChartData GetSignInfoByCode(DataConnection pclsCache, string PatientId, string PlanNo, string ItemCode, int StartDate, int EndDate)
        {
            ChartData ChartData = new ChartData();
            List<Graph> GraphList = new List<Graph>();
            GraphGuide GraphGuide = new GraphGuide();
            List<MstBloodPressure> reference = new List<MstBloodPressure>();

            try
            {
                string Module = "";
                GPlanInfo planInfo = new PlanInfoMethod().GetPlanInfo(pclsCache, PlanNo);
                if (planInfo != null)
                {
                    Module = planInfo.Module;

                }

                if (Module == "M1")
                {
                    if ((ItemCode == "Bloodpressure|Bloodpressure_1") || (ItemCode == "Bloodpressure|Bloodpressure_2"))
                    {
                        reference = new PlanInfoMethod().GetBPGrades(pclsCache);
                    }

                    GraphList = new PlanInfoMethod().GetSignInfoByM1(pclsCache, PatientId, PlanNo, ItemCode, StartDate, EndDate, reference);

                    //初始值、目标值、分级规则加工
                    if (GraphList != null)
                    {
                        if (GraphList.Count > 0)
                        {
                            GraphGuide = new PlanInfoMethod().GetGuidesByCode(pclsCache, PlanNo, ItemCode, reference);
                            ChartData.GraphGuide = GraphGuide;
                        }
                    }
                }

                //读取任务列表  必有测量任务,其他任务(例如吃药)可能没有  20151027 需要修改
                //List<PsTask> TaskList = new PlanInfoMethod().GetTaskList(pclsCache, PlanNo);
                List<PsTask> TaskList = new List<PsTask>();
                List<PsTask> VitalSignRows = new List<PsTask>();
                foreach (PsTask item in TaskList)
                {
                    if (item.Type == "VitalSign")
                    {
                        VitalSignRows.Add(item);
                    }
                }
                //其他任务依从情况
                List<CompliacneDetailByD> TasksComByPeriod = new List<CompliacneDetailByD>();
                //是否有其他任务
                if (TaskList.Count == VitalSignRows.Count)
                {
                    ChartData.OtherTasks = "0";
                }
                else
                {
                    ChartData.OtherTasks = "1";
                    TasksComByPeriod = new PlanInfoMethod().GetTasksComCountByPeriod(pclsCache, PatientId, PlanNo, StartDate, EndDate);
                    if ((TasksComByPeriod != null) && (TasksComByPeriod.Count == GraphList.Count))
                    {
                        for (int rowsCount = 0; rowsCount < TasksComByPeriod.Count; rowsCount++)
                        {
                            GraphList[rowsCount].DrugValue = "1";   //已经初始化过
                            GraphList[rowsCount].DrugBullet = TasksComByPeriod[rowsCount].drugBullet;
                            GraphList[rowsCount].DrugColor = TasksComByPeriod[rowsCount].drugColor;
                            GraphList[rowsCount].DrugDescription = TasksComByPeriod[rowsCount].Events;
                        }
                    }
                }
                ChartData.GraphList = GraphList;

                return ChartData;
                //string a = JSONHelper.ObjectToJson(ChartData);
                //Context.Response.BinaryWrite(new byte[] { 0xEF, 0xBB, 0xBF });
                //Context.Response.Write(a);
                //HttpContext.Current.ApplicationInstance.CompleteRequest();
                //Context.Response.End();
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "GetSignInfoByCode", "PlanInfoRepository error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
                //throw (ex);
            }
        }