自主呼吸 机械通气画点修正

This commit is contained in:
leomon 2022-11-11 12:49:46 +08:00
parent da9ac67e4f
commit 1396b0762c
16 changed files with 287 additions and 390 deletions

View File

@ -19,6 +19,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Windows.Forms; using System.Windows.Forms;
//using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
namespace AIMS.OperationDoing.AnasRecordBill.UI namespace AIMS.OperationDoing.AnasRecordBill.UI
{ {
@ -190,10 +191,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
templateManage2.Bind(); templateManage2.Bind();
zgcAnaesRecord2.Refresh(); zgcAnaesRecord2.Refresh();
Panel panel = zgcAnaesRecord.Parent as Panel; panel8.VerticalScroll.Value = 0;
panel.VerticalScroll.Value = 0; panel82.VerticalScroll.Value = 0;
Panel panel2 = zgcAnaesRecord2.Parent as Panel;
panel2.VerticalScroll.Value = 0;
mPanes = new List<MasterPane>(); mPanes = new List<MasterPane>();
UpPanes = new List<MasterPane>(); UpPanes = new List<MasterPane>();
@ -677,12 +676,14 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
_record.SpileInTime = null; _record.SpileInTime = null;
this.picCG.BackgroundImage = global::AIMS.Properties.Resources.; this.picCG.BackgroundImage = global::AIMS.Properties.Resources.;
BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id));
UpdatePhysioDataResp();
} }
if (Inevent != null && Inevent.EventName == "拔管") if (Inevent != null && Inevent.EventName == "拔管")
{ {
_record.SpileOutTime = null; _record.SpileOutTime = null;
this.picBG.BackgroundImage = global::AIMS.Properties.Resources.; this.picBG.BackgroundImage = global::AIMS.Properties.Resources.;
BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id));
UpdatePhysioDataResp();
} }
} }
} }
@ -789,12 +790,15 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
_record.SpileInTime = Inevent.EventBeginTime; _record.SpileInTime = Inevent.EventBeginTime;
this.picCG.BackgroundImage = global::AIMS.Properties.Resources._select; this.picCG.BackgroundImage = global::AIMS.Properties.Resources._select;
BOperationRecord.Update(" SpileInTime=@SpileIn where Id=@id ", new AIMSModel.ParameterList("@SpileIn", _record.SpileInTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id)); BOperationRecord.Update(" SpileInTime=@SpileIn where Id=@id ", new AIMSModel.ParameterList("@SpileIn", _record.SpileInTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
UpdatePhysioDataResp();
} }
if (Inevent != null && Inevent.EventName == "拔管" && _record.SpileOutTime != Inevent.EventBeginTime) if (Inevent != null && Inevent.EventName == "拔管" && _record.SpileOutTime != Inevent.EventBeginTime)
{ {
_record.SpileOutTime = Inevent.EventBeginTime; _record.SpileOutTime = Inevent.EventBeginTime;
this.picBG.BackgroundImage = global::AIMS.Properties.Resources._select; this.picBG.BackgroundImage = global::AIMS.Properties.Resources._select;
BOperationRecord.Update(" SpileOutTime=@SpileOut where Id=@id ", new AIMSModel.ParameterList("@SpileOut", _record.SpileOutTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id)); BOperationRecord.Update(" SpileOutTime=@SpileOut where Id=@id ", new AIMSModel.ParameterList("@SpileOut", _record.SpileOutTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
UpdatePhysioDataResp();
} }
if (Inevent != null && Inevent.EventName == "手术结束" && _record.OperationEndTime != Inevent.EventBeginTime) if (Inevent != null && Inevent.EventName == "手术结束" && _record.OperationEndTime != Inevent.EventBeginTime)
{ {
@ -852,7 +856,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (templateManage != null) if (templateManage != null)
templateManage.SetPYL(); templateManage.SetPYL();
} }
int lastpanel82VerticalScrollValue = -1;//为鼠标滚动事件提供一个静态变量用来存储上次滚动后的VerticalScroll.Value
private void panel82_MouseWheel(object sender, MouseEventArgs e) private void panel82_MouseWheel(object sender, MouseEventArgs e)
{ {
if (templateManage2 != null) if (templateManage2 != null)
@ -949,6 +952,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{ {
OperationDoing.AnasRecordBill.UI.frmSelectPatientNew2 frmSelectPatient = new UI.frmSelectPatientNew2(); OperationDoing.AnasRecordBill.UI.frmSelectPatientNew2 frmSelectPatient = new UI.frmSelectPatientNew2();
frmSelectPatient.isMainOpen = true; frmSelectPatient.isMainOpen = true;
frmSelectPatient.frmAnasRecord = this;
frmSelectPatient.FormClosed += new FormClosedEventHandler(frmSelectPatient_FormClosed); frmSelectPatient.FormClosed += new FormClosedEventHandler(frmSelectPatient_FormClosed);
frmSelectPatient.ShowDialog(); frmSelectPatient.ShowDialog();
@ -1294,7 +1298,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
#region #region
public DateTime? LastMonitorDataTime = null; public DateTime? LastMonitorDataTime = null;
private void timerGetCollectorData_Tick(bool isOpen) private void timerGetCollectorData_Tick()
{ {
if (State == AIMSExtension.EditState.BROWSE || _record.StateName != "手术中" || NowRoom == null || isReadOnly == true) return; if (State == AIMSExtension.EditState.BROWSE || _record.StateName != "手术中" || NowRoom == null || isReadOnly == true) return;
if (_record.OutRoomTime != null && DateTime.Now >= _record.OutRoomTime) return; if (_record.OutRoomTime != null && DateTime.Now >= _record.OutRoomTime) return;
@ -1317,7 +1321,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
string key = addPP.Name; string key = addPP.Name;
string value = addPP.Enname; string value = addPP.Enname;
if (addPP.IsValid == false) continue; if (addPP.IsValid == false) continue;
if (key == "机械通气") continue;
if (value == null || value == "") continue; if (value == null || value == "") continue;
int minMinutes = -5; int minMinutes = -5;
@ -1330,7 +1333,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{ {
if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue; if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue;
if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue; if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue;
if (isCgtime(addPP.Name, dtTime)) continue; if (!isCgtime(addPP.Name, dtTime)) continue;
PhysioData pdTemp = new PhysioData(); PhysioData pdTemp = new PhysioData();
pdTemp.RecordTime = dtTime; pdTemp.RecordTime = dtTime;
pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); pdTemp.Value = Double.Parse(dr["ParamValue"].ToString());
@ -1401,8 +1404,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
try try
{ {
if (((TimeSpan)(DateTime.Now - _record.lastPageBegin)).TotalHours > 24 || NowRoom == null) return; if (((TimeSpan)(DateTime.Now - _record.lastPageBegin)).TotalHours > 24 || NowRoom == null) return;
timerGetCollectorData_Tick(false); timerGetCollectorData_Tick();
ShowMonitorDataToRight(); if (State != AIMSExtension.EditState.BROWSE)
ShowMonitorDataToRight();
} }
catch (Exception) catch (Exception)
{ {
@ -1523,29 +1527,39 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
public bool isCgtime(string key, DateTime time) public bool isCgtime(string key, DateTime time)
{ {
bool b = false; bool b = false;
try if (key == "机械通气")
{ {
if (key == "自主呼吸") if (_record.SpileInTime != null && _record.SpileOutTime != null)
{ {
if (_record.SpileInTime != null && _record.SpileOutTime != null) if (time >= _record.SpileInTime && time <= _record.SpileOutTime)
{ b = true;
if (time > _record.SpileInTime && time < _record.SpileOutTime)
b = true;
}
if (_record.SpileInTime != null && _record.SpileOutTime == null)
{
if (time > _record.SpileInTime)
b = true;
}
} }
else if (_record.SpileInTime != null && _record.SpileOutTime == null)
{ {
b = false; if (time > _record.SpileInTime)
b = true;
} }
} }
catch (Exception ex) else if (key == "自主呼吸")
{ {
PublicMethod.WriteLog(ex); if (_record.SpileInTime != null && _record.SpileOutTime != null)
{
if (time < _record.SpileInTime || time > _record.SpileOutTime)
b = true;
}
if (_record.SpileInTime != null && _record.SpileOutTime == null)
{
if (time < _record.SpileInTime)
b = true;
}
if (_record.SpileInTime == null && _record.SpileOutTime == null)
{
b = true;
}
}
else
{
b = true;
} }
return b; return b;
} }
@ -1565,6 +1579,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{ {
if (timerGetTextCollectorData != null) if (timerGetTextCollectorData != null)
{ {
LastMonitorDataTime = null;
timerGetTextCollectorData.Enabled = false; timerGetTextCollectorData.Enabled = false;
timerGetTextCollectorData.Stop(); timerGetTextCollectorData.Stop();
} }
@ -1622,7 +1637,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
templateManage.zedControl_MouseDoubleClick(send, e); templateManage.zedControl_MouseDoubleClick(send, e);
} }
} }
//public ucStripMenuItem menuItem = new ucStripMenuItem();
private void zgcAnaesRecord_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState) private void zgcAnaesRecord_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
{ {
@ -1740,8 +1754,10 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
if (Double.Parse(dr["ParamValue"].ToString()) <= 0) continue; if (Double.Parse(dr["ParamValue"].ToString()) <= 0) continue;
if (dr["ParameterName"] != null && dr["ParameterName"].ToString() != "" && dr["ParameterName"].ToString().Equals(addPP.Id.ToString())) if (dr["ParameterName"] != null && dr["ParameterName"].ToString() != "" && dr["ParameterName"].ToString().Equals(addPP.Id.ToString()))
{ {
DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString());
if (!isCgtime(addPP.Name, RecordTime)) continue;
PhysioData pdTemp = new PhysioData(); PhysioData pdTemp = new PhysioData();
pdTemp.RecordTime = DateTime.Parse(dr["InsertTime"].ToString()); pdTemp.RecordTime = RecordTime;
pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); pdTemp.Value = Double.Parse(dr["ParamValue"].ToString());
pdTemp.YAisx = addPP.YAisx; pdTemp.YAisx = addPP.YAisx;
pdTemp.PhysioDataConfigId = addPP.Id; pdTemp.PhysioDataConfigId = addPP.Id;
@ -1752,6 +1768,36 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
} }
} }
} }
private void UpdatePhysioDataResp()
{
BOperationRecord.UpdatePhysioDataRespByTime(_record);
string PhysioDataConfigIds = "3,12";
DataTable dtPhysioData = BOperationRecord.getByOpeIDIsPhysioData(_record.Id.Value, PhysioDataConfigIds);
List<string> Ids = PhysioDataConfigIds.Split(',').ToList();
if (dtPhysioData != null && dtPhysioData.Rows.Count > 0)
{
foreach (PhysioDataConfig addPP in _record.addPhysioList)
{
if (!Ids.Contains(addPP.Id.ToString())) continue;
addPP.clearAddObj(zgcAnaesRecord);
if (addPP.IsDefalultShow == false) continue;
for (int i = 0; i < dtPhysioData.Rows.Count; i++)
{
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
{
PhysioData pdTemp = new PhysioData();
pdTemp.RecordTime = DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString());
pdTemp.Value = Double.Parse(dtPhysioData.Rows[i]["Value"].ToString());
pdTemp.YAisx = addPP.YAisx;
pdTemp.PhysioDataConfigId = addPP.Id;
pdTemp.PatientId = _record.Id.Value;
addPP.AddPoition(pdTemp);
}
}
}
}
}
private void clearSelectCouve_Click(Object sender, EventArgs e) private void clearSelectCouve_Click(Object sender, EventArgs e)
{ {
templateManage.ClearSelectCouve(); templateManage.ClearSelectCouve();
@ -2017,7 +2063,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.; this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.;
} }
private bool GetOpeState(ref string message) private bool GetOpeState(ref string message)
{ {
bool isTrue = true; bool isTrue = true;
@ -2115,6 +2160,34 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
} }
} }
public void ClearRecordDate()
{
panel8.VerticalScroll.Value = 0;
panel82.VerticalScroll.Value = 0;
//清空记录点并重新加载
ClearTimeText();
//关闭采集的服务
DisposeTimer();
lblHR.Text = "--";
lblRESP.Text = "--";
lblSpo2.Text = "--";
lblPR.Text = "--";
lblDia.Text = "---/---";
lblHR.ForeColor = Color.Green;
lblRESP.ForeColor = Color.Yellow;
lblSpo2.ForeColor = Color.Cyan;
lblPR.ForeColor = Color.Green;
lblDia.ForeColor = Color.Red;
if (templateManage != null)
{
templateManage.ControlClear();
}
if (templateManage2 != null)
{
templateManage2.ControlClear();
}
_record = null;
}
#endregion #endregion
#region #region
@ -2194,6 +2267,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
{ {
if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE) if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE)
{ {
panel8.VerticalScroll.Value = 0;
panel82.VerticalScroll.Value = 0;
DisposeTimer(); DisposeTimer();
} }
} }

View File

@ -734,7 +734,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
try try
{ {
if (NowRoom == null) return; if (NowRoom == null) return;
ShowMonitorDataToRight(); if (State != AIMSExtension.EditState.BROWSE)
ShowMonitorDataToRight();
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -443,11 +443,11 @@ namespace AIMS.PublicUI.UI
{ {
//try //try
//{ //{
// if (er.EventName == "机械通气" || er.EventName == "自主呼吸" || er.EventName == "辅助呼吸") // if (er.EventName == "机械通气" )
// { // {
// foreach (PhysioParameter item in _record.addPhysioList) // foreach (var item in _record.addPhysioList)
// { // {
// if (item.ParameterName != er.EventName) continue; // if (item.Name != er.EventName) continue;
// item.clearAddObj(zgcAnaesRecord); // item.clearAddObj(zgcAnaesRecord);
// BOperationRecord.DeletePhysioDataByID(_record.Id.Value, item.Id); // BOperationRecord.DeletePhysioDataByID(_record.Id.Value, item.Id);
// } // }
@ -640,16 +640,19 @@ namespace AIMS.PublicUI.UI
{ {
_record.SpileInTime = _event.EventBeginTime; IsChage = true; _record.SpileInTime = _event.EventBeginTime; IsChage = true;
BOperationRecord.Update(" SpileInTime=@SpileIn where Id=@id ", new AIMSModel.ParameterList("@SpileIn", _record.SpileInTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id)); BOperationRecord.Update(" SpileInTime=@SpileIn where Id=@id ", new AIMSModel.ParameterList("@SpileIn", _record.SpileInTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
UpdatePhysioDataResp();
} }
if (_event != null && _event.EventName == "喉罩" && _record.SpileInTime != _event.EventBeginTime) if (_event != null && _event.EventName == "喉罩" && _record.SpileInTime != _event.EventBeginTime)
{ {
_record.SpileInTime = _event.EventBeginTime; IsChage = true; _record.SpileInTime = _event.EventBeginTime; IsChage = true;
BOperationRecord.Update(" SpileInTime=@SpileIn where Id=@id ", new AIMSModel.ParameterList("@SpileIn", _record.SpileInTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id)); BOperationRecord.Update(" SpileInTime=@SpileIn where Id=@id ", new AIMSModel.ParameterList("@SpileIn", _record.SpileInTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
UpdatePhysioDataResp();
} }
if (_event != null && _event.EventName == "拔管" && _record.SpileOutTime != _event.EventBeginTime) if (_event != null && _event.EventName == "拔管" && _record.SpileOutTime != _event.EventBeginTime)
{ {
_record.SpileOutTime = _event.EventBeginTime; IsChage = true; _record.SpileOutTime = _event.EventBeginTime; IsChage = true;
BOperationRecord.Update(" SpileOutTime=@SpileOut where Id=@id ", new AIMSModel.ParameterList("@SpileOut", _record.SpileOutTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id)); BOperationRecord.Update(" SpileOutTime=@SpileOut where Id=@id ", new AIMSModel.ParameterList("@SpileOut", _record.SpileOutTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id));
UpdatePhysioDataResp();
} }
if (_event != null && _event.EventName == "手术结束" && _record.OperationEndTime != _event.EventBeginTime) if (_event != null && _event.EventName == "手术结束" && _record.OperationEndTime != _event.EventBeginTime)
{ {
@ -689,16 +692,19 @@ namespace AIMS.PublicUI.UI
{ {
_record.SpileInTime = null; _record.SpileInTime = null;
BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id));
UpdatePhysioDataResp();
} }
if (_event != null && _event.EventName == "喉罩") if (_event != null && _event.EventName == "喉罩")
{ {
_record.SpileInTime = null; _record.SpileInTime = null;
BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id));
UpdatePhysioDataResp();
} }
if (_event != null && _event.EventName == "拔管") if (_event != null && _event.EventName == "拔管")
{ {
_record.SpileOutTime = null; _record.SpileOutTime = null;
BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id));
UpdatePhysioDataResp();
} }
//AIMSModel.ParameterList keyValuePairs = new AIMSModel.ParameterList(); //AIMSModel.ParameterList keyValuePairs = new AIMSModel.ParameterList();
@ -924,6 +930,36 @@ namespace AIMS.PublicUI.UI
TextBoxX box = sender as TextBoxX; TextBoxX box = sender as TextBoxX;
box.Text = ""; box.Text = "";
} }
public void UpdatePhysioDataResp()
{
BOperationRecord.UpdatePhysioDataRespByTime(_record);
string PhysioDataConfigIds = "3,12";
DataTable dtPhysioData = BOperationRecord.getByOpeIDIsPhysioData(_record.Id.Value, PhysioDataConfigIds);
List<string> Ids = PhysioDataConfigIds.Split(',').ToList();
if (dtPhysioData != null && dtPhysioData.Rows.Count > 0)
{
foreach (PhysioDataConfig addPP in _record.addPhysioList)
{
if (!Ids.Contains(addPP.Id.ToString())) continue;
addPP.clearAddObj(zgcAnaesRecord);
if (addPP.IsDefalultShow == false) continue;
for (int i = 0; i < dtPhysioData.Rows.Count; i++)
{
if (dtPhysioData.Rows[i]["Name"].ToString().Equals(addPP.Name.ToString()))
{
PhysioData pdTemp = new PhysioData();
pdTemp.RecordTime = DateTime.Parse(dtPhysioData.Rows[i]["RecordTime"].ToString());
pdTemp.Value = Double.Parse(dtPhysioData.Rows[i]["Value"].ToString());
pdTemp.YAisx = addPP.YAisx;
pdTemp.PhysioDataConfigId = addPP.Id;
pdTemp.PatientId = _record.Id.Value;
addPP.AddPoition(pdTemp);
}
}
}
}
}
} }
public class DataGridViewComboEditTipBoxColumn : DataGridViewComboBoxColumn public class DataGridViewComboEditTipBoxColumn : DataGridViewComboBoxColumn
@ -1013,5 +1049,6 @@ namespace AIMS.PublicUI.UI
grid.CurrentCell.Value = value; grid.CurrentCell.Value = value;
} }
} }
} }
} }

View File

@ -87,7 +87,7 @@
this.panel1.Font = new System.Drawing.Font("宋体", 10.5F); this.panel1.Font = new System.Drawing.Font("宋体", 10.5F);
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(999, 39); this.panel1.Size = new System.Drawing.Size(1035, 39);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// buttonX3 // buttonX3
@ -96,7 +96,7 @@
this.buttonX3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonX3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonX3.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.buttonX3.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.buttonX3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonX3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonX3.Location = new System.Drawing.Point(479, 8); this.buttonX3.Location = new System.Drawing.Point(515, 8);
this.buttonX3.Name = "buttonX3"; this.buttonX3.Name = "buttonX3";
this.buttonX3.Size = new System.Drawing.Size(93, 23); this.buttonX3.Size = new System.Drawing.Size(93, 23);
this.buttonX3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.buttonX3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@ -179,7 +179,7 @@
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 39); this.groupBox1.Location = new System.Drawing.Point(0, 39);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(999, 103); this.groupBox1.Size = new System.Drawing.Size(1035, 103);
this.groupBox1.TabIndex = 1; this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "患者信息"; this.groupBox1.Text = "患者信息";
@ -216,7 +216,7 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(3, 17); this.panel2.Location = new System.Drawing.Point(3, 17);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(993, 83); this.panel2.Size = new System.Drawing.Size(1029, 83);
this.panel2.TabIndex = 0; this.panel2.TabIndex = 0;
this.panel2.Visible = false; this.panel2.Visible = false;
// //
@ -470,7 +470,7 @@
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Location = new System.Drawing.Point(0, 142); this.groupBox2.Location = new System.Drawing.Point(0, 142);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(999, 495); this.groupBox2.Size = new System.Drawing.Size(1035, 495);
this.groupBox2.TabIndex = 2; this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "手术患者"; this.groupBox2.Text = "手术患者";
@ -480,14 +480,14 @@
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(3, 17); this.panel3.Location = new System.Drawing.Point(3, 17);
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(993, 475); this.panel3.Size = new System.Drawing.Size(1029, 475);
this.panel3.TabIndex = 0; this.panel3.TabIndex = 0;
// //
// frmSelectPatientNew2 // frmSelectPatientNew2
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(999, 637); this.ClientSize = new System.Drawing.Size(1035, 637);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);

View File

@ -22,6 +22,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
public int SelPatientId; public int SelPatientId;
public int SelApplyId; public int SelApplyId;
public bool isMainOpen = false; public bool isMainOpen = false;
public AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord;
public frmSelectPatientNew2() public frmSelectPatientNew2()
{ {
@ -39,13 +40,13 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
//判断如果当前手术间编号不为空,则显示当前手术间 //判断如果当前手术间编号不为空,则显示当前手术间
OperationRoom oprm = GetOperationRoom(rooms); OperationRoom oprm = GetOperationRoom(rooms);
if (oprm != null && oprm.Id.Value > 0) if (oprm != null && oprm.Id.Value > 0)
{ {
cboRoom.SelectedValue = oprm.Id.Value; cboRoom.SelectedValue = oprm.Id.Value;
cboRoom.Text = oprm.Name.ToString(); cboRoom.Text = oprm.Name.ToString();
} }
if (cboRoom.Text == "" && PublicMethod.SelectRoom != 0) if (cboRoom.Text == "" && PublicMethod.SelectRoom != 0)
{ {
cboRoom.SelectedValue = PublicMethod.SelectRoom; cboRoom.SelectedValue = PublicMethod.SelectRoom;
} }
FillDgv(); FillDgv();
@ -71,6 +72,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
panel3.Controls.Clear(); panel3.Controls.Clear();
panel2.Visible = false; panel2.Visible = false;
int i = 0, j = 0; int i = 0, j = 0;
int count = 5;
if (isMainOpen == true) count = 4;
DataTable dt = SelectPatient.GetSelectPatientDataTable DataTable dt = SelectPatient.GetSelectPatientDataTable
(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString()); (DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString());
@ -83,7 +86,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30); uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
panel3.Controls.Add(uc); panel3.Controls.Add(uc);
j++; j++;
if (j == 5) if (j == count)
{ {
i++; i++;
j = 0; j = 0;
@ -103,7 +106,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30); uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
panel3.Controls.Add(uc); panel3.Controls.Add(uc);
j++; j++;
if (j == 5) if (j == count)
{ {
i++; i++;
j = 0; j = 0;
@ -206,7 +209,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
return; return;
} }
} }
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2();
if (frmAnasRecord == null)
frmAnasRecord = new frmAnasRecordBill2();
frmAnasRecord.PatientId = PatientId; frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId; frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId);
@ -227,13 +232,16 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
} }
else else
{ {
if (frmAnasRecord._record != null)
frmAnasRecord.ClearRecordDate();
this.Close(); this.Close();
} }
} }
else else
{ {
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2(); if (frmAnasRecord == null)
frmAnasRecord = new frmAnasRecordBill2();
frmAnasRecord.PatientId = PatientId; frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId; frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId);
@ -253,6 +261,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
} }
else else
{ {
if (frmAnasRecord._record != null)
frmAnasRecord.ClearRecordDate();
this.Close(); this.Close();
} }
} }
@ -263,28 +273,28 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
} }
} }
public OperationRoom GetOperationRoom(List<OperationRoom> list) public OperationRoom GetOperationRoom(List<OperationRoom> list)
{ {
try try
{ {
//得到计算机名 //得到计算机名
string strPcName = Dns.GetHostName(); string strPcName = Dns.GetHostName();
//得到本机IP地址数组 //得到本机IP地址数组
IPHostEntry ipEntry = Dns.GetHostEntry(strPcName); IPHostEntry ipEntry = Dns.GetHostEntry(strPcName);
//遍历数组 //遍历数组
foreach (OperationRoom room in list) foreach (OperationRoom room in list)
{
foreach (var IPadd in ipEntry.AddressList)
{ {
foreach (var IPadd in ipEntry.AddressList) //判断当前字符串是否为正确IP地址
if (PublicMethod.IsRightIP(IPadd.ToString()))
{ {
//判断当前字符串是否为正确IP地址 if (room.Ip == IPadd.ToString())
if (PublicMethod.IsRightIP(IPadd.ToString()))
{ {
if (room.Ip == IPadd.ToString() ) return room;
{
return room;
}
} }
} }
} }
}
return null; return null;
} }
catch (Exception) catch (Exception)
@ -340,7 +350,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
BOperationRecord.DeleteEvent(PatientId, 8); BOperationRecord.DeleteEvent(PatientId, 8);
HelperDB.DbHelperSQL.CommitTrans(); HelperDB.DbHelperSQL.CommitTrans();
AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2(); if (frmAnasRecord == null)
frmAnasRecord = new frmAnasRecordBill2();
frmAnasRecord.PatientId = PatientId; frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = applyId; frmAnasRecord.ApplyId = applyId;
frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(int.Parse(uc.Tag.ToString())); frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(int.Parse(uc.Tag.ToString()));
@ -356,6 +367,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
} }
else else
{ {
if (frmAnasRecord._record != null)
frmAnasRecord.ClearRecordDate();
this.Close(); this.Close();
} }
} }

View File

@ -165,7 +165,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAXJJREFUSEu1lk1KxTAU j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAXJJREFUSEu1lk1KxTAU
hTMSF6Ag6ExBHLkHceISXIP0J0n7+n7U5bgHFyCIougSnPgDOnD2wEE8t6+tSW5FafIG3+T2cA9Jzm0i hTMSF6Ag6ExBHLkHceISXIP0J0n7+n7U5bgHFyCIougSnPgDOnD2wEE8t6+tSW5FafIG3+T2cA9Jzm0i
jDGMNJNzm6SYCZepSDQxsTlOc/Xa148VCDQ2Nkl5JhxglKqRSHMNJOk30ix/JK3fi2AFwjYgFs1PfzFR jDGMNJNzm6SYCZepSDQxsTlOc/Xa148VCDQ2Nkl5JhxglKqRSHMNJOk30ix/JK3fi2AFwjYgFs1PfzFR
W9DcNtp5Xz9WINrmLV1z30TqdZjcW9pQE7aSVazkztNGNpHlpa8DkbZrdE5JmuHAHU1DgEkd0TG2qBKJ W9DcNtp5Xz9WINrmLV1z30TqdZjcW9pQE7aSVazkztNGNpHlpa8DkbZrdE5JmuHAHU1DgEkd0TG2qBKJ
@ -222,7 +222,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAaJJREFUSEu1lkFKw0AY j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAaJJREFUSEu1lkFKw0AY
hWclHkBB0J2CuPIO4sYjeAbJZGaSttqqx/EOHkCQiqJHcKMWdOFOcDG+lzRN8/+ldpEsPgovr+9lkn+G hWclHkBB0J2CuPIO4sYjeAbJZGaSttqqx/EOHkCQiqJHcKMWdOFOcDG+lzRN8/+ldpEsPgovr+9lkn+G
mBijwrrwkWQXp8DUDE2Sk1EDm/qfeRblKYHAHG3qXvC7ZZ1HaWZs6JfBvasGpbdGZhElEJh5V/zTA1a1 mBijwrrwkWQXp8DUDE2Sk1EDm/qfeRblKYHAHG3qXvC7ZZ1HaWZs6JfBvasGpbdGZhElEJh5V/zTA1a1
s7jksrWSiJIn67PNLlcyLcoeUbLe3UoqfO+2+xLnI6ZslPSv54raLkkd3893EgYnNgww0ufFaEufzCJK s7jksrWSiJIn67PNLlcyLcoeUbLe3UoqfO+2+xLnI6ZslPSv54raLkkd3893EgYnNgww0ufFaEufzCJK

View File

@ -29,11 +29,11 @@ namespace AIMSBLL
string sql = string.Empty; string sql = string.Empty;
if (str == "") if (str == "")
{ {
sql = string.Format("select Id,HelpCode,Name from Events where IsValid=1 and Name<>'入室' and Name<>'出室' and Name<>'手术开始' and Name<>'手术结束' and Name<>'麻醉开始' and Name<>'麻醉结束' and UseRate>50 Order By UseRate desc"); sql = string.Format("select Id,HelpCode,Name from Events where IsValid=1 and Name<>'入室' and Name<>'出室' and Name<>'手术开始' and Name<>'手术结束' and Name<>'麻醉开始' and Name<>'麻醉完成' and UseRate>50 Order By UseRate desc");
} }
else else
{ {
sql = string.Format("SELECT Top 28 e.Id,e.Name FROM Events e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and IsValid = 1 and Name<>'入室' and Name<>'出室' and Name<>'手术开始' and Name<>'手术结束' and Name<>'麻醉开始' and Name<>'麻醉结束' Order By UseRate desc", str); sql = string.Format("SELECT Top 28 e.Id,e.Name FROM Events e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and IsValid = 1 and Name<>'入室' and Name<>'出室' and Name<>'手术开始' and Name<>'手术结束' and Name<>'麻醉开始' and Name<>'麻醉完成' Order By UseRate desc", str);
} }
try try
{ {

View File

@ -178,11 +178,12 @@ namespace AIMSBLL
dose += item.DosageUnit; dose += item.DosageUnit;
} }
_record.SpareFour += string.Format("({0}){1} {2} {3}{4}{5} ", x + 1, (item.DrugBeginTime == item.DrugEndTime) ? item.DrugBeginTime.ToShortTimeString() : item.DrugBeginTime.ToShortTimeString() + "->" + item.DrugEndTime.ToShortTimeString(), item.DrugName.Trim(), dose, "", item.DrugChannel == null ? "" : " " + item.DrugChannel.ToString()); _record.SpareFour += string.Format("({0}){1} {2} {3}{4}{5} ", x + 1, (item.DrugBeginTime == item.DrugEndTime) ? item.DrugBeginTime.ToShortTimeString() : item.DrugBeginTime.ToShortTimeString() + "->" + item.DrugEndTime.ToShortTimeString(), item.DrugName.Trim(), dose, "", item.DrugChannel == null ? "" : " " + item.DrugChannel.ToString());
if (item.Dosage != 0) if (item.DosageUnit.Trim() == "mL" || item.DosageUnit.Trim() == "ml" || item.DosageUnit.Trim() == "ML")
{ if (item.Dosage != 0)
Double val = Convert.ToDouble(item.Dosage); {
allDrugDose += val; Double val = Convert.ToDouble(item.Dosage);
} allDrugDose += val;
}
x++; x++;
} }
_record.SpareTwo = allDrugDose.ToString(); _record.SpareTwo = allDrugDose.ToString();
@ -362,47 +363,32 @@ namespace AIMSBLL
} }
else if (EventName != "入室" && EventName != "麻醉开始" && _record.InRoomTime > curTimeTemp)// && OpeState == true else if (EventName != "入室" && EventName != "麻醉开始" && _record.InRoomTime > curTimeTemp)// && OpeState == true
{ {
//TimeSpan tsp = DateTime.Now - _record.InRoomTime.Value;
//if (tsp.TotalHours > 12 || tsp.TotalDays > 1)
// messing = "";// "请在“事件记录”添加" + EventName + "时间!";
//else
messing = EventName + "时间不能小于入室时间(" + _record.InRoomTime + ") "; messing = EventName + "时间不能小于入室时间(" + _record.InRoomTime + ") ";
return false; return false;
} }
if (_record.OutRoomTime != null && EventName != "出室" && EventName != "麻醉结束" && _record.OutRoomTime < curTimeTemp && OpeState == true) if (_record.OutRoomTime != null && EventName != "出室" && EventName != "麻醉完成" && _record.OutRoomTime < curTimeTemp && OpeState == true)
{ {
messing = EventName + "时间不能大于出室时间(" + _record.OutRoomTime + ") "; messing = EventName + "时间不能大于出室时间(" + _record.OutRoomTime + ") ";
return false; return false;
} }
//if (EventName == "麻醉开始" && _record.OperationBeginTime != null && curTimeTemp > _record.OperationBeginTime && OpeState == true) if (EventName == "麻醉完成" && _record.AnesthesiaBeginTime == null && OpeState == true)
//{
// messing = "麻醉开始时间不能大于手术开始时间(" + _record.OperationBeginTime + ") ";
// return false;
//}
//if (EventName == "手术开始" && _record.AnesthesiaBeginTime == null && OpeState == true)
//{
// messing = "请先填写麻醉开始时间!";
// return false;
//}
//if (EventName == "手术开始" && curTimeTemp < _record.AnesthesiaBeginTime && OpeState == true)
//{
// messing = "手术开始时间必须晚于麻醉开始时间(" + _record.AnesthesiaBeginTime + ") ";
// return false;
//}
else if (EventName == "手术开始" && _record.OperationEndTime != null && curTimeTemp > _record.OperationEndTime && OpeState == true)
{ {
messing = "手术开始时间不能大于手术结束时间(" + _record.OperationBeginTime + ") "; messing = "请先填写麻醉开始时间!";
return false; return false;
} }
if (EventName == "手术结束" && _record.OperationBeginTime == null && OpeState == true) if (EventName == "手术结束" && _record.OperationBeginTime == null && OpeState == true)
{ {
messing = "请先填写手术开始时间!"; messing = "请先填写手术开始时间!";
return false; return false;
} }
else if (EventName == "手术结束" && curTimeTemp < _record.OperationBeginTime && OpeState == true) if (EventName == "拔管" && _record.SpileInTime == null && OpeState == true)
{
messing = "请先填写插管时间!";
return false;
}
if (EventName == "手术结束" && curTimeTemp < _record.OperationBeginTime && OpeState == true)
{ {
messing = "手术结束时间必须晚于手术开始时间(" + _record.OperationBeginTime + ") "; messing = "手术结束时间必须晚于手术开始时间(" + _record.OperationBeginTime + ") ";
return false; return false;
@ -413,7 +399,7 @@ namespace AIMSBLL
messing = "请先填写手术结束时间!"; messing = "请先填写手术结束时间!";
return false; return false;
} }
else if (EventName == "出室" && curTimeTemp < _record.OperationEndTime && OpeState == true) if (EventName == "出室" && curTimeTemp < _record.OperationEndTime && OpeState == true)
{ {
messing = "出室时间必须晚于手术结束时间(" + _record.OperationEndTime + ") "; messing = "出室时间必须晚于手术结束时间(" + _record.OperationEndTime + ") ";
return false; return false;
@ -559,10 +545,52 @@ namespace AIMSBLL
string sqlStr = "DELETE FROM PhysioData where PatientId = " + operationId + " "; string sqlStr = "DELETE FROM PhysioData where PatientId = " + operationId + " ";
return DBHelper.ExecNonQuery(sqlStr); return DBHelper.ExecNonQuery(sqlStr);
} }
public static DateTime GetMaxTime(int PatientId, int Type)
public static int DeletePhysioDataByID(int operationId, int PhysioParameterID)
{ {
return DOperationRecord.GetMaxTime(PatientId, Type); string sqlStr = "delete FROM PhysioData where PatientId = " + operationId + " and PhysioDataConfigId=" + PhysioParameterID;
return DBHelper.ExecNonQuery(sqlStr);
} }
public static void UpdatePhysioDataRespByTime(OperationRecord record)
{
int zzhx = 3;
int jxtq = 12;
//限制没有插管不让点击拔管
//插管拔管时间都有 更新插管前机械通气为自主呼吸 插管后机械通气为自主呼吸 插管开始到拔管是自主呼吸为机械通气
//有插管时间没拔管时间 更新插管前机械通气为自主呼吸 插管后自主呼吸为机械通气
//没有插管拔管时间更新所有机械通气为自主呼吸
if (record.SpileInTime != null && record.SpileOutTime != null)
{
string sqlStr = "Update PhysioData set PhysioDataConfigId=" + zzhx + " where PatientId = " + record.Id + " and PhysioDataConfigId=" + jxtq + " and RecordTime<'" + record.SpileInTime + "' ";
DBHelper.ExecNonQuery(sqlStr);
string sqlStr2 = "Update PhysioData set PhysioDataConfigId=" + jxtq + " where PatientId = " + record.Id + " and PhysioDataConfigId=" + zzhx + " and RecordTime>='" + record.SpileInTime
+ "' and RecordTime<='" + record.SpileOutTime + "' ";
DBHelper.ExecNonQuery(sqlStr2);
string sqlStr3 = "Update PhysioData set PhysioDataConfigId=" + zzhx + " where PatientId = " + record.Id + " and PhysioDataConfigId=" + jxtq + " and RecordTime>'" + record.SpileOutTime + "' ";
DBHelper.ExecNonQuery(sqlStr3);
}
else if (record.SpileInTime != null && record.SpileOutTime == null)
{
string sqlStr = "Update PhysioData set PhysioDataConfigId=" + zzhx + " where PatientId = " + record.Id + " and PhysioDataConfigId=" + jxtq + " and RecordTime<'" + record.SpileInTime + "' ";
DBHelper.ExecNonQuery(sqlStr);
string sqlStr2 = "Update PhysioData set PhysioDataConfigId=" + jxtq + " where PatientId = " + record.Id + " and PhysioDataConfigId=" + zzhx + " and RecordTime>='" + record.SpileInTime
+ "' ";
DBHelper.ExecNonQuery(sqlStr2);
}
else if (record.SpileInTime == null && record.SpileOutTime == null)
{
string sqlStr = "Update PhysioData set PhysioDataConfigId=" + zzhx + " where PatientId = " + record.Id + " and PhysioDataConfigId=" + jxtq;
DBHelper.ExecNonQuery(sqlStr);
}
}
public static DataTable getByOpeIDIsPhysioData(int operationId,string PhysioDataConfigId)
{
string sqlStr = "SELECT [PhysioDataConfig].Name , PhysioData.RecordTime, PhysioData.[Value] FROM [dbo].[PhysioDataConfig] INNER JOIN PhysioData ON [PhysioDataConfig].Id = PhysioData.PhysioDataConfigId where PatientId = " + operationId + " and PhysioDataConfigId in ("+ PhysioDataConfigId + ") order by PhysioDataConfigId,PhysioData.RecordTime ASC";
return DBHelper.GetDataTable(sqlStr);
}
public static int GetDataCount(int RecorId, int PatientId, int Type) public static int GetDataCount(int RecorId, int PatientId, int Type)
{ {
return DOperationRecord.GetDataCount(RecorId, PatientId, Type); return DOperationRecord.GetDataCount(RecorId, PatientId, Type);

View File

@ -161,7 +161,7 @@ namespace AIMSDAL
} }
public static DataTable GetCommonlyEvents() public static DataTable GetCommonlyEvents()
{ {
string strSql = "select top 35 e.* from [Events] e where e.IsValid=1 and Name not in('入室' ,'出室' ,'手术开始' ,'手术结束' ,'麻醉开始' ,'麻醉结束','插管','喉罩' ,'拔管') Order By UseRate desc"; string strSql = "select top 35 e.* from [Events] e where e.IsValid=1 and Name not in('入室' ,'出室' ,'手术开始' ,'手术结束' ,'麻醉开始' ,'麻醉完成','插管','喉罩' ,'拔管') Order By UseRate desc";
return DBHelper.GetDataTable(strSql); return DBHelper.GetDataTable(strSql);
} }
public static DataTable GetEventsByIds(string ids) public static DataTable GetEventsByIds(string ids)
@ -182,11 +182,11 @@ namespace AIMSDAL
string sql = string.Empty; string sql = string.Empty;
if (str == "") if (str == "")
{ {
sql = string.Format("select Id,HelpCode,Name,Remark from Events where IsValid=1 and Name not in('入室' ,'出室' ,'手术开始' ,'手术结束' ,'麻醉开始' ,'麻醉结束','插管','喉罩' ,'拔管') Order By UseRate desc"); sql = string.Format("select Id,HelpCode,Name,Remark from Events where IsValid=1 and Name not in('入室' ,'出室' ,'手术开始' ,'手术结束' ,'麻醉开始' ,'麻醉完成','插管','喉罩' ,'拔管') Order By UseRate desc");
} }
else else
{ {
sql = string.Format("SELECT Top 28 e.Id,e.Name,e.Remark FROM Events e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and (IsValid=1 and Name not in('入室' ,'出室' ,'手术开始' ,'手术结束' ,'麻醉开始' ,'麻醉结束','插管' ,'喉罩' ,'拔管') ) Order By UseRate desc", str); sql = string.Format("SELECT Top 28 e.Id,e.Name,e.Remark FROM Events e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and (IsValid=1 and Name not in('入室' ,'出室' ,'手术开始' ,'手术结束' ,'麻醉开始' ,'麻醉完成','插管' ,'喉罩' ,'拔管') ) Order By UseRate desc", str);
} }
try try
{ {

View File

@ -15,8 +15,7 @@ namespace DrawGraph
{ {
/// <summary> /// <summary>
/// 药品区域 /// 药品区域
/// </summary> /// </summary>
public RectangleFramePackObj OutputManagePpack;
public LinePackObj H3pack; public LinePackObj H3pack;
public LinePackObj H5pack; public LinePackObj H5pack;
public LinesPackObj lines; public LinesPackObj lines;
@ -46,7 +45,6 @@ namespace DrawGraph
RowsCount = Convert.ToInt32(lines.XPageSpan / lines.XMajorGridStep); RowsCount = Convert.ToInt32(lines.XPageSpan / lines.XMajorGridStep);
H3pack = template.GetPackObjectOTag<LinePackObj>("DrugsManage_LinePackObj_6"); H3pack = template.GetPackObjectOTag<LinePackObj>("DrugsManage_LinePackObj_6");
H5pack = template.GetPackObjectOTag<LinePackObj>("DrugsManage_LinePackObj_9"); H5pack = template.GetPackObjectOTag<LinePackObj>("DrugsManage_LinePackObj_9");
OutputManagePpack = template.GetPackObjectOTag<RectangleFramePackObj>("OutputManage_RectangleFramePackObj_10");
} }
#endregion #endregion
@ -346,39 +344,20 @@ namespace DrawGraph
private void DrawDrugSapDose() private void DrawDrugSapDose()
{ {
if (OutputManagePpack != null) return; LinePackObj linePack = template.GetPackObjectOTag<LinePackObj>("RemarkManage_LinePackObj_21");
double x = template.GetPackObjectOTag<LinePackObj>("RemarkManage_LinePackObj_9").RealX; if (linePack == null) return;
double x = linePack.RealX;
RectangleFramePackObj remarkPpack = template.GetPackObjectOTag<RectangleFramePackObj>("RemarkManage_RectangleFramePackObj_2"); RectangleFramePackObj remarkPpack = template.GetPackObjectOTag<RectangleFramePackObj>("RemarkManage_RectangleFramePackObj_2");
float fontsize = 7f; float fontsize = 7f;
int DrawIndex = 0; int DrawIndex = 0;
double y; double y;
int remarkcount = 12; int remarkcount = 6;
double StartRemarkRatio = remarkPpack.RealY; double StartRemarkRatio = remarkPpack.RealY;
double EndRemarkRatio = remarkPpack.RealEndY; double EndRemarkRatio = remarkPpack.RealEndY;
try try
{ {
myOpeRecord.ClearDrugsDose(ZedControl); myOpeRecord.ClearDrugsDose(ZedControl);
double allDrugDose = 0; double allOutDose = 0; double allDrugDose = 0; double allOutDose = 0;
myOpeRecord.FactOutputLiquidsList.ForEach(item =>
{
if (item.DosageUnit.Trim() == "mL" || item.DosageUnit.Trim() == "ml" || item.DosageUnit.Trim() == "ML")
{
Double val = Convert.ToDouble(item.Dosage);
allOutDose += val;
}
});
y = StartRemarkRatio + getYPositionByListIndex(DrawIndex, StartRemarkRatio, EndRemarkRatio, remarkcount);
ZUtil.DrawText("总出量:" + allOutDose + " ml", x, y, ZedControl, "allOutDose", Color.Black, fontsize - 0.2f, true);
myOpeRecord.FactOutputLiquidsList.ForEach(item =>
{
if (item.DosageUnit.Trim() == "mL" || item.DosageUnit.Trim() == "ml" || item.DosageUnit.Trim() == "ML")
{
DrawIndex++;
Double val = Convert.ToDouble(item.Dosage);
y = StartRemarkRatio + getYPositionByListIndex(DrawIndex, StartRemarkRatio, EndRemarkRatio, remarkcount);
ZUtil.DrawTextRemark(item.OutputLiquidsName + "" + val + " " + item.DosageUnit, x + 0.01f, y, ZedControl, fontsize, "Out" + DrawIndex);
}
});
myOpeRecord.FactDrugList.ForEach(drug => myOpeRecord.FactDrugList.ForEach(drug =>
{ {
//if (drug.DrugEffectId != null && drug.DrugEffectId != 252) //if (drug.DrugEffectId != null && drug.DrugEffectId != 252)
@ -398,10 +377,29 @@ namespace DrawGraph
} }
//} //}
}); });
template.SetObjValue(myOpeRecord, "OperationRecord.InAmount", allDrugDose.ToString(), allDrugDose.ToString(), allDrugDose.ToString() != myOpeRecord.InAmount ? true : false);
DrawIndex++; DrawIndex++;
y = StartRemarkRatio + getYPositionByListIndex(DrawIndex, StartRemarkRatio, EndRemarkRatio, remarkcount); myOpeRecord.FactOutputLiquidsList.ForEach(item =>
ZUtil.DrawText("总入量:" + allDrugDose + " ml", x, y, ZedControl, "allDrugDose", Color.Black, fontsize - 0.2f, true); {
if (item.DosageUnit.Trim() == "mL" || item.DosageUnit.Trim() == "ml" || item.DosageUnit.Trim() == "ML")
{
Double val = Convert.ToDouble(item.Dosage);
allOutDose += val;
}
});
template.SetObjValue(myOpeRecord, "OperationRecord.OutAmount", allOutDose.ToString(), allOutDose.ToString(), allOutDose.ToString() != myOpeRecord.OutAmount ? true : false);
DrawIndex++;
//myOpeRecord.FactOutputLiquidsList.ForEach(item =>
//{
// if (item.DosageUnit.Trim() == "mL" || item.DosageUnit.Trim() == "ml" || item.DosageUnit.Trim() == "ML")
// {
// DrawIndex++;
// Double val = Convert.ToDouble(item.Dosage);
// y = StartRemarkRatio + getYPositionByListIndex(DrawIndex, StartRemarkRatio, EndRemarkRatio, remarkcount);
// ZUtil.DrawTextRemark(item.OutputLiquidsName + "" + val + " " + item.DosageUnit, x + 0.01f, y, ZedControl, fontsize, "Out" + DrawIndex);
// }
//});
} }
catch (Exception ex) catch (Exception ex)

View File

@ -184,7 +184,8 @@ namespace DrawGraph
SetRemarkInfo(myOpeRecord.SapsListstr, remarkRowscount, ref x, ref remarkRow, ref AllRemarkRow, fontsize, ref fontlength); SetRemarkInfo(myOpeRecord.SapsListstr, remarkRowscount, ref x, ref remarkRow, ref AllRemarkRow, fontsize, ref fontlength);
//术后镇痛药备注 //术后镇痛药备注
SetRemarkInfo(myOpeRecord.AfterDrugsListstr, remarkRowscount, ref x, ref remarkRow, ref AllRemarkRow, fontsize, ref fontlength); if (myOpeRecord.currentPage == myOpeRecord.pageCount)
SetRemarkInfo(myOpeRecord.AfterDrugsListstr, remarkRowscount, ref x, ref remarkRow, ref AllRemarkRow, fontsize, ref fontlength);
//手术信息备注 //手术信息备注
if (myOpeRecord.OpeRecordInfo != null && OutputManagePpack == null) if (myOpeRecord.OpeRecordInfo != null && OutputManagePpack == null)
@ -360,7 +361,7 @@ namespace DrawGraph
x = H5pack.RealX; x = H5pack.RealX;
remarkRow = 0; remarkRow = 0;
} }
else if (AllRemarkRow == (remarkRowscount * 3) && OutputManagePpack != null) else if (AllRemarkRow == (remarkRowscount * 3) && H6pack != null)
{ {
x = H6pack.RealX; x = H6pack.RealX;
remarkRow = 0; remarkRow = 0;

View File

@ -96,12 +96,6 @@
<DependentUpon>AreaManageForm.cs</DependentUpon> <DependentUpon>AreaManageForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="DocumentParent.cs" /> <Compile Include="DocumentParent.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="frmTemplateD.cs"> <Compile Include="frmTemplateD.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -135,9 +129,6 @@
<EmbeddedResource Include="AreaManageForm.resx"> <EmbeddedResource Include="AreaManageForm.resx">
<DependentUpon>AreaManageForm.cs</DependentUpon> <DependentUpon>AreaManageForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmTemplateD.resx"> <EmbeddedResource Include="frmTemplateD.resx">
<DependentUpon>frmTemplateD.cs</DependentUpon> <DependentUpon>frmTemplateD.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@ -1,105 +0,0 @@
namespace DrawGraphManagement
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.TextBox textBox1;
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
textBox1 = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(752, 613);
this.panel1.TabIndex = 0;
//
// panel2
//
this.panel2.Controls.Add(this.textBoxX1);
this.panel2.Controls.Add(textBox1);
this.panel2.Location = new System.Drawing.Point(296, 53);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(200, 896);
this.panel2.TabIndex = 0;
//
// textBox1
//
textBox1.CausesValidation = false;
textBox1.Enabled = false;
textBox1.HideSelection = false;
textBox1.Location = new System.Drawing.Point(29, 419);
textBox1.Name = "textBox1";
textBox1.ShortcutsEnabled = false;
textBox1.Size = new System.Drawing.Size(152, 21);
textBox1.TabIndex = 0;
textBox1.TabStop = false;
//
// textBoxX1
//
//
//
//
this.textBoxX1.Border.Class = "TextBoxBorder";
this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.textBoxX1.Location = new System.Drawing.Point(39, 554);
this.textBoxX1.Multiline = true;
this.textBoxX1.Name = "textBoxX1";
this.textBoxX1.Size = new System.Drawing.Size(142, 97);
this.textBoxX1.TabIndex = 1;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(752, 613);
this.Controls.Add(this.panel1);
this.Name = "Form1";
this.Text = "Form1";
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
}
}

View File

@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DrawGraphManagement
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

View File

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="textBox1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

View File

@ -15,7 +15,7 @@ namespace DrawGraphManagement
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
PreLoad(); PreLoad();
Application.Run(new Form1()); Application.Run(new Main());
} }
static void PreLoad() static void PreLoad()
{ {