From 1396b0762c1ba70e2b7add5e1cfa0bb3d039909b Mon Sep 17 00:00:00 2001 From: leomon Date: Fri, 11 Nov 2022 12:49:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E4=B8=BB=E5=91=BC=E5=90=B8=20?= =?UTF-8?q?=E6=9C=BA=E6=A2=B0=E9=80=9A=E6=B0=94=E7=94=BB=E7=82=B9=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnasRecordBill/frmAnasRecordBill2.cs | 133 ++++++++++++++---- .../AnasRecordBill/frmAnasRecordInstrument.cs | 3 +- .../AnasRecordBill/frmFactEventsNew.cs | 43 +++++- .../frmSelectPatientNew2.Designer.cs | 14 +- .../AnasRecordBill/frmSelectPatientNew2.cs | 57 +++++--- .../AnasRecordBill/frmSelectPatientNew2.resx | 4 +- AIMSEntity/BLL/Extension/BEvents.cs | 4 +- AIMSEntity/BLL/Extension/BOperationRecord.cs | 94 ++++++++----- AIMSEntity/DAL/Extension/DEvents.cs | 6 +- DrawGraph/AreaManage/DrugsManage.cs | 56 ++++---- DrawGraph/AreaManage/RemarkManage.cs | 5 +- .../DrawGraphManagement.csproj | 9 -- DrawGraphManagement/Form1.Designer.cs | 105 -------------- DrawGraphManagement/Form1.cs | 19 --- DrawGraphManagement/Form1.resx | 123 ---------------- DrawGraphManagement/Program.cs | 2 +- 16 files changed, 287 insertions(+), 390 deletions(-) delete mode 100644 DrawGraphManagement/Form1.Designer.cs delete mode 100644 DrawGraphManagement/Form1.cs delete mode 100644 DrawGraphManagement/Form1.resx diff --git a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs index 320b262..59768dc 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs @@ -19,6 +19,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Windows.Forms; +//using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock; namespace AIMS.OperationDoing.AnasRecordBill.UI { @@ -190,10 +191,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI templateManage2.Bind(); zgcAnaesRecord2.Refresh(); - Panel panel = zgcAnaesRecord.Parent as Panel; - panel.VerticalScroll.Value = 0; - Panel panel2 = zgcAnaesRecord2.Parent as Panel; - panel2.VerticalScroll.Value = 0; + panel8.VerticalScroll.Value = 0; + panel82.VerticalScroll.Value = 0; mPanes = new List(); UpPanes = new List(); @@ -677,12 +676,14 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI _record.SpileInTime = null; this.picCG.BackgroundImage = global::AIMS.Properties.Resources.置管; BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); + UpdatePhysioDataResp(); } if (Inevent != null && Inevent.EventName == "拔管") { _record.SpileOutTime = null; this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; 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; 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)); + UpdatePhysioDataResp(); + } if (Inevent != null && Inevent.EventName == "拔管" && _record.SpileOutTime != Inevent.EventBeginTime) { _record.SpileOutTime = Inevent.EventBeginTime; 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)); + UpdatePhysioDataResp(); } if (Inevent != null && Inevent.EventName == "手术结束" && _record.OperationEndTime != Inevent.EventBeginTime) { @@ -852,7 +856,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI if (templateManage != null) templateManage.SetPYL(); } - int lastpanel82VerticalScrollValue = -1;//为鼠标滚动事件提供一个静态变量,用来存储上次滚动后的VerticalScroll.Value private void panel82_MouseWheel(object sender, MouseEventArgs e) { if (templateManage2 != null) @@ -949,6 +952,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { OperationDoing.AnasRecordBill.UI.frmSelectPatientNew2 frmSelectPatient = new UI.frmSelectPatientNew2(); frmSelectPatient.isMainOpen = true; + frmSelectPatient.frmAnasRecord = this; frmSelectPatient.FormClosed += new FormClosedEventHandler(frmSelectPatient_FormClosed); frmSelectPatient.ShowDialog(); @@ -1294,7 +1298,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI #region 采集程序 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 (_record.OutRoomTime != null && DateTime.Now >= _record.OutRoomTime) return; @@ -1317,7 +1321,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI string key = addPP.Name; string value = addPP.Enname; if (addPP.IsValid == false) continue; - if (key == "机械通气") continue; if (value == null || value == "") continue; int minMinutes = -5; @@ -1330,7 +1333,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { if (Double.Parse(dr["ParamValue"].ToString()) <= 1) 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(); pdTemp.RecordTime = dtTime; pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); @@ -1401,8 +1404,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI try { if (((TimeSpan)(DateTime.Now - _record.lastPageBegin)).TotalHours > 24 || NowRoom == null) return; - timerGetCollectorData_Tick(false); - ShowMonitorDataToRight(); + timerGetCollectorData_Tick(); + if (State != AIMSExtension.EditState.BROWSE) + ShowMonitorDataToRight(); } catch (Exception) { @@ -1523,29 +1527,39 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI public bool isCgtime(string key, DateTime time) { 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 (_record.SpileInTime != null && _record.SpileOutTime == null) - { - if (time > _record.SpileInTime) - b = true; - } + if (time >= _record.SpileInTime && time <= _record.SpileOutTime) + 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; } @@ -1565,6 +1579,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { if (timerGetTextCollectorData != null) { + LastMonitorDataTime = null; timerGetTextCollectorData.Enabled = false; timerGetTextCollectorData.Stop(); } @@ -1622,7 +1637,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI templateManage.zedControl_MouseDoubleClick(send, e); } } - //public ucStripMenuItem menuItem = new ucStripMenuItem(); 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 (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(); - pdTemp.RecordTime = DateTime.Parse(dr["InsertTime"].ToString()); + pdTemp.RecordTime = RecordTime; pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); pdTemp.YAisx = addPP.YAisx; 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 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) { templateManage.ClearSelectCouve(); @@ -2017,7 +2063,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室; } - private bool GetOpeState(ref string message) { 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 #region 右侧按钮 @@ -2194,6 +2267,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { if (_record != null && _record.StateName == "手术中" && State != AIMSExtension.EditState.BROWSE) { + panel8.VerticalScroll.Value = 0; + panel82.VerticalScroll.Value = 0; DisposeTimer(); } } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordInstrument.cs b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordInstrument.cs index 98b8617..321c57f 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordInstrument.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordInstrument.cs @@ -734,7 +734,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI try { if (NowRoom == null) return; - ShowMonitorDataToRight(); + if (State != AIMSExtension.EditState.BROWSE) + ShowMonitorDataToRight(); } catch (Exception ex) { diff --git a/AIMS/OperationDoing/AnasRecordBill/frmFactEventsNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmFactEventsNew.cs index 8c150df..678edd7 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmFactEventsNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmFactEventsNew.cs @@ -443,11 +443,11 @@ namespace AIMS.PublicUI.UI { //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); // BOperationRecord.DeletePhysioDataByID(_record.Id.Value, item.Id); // } @@ -640,16 +640,19 @@ namespace AIMS.PublicUI.UI { _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)); + UpdatePhysioDataResp(); } if (_event != null && _event.EventName == "喉罩" && _record.SpileInTime != _event.EventBeginTime) { _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)); + UpdatePhysioDataResp(); } if (_event != null && _event.EventName == "拔管" && _record.SpileOutTime != _event.EventBeginTime) { _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)); + UpdatePhysioDataResp(); } if (_event != null && _event.EventName == "手术结束" && _record.OperationEndTime != _event.EventBeginTime) { @@ -689,16 +692,19 @@ namespace AIMS.PublicUI.UI { _record.SpileInTime = null; BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); + UpdatePhysioDataResp(); } if (_event != null && _event.EventName == "喉罩") { _record.SpileInTime = null; BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); + UpdatePhysioDataResp(); } if (_event != null && _event.EventName == "拔管") { _record.SpileOutTime = null; BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); + UpdatePhysioDataResp(); } //AIMSModel.ParameterList keyValuePairs = new AIMSModel.ParameterList(); @@ -924,6 +930,36 @@ namespace AIMS.PublicUI.UI TextBoxX box = sender as TextBoxX; box.Text = ""; } + + public void UpdatePhysioDataResp() + { + BOperationRecord.UpdatePhysioDataRespByTime(_record); + string PhysioDataConfigIds = "3,12"; + DataTable dtPhysioData = BOperationRecord.getByOpeIDIsPhysioData(_record.Id.Value, PhysioDataConfigIds); + List 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 @@ -1013,5 +1049,6 @@ namespace AIMS.PublicUI.UI grid.CurrentCell.Value = value; } } + } } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.Designer.cs b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.Designer.cs index 9bee17a..5887bd7 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.Designer.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.Designer.cs @@ -87,7 +87,7 @@ this.panel1.Font = new System.Drawing.Font("宋体", 10.5F); this.panel1.Location = new System.Drawing.Point(0, 0); 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; // // buttonX3 @@ -96,7 +96,7 @@ 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.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.Size = new System.Drawing.Size(93, 23); this.buttonX3.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -179,7 +179,7 @@ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(0, 39); 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.TabStop = false; this.groupBox1.Text = "患者信息"; @@ -216,7 +216,7 @@ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(3, 17); 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.Visible = false; // @@ -470,7 +470,7 @@ this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Location = new System.Drawing.Point(0, 142); 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.TabStop = false; this.groupBox2.Text = "手术患者"; @@ -480,14 +480,14 @@ this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Location = new System.Drawing.Point(3, 17); 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; // // frmSelectPatientNew2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 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.groupBox1); this.Controls.Add(this.panel1); diff --git a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs index b445740..6d05a43 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs @@ -22,6 +22,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI public int SelPatientId; public int SelApplyId; public bool isMainOpen = false; + public AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord; public frmSelectPatientNew2() { @@ -39,13 +40,13 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI //判断如果当前手术间编号不为空,则显示当前手术间 OperationRoom oprm = GetOperationRoom(rooms); if (oprm != null && oprm.Id.Value > 0) - { - cboRoom.SelectedValue = oprm.Id.Value; + { + cboRoom.SelectedValue = oprm.Id.Value; cboRoom.Text = oprm.Name.ToString(); } if (cboRoom.Text == "" && PublicMethod.SelectRoom != 0) - { - cboRoom.SelectedValue = PublicMethod.SelectRoom; + { + cboRoom.SelectedValue = PublicMethod.SelectRoom; } FillDgv(); @@ -71,6 +72,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI panel3.Controls.Clear(); panel2.Visible = false; int i = 0, j = 0; + int count = 5; + if (isMainOpen == true) count = 4; DataTable dt = SelectPatient.GetSelectPatientDataTable (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); panel3.Controls.Add(uc); j++; - if (j == 5) + if (j == count) { i++; j = 0; @@ -103,7 +106,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30); panel3.Controls.Add(uc); j++; - if (j == 5) + if (j == count) { i++; j = 0; @@ -206,7 +209,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI return; } } - AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2(); + + if (frmAnasRecord == null) + frmAnasRecord = new frmAnasRecordBill2(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); @@ -227,13 +232,16 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } else { + if (frmAnasRecord._record != null) + frmAnasRecord.ClearRecordDate(); this.Close(); } } else { - AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2(); + if (frmAnasRecord == null) + frmAnasRecord = new frmAnasRecordBill2(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); @@ -253,6 +261,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } else { + if (frmAnasRecord._record != null) + frmAnasRecord.ClearRecordDate(); this.Close(); } } @@ -263,28 +273,28 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } } public OperationRoom GetOperationRoom(List list) - { + { try - { + { //得到计算机名 string strPcName = Dns.GetHostName(); //得到本机IP地址数组 - IPHostEntry ipEntry = Dns.GetHostEntry(strPcName); - //遍历数组 - foreach (OperationRoom room in list) + IPHostEntry ipEntry = Dns.GetHostEntry(strPcName); + //遍历数组 + 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 (PublicMethod.IsRightIP(IPadd.ToString())) + if (room.Ip == IPadd.ToString()) { - if (room.Ip == IPadd.ToString() ) - { - return room; - } + return room; } } - } + } + } return null; } catch (Exception) @@ -340,7 +350,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI BOperationRecord.DeleteEvent(PatientId, 8); HelperDB.DbHelperSQL.CommitTrans(); - AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2(); + if (frmAnasRecord == null) + frmAnasRecord = new frmAnasRecordBill2(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(int.Parse(uc.Tag.ToString())); @@ -356,6 +367,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } else { + if (frmAnasRecord._record != null) + frmAnasRecord.ClearRecordDate(); this.Close(); } } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.resx b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.resx index 70f8230..1dbb543 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.resx +++ b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.resx @@ -165,7 +165,7 @@ RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAXJJREFUSEu1lk1KxTAU + j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAXJJREFUSEu1lk1KxTAU hTMSF6Ag6ExBHLkHceISXIP0J0n7+n7U5bgHFyCIougSnPgDOnD2wEE8t6+tSW5FafIG3+T2cA9Jzm0i jDGMNJNzm6SYCZepSDQxsTlOc/Xa148VCDQ2Nkl5JhxglKqRSHMNJOk30ix/JK3fi2AFwjYgFs1PfzFR W9DcNtp5Xz9WINrmLV1z30TqdZjcW9pQE7aSVazkztNGNpHlpa8DkbZrdE5JmuHAHU1DgEkd0TG2qBKJ @@ -222,7 +222,7 @@ RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAaJJREFUSEu1lkFKw0AY + j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAaJJREFUSEu1lkFKw0AY hWclHkBB0J2CuPIO4sYjeAbJZGaSttqqx/EOHkCQiqJHcKMWdOFOcDG+lzRN8/+ldpEsPgovr+9lkn+G mBijwrrwkWQXp8DUDE2Sk1EDm/qfeRblKYHAHG3qXvC7ZZ1HaWZs6JfBvasGpbdGZhElEJh5V/zTA1a1 s7jksrWSiJIn67PNLlcyLcoeUbLe3UoqfO+2+xLnI6ZslPSv54raLkkd3893EgYnNgww0ufFaEufzCJK diff --git a/AIMSEntity/BLL/Extension/BEvents.cs b/AIMSEntity/BLL/Extension/BEvents.cs index e9f0189..e8c8877 100644 --- a/AIMSEntity/BLL/Extension/BEvents.cs +++ b/AIMSEntity/BLL/Extension/BEvents.cs @@ -29,11 +29,11 @@ namespace AIMSBLL string sql = string.Empty; 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 { - 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 { diff --git a/AIMSEntity/BLL/Extension/BOperationRecord.cs b/AIMSEntity/BLL/Extension/BOperationRecord.cs index 04f453e..a97b150 100644 --- a/AIMSEntity/BLL/Extension/BOperationRecord.cs +++ b/AIMSEntity/BLL/Extension/BOperationRecord.cs @@ -178,11 +178,12 @@ namespace AIMSBLL 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()); - if (item.Dosage != 0) - { - Double val = Convert.ToDouble(item.Dosage); - allDrugDose += val; - } + 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; + } x++; } _record.SpareTwo = allDrugDose.ToString(); @@ -362,47 +363,32 @@ namespace AIMSBLL } 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 + ") !"; 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 + ") !"; return false; } - //if (EventName == "麻醉开始" && _record.OperationBeginTime != null && curTimeTemp > _record.OperationBeginTime && 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) + if (EventName == "麻醉完成" && _record.AnesthesiaBeginTime == null && OpeState == true) { - messing = "手术开始时间不能大于手术结束时间(" + _record.OperationBeginTime + ") !"; + messing = "请先填写麻醉开始时间!"; return false; } - if (EventName == "手术结束" && _record.OperationBeginTime == null && OpeState == true) { messing = "请先填写手术开始时间!"; 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 + ") !"; return false; @@ -413,7 +399,7 @@ namespace AIMSBLL messing = "请先填写手术结束时间!"; return false; } - else if (EventName == "出室" && curTimeTemp < _record.OperationEndTime && OpeState == true) + if (EventName == "出室" && curTimeTemp < _record.OperationEndTime && OpeState == true) { messing = "出室时间必须晚于手术结束时间(" + _record.OperationEndTime + ") !"; return false; @@ -559,10 +545,52 @@ namespace AIMSBLL string sqlStr = "DELETE FROM PhysioData where PatientId = " + operationId + " "; 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) { return DOperationRecord.GetDataCount(RecorId, PatientId, Type); diff --git a/AIMSEntity/DAL/Extension/DEvents.cs b/AIMSEntity/DAL/Extension/DEvents.cs index e2d35d5..0cc7f5c 100644 --- a/AIMSEntity/DAL/Extension/DEvents.cs +++ b/AIMSEntity/DAL/Extension/DEvents.cs @@ -161,7 +161,7 @@ namespace AIMSDAL } 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); } public static DataTable GetEventsByIds(string ids) @@ -182,11 +182,11 @@ namespace AIMSDAL string sql = string.Empty; 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 { - 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 { diff --git a/DrawGraph/AreaManage/DrugsManage.cs b/DrawGraph/AreaManage/DrugsManage.cs index f7967ec..57504b8 100644 --- a/DrawGraph/AreaManage/DrugsManage.cs +++ b/DrawGraph/AreaManage/DrugsManage.cs @@ -15,8 +15,7 @@ namespace DrawGraph { /// /// 药品区域 - /// - public RectangleFramePackObj OutputManagePpack; + /// public LinePackObj H3pack; public LinePackObj H5pack; public LinesPackObj lines; @@ -46,7 +45,6 @@ namespace DrawGraph RowsCount = Convert.ToInt32(lines.XPageSpan / lines.XMajorGridStep); H3pack = template.GetPackObjectOTag("DrugsManage_LinePackObj_6"); H5pack = template.GetPackObjectOTag("DrugsManage_LinePackObj_9"); - OutputManagePpack = template.GetPackObjectOTag("OutputManage_RectangleFramePackObj_10"); } #endregion @@ -346,39 +344,20 @@ namespace DrawGraph private void DrawDrugSapDose() { - if (OutputManagePpack != null) return; - double x = template.GetPackObjectOTag("RemarkManage_LinePackObj_9").RealX; + LinePackObj linePack = template.GetPackObjectOTag("RemarkManage_LinePackObj_21"); + if (linePack == null) return; + double x = linePack.RealX; RectangleFramePackObj remarkPpack = template.GetPackObjectOTag("RemarkManage_RectangleFramePackObj_2"); float fontsize = 7f; int DrawIndex = 0; double y; - int remarkcount = 12; + int remarkcount = 6; double StartRemarkRatio = remarkPpack.RealY; double EndRemarkRatio = remarkPpack.RealEndY; try { myOpeRecord.ClearDrugsDose(ZedControl); 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 => { //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++; - y = StartRemarkRatio + getYPositionByListIndex(DrawIndex, StartRemarkRatio, EndRemarkRatio, remarkcount); - ZUtil.DrawText("总入量:" + allDrugDose + " ml", x, y, ZedControl, "allDrugDose", Color.Black, fontsize - 0.2f, true); + 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; + } + }); + 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) diff --git a/DrawGraph/AreaManage/RemarkManage.cs b/DrawGraph/AreaManage/RemarkManage.cs index 911d9d7..4b394f3 100644 --- a/DrawGraph/AreaManage/RemarkManage.cs +++ b/DrawGraph/AreaManage/RemarkManage.cs @@ -184,7 +184,8 @@ namespace DrawGraph 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) @@ -360,7 +361,7 @@ namespace DrawGraph x = H5pack.RealX; remarkRow = 0; } - else if (AllRemarkRow == (remarkRowscount * 3) && OutputManagePpack != null) + else if (AllRemarkRow == (remarkRowscount * 3) && H6pack != null) { x = H6pack.RealX; remarkRow = 0; diff --git a/DrawGraphManagement/DrawGraphManagement.csproj b/DrawGraphManagement/DrawGraphManagement.csproj index 6c2995d..bba5ec4 100644 --- a/DrawGraphManagement/DrawGraphManagement.csproj +++ b/DrawGraphManagement/DrawGraphManagement.csproj @@ -96,12 +96,6 @@ AreaManageForm.cs - - Form - - - Form1.cs - Form @@ -135,9 +129,6 @@ AreaManageForm.cs - - Form1.cs - frmTemplateD.cs diff --git a/DrawGraphManagement/Form1.Designer.cs b/DrawGraphManagement/Form1.Designer.cs deleted file mode 100644 index cc4a324..0000000 --- a/DrawGraphManagement/Form1.Designer.cs +++ /dev/null @@ -1,105 +0,0 @@ -namespace DrawGraphManagement -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - 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; - } -} \ No newline at end of file diff --git a/DrawGraphManagement/Form1.cs b/DrawGraphManagement/Form1.cs deleted file mode 100644 index ffe47f0..0000000 --- a/DrawGraphManagement/Form1.cs +++ /dev/null @@ -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(); - } - } -} diff --git a/DrawGraphManagement/Form1.resx b/DrawGraphManagement/Form1.resx deleted file mode 100644 index 0a16bb8..0000000 --- a/DrawGraphManagement/Form1.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/DrawGraphManagement/Program.cs b/DrawGraphManagement/Program.cs index 4ff495d..3cf8281 100644 --- a/DrawGraphManagement/Program.cs +++ b/DrawGraphManagement/Program.cs @@ -15,7 +15,7 @@ namespace DrawGraphManagement Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); PreLoad(); - Application.Run(new Form1()); + Application.Run(new Main()); } static void PreLoad() {