画点模式修改
This commit is contained in:
parent
6374f814bf
commit
4f34e157d6
@ -1412,7 +1412,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
if (pdTemp.Value < 0) continue;
|
if (pdTemp.Value < 0) continue;
|
||||||
PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0];
|
PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0];
|
||||||
addPP.AddOrDelItem(pdTemp, 5);
|
//addPP.AddOrDelItem(pdTemp, 5);
|
||||||
|
addPP.AddPointItem(pdTemp);
|
||||||
date++;
|
date++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1756,23 +1757,23 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
||||||
if (!isCgtime(addPP.Name, RecordTime)) continue;
|
if (!isCgtime(addPP.Name, RecordTime)) continue;
|
||||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
||||||
addPP.AddItemByTime(pdTemp);
|
addPP.AddPointItem(pdTemp, false);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (var addPP in _record.PhysioAnesConfigList)
|
|
||||||
{
|
|
||||||
if (addPP.IsValid == false) continue;
|
|
||||||
foreach (DataRow dr in dtPhysioData.Rows)
|
|
||||||
{
|
|
||||||
if (dr["ParameterName"] != null && dr["ParameterName"].ToString() != "" && dr["ParameterName"].ToString().Equals(addPP.Id.ToString()))
|
|
||||||
{
|
|
||||||
DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
|
||||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
|
||||||
addPP.AddItemByTime(pdTemp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//foreach (var addPP in _record.PhysioAnesConfigList)
|
||||||
|
//{
|
||||||
|
// if (addPP.IsValid == false) continue;
|
||||||
|
// foreach (DataRow dr in dtPhysioData.Rows)
|
||||||
|
// {
|
||||||
|
// if (dr["ParameterName"] != null && dr["ParameterName"].ToString() != "" && dr["ParameterName"].ToString().Equals(addPP.Id.ToString()))
|
||||||
|
// {
|
||||||
|
// DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
||||||
|
// PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
||||||
|
// addPP.AddPointItem(pdTemp);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void UpdatePhysioDataResp()
|
private void UpdatePhysioDataResp()
|
||||||
@ -1792,8 +1793,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
|
|||||||
{
|
{
|
||||||
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
|
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
|
||||||
{
|
{
|
||||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString()) , dtPhysioData.Rows[i]["Value"].ToString());
|
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString()), dtPhysioData.Rows[i]["Value"].ToString());
|
||||||
addPP.AddPoition(pdTemp);
|
addPP.AddPointItem(pdTemp, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -911,7 +911,7 @@ namespace AIMS.PublicUI.UI
|
|||||||
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
|
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
|
||||||
{
|
{
|
||||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString()), dtPhysioData.Rows[i]["Value"].ToString());
|
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString()), dtPhysioData.Rows[i]["Value"].ToString());
|
||||||
addPP.AddPoition(pdTemp);
|
addPP.AddPointItem(pdTemp, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -209,7 +209,7 @@ namespace AIMS.OperationDoing.AnasRecordBill
|
|||||||
if (pdNew.config.ConfigType == "麻醉体征")
|
if (pdNew.config.ConfigType == "麻醉体征")
|
||||||
pdNew.config.EditModifyItem(pdNew, pdNew);
|
pdNew.config.EditModifyItem(pdNew, pdNew);
|
||||||
else
|
else
|
||||||
pdNew.config.ModItem(pdNew, pdNew);
|
pdNew.config.ModifyItem(pdNew, pdNew);
|
||||||
txtNum.Tag = pdNew;
|
txtNum.Tag = pdNew;
|
||||||
TempValue = txtNum.Text.Trim();
|
TempValue = txtNum.Text.Trim();
|
||||||
}
|
}
|
||||||
@ -224,7 +224,7 @@ namespace AIMS.OperationDoing.AnasRecordBill
|
|||||||
if (pdNew.config.ConfigType == "麻醉体征")
|
if (pdNew.config.ConfigType == "麻醉体征")
|
||||||
pdNew.config.EditAddItem(pdNew);
|
pdNew.config.EditAddItem(pdNew);
|
||||||
else
|
else
|
||||||
pdNew.config.AddFillItem(pdNew);
|
pdNew.config.AddPointItem(pdNew);
|
||||||
txtNum.Tag = pdNew;
|
txtNum.Tag = pdNew;
|
||||||
TempValue = txtNum.Text.Trim();
|
TempValue = txtNum.Text.Trim();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1030,7 +1030,8 @@ namespace AIMS.OperationDoing.AnasRecoverBill.UI
|
|||||||
{
|
{
|
||||||
if (pdTemp.Value < 1) continue;
|
if (pdTemp.Value < 1) continue;
|
||||||
PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0];
|
PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0];
|
||||||
addPP.AddOrDelItem(pdTemp, 5);
|
//addPP.AddOrDelItem(pdTemp, 5);
|
||||||
|
addPP.AddPointItem(pdTemp);
|
||||||
date++;
|
date++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1364,7 +1365,7 @@ namespace AIMS.OperationDoing.AnasRecoverBill.UI
|
|||||||
DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
|
||||||
if (!isCgtime(addPP.Name, RecordTime)) continue;
|
if (!isCgtime(addPP.Name, RecordTime)) continue;
|
||||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString());
|
||||||
addPP.AddItemByTime(pdTemp);
|
addPP.AddPointItem(pdTemp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -773,7 +773,7 @@ namespace AIMSExtension
|
|||||||
sw.WriteLine("当前时间:" + DateTime.Now.ToString());
|
sw.WriteLine("当前时间:" + DateTime.Now.ToString());
|
||||||
sw.WriteLine("异常信息:" + ex.Message);
|
sw.WriteLine("异常信息:" + ex.Message);
|
||||||
sw.WriteLine("异常对象:" + ex.Source);
|
sw.WriteLine("异常对象:" + ex.Source);
|
||||||
sw.WriteLine("调用堆栈:\n" + ex.StackTrace.Trim());
|
sw.WriteLine("调用堆栈:\n" + ex.StackTrace);
|
||||||
sw.WriteLine("触发方法:" + ex.TargetSite);
|
sw.WriteLine("触发方法:" + ex.TargetSite);
|
||||||
sw.WriteLine();
|
sw.WriteLine();
|
||||||
sw.Close();
|
sw.Close();
|
||||||
|
|||||||
@ -192,7 +192,7 @@ namespace DrawGraph
|
|||||||
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
|
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
|
||||||
{
|
{
|
||||||
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, myOpeRecord.Id.Value, DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString()), dtPhysioData.Rows[i]["Value"].ToString());
|
PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, myOpeRecord.Id.Value, DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString()), dtPhysioData.Rows[i]["Value"].ToString());
|
||||||
addPP.AddPoition(pdTemp);
|
addPP.AddPointItem(pdTemp, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ namespace DrawGraph
|
|||||||
if (pdNew.config.ConfigType == "麻醉体征")
|
if (pdNew.config.ConfigType == "麻醉体征")
|
||||||
pdNew.config.EditModifyItem(pdNew, pdNew);
|
pdNew.config.EditModifyItem(pdNew, pdNew);
|
||||||
else
|
else
|
||||||
pdNew.config.ModItem(pdNew, pdNew);
|
pdNew.config.ModifyItem(pdNew, pdNew);
|
||||||
txtNum.Tag = pdNew;
|
txtNum.Tag = pdNew;
|
||||||
TempValue = txtNum.Text.Trim();
|
TempValue = txtNum.Text.Trim();
|
||||||
}
|
}
|
||||||
@ -270,7 +270,7 @@ namespace DrawGraph
|
|||||||
if (pdNew.config.ConfigType == "麻醉体征")
|
if (pdNew.config.ConfigType == "麻醉体征")
|
||||||
pdNew.config.EditAddItem(pdNew);
|
pdNew.config.EditAddItem(pdNew);
|
||||||
else
|
else
|
||||||
pdNew.config.AddFillItem(pdNew);
|
pdNew.config.AddPointItem(pdNew);
|
||||||
txtNum.Tag = pdNew;
|
txtNum.Tag = pdNew;
|
||||||
TempValue = txtNum.Text.Trim();
|
TempValue = txtNum.Text.Trim();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,9 @@ namespace DrawGraph
|
|||||||
{
|
{
|
||||||
public class PhysioDataConfig : EventObj
|
public class PhysioDataConfig : EventObj
|
||||||
{
|
{
|
||||||
|
#region 属性
|
||||||
private int id;
|
private int id;
|
||||||
|
private int patientId;
|
||||||
private string name;
|
private string name;
|
||||||
private string enname;
|
private string enname;
|
||||||
private string color;
|
private string color;
|
||||||
@ -46,6 +48,14 @@ namespace DrawGraph
|
|||||||
set { id = value; }
|
set { id = value; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 手术ID
|
||||||
|
/// </summary>
|
||||||
|
public int PatientId
|
||||||
|
{
|
||||||
|
get { return patientId; }
|
||||||
|
set { patientId = value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name
|
public string Name
|
||||||
@ -198,23 +208,19 @@ namespace DrawGraph
|
|||||||
set { physioOrder = value; }
|
set { physioOrder = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 私有变量
|
#region 私有变量
|
||||||
private int yAisx = 0;
|
private int yAisx = 0;
|
||||||
private int patientId;
|
|
||||||
private Color conveColor;
|
private Color conveColor;
|
||||||
public double X_MINOR_GRID_STEP = 5.0; //步长
|
public double X_MINOR_GRID_STEP = 5.0; //步长
|
||||||
private PointPairList aPhysioDatas;
|
private PointPairList aPhysioDatas;
|
||||||
PhysioData pdTrue = null;
|
PhysioData pdTrue = null;
|
||||||
public double showValue { get; set; }
|
public double YLocation { get; set; }
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
private LineItem curve1;
|
private LineItem curve1;
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
private bool isClick = false;
|
private bool isClick = false;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 属性
|
|
||||||
|
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
public LineItem curve
|
public LineItem curve
|
||||||
{
|
{
|
||||||
@ -237,7 +243,7 @@ namespace DrawGraph
|
|||||||
set { aPhysioDatas = value; }
|
set { aPhysioDatas = value; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 此曲线的值以Y的第几个轴匹配
|
/// 此曲线的Y轴
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int YAisx
|
public int YAisx
|
||||||
{
|
{
|
||||||
@ -245,14 +251,6 @@ namespace DrawGraph
|
|||||||
set { yAisx = value; }
|
set { yAisx = value; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 手术ID
|
|
||||||
/// </summary>
|
|
||||||
public int PatientId
|
|
||||||
{
|
|
||||||
get { return patientId; }
|
|
||||||
set { patientId = value; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 线的着色
|
/// 线的着色
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Color ConveColor
|
public Color ConveColor
|
||||||
@ -260,9 +258,11 @@ namespace DrawGraph
|
|||||||
get { return conveColor; }
|
get { return conveColor; }
|
||||||
set { conveColor = value; }
|
set { conveColor = value; }
|
||||||
}
|
}
|
||||||
#endregion
|
/// <summary>
|
||||||
|
/// Panel动态填写对象
|
||||||
|
/// </summary>
|
||||||
|
public AbleEditPackObj phListPack = null;
|
||||||
|
|
||||||
#region 事件
|
|
||||||
public delegate void ClickEventHandler(object sender, EventArgs e);
|
public delegate void ClickEventHandler(object sender, EventArgs e);
|
||||||
public event ClickEventHandler Click;
|
public event ClickEventHandler Click;
|
||||||
public void onClick(EventArgs e)
|
public void onClick(EventArgs e)
|
||||||
@ -272,100 +272,126 @@ namespace DrawGraph
|
|||||||
Click(this, e);
|
Click(this, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
public PhysioDataConfig()
|
public PhysioDataConfig()
|
||||||
{
|
{
|
||||||
APhysioParams = new PointPairList();
|
APhysioParams = new PointPairList();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 初始化
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 包含增加和删除,当插入位置已有生理数据时,执行删除
|
/// 画生理曲线,即初始化
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pd"></param>
|
public void initCurve(bool isValidLine = true)
|
||||||
public void AddOrDelItem(PhysioData pd, int collectInterval)
|
|
||||||
{
|
{
|
||||||
|
if (zgcAnas == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PointPairList ppl = new PointPairList();
|
||||||
|
|
||||||
|
curve = ZUtil.AddCurve(Name, ppl, conveColor, imgPath, true, zgcAnas, TextPrefix.PI + Name + Id.ToString());
|
||||||
|
|
||||||
|
curve.YAxisIndex = this.YAisx;
|
||||||
|
curve.Label.IsVisible = this.isValid;
|
||||||
|
curve.Symbol.IsVisible = this.isValid;
|
||||||
|
curve.Line.IsVisible = isValidLine;
|
||||||
|
|
||||||
|
curve.Label.FontSpec = new FontSpec("微软雅黑", 5.9f, System.Drawing.Color.Black, false, false, false);
|
||||||
|
curve.Label.FontSpec.Border.IsVisible = false;
|
||||||
|
curve.Label.FontSpec.Fill.IsVisible = false;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 重新设置曲线属性
|
||||||
|
/// </summary>
|
||||||
|
public void reSetCurve()
|
||||||
|
{
|
||||||
|
this.curve.Color = this.ConveColor;
|
||||||
|
this.curve.Symbol.Fill = new Fill(new ZUtil().getImage(this.imgPath), System.Drawing.Drawing2D.WrapMode.Clamp);
|
||||||
|
this.curve.IsVisible = this.isValid;
|
||||||
|
this.curve.YAxisIndex = this.YAisx;
|
||||||
|
curve.Label.IsVisible = this.isValid;
|
||||||
|
curve.Line.IsVisible = this.isValid;
|
||||||
|
curve.Symbol.IsVisible = this.isValid;
|
||||||
|
|
||||||
|
if (!ShowText)
|
||||||
|
{
|
||||||
|
foreach (PointPair pp in APhysioParams)
|
||||||
|
{
|
||||||
|
PhysioData pd = PointPairToPhysioData(pp);
|
||||||
|
if (pd != null)
|
||||||
|
{
|
||||||
|
delAddObj(pd);
|
||||||
|
SetPositionText(pd, "-1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (PointPair pp in APhysioParams)
|
||||||
|
{
|
||||||
|
PhysioData pd = PointPairToPhysioData(pp);
|
||||||
|
if (pd != null) DrawTextPhysioData(pd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 重新设置曲线属性
|
||||||
|
/// </summary>
|
||||||
|
public void reSetCurveSpo2()
|
||||||
|
{
|
||||||
|
this.curve.Color = this.ConveColor;
|
||||||
|
this.curve.Symbol.Fill = new Fill(new ZUtil().getImage(this.imgPath), System.Drawing.Drawing2D.WrapMode.Clamp);
|
||||||
|
this.curve.IsVisible = this.isValid;
|
||||||
|
this.curve.YAxisIndex = this.YAisx;
|
||||||
|
curve.Label.IsVisible = this.isValid;
|
||||||
|
curve.Line.IsVisible = this.isValid;
|
||||||
|
curve.Symbol.IsVisible = this.isValid;
|
||||||
|
}
|
||||||
|
public static IList<PhysioDataConfig> GetLifeList()
|
||||||
|
{
|
||||||
|
string sql = "Select * FROM PhysioDataConfig where ConfigType='生命体征' order by PhysioOrder asc";
|
||||||
|
return GetListBySql(sql);
|
||||||
|
}
|
||||||
|
public static IList<PhysioDataConfig> GetAnesList()
|
||||||
|
{
|
||||||
|
string sql = "Select * FROM PhysioDataConfig where ConfigType='麻醉体征' order by PhysioOrder asc";
|
||||||
|
return GetListBySql(sql);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 数据操作
|
||||||
|
public void AddPointItem(PhysioData pd, bool isInsertDB = true)
|
||||||
|
{
|
||||||
|
//如果是负数则不执行操作
|
||||||
|
if (pd.Value <= 0) return;
|
||||||
bool isHave = false;
|
bool isHave = false;
|
||||||
PhysioData curPd = null;
|
|
||||||
foreach (PointPair pptemp in APhysioParams)
|
foreach (PointPair pptemp in APhysioParams)
|
||||||
{
|
{
|
||||||
PhysioData temp1 = PointPairToPhysioData(pptemp);
|
PhysioData temp1 = PointPairToPhysioData(pptemp);
|
||||||
if (pd.isEquert(temp1) && temp1.Value != Double.MaxValue)
|
if (pd.isEquert(temp1) && temp1.Value != Double.MaxValue)
|
||||||
{
|
{
|
||||||
isHave = true;
|
isHave = true;
|
||||||
curPd = temp1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isHave)
|
if (isHave) return;
|
||||||
{
|
|
||||||
//DelItem(curPd);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddMultipleItem(pd, pd.RecordTime, collectInterval);
|
|
||||||
//AddItem(pd, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddFillItem(PhysioData pd)
|
|
||||||
{
|
|
||||||
bool isHave = false;
|
|
||||||
foreach (PointPair pptemp in APhysioParams)
|
|
||||||
{
|
|
||||||
PhysioData temp1 = PointPairToPhysioData(pptemp);
|
|
||||||
double yDiff = pd.Value - temp1.Value;
|
|
||||||
TimeSpan ts1 = new TimeSpan(pd.RecordTime.Ticks);
|
|
||||||
TimeSpan ts2 = new TimeSpan(temp1.RecordTime.Ticks);
|
|
||||||
double minDiff = (ts1.Subtract(ts2).TotalMinutes);
|
|
||||||
if (-2 < minDiff && minDiff < 2 && temp1.Value != Double.MaxValue)
|
|
||||||
{
|
|
||||||
isHave = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isHave)
|
|
||||||
{
|
|
||||||
//如果是负数则不执行操作
|
|
||||||
if (pd.Value < 0) return;
|
|
||||||
//pd = reCnterValue(pd);
|
|
||||||
//增加点时如果当前有点且是隐藏的则直接改值
|
|
||||||
Sort();
|
|
||||||
foreach (PointPair pptemp in APhysioParams)
|
|
||||||
{
|
|
||||||
PhysioData pdTemp = PointPairToPhysioData(pptemp);
|
|
||||||
if (pdTemp.isEquert(pd) && pdTemp.Value == Double.MaxValue)
|
|
||||||
{
|
|
||||||
pptemp.Y = pd.Value;
|
|
||||||
isHave = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (pdTemp.isEquert(pd))
|
|
||||||
{
|
|
||||||
isHave = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isHave)
|
|
||||||
{
|
|
||||||
this.APhysioParams.Add(pd);
|
this.APhysioParams.Add(pd);
|
||||||
}
|
|
||||||
Sort();
|
Sort();
|
||||||
curve.Points = APhysioParams;
|
curve.Points = APhysioParams;
|
||||||
|
if (isInsertDB == true)
|
||||||
PhysioDataService.AddPhysioData(pd);
|
PhysioDataService.AddPhysioData(pd);
|
||||||
if (ShowText == true)
|
if (ShowText == true)
|
||||||
{
|
{
|
||||||
DrawTextPhysioData(pd);
|
DrawTextPhysioData(pd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 增加一点生理数据,往数据库中写入数据
|
/// 增加一点生理数据,往数据库中写入数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pd"></param>
|
/// <param name="pd"></param>
|
||||||
public void AddItem(PhysioData pd, bool isShouDong = true, bool isFillMissPoint = true)
|
public void AddItem(PhysioData pd, bool isShouDong = true, bool isFillMissPoint = true)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
//如果是负数则不执行操作
|
//如果是负数则不执行操作
|
||||||
if (pd.Value < 0) return;
|
if (pd.Value < 0) return;
|
||||||
@ -410,6 +436,7 @@ namespace DrawGraph
|
|||||||
this.APhysioParams.Add(pd);
|
this.APhysioParams.Add(pd);
|
||||||
}
|
}
|
||||||
Sort();
|
Sort();
|
||||||
|
pd.ValueString = pd.Value.ToString();
|
||||||
curve.Points = APhysioParams;
|
curve.Points = APhysioParams;
|
||||||
PhysioDataService.AddPhysioData(pd);
|
PhysioDataService.AddPhysioData(pd);
|
||||||
if (ShowText == true)
|
if (ShowText == true)
|
||||||
@ -481,94 +508,12 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
throw new Exception("插入生理数据结点时出错");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 动态填写对象
|
|
||||||
/// </summary>
|
|
||||||
public AbleEditPackObj phListPack = null;
|
|
||||||
|
|
||||||
public void SetPositionText(PhysioData pdTemp, string viewValue)
|
|
||||||
{
|
|
||||||
if (phListPack != null)
|
|
||||||
{
|
|
||||||
Panel pan3 = phListPack.CControl as Panel;
|
|
||||||
if (pan3 != null)
|
|
||||||
{
|
|
||||||
Control[] cs = pan3.Controls.Find(pdTemp.PhysioDataConfigId + "" + pdTemp.RecordTime.ToString("HHmm"), true);
|
|
||||||
if (cs != null && cs.Length > 0)
|
|
||||||
{
|
|
||||||
TextBox c = cs[0] as TextBox;
|
|
||||||
if (c != null)
|
|
||||||
{
|
|
||||||
if (viewValue == "-1")
|
|
||||||
{
|
|
||||||
pdTemp.Value = -1;
|
|
||||||
pdTemp.ValueString = "";
|
|
||||||
c.Tag = pdTemp;
|
|
||||||
c.Text = "";
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c.Tag = pdTemp;
|
|
||||||
c.Text = viewValue.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 增加一点生理数据,往数据库中写入数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="pd"></param>
|
|
||||||
public void AddItemByTime(PhysioData pd)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//如果是负数则不执行操作
|
|
||||||
if (pd.Value <= 0) return;
|
|
||||||
bool isHave = false;
|
|
||||||
PhysioData curPd = null;
|
|
||||||
foreach (PointPair pptemp in APhysioParams)
|
|
||||||
{
|
|
||||||
PhysioData temp1 = PointPairToPhysioData(pptemp);
|
|
||||||
if (pd.isEquert(temp1) && temp1.Value != Double.MaxValue)
|
|
||||||
{
|
|
||||||
isHave = true;
|
|
||||||
curPd = temp1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isHave) return;
|
|
||||||
this.APhysioParams.Add(pd);
|
|
||||||
Sort();
|
|
||||||
curve.Points = APhysioParams;
|
|
||||||
PhysioDataService.AddPhysioData(pd);
|
|
||||||
if (ShowText == true)
|
|
||||||
{
|
|
||||||
DrawTextPhysioData(pd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
//throw new Exception("插入生理数据结点时出错");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 增加一点生理数据,往数据库中写入数据
|
/// 增加一点生理数据,往数据库中写入数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pd"></param>
|
/// <param name="pd"></param>
|
||||||
public void AddMultipleItem(PhysioData pd, DateTime endtime, int collectInterval)
|
public void AddMultipleItem(PhysioData pd, DateTime endtime, int collectInterval)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
//如果是负数则不执行操作
|
//如果是负数则不执行操作
|
||||||
pd = reCnterValue(pd);
|
pd = reCnterValue(pd);
|
||||||
@ -585,35 +530,102 @@ namespace DrawGraph
|
|||||||
AddItem(pd);
|
AddItem(pd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仅修改值不修改数据库
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oldPd"></param>
|
||||||
|
/// <param name="newPd"></param>
|
||||||
|
/// <param name="index"></param>
|
||||||
|
public PhysioData MoveItem(PhysioData newPd )
|
||||||
{
|
{
|
||||||
throw;
|
//如果是负数则不执行操作
|
||||||
|
if (newPd.Value < 0) return null;
|
||||||
|
newPd = reCnterValue(newPd);
|
||||||
|
|
||||||
|
int index = indexOf(newPd);
|
||||||
|
if (index == -1) return null;
|
||||||
|
this.APhysioParams[index].Y = newPd.Y;
|
||||||
|
|
||||||
|
Sort();
|
||||||
|
curve.Points = APhysioParams;
|
||||||
|
|
||||||
|
if (ShowText == true)
|
||||||
|
{
|
||||||
|
MoveText(newPd);
|
||||||
|
}
|
||||||
|
return newPd;
|
||||||
|
}
|
||||||
|
private void MoveText(PhysioData newPd)
|
||||||
|
{
|
||||||
|
TextObj text = (TextObj)zgcAnas.MasterPane.GraphObjList[this.Enname + newPd.RecordTime.ToString()];
|
||||||
|
text.Location.Y = YLocation;
|
||||||
|
text.Text = ((int)newPd.Value).ToString();
|
||||||
|
}
|
||||||
|
public void ModifyItem(PhysioData oldPd, PhysioData newPd)
|
||||||
|
{
|
||||||
|
//如果是负数则不执行操作
|
||||||
|
if (newPd.Value < 0 && oldPd.PhysioDataConfigId != newPd.PhysioDataConfigId)
|
||||||
|
return;
|
||||||
|
int index = indexOf(newPd);
|
||||||
|
if (index == -1) return;
|
||||||
|
//newPd = reCnterValue(newPd, false);
|
||||||
|
newPd.ValueString = newPd.Value.ToString();
|
||||||
|
this.APhysioParams[index].Y = newPd.Y;
|
||||||
|
Sort();
|
||||||
|
curve.Points = APhysioParams;
|
||||||
|
PhysioDataService.UpdatePhysioData(oldPd, newPd, PublicMethod.OperatorName);
|
||||||
|
if (ShowText == true)
|
||||||
|
{
|
||||||
|
delAddObj(oldPd);
|
||||||
|
DrawTextPhysioData(newPd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 返回当前曲线上最大且不为空的点
|
/// 删除一点生理数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="pd"></param>
|
||||||
private PhysioData ReMaxAndGoodPhysioData()
|
public void DelItem(PhysioData pd)
|
||||||
{
|
{
|
||||||
PhysioData rePd = null;
|
Sort();
|
||||||
|
//如果是两头的点就删除,如果是中间的点就设置为无效
|
||||||
|
bool isModmaxValue = false;
|
||||||
for (int i = APhysioParams.Count - 1; i > -1; i--)
|
for (int i = APhysioParams.Count - 1; i > -1; i--)
|
||||||
{
|
{
|
||||||
rePd = PointPairToPhysioData(APhysioParams[i]);
|
PhysioData maxPhysioData = PointPairToPhysioData(APhysioParams[i]);
|
||||||
//且被大于的值的点不空隐藏
|
if (maxPhysioData.isEquert(pd) && i != 0 && i != APhysioParams.Count - 1)
|
||||||
if (rePd.Value != Double.MaxValue)
|
|
||||||
{
|
{
|
||||||
return rePd;
|
APhysioParams[i].Y = Double.MaxValue;
|
||||||
|
isModmaxValue = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rePd;
|
if (!isModmaxValue)
|
||||||
}
|
this.APhysioParams.Remove(pd);
|
||||||
|
curve.Points = APhysioParams;
|
||||||
|
|
||||||
public void delAddObj(PhysioData newPd)
|
Sort();
|
||||||
|
|
||||||
|
if (ShowText == true || pd.Value == HighLimit)
|
||||||
{
|
{
|
||||||
delAddObj(this.Enname + newPd.RecordTime.ToString());
|
delAddObj(pd);
|
||||||
|
SetPositionText(pd, "-1");
|
||||||
|
}
|
||||||
|
PhysioDataService.DelPhysioByValueData(pd);
|
||||||
|
for (int i = APhysioParams.Count - 1; i > -1; i--)
|
||||||
|
{
|
||||||
|
PhysioData maxPhysioData = PointPairToPhysioData(APhysioParams[i]);
|
||||||
|
if (maxPhysioData.isEquert(pd) && maxPhysioData.Y != Double.MaxValue)
|
||||||
|
{
|
||||||
|
this.APhysioParams.Remove(APhysioParams[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void DelItems(DateTime RecordTime, DateTime EndTime)
|
||||||
|
{
|
||||||
|
PhysioDataService.DelPhysioasDataParameterID(RecordTime, EndTime, this.Id, this.PatientId);
|
||||||
}
|
}
|
||||||
public void DrawTextPhysioData(PhysioData pd)
|
public void DrawTextPhysioData(PhysioData pd)
|
||||||
{
|
{
|
||||||
@ -633,62 +645,21 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
if (viewValue != "")
|
if (viewValue != "")
|
||||||
{
|
{
|
||||||
ZUtil.DrawText(viewValue, getXPositinByXDate(pd.RecordTime), showValue, zgcAnas, this.Enname + pd.RecordTime.ToString(), 5f, true);
|
ZUtil.DrawText(viewValue, getXPositinByXDate(pd.RecordTime), YLocation, zgcAnas, this.Enname + pd.RecordTime.ToString(), 5f, true);
|
||||||
SetPositionText(pd, viewValue);
|
SetPositionText(pd, viewValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 通用方法
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仅修改值不修改数据库
|
/// 为生理数据集合排序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="oldPd"></param>
|
public void Sort()
|
||||||
/// <param name="newPd"></param>
|
|
||||||
/// <param name="index"></param>
|
|
||||||
public PhysioData onlyModItem(PhysioData newPd, PhysioData oldPd = null)
|
|
||||||
{
|
{
|
||||||
//如果是负数则不执行操作
|
aPhysioDatas.Sort();
|
||||||
if (newPd.Value < 0)
|
|
||||||
{
|
|
||||||
//MessageBox.Show("输入的值不能小于0");
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
newPd = reCnterValue(newPd);
|
|
||||||
|
|
||||||
this.APhysioParams[indexOf(newPd)].Y = newPd.Y;
|
|
||||||
|
|
||||||
Sort();
|
|
||||||
curve.Points = APhysioParams;
|
|
||||||
|
|
||||||
if (ShowText == true)
|
|
||||||
{
|
|
||||||
onlyMoveText(newPd, oldPd);
|
|
||||||
}
|
|
||||||
return newPd;
|
|
||||||
}
|
|
||||||
private void onlyMoveText(PhysioData newPd, PhysioData oldPd = null)
|
|
||||||
{
|
|
||||||
TextObj text = (TextObj)zgcAnas.MasterPane.GraphObjList[this.Enname + ((oldPd == null) ? newPd.RecordTime.ToString() : oldPd.RecordTime.ToString())];
|
|
||||||
text.Location.Y = showValue;
|
|
||||||
text.Text = ((int)newPd.Value).ToString();
|
|
||||||
}
|
|
||||||
public void ModItem(PhysioData oldPd, PhysioData newPd)
|
|
||||||
{
|
|
||||||
//如果是负数则不执行操作
|
|
||||||
if (newPd.Value < 0 && oldPd.PhysioDataConfigId != newPd.PhysioDataConfigId)
|
|
||||||
return;
|
|
||||||
newPd.RecordTime = oldPd.RecordTime;
|
|
||||||
newPd = reCnterValue(newPd, false);
|
|
||||||
this.APhysioParams[indexOf(newPd)].Y = newPd.Y;
|
|
||||||
Sort();
|
|
||||||
curve.Points = APhysioParams;
|
|
||||||
PhysioDataService.UpdatePhysioData(oldPd, newPd, PublicMethod.OperatorName);
|
|
||||||
if (ShowText == true)
|
|
||||||
{
|
|
||||||
delAddObj(oldPd);
|
|
||||||
DrawTextPhysioData(newPd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int indexOf(PhysioData pd)
|
public int indexOf(PhysioData pd)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < APhysioParams.Count; i++)
|
for (int i = 0; i < APhysioParams.Count; i++)
|
||||||
@ -701,39 +672,60 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
public PhysioData PointPairToPhysioData(PointPair pp)
|
||||||
|
{
|
||||||
|
if (pp == null) return null;
|
||||||
|
PhysioData pd = new PhysioData();
|
||||||
|
pd.ValueString = pp.Y.ToString();
|
||||||
|
pd.Value = pp.Y;
|
||||||
|
pd.RecordTime = new XDate(pp.X);
|
||||||
|
pd.PatientId = PatientId;
|
||||||
|
pd.PhysioDataConfigId = Id;
|
||||||
|
pd.config = this;
|
||||||
|
return pd;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仅画点,不操作数据库
|
/// 删除麻醉单上的曲线本身,不包含数据删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pd"></param>
|
/// <param name="DrugsRecord"></param>
|
||||||
public void AddPoition(PhysioData pd)
|
public override void clearAddObj(ZedGraphControl zgc)
|
||||||
{
|
{
|
||||||
//如果是负数则不执行操作
|
if (zgcAnas == null || zgcAnas != zgc) zgcAnas = zgc;
|
||||||
if (pd.Value < 0) return;
|
|
||||||
//pd.Tag = pd.Id;
|
|
||||||
if (APhysioParams.Count > 0)
|
|
||||||
{
|
|
||||||
PhysioData pdTemp = pd.Clone();
|
|
||||||
|
|
||||||
//当前点的前一个点加步长时间的结点
|
|
||||||
PhysioData pdQD = reMPhysioData(pdTemp);
|
|
||||||
//插入的点大于之前点5分钟以上
|
|
||||||
if (DateTime.Compare(pd.RecordTime, pdQD.RecordTime.AddMinutes(1)) > 0)
|
|
||||||
{
|
|
||||||
pdTemp.Value = Double.MaxValue;
|
|
||||||
this.APhysioParams.Add(pdTemp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pd = reCnterValue(pd, false);
|
|
||||||
|
|
||||||
this.APhysioParams.Add(pd);
|
|
||||||
|
|
||||||
Sort();
|
|
||||||
curve.Points = APhysioParams;
|
|
||||||
if (ShowText == true)
|
if (ShowText == true)
|
||||||
{
|
{
|
||||||
DrawTextPhysioData(pd);
|
foreach (PointPair pp in APhysioParams)
|
||||||
|
{
|
||||||
|
PhysioData pd = PointPairToPhysioData(pp);
|
||||||
|
if (pd != null)
|
||||||
|
{
|
||||||
|
delAddObj(pd);
|
||||||
|
SetPositionText(pd, "-1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (APhysioParams == null || curve == null) return;
|
||||||
|
APhysioParams.Clear();
|
||||||
|
curve.Points = APhysioParams;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 清除各种对象数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="frm"></param>
|
||||||
|
public void ClearTagstr(ZedGraphControl zgc)
|
||||||
|
{
|
||||||
|
if (zgcAnas == null || zgcAnas != zgc) zgcAnas = zgc;
|
||||||
|
delAddObj("PP" + Enname);
|
||||||
|
delAddObj("PP" + Enname + "unit");
|
||||||
|
delAddObj("PP" + Enname + Id);
|
||||||
|
delAddObj("PPP" + Enname);
|
||||||
|
delAddObj("PPP" + Enname + "unit");
|
||||||
|
}
|
||||||
|
public void delAddObj(PhysioData newPd)
|
||||||
|
{
|
||||||
|
delAddObj(this.Enname + newPd.RecordTime.ToString());
|
||||||
|
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 控制画点的范围
|
/// 控制画点的范围
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -783,206 +775,37 @@ namespace DrawGraph
|
|||||||
}
|
}
|
||||||
return pd;
|
return pd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 删除一点生理数据
|
/// 返回当前曲线上最大且不为空的点
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pd"></param>
|
/// <returns></returns>
|
||||||
public void DelItem(PhysioData pd)
|
private PhysioData ReMaxAndGoodPhysioData()
|
||||||
{
|
{
|
||||||
try
|
PhysioData rePd = null;
|
||||||
{
|
|
||||||
Sort();
|
|
||||||
//如果是两头的点就删除,如果是中间的点就设置为无效
|
|
||||||
bool isModmaxValue = false;
|
|
||||||
for (int i = APhysioParams.Count - 1; i > -1; i--)
|
for (int i = APhysioParams.Count - 1; i > -1; i--)
|
||||||
{
|
{
|
||||||
PhysioData maxPhysioData = PointPairToPhysioData(APhysioParams[i]);
|
rePd = PointPairToPhysioData(APhysioParams[i]);
|
||||||
if (maxPhysioData.isEquert(pd) && i != 0 && i != APhysioParams.Count - 1)
|
//且被大于的值的点不空隐藏
|
||||||
|
if (rePd.Value != Double.MaxValue)
|
||||||
{
|
{
|
||||||
APhysioParams[i].Y = Double.MaxValue;
|
return rePd;
|
||||||
isModmaxValue = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isModmaxValue)
|
return rePd;
|
||||||
this.APhysioParams.Remove(pd);
|
}
|
||||||
curve.Points = APhysioParams;
|
#endregion
|
||||||
|
|
||||||
Sort();
|
#region 动态体征方法
|
||||||
|
public static int UpdatePhysioDataConfig(PhysioDataConfig physioDataConfig)
|
||||||
|
{
|
||||||
|
string sql = "Update PhysioDataConfig set HighLimit=@HighLimit, LowLimit=@LowLimit,ShowImg=@ShowImg, ShowText=@ShowText, WarningHighLimit=@WarningHighLimit, WarningLowLimit=@WarningLowLimit, IsSplit=@IsSplit, IsDefalultShow=@IsDefalultShow, Unit=@Unit, PhysioOrder=@PhysioOrder, YAisx=@YAisx where Id=@Id";
|
||||||
|
|
||||||
if (ShowText == true || pd.Value == HighLimit)
|
SqlParameter[] para = new SqlParameter[]
|
||||||
{
|
{
|
||||||
delAddObj(pd);
|
new SqlParameter("@Id",physioDataConfig.Id), new SqlParameter("@HighLimit",physioDataConfig.HighLimit), new SqlParameter("@LowLimit",physioDataConfig.LowLimit), new SqlParameter("@ShowImg",physioDataConfig.ShowImg), new SqlParameter("@ShowText",physioDataConfig.ShowText), new SqlParameter("@WarningHighLimit",physioDataConfig.WarningHighLimit), new SqlParameter("@WarningLowLimit",physioDataConfig.WarningLowLimit), new SqlParameter("@IsSplit",physioDataConfig.IsSplit), new SqlParameter("@IsDefalultShow",physioDataConfig.IsDefalultShow), new SqlParameter("@Unit",physioDataConfig.Unit), new SqlParameter("@PhysioOrder",physioDataConfig.PhysioOrder), new SqlParameter("@YAisx",physioDataConfig.YAisx)
|
||||||
SetPositionText(pd, "-1");
|
};
|
||||||
|
return DBHelper.ExecNonQuery(sql, para);
|
||||||
}
|
}
|
||||||
PhysioDataService.DelPhysioByValueData(pd);
|
|
||||||
for (int i = APhysioParams.Count - 1; i > -1; i--)
|
|
||||||
{
|
|
||||||
PhysioData maxPhysioData = PointPairToPhysioData(APhysioParams[i]);
|
|
||||||
if (maxPhysioData.isEquert(pd) && maxPhysioData.Y != Double.MaxValue)
|
|
||||||
{
|
|
||||||
this.APhysioParams.Remove(APhysioParams[i]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
throw new Exception("删除生理数据结点时出错");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void DelItems(DateTime RecordTime, DateTime EndTime)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
PhysioDataService.DelPhysioasDataParameterID(RecordTime, EndTime, this.Id, this.PatientId);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
throw new Exception("删除生理数据结点时出错");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 为生理数据集合排序
|
|
||||||
/// </summary>
|
|
||||||
public void Sort()
|
|
||||||
{
|
|
||||||
aPhysioDatas.Sort();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 画生理曲线,即初始化
|
|
||||||
/// </summary>
|
|
||||||
public void draw(bool isValidLine = true)
|
|
||||||
{
|
|
||||||
if (zgcAnas == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
PointPairList ppl = new PointPairList();
|
|
||||||
|
|
||||||
curve = ZUtil.AddCurve(Name, ppl, conveColor, imgPath, true, zgcAnas, TextPrefix.PI + Name + Id.ToString());
|
|
||||||
|
|
||||||
curve.YAxisIndex = this.YAisx;
|
|
||||||
curve.Label.IsVisible = this.isValid;
|
|
||||||
curve.Symbol.IsVisible = this.isValid;
|
|
||||||
curve.Line.IsVisible = isValidLine;
|
|
||||||
|
|
||||||
curve.Label.FontSpec = new FontSpec("微软雅黑", 5.9f, System.Drawing.Color.Black, false, false, false);
|
|
||||||
curve.Label.FontSpec.Border.IsVisible = false;
|
|
||||||
curve.Label.FontSpec.Fill.IsVisible = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PhysioData PointPairToPhysioData(PointPair pp)
|
|
||||||
{
|
|
||||||
if (pp == null) return null;
|
|
||||||
PhysioData pd = new PhysioData();
|
|
||||||
pd.ValueString = pp.Y.ToString();
|
|
||||||
pd.Value = pp.Y;
|
|
||||||
pd.RecordTime = new XDate(pp.X);
|
|
||||||
pd.PatientId = PatientId;
|
|
||||||
pd.PhysioDataConfigId = Id;
|
|
||||||
pd.config = this;
|
|
||||||
return pd;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除麻醉单上的曲线本身,不包含数据删除
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="DrugsRecord"></param>
|
|
||||||
public override void clearAddObj(ZedGraphControl zgc)
|
|
||||||
{
|
|
||||||
if (zgcAnas == null || zgcAnas != zgc) zgcAnas = zgc;
|
|
||||||
|
|
||||||
if (ShowText == true)
|
|
||||||
{
|
|
||||||
foreach (PointPair pp in APhysioParams)
|
|
||||||
{
|
|
||||||
PhysioData pd = PointPairToPhysioData(pp);
|
|
||||||
if (pd != null)
|
|
||||||
delAddObj(pd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (APhysioParams == null || curve == null) return;
|
|
||||||
APhysioParams.Clear();
|
|
||||||
curve.Points = APhysioParams;
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 重新设置曲线属性
|
|
||||||
/// </summary>
|
|
||||||
public void reSetCurve()
|
|
||||||
{
|
|
||||||
this.curve.Color = this.ConveColor;
|
|
||||||
this.curve.Symbol.Fill = new Fill(new ZUtil().getImage(this.imgPath), System.Drawing.Drawing2D.WrapMode.Clamp);
|
|
||||||
this.curve.IsVisible = this.isValid;
|
|
||||||
this.curve.YAxisIndex = this.YAisx;
|
|
||||||
curve.Label.IsVisible = this.isValid;
|
|
||||||
curve.Line.IsVisible = this.isValid;
|
|
||||||
curve.Symbol.IsVisible = this.isValid;
|
|
||||||
|
|
||||||
if (!ShowText)
|
|
||||||
{
|
|
||||||
foreach (PointPair pp in APhysioParams)
|
|
||||||
{
|
|
||||||
PhysioData pd = PointPairToPhysioData(pp);
|
|
||||||
if (pd != null)
|
|
||||||
delAddObj(pd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (PointPair pp in APhysioParams)
|
|
||||||
{
|
|
||||||
PhysioData pd = PointPairToPhysioData(pp);
|
|
||||||
if (pd != null) DrawTextPhysioData(pd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 重新设置曲线属性
|
|
||||||
/// </summary>
|
|
||||||
public void reSetCurveSpo2()
|
|
||||||
{
|
|
||||||
this.curve.Color = this.ConveColor;
|
|
||||||
this.curve.Symbol.Fill = new Fill(new ZUtil().getImage(this.imgPath), System.Drawing.Drawing2D.WrapMode.Clamp);
|
|
||||||
this.curve.IsVisible = this.isValid;
|
|
||||||
this.curve.YAxisIndex = this.YAisx;
|
|
||||||
curve.Label.IsVisible = this.isValid;
|
|
||||||
curve.Line.IsVisible = this.isValid;
|
|
||||||
curve.Symbol.IsVisible = this.isValid;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 清除各种对象数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="frm"></param>
|
|
||||||
public void ClearTagstr(ZedGraphControl zgc)
|
|
||||||
{
|
|
||||||
if (zgcAnas == null || zgcAnas != zgc) zgcAnas = zgc;
|
|
||||||
delAddObj("PP" + Enname);
|
|
||||||
delAddObj("PP" + Enname + "unit");
|
|
||||||
delAddObj("PP" + Enname + Id);
|
|
||||||
delAddObj("PPP" + Enname);
|
|
||||||
delAddObj("PPP" + Enname + "unit");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static IList<PhysioDataConfig> GetLifeList()
|
|
||||||
{
|
|
||||||
string sql = "Select * FROM PhysioDataConfig where ConfigType='生命体征' order by PhysioOrder asc";
|
|
||||||
return GetListBySql(sql);
|
|
||||||
}
|
|
||||||
public static IList<PhysioDataConfig> GetAnesList()
|
|
||||||
{
|
|
||||||
string sql = "Select * FROM PhysioDataConfig where ConfigType='麻醉体征' order by PhysioOrder asc";
|
|
||||||
return GetListBySql(sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private static IList<PhysioDataConfig> GetListBySql(string sql, params SqlParameter[] para)
|
private static IList<PhysioDataConfig> GetListBySql(string sql, params SqlParameter[] para)
|
||||||
{
|
{
|
||||||
IList<PhysioDataConfig> list = new List<PhysioDataConfig>();
|
IList<PhysioDataConfig> list = new List<PhysioDataConfig>();
|
||||||
@ -1020,16 +843,6 @@ namespace DrawGraph
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static int UpdatePhysioDataConfig(PhysioDataConfig physioDataConfig)
|
|
||||||
{
|
|
||||||
string sql = "Update PhysioDataConfig set HighLimit=@HighLimit, LowLimit=@LowLimit,ShowImg=@ShowImg, ShowText=@ShowText, WarningHighLimit=@WarningHighLimit, WarningLowLimit=@WarningLowLimit, IsSplit=@IsSplit, IsDefalultShow=@IsDefalultShow, Unit=@Unit, PhysioOrder=@PhysioOrder, YAisx=@YAisx where Id=@Id";
|
|
||||||
|
|
||||||
SqlParameter[] para = new SqlParameter[]
|
|
||||||
{
|
|
||||||
new SqlParameter("@Id",physioDataConfig.Id), new SqlParameter("@HighLimit",physioDataConfig.HighLimit), new SqlParameter("@LowLimit",physioDataConfig.LowLimit), new SqlParameter("@ShowImg",physioDataConfig.ShowImg), new SqlParameter("@ShowText",physioDataConfig.ShowText), new SqlParameter("@WarningHighLimit",physioDataConfig.WarningHighLimit), new SqlParameter("@WarningLowLimit",physioDataConfig.WarningLowLimit), new SqlParameter("@IsSplit",physioDataConfig.IsSplit), new SqlParameter("@IsDefalultShow",physioDataConfig.IsDefalultShow), new SqlParameter("@Unit",physioDataConfig.Unit), new SqlParameter("@PhysioOrder",physioDataConfig.PhysioOrder), new SqlParameter("@YAisx",physioDataConfig.YAisx)
|
|
||||||
};
|
|
||||||
return DBHelper.ExecNonQuery(sql, para);
|
|
||||||
}
|
|
||||||
public static PhysioData newPhysioData(PhysioDataConfig dataConfig, int Id, DateTime RecordTime, string Value)
|
public static PhysioData newPhysioData(PhysioDataConfig dataConfig, int Id, DateTime RecordTime, string Value)
|
||||||
{
|
{
|
||||||
PhysioData pdTemp = new PhysioData();
|
PhysioData pdTemp = new PhysioData();
|
||||||
@ -1071,11 +884,43 @@ namespace DrawGraph
|
|||||||
SetPositionText(pd, "-1");
|
SetPositionText(pd, "-1");
|
||||||
PhysioDataService.DelPhysioByValueData(pd);
|
PhysioDataService.DelPhysioByValueData(pd);
|
||||||
}
|
}
|
||||||
|
public void SetPositionText(PhysioData pdTemp, string viewValue)
|
||||||
|
{
|
||||||
|
if (phListPack != null)
|
||||||
|
{
|
||||||
|
Panel pan3 = phListPack.CControl as Panel;
|
||||||
|
if (pan3 != null)
|
||||||
|
{
|
||||||
|
Control[] cs = pan3.Controls.Find(pdTemp.PhysioDataConfigId + "" + pdTemp.RecordTime.ToString("HHmm"), true);
|
||||||
|
if (cs != null && cs.Length > 0)
|
||||||
|
{
|
||||||
|
TextBox c = cs[0] as TextBox;
|
||||||
|
if (c != null)
|
||||||
|
{
|
||||||
|
if (viewValue == "-1")
|
||||||
|
{
|
||||||
|
pdTemp.Value = -1;
|
||||||
|
pdTemp.ValueString = "";
|
||||||
|
c.Tag = pdTemp;
|
||||||
|
c.Text = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
c.Tag = pdTemp;
|
||||||
|
c.Text = viewValue.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public void AddText(PhysioData pd)
|
public void AddText(PhysioData pd)
|
||||||
{
|
{
|
||||||
if (pd.ValueString == null || pd.ValueString == "") return;
|
if (pd.ValueString == null || pd.ValueString == "") return;
|
||||||
DrawTextPhysioData(pd);
|
DrawTextPhysioData(pd);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,30 +30,18 @@ namespace DrawGraph
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
AbleEditPackObj phListPack = null;
|
AbleEditPackObj phListPack = null;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当前图例文本
|
|
||||||
/// </summary>
|
|
||||||
//string curLegend = "";
|
|
||||||
/// <summary>
|
|
||||||
/// 当前选中的,手术生理曲线
|
/// 当前选中的,手术生理曲线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private PhysioDataConfig curPhysioParam = null;
|
private PhysioDataConfig curPhysioParam = null;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当前选中的生命体征对象 临时
|
|
||||||
/// </summary>
|
|
||||||
private PhysioData curPhysioData = null;
|
|
||||||
/// <summary>
|
|
||||||
/// 当前选中的生命体征对象 未改变前
|
/// 当前选中的生命体征对象 未改变前
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private PhysioData oldCurPhysioData = null;
|
private PhysioData CurPhysioData = null;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 悬浮选中的生命体征
|
/// 悬浮选中的生命体征
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private PhysioData selPhysioData = null;
|
private PhysioData selPhysioData = null;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 选中点点坐标是否处在可编辑状态
|
|
||||||
/// </summary>
|
|
||||||
//private bool isEdit = false;
|
|
||||||
/// <summary>
|
|
||||||
/// 当前手术对象
|
/// 当前手术对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private OperationRecord myOpeRecord = null;
|
private OperationRecord myOpeRecord = null;
|
||||||
@ -84,8 +72,6 @@ namespace DrawGraph
|
|||||||
|
|
||||||
//自己要用的手术对象
|
//自己要用的手术对象
|
||||||
myOpeRecord = OpeRecord as OperationRecord;
|
myOpeRecord = OpeRecord as OperationRecord;
|
||||||
//myOpeRecord.SAreaObj.maxnumber = ZedControl.GraphPane.YAxis.Scale.Max;
|
|
||||||
//myOpeRecord.SAreaObj.minnumber = ZedControl.GraphPane.YAxis.Scale.Min;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -120,7 +106,7 @@ namespace DrawGraph
|
|||||||
{
|
{
|
||||||
if (curPhysioParam != null && curPhysioParam.IsClick == true)
|
if (curPhysioParam != null && curPhysioParam.IsClick == true)
|
||||||
{
|
{
|
||||||
System.Windows.Forms.DialogResult dr = System.Windows.Forms.MessageBox.Show("你确定要删除当前曲线的所有生理数据吗?", "保存修改", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Information);
|
System.Windows.Forms.DialogResult dr = System.Windows.Forms.MessageBox.Show("是否删除当前选项的所有数据?", "系统提示", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Information);
|
||||||
if (dr == System.Windows.Forms.DialogResult.Yes)
|
if (dr == System.Windows.Forms.DialogResult.Yes)
|
||||||
{
|
{
|
||||||
if (curPhysioParam.ShowText == true)
|
if (curPhysioParam.ShowText == true)
|
||||||
@ -141,13 +127,11 @@ namespace DrawGraph
|
|||||||
|
|
||||||
curPhysioParam.DelItems(myOpeRecord.pageBegin, myOpeRecord.lastPageBegin);
|
curPhysioParam.DelItems(myOpeRecord.pageBegin, myOpeRecord.lastPageBegin);
|
||||||
curPhysioParam.clearAddObj(ZedControl);
|
curPhysioParam.clearAddObj(ZedControl);
|
||||||
|
|
||||||
|
|
||||||
ZedControl.Refresh();
|
ZedControl.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
//PublicMethod.ShowMessage("删除曲线前请先选中曲线!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -159,7 +143,6 @@ namespace DrawGraph
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
public override void MouseDown(ZedGraphControl sender, MouseEventArgs e)
|
public override void MouseDown(ZedGraphControl sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
//if ((OpeRecord != null && status == DoOpeStatus.BEGINOPE) || IsReview)
|
|
||||||
if (myOpeRecord != null)
|
if (myOpeRecord != null)
|
||||||
{
|
{
|
||||||
if (e.Button != System.Windows.Forms.MouseButtons.Left) return;
|
if (e.Button != System.Windows.Forms.MouseButtons.Left) return;
|
||||||
@ -214,7 +197,6 @@ namespace DrawGraph
|
|||||||
{
|
{
|
||||||
if (curPhysioParam != null && curPhysioParam.IsClick)
|
if (curPhysioParam != null && curPhysioParam.IsClick)
|
||||||
{
|
{
|
||||||
//如果曲线被选中则进行点的操作,反之选中所有点的集合在子范围内画选中框
|
|
||||||
bool isHave = false;
|
bool isHave = false;
|
||||||
|
|
||||||
PhysioData pdTemp = rePD(sender, e);
|
PhysioData pdTemp = rePD(sender, e);
|
||||||
@ -222,13 +204,12 @@ namespace DrawGraph
|
|||||||
|
|
||||||
foreach (PointPair pp in curPhysioParam.APhysioParams)
|
foreach (PointPair pp in curPhysioParam.APhysioParams)
|
||||||
{
|
{
|
||||||
curPhysioData = curPhysioParam.PointPairToPhysioData(pp);
|
|
||||||
if (pdTemp.isEquert(curPhysioParam.PointPairToPhysioData(pp)) && curPhysioParam.PointPairToPhysioData(pp).Value != Double.MaxValue)
|
if (pdTemp.isEquert(curPhysioParam.PointPairToPhysioData(pp)) && curPhysioParam.PointPairToPhysioData(pp).Value != Double.MaxValue)
|
||||||
{
|
{
|
||||||
isHave = true;
|
isHave = true;
|
||||||
if (AnesOpeStatue == DoAnesOpeStatus.VIEW)
|
if (AnesOpeStatue == DoAnesOpeStatus.VIEW)
|
||||||
{
|
{
|
||||||
oldCurPhysioData = curPhysioParam.PointPairToPhysioData(pp);
|
CurPhysioData = curPhysioParam.PointPairToPhysioData(pp);
|
||||||
|
|
||||||
AnesOpeStatue = DoAnesOpeStatus.MOVEPD;
|
AnesOpeStatue = DoAnesOpeStatus.MOVEPD;
|
||||||
break;
|
break;
|
||||||
@ -239,9 +220,7 @@ namespace DrawGraph
|
|||||||
{
|
{
|
||||||
AnesOpeStatue = DoAnesOpeStatus.ADDPD;
|
AnesOpeStatue = DoAnesOpeStatus.ADDPD;
|
||||||
DateTime insTime = GetRecordTime(pdTemp.RecordTime);
|
DateTime insTime = GetRecordTime(pdTemp.RecordTime);
|
||||||
|
|
||||||
curPhysioParam.AddMultipleItem(pdTemp, insTime, collectInterval);
|
curPhysioParam.AddMultipleItem(pdTemp, insTime, collectInterval);
|
||||||
AnesOpeStatue = DoAnesOpeStatus.VIEW;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -310,39 +289,36 @@ namespace DrawGraph
|
|||||||
{
|
{
|
||||||
case DoAnesOpeStatus.MOVEPD:
|
case DoAnesOpeStatus.MOVEPD:
|
||||||
if (curPhysioParam != null)
|
if (curPhysioParam != null)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
PhysioData pdNew = rePD(sender, e);
|
PhysioData pdNew = rePD(sender, e);
|
||||||
if (pdNew == null) return;
|
if (pdNew == null) return;
|
||||||
|
|
||||||
int countSim = 0;
|
PhysioData newPd = curPhysioParam.MoveItem(pdNew);
|
||||||
|
if (newPd != null )//&& CurPhysioData.Value != newPd.Value
|
||||||
|
{
|
||||||
|
CurPhysioData = newPd;
|
||||||
|
curPhysioParam.ModifyItem(CurPhysioData, CurPhysioData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DoAnesOpeStatus.ADDPD:
|
||||||
|
if (curPhysioParam != null)
|
||||||
|
{
|
||||||
|
PhysioData pdTemp = rePD(sender, e);
|
||||||
|
if (pdTemp == null) return;
|
||||||
|
bool isHave = false;
|
||||||
foreach (PointPair pp in curPhysioParam.APhysioParams)
|
foreach (PointPair pp in curPhysioParam.APhysioParams)
|
||||||
{
|
{
|
||||||
PhysioData ppd = curPhysioParam.PointPairToPhysioData(pp);
|
if (pdTemp.isEquert(curPhysioParam.PointPairToPhysioData(pp)) && curPhysioParam.PointPairToPhysioData(pp).Value != Double.MaxValue)
|
||||||
if (pdNew.isEquert(ppd))
|
|
||||||
{
|
{
|
||||||
countSim++;
|
isHave = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (countSim < 2)
|
if (!isHave)
|
||||||
{
|
{
|
||||||
curPhysioParam.onlyModItem(pdNew, oldCurPhysioData);
|
AnesOpeStatue = DoAnesOpeStatus.ADDPD;
|
||||||
}
|
DateTime insTime = GetRecordTime(pdTemp.RecordTime);
|
||||||
else
|
curPhysioParam.AddMultipleItem(pdTemp, insTime, collectInterval);
|
||||||
{
|
|
||||||
curPhysioParam.onlyModItem(oldCurPhysioData, oldCurPhysioData);
|
|
||||||
AnesOpeStatue = DoAnesOpeStatus.VIEW;
|
|
||||||
|
|
||||||
ZedControl.AxisChange();
|
|
||||||
ZedControl.Refresh();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -357,7 +333,6 @@ namespace DrawGraph
|
|||||||
myOpeRecord.SAreaObj.EndPds = rePDs(sender, e);
|
myOpeRecord.SAreaObj.EndPds = rePDs(sender, e);
|
||||||
myOpeRecord.SAreaObj.Draw();
|
myOpeRecord.SAreaObj.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch { return; }
|
catch { return; }
|
||||||
finally
|
finally
|
||||||
@ -379,24 +354,16 @@ namespace DrawGraph
|
|||||||
double x = Convert.ToDouble(Convert.ToDouble(e.X) / Convert.ToDouble(ZedControl.Width));
|
double x = Convert.ToDouble(Convert.ToDouble(e.X) / Convert.ToDouble(ZedControl.Width));
|
||||||
|
|
||||||
if (curPhysioParam != null && curPhysioParam.IsClick == true)
|
if (curPhysioParam != null && curPhysioParam.IsClick == true)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
PhysioData pdNew = rePD(sender, e);
|
PhysioData pdNew = rePD(sender, e);
|
||||||
if (pdNew == null) return;
|
if (pdNew == null) return;
|
||||||
if (AnesOpeStatue == DoAnesOpeStatus.MOVEPD)
|
if (AnesOpeStatue == DoAnesOpeStatus.MOVEPD)
|
||||||
{
|
{
|
||||||
curPhysioParam.ModItem(oldCurPhysioData, pdNew);
|
if (CurPhysioData.RecordTime == pdNew.RecordTime)
|
||||||
curPhysioData = null;
|
curPhysioParam.ModifyItem(CurPhysioData, pdNew);
|
||||||
oldCurPhysioData = null;
|
CurPhysioData = null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
AnesOpeStatue = DoAnesOpeStatus.VIEW;
|
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
|
||||||
AnesOpeStatue = DoAnesOpeStatus.VIEW;
|
AnesOpeStatue = DoAnesOpeStatus.VIEW;
|
||||||
ZedControl.AxisChange();
|
ZedControl.AxisChange();
|
||||||
ZedControl.Refresh();
|
ZedControl.Refresh();
|
||||||
@ -530,8 +497,7 @@ namespace DrawGraph
|
|||||||
//DrawPhysioData();
|
//DrawPhysioData();
|
||||||
|
|
||||||
curPhysioParam = null;
|
curPhysioParam = null;
|
||||||
curPhysioData = null;
|
CurPhysioData = null;
|
||||||
oldCurPhysioData = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -546,7 +512,7 @@ namespace DrawGraph
|
|||||||
Legend legend = myPane.Legend;
|
Legend legend = myPane.Legend;
|
||||||
legend.IsVisible = true;
|
legend.IsVisible = true;
|
||||||
legend.Position = LegendPos.Float;//定位图标位置
|
legend.Position = LegendPos.Float;//定位图标位置
|
||||||
legend.Location = new Location(janCePack.RealX, janCePack.RealEndY - 0.02, CoordType.PaneFraction);//只有当Legend的Position属性设置为Float,才可修改其位置 0.87 0.3
|
legend.Location = new Location(janCePack.RealX, janCePack.RealEndY - 0.02, CoordType.PaneFraction);
|
||||||
legend.Border.Width = 0;
|
legend.Border.Width = 0;
|
||||||
legend.Border.IsVisible = false; //不显示图标外边框
|
legend.Border.IsVisible = false; //不显示图标外边框
|
||||||
legend.Gap = 2.0f;
|
legend.Gap = 2.0f;
|
||||||
@ -564,7 +530,7 @@ namespace DrawGraph
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (janCePack == null) return;
|
if (janCePack == null) return;
|
||||||
int showvalue = 0;
|
int YRows = 0;
|
||||||
addPhysioList.Clear();
|
addPhysioList.Clear();
|
||||||
ZedControl.GraphPane.CurveList.Clear();
|
ZedControl.GraphPane.CurveList.Clear();
|
||||||
//监测区域里的第1根竖线,显示数值时用
|
//监测区域里的第1根竖线,显示数值时用
|
||||||
@ -597,10 +563,10 @@ namespace DrawGraph
|
|||||||
//如果模板管理不为空
|
//如果模板管理不为空
|
||||||
if (pack != null && rowNum < 4 && pp.ShowText == true)
|
if (pack != null && rowNum < 4 && pp.ShowText == true)
|
||||||
{
|
{
|
||||||
double y = pack.RealY + getYPositionByListIndex(showvalue, pack.RealY, pack.RealEndY, RowsCount);
|
double y = pack.RealY + getYPositionByListIndex(YRows, pack.RealY, pack.RealEndY, RowsCount);
|
||||||
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname, 5.5f);
|
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname, 5.5f);
|
||||||
pp.showValue = y + 0.002;
|
pp.YLocation = y + 0.002;
|
||||||
showvalue++;
|
YRows++;
|
||||||
rowNum++;
|
rowNum++;
|
||||||
}
|
}
|
||||||
pp.phListPack = phListPack;
|
pp.phListPack = phListPack;
|
||||||
@ -617,7 +583,7 @@ namespace DrawGraph
|
|||||||
if (!isHave)
|
if (!isHave)
|
||||||
{
|
{
|
||||||
addPhysioList.Add(pp);
|
addPhysioList.Add(pp);
|
||||||
pp.draw();
|
pp.initCurve();
|
||||||
pp_Click(pp, null);
|
pp_Click(pp, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -641,12 +607,12 @@ namespace DrawGraph
|
|||||||
pp.setAnasArr(ZedControl, chartPack.RealX, chartPack.RealEndX, myOpeRecord.pageBegin,
|
pp.setAnasArr(ZedControl, chartPack.RealX, chartPack.RealEndX, myOpeRecord.pageBegin,
|
||||||
myOpeRecord.pageBegin.AddMinutes(EVERY_PAGE_TIME_SPAN));
|
myOpeRecord.pageBegin.AddMinutes(EVERY_PAGE_TIME_SPAN));
|
||||||
pp.ClearTagstr(ZedControl);
|
pp.ClearTagstr(ZedControl);
|
||||||
if ( rowNum < 4)
|
if (rowNum < 4)
|
||||||
{
|
{
|
||||||
double y = pack.RealY + getYPositionByListIndex(showvalue, pack.RealY, pack.RealEndY, RowsCount);
|
double y = pack.RealY + getYPositionByListIndex(YRows, pack.RealY, pack.RealEndY, RowsCount);
|
||||||
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname + pp.Id, 5.5f);
|
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname + pp.Id, 5.5f);
|
||||||
pp.showValue = y + 0.002;
|
pp.YLocation = y + 0.002;
|
||||||
showvalue++;
|
YRows++;
|
||||||
rowNum++;
|
rowNum++;
|
||||||
}
|
}
|
||||||
myOpeRecord.PhysioAnesConfigList.Add(pp);
|
myOpeRecord.PhysioAnesConfigList.Add(pp);
|
||||||
@ -682,7 +648,7 @@ namespace DrawGraph
|
|||||||
//原因:正是因为xmlOpe是全局变量,因此,在整个窗体生命周期都没有发生改变。
|
//原因:正是因为xmlOpe是全局变量,因此,在整个窗体生命周期都没有发生改变。
|
||||||
//即在该段时间内驻留内存,及时其他窗体将其信息改变,其操作的XML内容仍然不变。
|
//即在该段时间内驻留内存,及时其他窗体将其信息改变,其操作的XML内容仍然不变。
|
||||||
//解决办法:重新定义,使XML操作对象发生变化。
|
//解决办法:重新定义,使XML操作对象发生变化。
|
||||||
int showvalue = 0;
|
int YRows = 0;
|
||||||
//监测区域里的第1根竖线,显示数值时用
|
//监测区域里的第1根竖线,显示数值时用
|
||||||
LinesPackObj pack = template.GetPackObjectOTag<LinesPackObj>("MonitorManage_LinesPackObj_9");
|
LinesPackObj pack = template.GetPackObjectOTag<LinesPackObj>("MonitorManage_LinesPackObj_9");
|
||||||
|
|
||||||
@ -710,10 +676,10 @@ namespace DrawGraph
|
|||||||
//如果模板管理不为空
|
//如果模板管理不为空
|
||||||
if (pack != null && rowNum < 4 && pp.ShowText == true)
|
if (pack != null && rowNum < 4 && pp.ShowText == true)
|
||||||
{
|
{
|
||||||
double y = pack.RealY + getYPositionByListIndex(showvalue, pack.RealY, pack.RealEndY, RowsCount);
|
double y = pack.RealY + getYPositionByListIndex(YRows, pack.RealY, pack.RealEndY, RowsCount);
|
||||||
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname, 5.5f);
|
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname, 5.5f);
|
||||||
pp.showValue = y + 0.002;
|
pp.YLocation = y + 0.002;
|
||||||
showvalue++;
|
YRows++;
|
||||||
rowNum++;
|
rowNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,10 +702,10 @@ namespace DrawGraph
|
|||||||
pp.ClearTagstr(ZedControl);
|
pp.ClearTagstr(ZedControl);
|
||||||
if (pp.ShowText == true && rowNum < 4)
|
if (pp.ShowText == true && rowNum < 4)
|
||||||
{
|
{
|
||||||
double y = pack.RealY + getYPositionByListIndex(showvalue, pack.RealY, pack.RealEndY, RowsCount);
|
double y = pack.RealY + getYPositionByListIndex(YRows, pack.RealY, pack.RealEndY, RowsCount);
|
||||||
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname + pp.Id, 5.5f);
|
ZUtil.DrawText(pp.Name, pack.RealX, y, ZedControl, "PP" + pp.Enname + pp.Id, 5.5f);
|
||||||
pp.showValue = y + 0.002;
|
pp.YLocation = y + 0.002;
|
||||||
showvalue++;
|
YRows++;
|
||||||
rowNum++;
|
rowNum++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -834,15 +800,18 @@ namespace DrawGraph
|
|||||||
physioParam = myOpeRecord.PhysioConfigList[1];
|
physioParam = myOpeRecord.PhysioConfigList[1];
|
||||||
else
|
else
|
||||||
physioParam = curPhysioParam;
|
physioParam = curPhysioParam;
|
||||||
pdNews.Add(PhysioDataConfig.newPhysioData(physioParam, myOpeRecord.Id.Value, xd.DateTime, Math.Round(y[physioParam.YAisx], 2)));
|
double value = Math.Round(y[physioParam.YAisx], 0);
|
||||||
|
pdNews.Add(PhysioDataConfig.newPhysioData(physioParam, myOpeRecord.Id.Value, xd.DateTime, value));
|
||||||
|
|
||||||
if (y[1].ToString() != "")
|
if (y[1].ToString() != "")
|
||||||
{
|
{
|
||||||
pdNews.Add(PhysioDataConfig.newPhysioData(myOpeRecord.PhysioConfigList.Where(a => a.Name == "氧饱和度").ToList()[0], myOpeRecord.Id.Value, xd.DateTime, Math.Round(y[physioParam.YAisx], 2)));
|
value = Math.Round(y[physioParam.YAisx], 0);
|
||||||
|
pdNews.Add(PhysioDataConfig.newPhysioData(myOpeRecord.PhysioConfigList.Where(a => a.Name == "氧饱和度").ToList()[0], myOpeRecord.Id.Value, xd.DateTime, value));
|
||||||
}
|
}
|
||||||
if (y[0].ToString() != "")
|
if (y[0].ToString() != "")
|
||||||
{
|
{
|
||||||
pdNews.Add(PhysioDataConfig.newPhysioData(myOpeRecord.PhysioConfigList.Where(a => a.Name == "体温").ToList()[0], myOpeRecord.Id.Value, xd.DateTime, Math.Round(y[physioParam.YAisx], 2)));
|
value = Math.Round(y[physioParam.YAisx], 1);
|
||||||
|
pdNews.Add(PhysioDataConfig.newPhysioData(myOpeRecord.PhysioConfigList.Where(a => a.Name == "体温").ToList()[0], myOpeRecord.Id.Value, xd.DateTime, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -885,7 +854,8 @@ namespace DrawGraph
|
|||||||
{
|
{
|
||||||
physioParam = curPhysioParam;
|
physioParam = curPhysioParam;
|
||||||
}
|
}
|
||||||
PhysioData pdNew = PhysioDataConfig.newPhysioData(physioParam, myOpeRecord.Id.Value, xd.DateTime, Math.Round(y[physioParam.YAisx], 2));
|
double value = physioParam.YAisx == 1 ? Math.Round(y[physioParam.YAisx], 1) : Math.Round(y[physioParam.YAisx], 0);
|
||||||
|
PhysioData pdNew = PhysioDataConfig.newPhysioData(physioParam, myOpeRecord.Id.Value, xd.DateTime, value);
|
||||||
|
|
||||||
return pdNew;
|
return pdNew;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user