/// <summary> /// 增加麻醉事件 /// </summary> /// <param name="vitalSignGraph"></param> /// <param name="eventMark"></param> private void AddAnesEventMark(EventMarkModel eventMark, DateTime eventTime, string text, string anesFlag) { Color color = Color.Black; string alias = ""; SymbolModel symbol = null; MedSymbolCurveDetail detailFlag = GetVitalSignEventMark(anesFlag); SymbolCurveDetailModel detail = null; if (detailFlag != null) { detail = ConvertToDetailModel(GetVitalSignEventMark(anesFlag)); } if (detail != null) { symbol = new SymbolModel(detail.SymbolType); if (symbol.SymbolType == SymbolType.Text) { symbol.Text = detail.SymbolEntry; } symbol.Pen = new Pen(detail.Color); color = detail.Color; alias = anesFlag; } eventMark.AddPoint(eventTime, 0, text, symbol, color, alias); }
private SymbolCurveDetailModel ConvertToDetailModel(MedSymbolCurveDetail curveDetailList) { SymbolCurveDetailModel detailModel = new SymbolCurveDetailModel(); detailModel.Text = curveDetailList.Text; detailModel.SymbolEntry = curveDetailList.SymbolEntry; detailModel.Color = curveDetailList.Color; string type = curveDetailList.SymbolType.ToString(); detailModel.SymbolType = (SymbolType)Enum.Parse(typeof(SymbolType), type); return(detailModel); }
private MedSymbolCurveDetail GetVitalSignEventMark(string curveText) { MedSymbolCurveDetail detail = null; foreach (MedSymbolCurveDetail curveDetail in _vitalSignGraph.EventMarkSettings) { string text1 = curveText.Trim(); string text2 = curveDetail.Text.Trim(); if (text1.ToLower().Equals(text2.ToLower()) || text1.ToLower().StartsWith(text2.ToLower() + "(")) { detail = curveDetail; } else if ((text2.EndsWith("%") && text1.StartsWith(text2.Substring(0, text2.Length - 2))) || (text2.StartsWith("%") && text1.EndsWith(text2.Substring(1))) || (text2.StartsWith("%") && text2.EndsWith("%") && text1.Contains(text2.Substring(1, text2.Length - 2)))) { detail = curveDetail; } } return(detail); }