public EventPoint(DrawingDataColumn parent, EntityEmrTemperatureChartEvent value) { this.ParentColumn = parent; this.Value = value; this.Index = 0; this.TextFont = new Font(ThreeItemConstValue.DefaultFontFamilyName, this.ParentColumn.SizePerUnit * 0.75f); this.drawed = false; this.OriginValuePoint = null; Text = this.Value.eventName; if (this.Value.EventType != null) { Text = this.Value.EventType.eventName; } if (this.Value.isDrawTime == 1)//如果描绘时间则加上连接线 { DateTime dt = this.Value.recordDate; Text += "—" + DateTimeToCHS(dt); } }
public static List <ThreeItemsColumnData> GetColumnsData(List <EntityEmrTemperatureMonitorData> listValues, List <EntityEmrTemperatureChartEvent> listEvent) { //清远医院特殊处理 //if (clsGlobalHospitalCode.Code == "0003") // ThreeItemConstValue.MaxPulse = 200; //else ThreeItemConstValue.MaxPulse = 180; //判断是否显示35°下的体温信息 bool blnFlag = true; if (GlobalParm.dicSysParameter.ContainsKey(73)) { string strVal = GlobalParm.dicSysParameter[73]; int intVal = 0; if (int.TryParse(strVal, out intVal)) { if (intVal == 1) { blnFlag = false; } } } List <ThreeItemsColumnData> returnData = new List <ThreeItemsColumnData>(); foreach (EntityEmrTemperatureMonitorData entityPoint in listValues) { //1口表 2腋表 3肛表 4降温 5脉搏 6心率 //7呼吸 8血压 9总入液量 10排出量-大便 11排出量-尿量 12排出量-其他1 //13体重 14皮试 15其他 entityPoint.timePeriod = ThreeItemTimePeriodGenerator.GetTimePeriod(entityPoint.recordDate, ref entityPoint.drawingPointDate); ThreeItemsColumnData columnsData = null; if (!returnData.Any(i => i.RecDate.Date == entityPoint.drawingPointDate.Date)) { columnsData = new ThreeItemsColumnData(entityPoint.drawingPointDate); returnData.Add(columnsData); } else { columnsData = returnData.Single(i => i.RecDate.Date == entityPoint.drawingPointDate.Date); } //1口表 2腋表 3肛表 4降温 16亚低温治疗 if (entityPoint.measureType == 1 || entityPoint.measureType == 2 || entityPoint.measureType == 3 || entityPoint.measureType == 4 || entityPoint.measureType == 16) { decimal decVal = -1m; if (entityPoint.measureType != 4 && entityPoint.measureType != 16) { if (decimal.TryParse(entityPoint.measureValue, out decVal)) { if (decVal < 35m && blnFlag)//低于35度,转换为事件 { EntityEmrTemperatureChartEvent entityEvent = new EntityEmrTemperatureChartEvent(); entityEvent.recordDate = entityPoint.recordDate; entityEvent.timePeriod = entityPoint.timePeriod; entityEvent.eventName = "体温不升"; entityEvent.drawingPotision = 1; entityEvent.isBreakingPoint = 1; entityEvent.isDrawTime = 0; entityEvent.isOperation = 0; entityEvent.SpecialValue = entityPoint; columnsData.EventValues.Add(entityEvent); } else { columnsData.TempuValues.Add(entityPoint); } } } else { columnsData.TempuValues.Add(entityPoint); if (!string.IsNullOrEmpty(entityPoint.measureValue2)) { EntityEmrTemperatureChartEvent entityEvent = new EntityEmrTemperatureChartEvent(); entityEvent.recordDate = entityPoint.recordDate; entityEvent.timePeriod = entityPoint.timePeriod; entityEvent.eventName = entityPoint.measureValue2; entityEvent.drawingPotision = 1; entityEvent.isBreakingPoint = 0; entityEvent.isDrawTime = 0; entityEvent.isOperation = 0; entityEvent.SpecialValue = entityPoint; columnsData.EventValues.Add(entityEvent); } } } else if (entityPoint.measureType == 5)//5脉搏 { columnsData.PulseValues.Add(entityPoint); } else if (entityPoint.measureType == 6)//6心率 { columnsData.HeartRateValues.Add(entityPoint); } else if (entityPoint.measureType == 7)//7呼吸 { if (entityPoint.measureValue == "辅助呼吸" || entityPoint.measureValue == "停辅助呼吸") { EntityEmrTemperatureChartEvent entityEvent = new EntityEmrTemperatureChartEvent(); entityEvent.recordDate = entityPoint.recordDate; entityEvent.timePeriod = entityPoint.timePeriod; entityEvent.eventName = entityPoint.measureValue; entityEvent.drawingPotision = 1; entityEvent.isBreakingPoint = 0; entityEvent.isDrawTime = 0; entityEvent.isOperation = 0; entityEvent.SpecialValue = entityPoint; columnsData.EventValues.Add(entityEvent); if (!string.IsNullOrEmpty(entityPoint.measureValue2)) { columnsData.BreathValues.Add(entityPoint); } } else { columnsData.BreathValues.Add(entityPoint); } } else if (entityPoint.measureType == 8)//8血压 { columnsData.BloodPressureValues.Add(entityPoint); } else if (entityPoint.measureType == 9)//9总入液量 { columnsData.TotalLiqValue = entityPoint; } else if (entityPoint.measureType == 10)//10排出量-大便 { columnsData.ExcrementValue = entityPoint; } else if (entityPoint.measureType == 11)//11排出量-尿量 { columnsData.UrineValue = entityPoint; } else if (entityPoint.measureType == 12)//12排出量-其他 { columnsData.Other1Values.Add(entityPoint); } else if (entityPoint.measureType == 13)//13体重 { columnsData.WeightValue = entityPoint; } else if (entityPoint.measureType == 14)//14皮试 { columnsData.PeauTestValues.Add(entityPoint); } else if (entityPoint.measureType == 15)//15其他 { columnsData.Other2Values.Add(entityPoint); } } foreach (EntityEmrTemperatureChartEvent entityEvent in listEvent) { entityEvent.timePeriod = ThreeItemTimePeriodGenerator.GetTimePeriod(entityEvent.recordDate, ref entityEvent.drawingPointDate); ThreeItemsColumnData data = null; if (!returnData.Any(i => i.RecDate.Date == entityEvent.drawingPointDate.Date)) { data = new ThreeItemsColumnData(entityEvent.drawingPointDate); returnData.Add(data); } else { data = returnData.Single(i => i.RecDate.Date == entityEvent.drawingPointDate.Date); } data.EventValues.Add(entityEvent); } return(returnData.OrderBy(i => i.RecDate).ToList()); }