/// <summary> /// 初始化体征数据 /// </summary> private void IntensiveSignRefresh() { string patientID = ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID; int visitID = ExtendAppContext.Current.PatientInformationExtend.VISIT_ID; int operID = ExtendAppContext.Current.PatientInformationExtend.OPER_ID; string eventNo = ExtendAppContext.Current.EventNo; if (_rescueTime.BeginTime.HasValue) { ProcessBeginTime = _rescueTime.BeginTime.Value; } else { ProcessBeginTime = null; } if (_rescueTime.EndTime.HasValue) { ProcessEndTime = _rescueTime.EndTime.Value; } _vitalSignList = AnesInfoService.ClientInstance.GetVitalSignData(patientID, visitID, operID, eventNo, true); ScheduledTimeViewModel scheduledTimeViewModel = new ScheduledTimeViewModel(); DateTimeRangeModel timeRange = new DateTimeRangeModel(_rescueTime.BeginTime.Value, _rescueTime.EndTime == null ? _rescueTime.BeginTime.Value.AddMinutes(20) : _rescueTime.EndTime); xAxisSetting = scheduledTimeViewModel.SetAxisSetting(timeRange, true); VitalSignViewModel vitalSign = new VitalSignViewModel(_vitalSignList, null, _vitalSignGraph, _xAxisSetting); Curves = vitalSign.GetVitalSignCurve(true, _rescueTime); }
public override void LoadData() { if (ExtendAppContext.Current.PatientInformationExtend == null) { return; } _patientID = ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID; _visitID = ExtendAppContext.Current.PatientInformationExtend.VISIT_ID; _operID = ExtendAppContext.Current.PatientInformationExtend.OPER_ID; _eventNo = "0"; var anesEvent = AnesInfoService.ClientInstance.GetAnesthesiaEventByEventNo(_patientID, _visitID, _operID, _eventNo); var vitalSign = AnesInfoService.ClientInstance.GetVitalSignData(_patientID, _visitID, _operID, _eventNo, false); var operMaster = AnesInfoService.ClientInstance.GetOperationMaster(_patientID, _visitID, _operID); ScheduledTimeViewModel scheduledTimeViewModel = new ScheduledTimeViewModel(); DateTimeRangeModel pageTimeRange = scheduledTimeViewModel.GetGraphDateTime(vitalSign, anesEvent, _eventNo, operMaster); xAxisSetting = scheduledTimeViewModel.SetAxisSetting(pageTimeRange, false); List <IntakeAndOutputData> DataList = new List <IntakeAndOutputData>(); var listItem = anesEvent.FindAll(delegate(MED_ANESTHESIA_EVENT a) { return(a.EVENT_CLASS_CODE == "2" || a.EVENT_CLASS_CODE == "3" || a.EVENT_CLASS_CODE == "4" || a.EVENT_CLASS_CODE == "B" || a.EVENT_CLASS_CODE == "C" || a.EVENT_CLASS_CODE == "D"); }); var oxygen = listItem.FindAll(delegate(MED_ANESTHESIA_EVENT a) { return(a.EVENT_CLASS_CODE == "4"); }); if (oxygen.Count > 0) { foreach (var item in oxygen) { double showNum = 0; double.TryParse(item.PERFORM_SPEED.ToString(), out showNum); IntakeAndOutputData data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.SPEED_UNIT); data.BeginTime = item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second); if (item.END_TIME != null) { data.EndTime = item.END_TIME.Value.AddSeconds(0 - item.END_TIME.Value.Second); } data.ToolTip = ""; DataList.Add(data); } } foreach (var item in listItem) { if (item.EVENT_CLASS_CODE == "2" || item.EVENT_CLASS_CODE == "C") { IntakeAndOutputData data; if (item.DURATIVE_INDICATOR == 1) { double showNum = 0; if (item.PERFORM_SPEED.HasValue || item.PERFORM_SPEED > 0) { double.TryParse(item.PERFORM_SPEED.ToString(), out showNum); data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.SPEED_UNIT); } else { double.TryParse(item.DOSAGE.ToString(), out showNum); data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.DOSAGE_UNITS); } data.BeginTime = item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second); if (item.END_TIME != null) { data.EndTime = item.END_TIME.Value.AddSeconds(0 - item.END_TIME.Value.Second); } } else { double showNum = 0; double.TryParse(item.DOSAGE.ToString(), out showNum); data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.DOSAGE_UNITS); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(item.START_TIME != null ? item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second) : DateTime.Now); } DataList.Add(data); } else if (item.EVENT_CLASS_CODE == "D") { double showNum = 0; double.TryParse(item.DOSAGE.ToString(), out showNum); IntakeAndOutputData data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.DOSAGE_UNITS, IntakeAndOutputType.Output); if (item.DURATIVE_INDICATOR == 1) { data.BeginTime = item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second); if (item.END_TIME != null) { data.EndTime = item.END_TIME.Value.AddSeconds(0 - item.END_TIME.Value.Second); } } else { if (item.EVENT_ITEM_NAME.Contains("尿")) { data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(item.START_TIME != null ? item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second) : DateTime.Now, "尿", Color.FromRgb(0x66, 0xFF, 0xCC)); } else if (item.EVENT_ITEM_NAME.Contains("血")) { data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(item.START_TIME != null ? item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second) : DateTime.Now, "血", Color.FromRgb(0xCC, 0xCC, 0x00)); } else { data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(item.START_TIME != null ? item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second) : DateTime.Now, "引", Color.FromRgb(0xCC, 0xCC, 0x00)); } } DataList.Add(data); } else if (item.EVENT_CLASS_CODE == "3" || item.EVENT_CLASS_CODE == "B") { IntakeAndOutputData data; if (item.DURATIVE_INDICATOR == 1) { double showNum = 0; //if (item.PERFORM_SPEED.HasValue || item.PERFORM_SPEED > 0) //{ // double.TryParse(item.PERFORM_SPEED.ToString(), out showNum); // data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.SPEED_UNIT, IntakeAndOutputType.Infusion); //} //else //{ double.TryParse(item.DOSAGE.ToString(), out showNum); data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.DOSAGE_UNITS, IntakeAndOutputType.Infusion); //} data.BeginTime = item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second); if (item.END_TIME != null) { data.EndTime = item.END_TIME.Value.AddSeconds(0 - item.END_TIME.Value.Second); } } else { double showNum = 0; double.TryParse(item.DOSAGE.ToString(), out showNum); data = new IntakeAndOutputData(item.EVENT_ITEM_NAME, showNum, item.DOSAGE_UNITS, IntakeAndOutputType.Infusion); data.OnetimeData = new IntakeAndOutputData.OneTimeIntakeAndOut(item.START_TIME != null ? item.START_TIME.Value.AddSeconds(0 - item.START_TIME.Value.Second) : DateTime.Now); } DataList.Add(data); } } InputOutData = DataList; }
protected void LoadVitalSignControl() { if (null == ExtendAppContext.Current.PatientInformationExtend) { return; } IsVitalSignsEditEnable = ExtendAppContext.Current.IsModify & ExtendAppContext.Current.IsPermission; string patientID = ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID; int visitID = ExtendAppContext.Current.PatientInformationExtend.VISIT_ID; int operID = ExtendAppContext.Current.PatientInformationExtend.OPER_ID; string eventNo = ExtendAppContext.Current.EventNo; _vitalSignList = AnesInfoService.ClientInstance.GetVitalSignData(patientID, visitID, operID, eventNo, false); _anesEventList = AnesInfoService.ClientInstance.GetAnesthesiaEventByEventNo(patientID, visitID, operID, eventNo); _operMaster = AnesInfoService.ClientInstance.GetOperationMaster(patientID, visitID, operID); if (_operMaster.IN_DATE_TIME.HasValue) { ProcessBeginTime = _operMaster.IN_DATE_TIME; } else { ProcessBeginTime = null; } if (_operMaster.END_DATE_TIME.HasValue) { ProcessEndTime = _operMaster.OUT_DATE_TIME; } else { ProcessEndTime = null; } List <MED_OPERATION_RESCUE> operRescueList = CommonService.ClientInstance.GetOperationRescue(patientID, visitID, operID); List <MED_CAMERA_PICINFO> cameraList = CareDocService.ClientInstance.GetPicInfoList(patientID, visitID, operID); RescueTimeList = new List <RescueTime>(); if (operRescueList != null && operRescueList.Count > 0) { foreach (MED_OPERATION_RESCUE row in operRescueList) { RescueTimeList.Add(new RescueTime(row.START_DATE_TIME, row.END_DATE_TIME)); } } if (ExtendAppContext.Current.IsOperationRescuing && ExtendAppContext.Current.OperationRescueStartTime != null && ExtendAppContext.Current.OperationRescueStartTime != DateTime.MinValue) { RescueTimeList.Add(new RescueTime(ExtendAppContext.Current.OperationRescueStartTime, null)); } if (cameraList != null && cameraList.Count > 0) { foreach (MED_CAMERA_PICINFO row in cameraList) { RescueTimeList.Add(new RescueTime(row.UPDATE_TIME)); } } ScheduledTimeViewModel scheduledTimeViewModel = new ScheduledTimeViewModel(); DateTimeRangeModel pageTimeRange = scheduledTimeViewModel.GetGraphDateTime(_vitalSignList, _anesEventList, eventNo, _operMaster); xAxisSetting = scheduledTimeViewModel.SetAxisSetting(pageTimeRange, false); VitalSignViewModel vitalSign = new VitalSignViewModel(_vitalSignList, _anesEventList, _vitalSignGraph, _xAxisSetting); Curves = vitalSign.GetVitalSignCurve(false, null); TextMarkPoints = vitalSign.GetBloodGasItems(ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID, ExtendAppContext.Current.PatientInformationExtend.VISIT_ID, ExtendAppContext.Current.PatientInformationExtend.OPER_ID); EventMarkViewModel eventMark = new EventMarkViewModel(_anesEventList, _operMaster, _vitalSignGraph); EventMark = eventMark.GetEventMark(); BreathParaViewModel breathViewModel = new BreathParaViewModel(_vitalSignGraph); BreathParam = breathViewModel.GetBreathPara(); }