public BreathParaModel GetBreathPara() { BreathParaModel breathPara = new BreathParaModel(); if (!string.IsNullOrEmpty(_vitalSignGraph.BreathPara1) && !string.IsNullOrEmpty(_vitalSignGraph.BreathPara2) && !string.IsNullOrEmpty(_vitalSignGraph.BreathPara3)) { breathPara.TopParamCode = _vitalSignGraph.BreathPara1; breathPara.LeftParamCode = _vitalSignGraph.BreathPara2; breathPara.RightParamCode = _vitalSignGraph.BreathPara3; breathPara.TopParamName = GetMonitorFunctionName(_vitalSignGraph.BreathPara1); breathPara.LeftParamName = GetMonitorFunctionName(_vitalSignGraph.BreathPara2); breathPara.RightParamName = GetMonitorFunctionName(_vitalSignGraph.BreathPara3); List <MED_PAT_MONITOR_DATA_EXT> patMonitorDataExtDataTable = AnesInfoService.ClientInstance.GetPatMonitorExtList(ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID, ExtendAppContext.Current.PatientInformationExtend.VISIT_ID, ExtendAppContext.Current.PatientInformationExtend.OPER_ID); if (patMonitorDataExtDataTable != null && patMonitorDataExtDataTable.Count > 0) { List <MED_PAT_MONITOR_DATA_EXT> breathList = patMonitorDataExtDataTable.Where(x => x.ITEM_CODE == _vitalSignGraph.BreathPara1 || x.ITEM_CODE == _vitalSignGraph.BreathPara2 || x.ITEM_CODE == _vitalSignGraph.BreathPara3).ToList(); if (breathList != null && breathList.Count > 0) { breathList.ForEach(row => { if (!breathPara.BreathParalList.ContainsKey(row.TIME_POINT)) { breathPara.BreathParalList.Add(row.TIME_POINT, new BreathParaDetail()); } if (!string.IsNullOrEmpty(row.ITEM_VALUE)) { if (row.ITEM_CODE.Equals(breathPara.TopParamCode)) { breathPara.BreathParalList[row.TIME_POINT].TopParamVal = row.ITEM_VALUE; } else if (row.ITEM_CODE.Equals(breathPara.LeftParamCode)) { breathPara.BreathParalList[row.TIME_POINT].LeftParamVal = row.ITEM_VALUE; } else if (row.ITEM_CODE.Equals(breathPara.RightParamCode)) { breathPara.BreathParalList[row.TIME_POINT].RightParamVal = row.ITEM_VALUE; } } }); } } } BreathPara = breathPara; return(BreathPara); }
/// <summary> /// ¹¹Ôì·½·¨ /// </summary> public TestViewModel() { //OperationDocLib lr = new OperationDocLib(); //lr.GetAnesDoc("Âé×í¼Ç¼µ¥"); //var aaa = AnesInfoService.ClientInstance.GetAnesthesiaPlan("1153772", 1, 1); //LoadReport lr = new LoadReport(); //lr.LoadReportByName("Âé×íµ¥"); DateTime begin = DateTime.Now.Date.AddHours(9); List <IntakeAndOutputData> DataList = new List <IntakeAndOutputData>(); IntakeAndOutputData data = new IntakeAndOutputData("ÑõÆø£¨ÎüÈ룩", 5, "L/min"); data.BeginTime = begin.AddMinutes(22); //data.EndTime = data.BeginTime.Value.AddMinutes(26); DataList.Add(data); data = new IntakeAndOutputData("5%ÆÏÌÑÌÇ", 500, "mL"); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(53)); DataList.Add(data); data = new IntakeAndOutputData("10%ÆÏÌÑÌÇ", 500, "mL"); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(53)); DataList.Add(data); data = new IntakeAndOutputData("15%ÆÏÌÑÌÇ", 500, "mL"); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(53)); DataList.Add(data); data = new IntakeAndOutputData("Äò", 1, "L", IntakeAndOutputType.Output); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(33)); DataList.Add(data); data = new IntakeAndOutputData("Ѫ", 500, "mL", IntakeAndOutputType.Output); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(33)); DataList.Add(data); data = new IntakeAndOutputData("ÒýÁ÷", 500, "mL", IntakeAndOutputType.Output); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(33)); DataList.Add(data); data = new IntakeAndOutputData("ÒýÁ÷1", 500, "mL", IntakeAndOutputType.Output); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(33)); DataList.Add(data); data = new IntakeAndOutputData("ÒýÁ÷2", 500, "mL", IntakeAndOutputType.Output); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(33)); DataList.Add(data); data = new IntakeAndOutputData("ÒýÁ÷3", 500, "mL", IntakeAndOutputType.Output); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(begin.AddMinutes(33)); DataList.Add(data); data = new IntakeAndOutputData("¸´·½ÂÈ»¯ÄÆ×¢ÉäÒº", 500, "ml", IntakeAndOutputType.Infusion); data.BeginTime = begin.AddMinutes(22); data.EndTime = data.BeginTime.Value.AddMinutes(39); DataList.Add(data); _InputOutData = DataList; AxisSetting axisSetting = new AxisSetting(); axisSetting.BeginTime = begin; axisSetting.EndTime = begin.AddHours(3).AddMinutes(3); axisSetting.MoveMinLimitTime = begin.AddHours(-3); axisSetting.MoveMaxLimitTime = axisSetting.EndTime.Value.AddHours(1); xAxisSetting = axisSetting; _YAxisSettings = new List <YAxisSetting>() { new YAxisSetting() { MinVal = 0, MaxVal = 320, MinorStep = 0, MajorStep = 20, IsPrimary = true, Index = 0, Title = "xxx", Unit = "mmHg" } , new YAxisSetting() { MinVal = 10, MaxVal = 42, MinorStep = 0, MajorStep = 2, IsPrimary = false, Index = 1, Title = "ÌåÎÂ", Unit = "¡æ" } }; _RescueTimeList = new List <RescueTime>() { new RescueTime(begin.AddMinutes(30), begin.AddHours(1)) , new RescueTime(begin.AddHours(2), begin.AddHours(2).AddMinutes(30)) }; //»³±ÆøÁ¿Í¼±ê _breathParam = new BreathParaModel(); _breathParam.TopParamName = "I:E"; _breathParam.LeftParamName = "TVE"; _breathParam.RightParamName = "f"; _breathParam.BreathParalList.Add(begin.AddMinutes(68), new BreathParaDetail("30", "120", "40")); _breathParam.BreathParalList.Add(begin.AddMinutes(83), new BreathParaDetail("30", "120", "40")); _breathParam.BreathParalList.Add(begin.AddMinutes(95), new BreathParaDetail("30", "120", "40")); _breathParam.BreathParalList.Add(begin.AddMinutes(110), new BreathParaDetail("30", "120", "40")); //ÇúÏß _Curves = new List <VitalSignCurveDetailModel>(); List <SymbolModel> symbolList = new List <SymbolModel>(); symbolList.Add(new SymbolModel(SymbolType.None) { Text = "#" }); Model.InOperationModel.VitalSignCurveDetailModel curve = new Model.InOperationModel.VitalSignCurveDetailModel("²âÊÔ", 0, System.Drawing.Color.Blue, true); curve.Points = new List <VitalSignPointModel>(); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(68), "#", curve, null, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(72), "#", curve, null, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(83), "#", curve, null, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(97), "#", curve, null, string.Empty)); _Curves.Add(curve); curve = new Model.InOperationModel.VitalSignCurveDetailModel("²âÊÔ2", 0, System.Drawing.Color.Blue, true); curve.Points = new List <VitalSignPointModel>(); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(68), "#", curve, null, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(72), "#", curve, null, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(83), "#", curve, null, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(97), "#", curve, null, string.Empty)); _Curves.Add(curve); curve = new Model.InOperationModel.VitalSignCurveDetailModel("ÊæÕÅѹ", 0, System.Drawing.Color.FromArgb(0xFF, 0x1D, 0xAD, 0xE7)); curve.Points = new List <VitalSignPointModel>(); SymbolType stype = SymbolType.VLetter; SymbolModel smodel = new SymbolModel(stype); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(14), 100, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(32), 1300, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(64), 200, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(92), -100, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(120), 300, curve, smodel, string.Empty)); curve.LegendList = new List <LegendItem>() { new LegendItem() { DisplayName = "ÊæÕÅѹ", Symbol = smodel } }; _Curves.Add(curve); curve = new Model.InOperationModel.VitalSignCurveDetailModel("ÊÕËõѹ", 0, System.Drawing.Color.RoyalBlue); curve.Points = new List <VitalSignPointModel>(); stype = SymbolType.VLetterDown; smodel = new SymbolModel(stype); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(11), 80, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(50), 110, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(64), 130, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(92), 150, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(120), 220, curve, smodel, string.Empty)); curve.LegendList = new List <LegendItem>() { new LegendItem() { DisplayName = "ÊÕËõѹ", Symbol = smodel } }; _Curves.Add(curve); curve = new Model.InOperationModel.VitalSignCurveDetailModel("²âÊÔµÄ", 0, System.Drawing.Color.Chocolate); curve.Points = new List <VitalSignPointModel>(); stype = SymbolType.Triangle; smodel = new SymbolModel(stype); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(23), 60, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(32), 78, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(64), 82, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(92), 90, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(120), 110, curve, smodel, string.Empty)); curve.LegendList = new List <LegendItem>() { new LegendItem() { DisplayName = "²âÊÔµÄ", Symbol = smodel } }; curve.HideTime = new List <DateTimeRangeModel>() { new DateTimeRangeModel(begin.AddMinutes(65), begin.AddMinutes(90)) }; _Curves.Add(curve); curve = new Model.InOperationModel.VitalSignCurveDetailModel("²âÊÔµÄ2", 0, System.Drawing.Color.Gray); curve.Points = new List <VitalSignPointModel>(); stype = SymbolType.Circle; smodel = new SymbolModel(stype); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(23), 80, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(32), 168, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(64), 172, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(92), 199, curve, smodel, string.Empty)); curve.Points.Add(new VitalSignPointModel(begin.AddMinutes(120), 153, curve, smodel, string.Empty)); curve.LegendList = new List <LegendItem>() { new LegendItem() { DisplayName = "²âÊÔµÄ2", Symbol = smodel } }; _Curves.Add(curve); //ʼþ _EventMark = new EventMarkModel(); _EventMark.AddPoint(begin.AddMinutes(37), 12, "²âÊÔʼþ", new SymbolModel(SymbolType.CircleXCross), System.Drawing.Color.Red, "²âÊÔʼþ"); _EventMark.AddPoint(begin.AddMinutes(50), 12, "²âÊÔʼþ1", new SymbolModel(SymbolType.CircleDot), System.Drawing.Color.Red, "²âÊÔʼþ1"); _EventMark.AddPoint(begin.AddMinutes(53), 12, "²âÊÔʼþ2", new SymbolModel(SymbolType.CircleHArrow), System.Drawing.Color.Red, "²âÊÔʼþ2"); _EventMark.AddPoint(begin.AddMinutes(54), 12, "²âÊÔʼþ3", new SymbolModel(SymbolType.CircleHLine), System.Drawing.Color.Red, "²âÊÔʼþ3"); _EventMark.AddPoint(begin.AddMinutes(55), 12, "²âÊÔʼþ4", new SymbolModel(SymbolType.CirclePlus), System.Drawing.Color.Red, "²âÊÔʼþ4"); _EventMark.AddPoint(begin.AddMinutes(59), 12, "²âÊÔʼþ6", new SymbolModel(SymbolType.CircleXCrossDot), System.Drawing.Color.Red, "²âÊÔʼþ5"); _EventMark.AddPoint(begin.AddMinutes(65), 12, "²âÊÔʼþ7", new SymbolModel(SymbolType.Diamond), System.Drawing.Color.Red, "²âÊÔʼþ6"); _EventMark.AddPoint(begin.AddMinutes(85), 12, "²âÊÔʼþ8", new SymbolModel(SymbolType.MiniCircle), System.Drawing.Color.Red, "²âÊÔʼþ7"); _TextMarkPoints = new List <TextMarkPoint>(); _TextMarkPoints.Add(new TextMarkPoint(begin.AddMinutes(53), "ѪÆø·ÖÎö¶þ\nѪÆø·ÖÎö¶þ\nѪÆø·ÖÎö¶þ\nѪÆø·ÖÎö¶þ\nѪÆø·ÖÎö¶þ\nѪÆø·ÖÎö¶þ")); _TextMarkPoints.Add(new TextMarkPoint(begin.AddMinutes(85), "ѪÆø·ÖÎöÈý\nѪÆø·ÖÎöÈý\nѪÆø·ÖÎöÈý\nѪÆø·ÖÎöÈý\nѪÆø·ÖÎöÈý\nѪÆø·ÖÎöÈý")); _TextMarkPoints.Add(new TextMarkPoint(begin.AddMinutes(147), "ѪÆø·ÖÎöËÄ\nѪÆø·ÖÎöËÄ\nѪÆø·ÖÎöËÄ\nѪÆø·ÖÎöËÄ\nѪÆø·ÖÎöËÄ\nѪÆø·ÖÎöËÄ")); _ProcessBeginTime = begin.AddMinutes(54); _IsEditEnable = true; IsHiddenEventMarkArea = true; }