From 3adf335d8353d62ee2473d64e47e5099a70ad99e Mon Sep 17 00:00:00 2001 From: leomon Date: Tue, 20 Dec 2022 19:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=A1=AB=E5=86=99=E7=94=9F?= =?UTF-8?q?=E5=91=BD=E4=BD=93=E5=BE=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnasRecordBill/frmAanesthesiaRecord.cs | 5 +- .../AnasRecordBill/frmPhysioDataEdit.cs | 263 ++++++++++++++++-- .../frmPhysioDataEdit.designer.cs | 190 ++++++++++++- .../AnasRecordBill/frmPhysioDataEdit.resx | 76 ++--- DrawGraph/AreaManage/MonitorManage.cs | 73 ++++- DrawGraph/AreaManage/PhysioDataConfig.cs | 18 +- DrawGraph/AreaManage/PhysioDataManage.cs | 79 +++--- DrawGraph/AreaManage/PhysioDataService.cs | 14 +- 8 files changed, 587 insertions(+), 131 deletions(-) diff --git a/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs b/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs index b4893d5..4e52f07 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs @@ -1411,8 +1411,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI foreach (var pdTemp in physioDatas) { if (pdTemp.Value < 0) continue; - PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0]; - //addPP.AddOrDelItem(pdTemp, 5); + PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0]; addPP.AddPointItem(pdTemp); date++; } @@ -1757,7 +1756,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI DateTime RecordTime = DateTime.Parse(dr["InsertTime"].ToString()); if (!isCgtime(addPP.Name, RecordTime)) continue; PhysioData pdTemp = PhysioDataConfig.newPhysioData(addPP, _record.Id.Value, RecordTime, dr["ParamValue"].ToString()); - addPP.AddPointItem(pdTemp, false); + addPP.AddPointItem(pdTemp); } } } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.cs b/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.cs index 4177722..c555bd1 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.cs @@ -1,9 +1,12 @@ using AIMSBLL; +using AIMSExtension; +using DevComponents.DotNetBar; using DrawGraph; using System; using System.Collections.Generic; using System.Data; using System.Drawing; +using System.Linq; using System.Windows.Forms; namespace AIMS.OperationDoing.AnasRecordBill @@ -34,9 +37,83 @@ namespace AIMS.OperationDoing.AnasRecordBill #region 窗体加载事件 private void FormPrintBGYYNew_Load(object sender, EventArgs e) + { + dtpInsertBegin.Value = _record.InRoomTime.Value; + dtpInsertEnd.Value = _record.InRoomTime.Value.AddMinutes(240); + + int rows1 = 2; + //循环加载CheckBox控件 + foreach (PhysioDataConfig ade in _record.PhysioConfigList) + { + if (ade.IsDefalultShow == false) continue; + System.Windows.Forms.Label cb = new System.Windows.Forms.Label(); + cb.Tag = ade; + cb.Text = ade.Name; + cb.Font = new System.Drawing.Font("微软雅黑", 8f); + cb.Width = 75; + cb.Tag = ade; + cb.Location = new Point(5, rows1 * (cb.Height + 5)); + groupBox3.Controls.Add(cb); + + System.Windows.Forms.TextBox text = new System.Windows.Forms.TextBox(); + text.Tag = ade; + text.Font = new System.Drawing.Font("微软雅黑", 8f); + text.Width = 40; + text.Tag = ade; + text.Location = new Point(80, rows1 * (cb.Height + 5)); + groupBox3.Controls.Add(text); + + System.Windows.Forms.Label unit = new System.Windows.Forms.Label(); + unit.Tag = ade; + unit.Text = ade.Unit; + unit.Font = new System.Drawing.Font("微软雅黑", 7f); + unit.Width = 50; + unit.Tag = ade; + unit.Location = new Point(120, rows1 * (unit.Height + 5)); + groupBox3.Controls.Add(unit); + rows1++; + } + foreach (PhysioDataConfig ade in _record.PhysioAnesConfigList) + { + if (ade.IsDefalultShow == false) continue; + System.Windows.Forms.Label cb = new System.Windows.Forms.Label(); + cb.Tag = ade; + cb.Text = ade.Name; + cb.Font = new System.Drawing.Font("微软雅黑", 8f); + cb.Width = 75; + cb.Tag = ade; + cb.Location = new Point(5, rows1 * (cb.Height + 5)); + groupBox3.Controls.Add(cb); + + System.Windows.Forms.TextBox text = new System.Windows.Forms.TextBox(); + text.Tag = ade; + text.Font = new System.Drawing.Font("微软雅黑", 8f); + text.Width = 40; + text.Tag = ade; + text.Location = new Point(80, rows1 * (cb.Height + 5)); + groupBox3.Controls.Add(text); + + System.Windows.Forms.Label unit = new System.Windows.Forms.Label(); + unit.Tag = ade; + unit.Text = ade.Unit; + unit.Font = new System.Drawing.Font("微软雅黑", 7f); + unit.Width = 50; + unit.Tag = ade; + unit.Location = new Point(120, rows1 * (unit.Height + 5)); + groupBox3.Controls.Add(unit); + rows1++; + } + + LoadPhysioData(); + + btnAdd.Focus(); + } + + private void LoadPhysioData() { System.Data.DataTable dtPhysioData = BOperationRecord.getByOpeIDIsPhysioData(_record.Id.Value); + panel2.Controls.Clear(); int rows = 2; int Width = panel2.Width - (panel2.Width / (240 / 5) * 3); //循环加载麻醉体征控件 @@ -60,7 +137,6 @@ namespace AIMS.OperationDoing.AnasRecordBill for (int i = (240 / ade.YAisx) - 1; i >= 0; i--) { DateTime SpanTime = _record.InRoomTime.Value.AddMinutes(i * ade.YAisx); - System.Windows.Forms.TextBox textNum = new System.Windows.Forms.TextBox(); PhysioData pdNew = null; foreach (var item in list) { @@ -68,7 +144,6 @@ namespace AIMS.OperationDoing.AnasRecordBill { pdNew = item; pdNew.config = ade; - textNum.Text = pdNew.ValueString.ToString(); break; } } @@ -76,16 +151,37 @@ namespace AIMS.OperationDoing.AnasRecordBill { pdNew = PhysioDataConfig.newPhysioData(ade, _record.Id.Value, SpanTime, -1); } - - textNum.Name = pdNew.config.Id + "" + SpanTime.ToString("HHmm"); - textNum.Tag = pdNew; - textNum.Width = Width / (240 / ade.YAisx); - textNum.Dock = System.Windows.Forms.DockStyle.Left; - textNum.Font = new System.Drawing.Font("微软雅黑", 7f); - textNum.Click += TextNum_Click; - textNum.Leave += TextNum_Leave; - textNum.DoubleClick += TextNum_DoubleClick; - panel.Controls.Add(textNum); + if (ade.ImgPath != null && ade.ImgPath != "") + { + System.Windows.Forms.ComboBox textNum = new System.Windows.Forms.ComboBox(); + textNum.Items.AddRange(ade.ImgPath.Split('|')); + textNum.Name = pdNew.config.Id + "" + SpanTime.ToString("HHmm"); + textNum.Tag = pdNew; + if (pdNew.ValueString != "-1") + textNum.Text = pdNew.ValueString.ToString(); + textNum.Width = Width / (240 / ade.YAisx); + textNum.Dock = System.Windows.Forms.DockStyle.Left; + textNum.DropDownStyle = ComboBoxStyle.DropDownList; + textNum.Font = new System.Drawing.Font("微软雅黑", 7f); + textNum.Click += TextNum_Click; + textNum.Leave += ComeBoxNum_Leave; + panel.Controls.Add(textNum); + } + else + { + System.Windows.Forms.TextBox textNum = new System.Windows.Forms.TextBox(); + textNum.Name = pdNew.config.Id + "" + SpanTime.ToString("HHmm"); + textNum.Tag = pdNew; + if (pdNew.ValueString != "-1") + textNum.Text = pdNew.ValueString.ToString(); + textNum.Width = Width / (240 / ade.YAisx); + textNum.Dock = System.Windows.Forms.DockStyle.Left; + textNum.Font = new System.Drawing.Font("微软雅黑", 7f); + textNum.Click += TextNum_Click; + textNum.Leave += TextNum_Leave; + textNum.DoubleClick += TextNum_DoubleClick; + panel.Controls.Add(textNum); + } } System.Windows.Forms.Label textName = new System.Windows.Forms.Label(); textName.Name = "txt" + ade.Name; @@ -180,8 +276,6 @@ namespace AIMS.OperationDoing.AnasRecordBill textTipName.TextAlign = ContentAlignment.MiddleCenter; paneltop.Controls.Add(textTipName); panel2.Controls.Add(paneltop); - - this.Focus(); } private void TextNum_Leave(object sender, EventArgs e) @@ -202,7 +296,7 @@ namespace AIMS.OperationDoing.AnasRecordBill { if (pdNew.Value.ToString() != txtNum.Text) { - string value = checkValue(txtNum, pdNew); + string value = checkValue(txtNum, pdNew.config); if (value != "") { pdNew.ValueString = value; @@ -217,7 +311,7 @@ namespace AIMS.OperationDoing.AnasRecordBill } else if (txtNum.Text.Trim() != "") { - string value = checkValue(txtNum, pdNew); + string value = checkValue(txtNum, pdNew.config); if (value != "") { pdNew.ValueString = value; @@ -230,11 +324,40 @@ namespace AIMS.OperationDoing.AnasRecordBill } } } - public string checkValue(TextBox txtNum, PhysioData pdNew) + private void ComeBoxNum_Leave(object sender, EventArgs e) + { + ComboBox txtNum = sender as ComboBox; + PhysioData pdNew = txtNum.Tag as PhysioData; + if (txtNum.Text.Trim() == "" && pdNew.Value > -1) + { + pdNew.config.EditDelItem(pdNew); + pdNew.Value = -1; + txtNum.Tag = pdNew; + TempValue = ""; + } + else if (txtNum.Text.Trim() != "" && pdNew.Value > -1) + { + if (pdNew.Value.ToString() != txtNum.Text) + { + pdNew.ValueString = txtNum.Text.Trim(); + pdNew.config.EditModifyItem(pdNew, pdNew); + txtNum.Tag = pdNew; + TempValue = txtNum.Text.Trim(); + } + } + else if (txtNum.Text.Trim() != "") + { + pdNew.ValueString = txtNum.Text.Trim(); + pdNew.config.EditAddItem(pdNew); + txtNum.Tag = pdNew; + TempValue = txtNum.Text.Trim(); + } + } + public string checkValue(TextBox txtNum, PhysioDataConfig config) { string Result = ""; double value = -1; - if (pdNew.config.ConfigType == "生命体征" || pdNew.config.ShowText == true) + if (config.ConfigType == "生命体征" || config.ShowText == true) { if (!double.TryParse(txtNum.Text.ToString(), out value)) { @@ -243,16 +366,16 @@ namespace AIMS.OperationDoing.AnasRecordBill } else { - if (value < pdNew.config.WarningLowLimit || value > pdNew.config.WarningHighLimit) + if (value < config.WarningLowLimit || value > config.WarningHighLimit) { - DialogResult dr = MessageBox.Show("数值:" + value + " 超出 " + pdNew.config.Name + "[" + pdNew.config.WarningLowLimit + "-" + pdNew.config.WarningHighLimit + "] 报警范围! ", "系统提示");//, MessageBoxButtons.YesNo); //if (dr != DialogResult.Yes) { txtNum.Focus(); } - if (value < pdNew.config.WarningLowLimit) + //DialogResult dr = MessageBox.Show("数值:" + value + " 超出 " + config.Name + "[" + config.WarningLowLimit + "-" + config.WarningHighLimit + "] 报警范围! ", "系统提示");//, MessageBoxButtons.YesNo); //if (dr != DialogResult.Yes) { txtNum.Focus(); } + if (value < config.WarningLowLimit) { - value = pdNew.config.WarningLowLimit; + value = config.WarningLowLimit; } - if (value > pdNew.config.WarningHighLimit) + if (value > config.WarningHighLimit) { - value = pdNew.config.WarningHighLimit; + value = config.WarningHighLimit; } } } @@ -265,9 +388,24 @@ namespace AIMS.OperationDoing.AnasRecordBill return Result; } + public bool checkValue2(TextBox txtNum, PhysioDataConfig config) + { + bool Result = true; + double value = -1; + if (config.ConfigType == "生命体征" || config.ShowText == true) + { + if (!double.TryParse(txtNum.Text.ToString(), out value)) + { + MessageBox.Show("请填写正确数值!", "系统提示"); + txtNum.Focus(); + Result = false; + } + } + return Result; + } private void TextNum_DoubleClick(object sender, EventArgs e) { - TextBox txtNum = sender as TextBox; + Control txtNum = sender as Control; if (TempValue != "") { txtNum.Text = TempValue; @@ -277,7 +415,7 @@ namespace AIMS.OperationDoing.AnasRecordBill public string TempValue; private void TextNum_Click(object sender, EventArgs e) { - TextBox txtNum = sender as TextBox; + Control txtNum = sender as Control; PhysioData pdNew = txtNum.Tag as PhysioData; if (selectConfig != null) { @@ -317,5 +455,78 @@ namespace AIMS.OperationDoing.AnasRecordBill return resultTime; } + private void btnAdd_Click(object sender, EventArgs e) + { + try + { + if (dtpInsertEnd.Value < dtpInsertBegin.Value) return; + if (dtpInsertBegin.Value < _record.pageBegin) return; + bool RESULT = true; + foreach (var item in groupBox3.Controls) + { + if (item is TextBox) + { + TextBox txtNum = (item as TextBox); + PhysioDataConfig ade = txtNum.Tag as PhysioDataConfig; + if (txtNum.Text.Trim() != "") + { + bool value = checkValue2(txtNum, ade); + if (value == false) RESULT = false; + } + } + } + if (RESULT == false) return; + List list = new List(); + foreach (var item in groupBox3.Controls) + { + if (item is TextBox) + { + TextBox txtNum = (item as TextBox); + PhysioDataConfig ade = txtNum.Tag as PhysioDataConfig; + if (txtNum.Text.Trim() != "") + { + string value = checkValue(txtNum, ade); + int spanNun = ade.ConfigType == "麻醉体征" ? ade.YAisx : 5; + for (int i = 0; i < (240 / spanNun); i++) + { + DateTime SpanTime = _record.InRoomTime.Value.AddMinutes(i * spanNun); + if (SpanTime >= dtpInsertBegin.Value && SpanTime <= dtpInsertEnd.Value) + { + PhysioData pdNew = PhysioDataConfig.newPhysioData(ade, _record.Id.Value, SpanTime, value); + if (value != "") + { + pdNew.ValueString = value; + list.Add(pdNew); + } + } + } + } + } + } + if (list.Count > 0) + { + PhysioDataService.AddPhysioDatas(list); + LoadPhysioData(); + btnClear_Click(null, null); + MessageBox.Show("添加成功!", "系统提示"); + } + } + catch (Exception ex) + { + PublicMethod.WriteLog(ex); + } + + } + + private void btnClear_Click(object sender, EventArgs e) + { + foreach (var item in groupBox3.Controls) + { + if (item is TextBox) + { + (item as TextBox).Text = ""; + } + } + } } } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.designer.cs b/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.designer.cs index a340a05..bc15207 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.designer.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.designer.cs @@ -33,8 +33,19 @@ this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.groupBox2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.dtpInsertEnd = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.dtpInsertBegin = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); + this.btnAdd = new DevComponents.DotNetBar.ButtonX(); + this.btnClear = new DevComponents.DotNetBar.ButtonX(); + this.label24 = new System.Windows.Forms.Label(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox2.SuspendLayout(); + this.panel1.SuspendLayout(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dtpInsertEnd)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dtpInsertBegin)).BeginInit(); this.SuspendLayout(); // // imageList1 @@ -47,19 +58,175 @@ // groupBox2 // this.groupBox2.Controls.Add(this.panel2); + this.groupBox2.Controls.Add(this.panel1); this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Location = new System.Drawing.Point(0, 0); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(1384, 729); + this.groupBox2.Size = new System.Drawing.Size(1584, 729); this.groupBox2.TabIndex = 450; // // panel2 // this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Location = new System.Drawing.Point(174, 0); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(1384, 729); - this.panel2.TabIndex = 2; + this.panel2.Size = new System.Drawing.Size(1410, 729); + this.panel2.TabIndex = 4; + // + // panel1 + // + this.panel1.Controls.Add(this.groupBox3); + this.panel1.Dock = System.Windows.Forms.DockStyle.Left; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(174, 729); + this.panel1.TabIndex = 3; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.dtpInsertEnd); + this.groupBox3.Controls.Add(this.dtpInsertBegin); + this.groupBox3.Controls.Add(this.btnAdd); + this.groupBox3.Controls.Add(this.btnClear); + this.groupBox3.Controls.Add(this.label24); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(0, 0); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(174, 729); + this.groupBox3.TabIndex = 2; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "添加生命体征"; + // + // dtpInsertEnd + // + // + // + // + this.dtpInsertEnd.BackgroundStyle.Class = "DateTimeInputBackground"; + this.dtpInsertEnd.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertEnd.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.dtpInsertEnd.ButtonDropDown.Visible = true; + this.dtpInsertEnd.Font = new System.Drawing.Font("微软雅黑", 9F); + this.dtpInsertEnd.Format = DevComponents.Editors.eDateTimePickerFormat.ShortTime; + this.dtpInsertEnd.IsPopupCalendarOpen = false; + this.dtpInsertEnd.Location = new System.Drawing.Point(92, 24); + // + // + // + // + // + // + this.dtpInsertEnd.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertEnd.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.dtpInsertEnd.MonthCalendar.ClearButtonVisible = true; + // + // + // + this.dtpInsertEnd.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.dtpInsertEnd.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.dtpInsertEnd.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.dtpInsertEnd.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.dtpInsertEnd.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.dtpInsertEnd.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.dtpInsertEnd.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertEnd.MonthCalendar.DisplayMonth = new System.DateTime(2019, 1, 1, 0, 0, 0, 0); + this.dtpInsertEnd.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + // + // + // + this.dtpInsertEnd.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.dtpInsertEnd.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.dtpInsertEnd.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.dtpInsertEnd.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertEnd.MonthCalendar.TodayButtonVisible = true; + this.dtpInsertEnd.MonthCalendar.Visible = false; + this.dtpInsertEnd.Name = "dtpInsertEnd"; + this.dtpInsertEnd.Size = new System.Drawing.Size(77, 23); + this.dtpInsertEnd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.dtpInsertEnd.TabIndex = 0; + // + // dtpInsertBegin + // + // + // + // + this.dtpInsertBegin.BackgroundStyle.Class = "DateTimeInputBackground"; + this.dtpInsertBegin.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertBegin.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown; + this.dtpInsertBegin.ButtonDropDown.Visible = true; + this.dtpInsertBegin.Font = new System.Drawing.Font("微软雅黑", 9F); + this.dtpInsertBegin.Format = DevComponents.Editors.eDateTimePickerFormat.ShortTime; + this.dtpInsertBegin.IsPopupCalendarOpen = false; + this.dtpInsertBegin.Location = new System.Drawing.Point(4, 24); + // + // + // + // + // + // + this.dtpInsertBegin.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertBegin.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1); + this.dtpInsertBegin.MonthCalendar.ClearButtonVisible = true; + // + // + // + this.dtpInsertBegin.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2; + this.dtpInsertBegin.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90; + this.dtpInsertBegin.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; + this.dtpInsertBegin.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.dtpInsertBegin.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder; + this.dtpInsertBegin.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1; + this.dtpInsertBegin.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertBegin.MonthCalendar.DisplayMonth = new System.DateTime(2019, 1, 1, 0, 0, 0, 0); + this.dtpInsertBegin.MonthCalendar.FirstDayOfWeek = System.DayOfWeek.Monday; + // + // + // + this.dtpInsertBegin.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.dtpInsertBegin.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90; + this.dtpInsertBegin.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.dtpInsertBegin.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.dtpInsertBegin.MonthCalendar.TodayButtonVisible = true; + this.dtpInsertBegin.MonthCalendar.Visible = false; + this.dtpInsertBegin.Name = "dtpInsertBegin"; + this.dtpInsertBegin.Size = new System.Drawing.Size(77, 23); + this.dtpInsertBegin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.dtpInsertBegin.TabIndex = 0; + // + // btnAdd + // + this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 11.5F); + this.btnAdd.Location = new System.Drawing.Point(16, 674); + this.btnAdd.Name = "btnAdd"; + this.btnAdd.Size = new System.Drawing.Size(65, 26); + this.btnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnAdd.TabIndex = 456; + this.btnAdd.Text = "添加"; + this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); + // + // btnClear + // + this.btnClear.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnClear.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F); + this.btnClear.Location = new System.Drawing.Point(87, 674); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(65, 26); + this.btnClear.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.TabIndex = 456; + this.btnClear.Text = "清空"; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(79, 27); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(15, 20); + this.label24.TabIndex = 455; + this.label24.Text = "-"; // // dataGridViewTextBoxColumn1 // @@ -73,7 +240,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(1384, 729); + this.ClientSize = new System.Drawing.Size(1584, 729); this.Controls.Add(this.groupBox2); this.Font = new System.Drawing.Font("微软雅黑", 10.5F); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -85,6 +252,11 @@ this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmPhysioDataEdit_FormClosed); this.Load += new System.EventHandler(this.FormPrintBGYYNew_Load); this.groupBox2.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dtpInsertEnd)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dtpInsertBegin)).EndInit(); this.ResumeLayout(false); } @@ -95,6 +267,12 @@ private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.Panel groupBox2; private System.Windows.Forms.Panel panel2; - + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.GroupBox groupBox3; + private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpInsertEnd; + private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpInsertBegin; + private DevComponents.DotNetBar.ButtonX btnAdd; + private DevComponents.DotNetBar.ButtonX btnClear; + public System.Windows.Forms.Label label24; } } \ No newline at end of file diff --git a/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.resx b/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.resx index 0edf62e..cb43499 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.resx +++ b/AIMS/OperationDoing/AnasRecordBill/frmPhysioDataEdit.resx @@ -124,44 +124,44 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM - CAAAAk1TRnQBSQFMAgEBAgEA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fwC/wL9Af8BkwGCAUEB//8ADQACbQFs + AfcDXAH4A4AB/gOAAf4DgAH+A4AB/gGYAYcBSAH/AW8BbAFnAfwB1AHNAcIB/wHUAc0BwgH/AdQBzQHC + Af8DgAH+AZMBggFBAf//AAkAAwMBBANQAZoBkgGCAUAB/wKAAXYB/gKAAXYB/gKAAXYB/gGTAYIBQgH/ + AZMBggFCAf8BjgGBAUIB/wGTAYIBQgH/AZMBggFCAf8BkwGCAUIB/wKAAXYB/gNaAb3/AAkAAwMBBAMS + ARcDIwEzAyMBMwMjATMDIwEzAyMBMwMjATMDIwEzAyMBMwMjATMDIwEzAyMBMwMWAR7/AA0AAwUBBgME + AQUDBAEFAwQBBQMEBAUBBgMFAQYDBQEGAwUBBgMFAQYDBQEGAwUBBgMDAQTwAAFCAU0BPgcAAT4DAAEo + AwABUAMAARQDAAEBAQABAQUAAfAXAAP/AQAB/gEAAQ8C/wcAAf4BAAEPAv8HAAH+AQABDwL/BwAB/gEA + AQ8C/wcAAf4BAAEPAv8HAAH+AQABDwL/BwAB/gEAAQ8C/wcAAYABAAEPAv8JAAEPAv8IAAEBAc8C/wgA + AQEBzwL/CAABAQHPAv8JAAEPAv8JAAEPAv8HAAH+AQABDwL/BwAB/gEAAQ8C/wcAAf4BAAEPAv8HAAH8 + AQABDwL/BwAB/AEAAQ8C/wcAAf4BAAEPAv8HAAs= diff --git a/DrawGraph/AreaManage/MonitorManage.cs b/DrawGraph/AreaManage/MonitorManage.cs index dc2e8f0..f7a321a 100644 --- a/DrawGraph/AreaManage/MonitorManage.cs +++ b/DrawGraph/AreaManage/MonitorManage.cs @@ -105,10 +105,9 @@ namespace DrawGraph for (int i = (240 / 5); i >= 0; i--) { DateTime SpanTime = getInRoomSpanTime(myOpeRecord.pageBegin.AddMinutes(i * 5)); - System.Windows.Forms.TextBox textNum = new System.Windows.Forms.TextBox(); - PhysioData pdNew = PhysioDataConfig.newPhysioData(ade, myOpeRecord.Id.Value, SpanTime, -1); + System.Windows.Forms.TextBox textNum = new System.Windows.Forms.TextBox(); textNum.Name = pdNew.config.Id + "" + SpanTime.ToString("HHmm"); textNum.Tag = pdNew; textNum.Font = new System.Drawing.Font("微软雅黑", 7f); @@ -133,20 +132,35 @@ namespace DrawGraph for (int i = (240 / ade.YAisx); i >= 0; i--) { DateTime SpanTime = getInRoomSpanTime(myOpeRecord.pageBegin.AddMinutes(i * ade.YAisx)); - System.Windows.Forms.TextBox textNum = new System.Windows.Forms.TextBox(); - PhysioData pdNew = PhysioDataConfig.newPhysioData(ade, myOpeRecord.Id.Value, SpanTime, -1); - - textNum.Name = pdNew.config.Id + "" + SpanTime.ToString("HHmm"); - textNum.Tag = pdNew; - textNum.Font = new System.Drawing.Font("微软雅黑", 7f); - textNum.Multiline = true; - textNum.Width = Width / (240 / ade.YAisx) + 1; - textNum.Height = panel.Height; - textNum.Dock = System.Windows.Forms.DockStyle.Left; - textNum.Leave += TextNum_Leave; - textNum.DoubleClick += TextNum_DoubleClick; - panel.Controls.Add(textNum); + if (ade.ImgPath != null && ade.ImgPath != "") + { + System.Windows.Forms.ComboBox textNum = new System.Windows.Forms.ComboBox(); + textNum.Items.AddRange(ade.ImgPath.Split('|')); + textNum.Name = pdNew.config.Id + "" + SpanTime.ToString("HHmm"); + textNum.Tag = pdNew; + textNum.Font = new System.Drawing.Font("微软雅黑", 7f); + textNum.Width = Width / (240 / ade.YAisx) + 1; + textNum.Height = panel.Height; + textNum.Dock = System.Windows.Forms.DockStyle.Left; + textNum.DropDownStyle = ComboBoxStyle.DropDownList; + textNum.Leave += ComeBoxNum_Leave; + panel.Controls.Add(textNum); + } + else + { + System.Windows.Forms.TextBox textNum = new System.Windows.Forms.TextBox(); + textNum.Name = pdNew.config.Id + "" + SpanTime.ToString("HHmm"); + textNum.Tag = pdNew; + textNum.Font = new System.Drawing.Font("微软雅黑", 7f); + textNum.Multiline = true; + textNum.Width = Width / (240 / ade.YAisx) + 1; + textNum.Height = panel.Height; + textNum.Dock = System.Windows.Forms.DockStyle.Left; + textNum.Leave += TextNum_Leave; + textNum.DoubleClick += TextNum_DoubleClick; + panel.Controls.Add(textNum); + } } panPanels.Add(panel); } @@ -276,6 +290,35 @@ namespace DrawGraph } } } + private void ComeBoxNum_Leave(object sender, EventArgs e) + { + ComboBox txtNum = sender as ComboBox; + PhysioData pdNew = txtNum.Tag as PhysioData; + if (txtNum.Text.Trim() == "" && pdNew.Value > -1) + { + pdNew.config.EditDelItem(pdNew); + pdNew.Value = -1; + txtNum.Tag = pdNew; + TempValue = ""; + } + else if (txtNum.Text.Trim() != "" && pdNew.Value > -1) + { + if (pdNew.Value.ToString() != txtNum.Text) + { + pdNew.ValueString = txtNum.Text.Trim(); + pdNew.config.EditModifyItem(pdNew, pdNew); + txtNum.Tag = pdNew; + TempValue = txtNum.Text.Trim(); + } + } + else if (txtNum.Text.Trim() != "") + { + pdNew.ValueString = txtNum.Text.Trim(); + pdNew.config.EditAddItem(pdNew); + txtNum.Tag = pdNew; + TempValue = txtNum.Text.Trim(); + } + } public string checkValue(TextBox txtNum, PhysioData pdNew) { string Result = ""; diff --git a/DrawGraph/AreaManage/PhysioDataConfig.cs b/DrawGraph/AreaManage/PhysioDataConfig.cs index 527301c..c070240 100644 --- a/DrawGraph/AreaManage/PhysioDataConfig.cs +++ b/DrawGraph/AreaManage/PhysioDataConfig.cs @@ -377,6 +377,19 @@ namespace DrawGraph } } if (isHave) return; + if (APhysioParams.Count > 0) + { + PhysioData pdTemp = pd.Clone(); + + //当前点的前一个点加步长时间的结点 + PhysioData pdQD = reMPhysioData(pdTemp); + //插入的点大于之前点5分钟以上 + if (DateTime.Compare(pd.RecordTime, pdQD.RecordTime.AddMinutes(1)) > 0) + { + pdTemp.Value = Double.MaxValue; + this.APhysioParams.Add(pdTemp); + } + } this.APhysioParams.Add(pd); Sort(); curve.Points = APhysioParams; @@ -387,6 +400,7 @@ namespace DrawGraph DrawTextPhysioData(pd); } } + /// /// 增加一点生理数据,往数据库中写入数据 /// @@ -537,7 +551,7 @@ namespace DrawGraph /// /// /// - public PhysioData MoveItem(PhysioData newPd ) + public PhysioData MoveItem(PhysioData newPd) { //如果是负数则不执行操作 if (newPd.Value < 0) return null; @@ -894,7 +908,7 @@ namespace DrawGraph Control[] cs = pan3.Controls.Find(pdTemp.PhysioDataConfigId + "" + pdTemp.RecordTime.ToString("HHmm"), true); if (cs != null && cs.Length > 0) { - TextBox c = cs[0] as TextBox; + Control c = cs[0]; if (c != null) { if (viewValue == "-1") diff --git a/DrawGraph/AreaManage/PhysioDataManage.cs b/DrawGraph/AreaManage/PhysioDataManage.cs index 6c65d96..e50a61e 100644 --- a/DrawGraph/AreaManage/PhysioDataManage.cs +++ b/DrawGraph/AreaManage/PhysioDataManage.cs @@ -219,8 +219,8 @@ namespace DrawGraph if (!isHave) { AnesOpeStatue = DoAnesOpeStatus.ADDPD; - DateTime insTime = GetRecordTime(pdTemp.RecordTime); - curPhysioParam.AddMultipleItem(pdTemp, insTime, collectInterval); + DateTime insTime = GetRecordTime(pdTemp.RecordTime); + curPhysioParam.AddMultipleItem(pdTemp, insTime, collectInterval); } } else @@ -284,45 +284,48 @@ namespace DrawGraph aSyncTip.ViewStr = viewStr; aSyncTip.Show(x, (y + yP)); } - - switch (AnesOpeStatue) + //考虑客户端拖拽数据库处理不及时 可以采用批量缓存新增修改的数据点集中处理 + if (AnesOpeStatue == DoAnesOpeStatus.MOVEPD || AnesOpeStatue == DoAnesOpeStatus.ADDPD) { - case DoAnesOpeStatus.MOVEPD: - if (curPhysioParam != null) + if (curPhysioParam != null) + { + PhysioData pdTemp = rePD(sender, e); + if (pdTemp == null) return; + bool isHave = false; + foreach (PointPair pp in curPhysioParam.APhysioParams) { - PhysioData pdNew = rePD(sender, e); - if (pdNew == null) return; - - PhysioData newPd = curPhysioParam.MoveItem(pdNew); - if (newPd != null )//&& CurPhysioData.Value != newPd.Value + if (pdTemp.isEquert(curPhysioParam.PointPairToPhysioData(pp)) && curPhysioParam.PointPairToPhysioData(pp).Value != Double.MaxValue) + { + isHave = true; + } + } + if (!isHave) + { + AnesOpeStatue = DoAnesOpeStatus.ADDPD; + DateTime insTime = GetRecordTime(pdTemp.RecordTime); + pdTemp.RecordTime = insTime; + curPhysioParam.AddPointItem(pdTemp); + ZedControl.AxisChange(); + ZedControl.Refresh(); + } + else + { + PhysioData newPd = curPhysioParam.MoveItem(pdTemp); + if (newPd != null)//&& CurPhysioData.Value != newPd.Value { CurPhysioData = newPd; curPhysioParam.ModifyItem(CurPhysioData, CurPhysioData); + ZedControl.AxisChange(); + ZedControl.Refresh(); } + } - break; - case DoAnesOpeStatus.ADDPD: - if (curPhysioParam != null) - { - PhysioData pdTemp = rePD(sender, e); - if (pdTemp == null) return; - bool isHave = false; - foreach (PointPair pp in curPhysioParam.APhysioParams) - { - if (pdTemp.isEquert(curPhysioParam.PointPairToPhysioData(pp)) && curPhysioParam.PointPairToPhysioData(pp).Value != Double.MaxValue) - { - isHave = true; - } - } - if (!isHave) - { - AnesOpeStatue = DoAnesOpeStatus.ADDPD; - DateTime insTime = GetRecordTime(pdTemp.RecordTime); - curPhysioParam.AddMultipleItem(pdTemp, insTime, collectInterval); - } - } - break; - case DoAnesOpeStatus.SelectArea: + } + } + else + { + if (AnesOpeStatue == DoAnesOpeStatus.SelectArea) + { try { PhysioData pdNew = rePD(sender, e); @@ -332,7 +335,7 @@ namespace DrawGraph myOpeRecord.SAreaObj.EndPd = pdNew; myOpeRecord.SAreaObj.EndPds = rePDs(sender, e); myOpeRecord.SAreaObj.Draw(); - } + } } catch { return; } finally @@ -340,12 +343,8 @@ namespace DrawGraph ZedControl.AxisChange(); ZedControl.Refresh(); } - break; - case DoAnesOpeStatus.VIEW: - break; + } } - ZedControl.AxisChange(); - ZedControl.Refresh(); } public override void MouseUp(ZedGraphControl sender, MouseEventArgs e) { diff --git a/DrawGraph/AreaManage/PhysioDataService.cs b/DrawGraph/AreaManage/PhysioDataService.cs index 23f1ed3..48b4b2d 100644 --- a/DrawGraph/AreaManage/PhysioDataService.cs +++ b/DrawGraph/AreaManage/PhysioDataService.cs @@ -10,7 +10,7 @@ namespace DrawGraph public static partial class PhysioDataService { //Add Mothed Start - public static readonly string InsertSql = "INSERT PhysioData (PatientId, PhysioDataConfigId, RecordTime, Value )VALUES (@PatientId, @PhysioDataConfigId, @RecordTime, @Value )"; + public static readonly string InsertSql = "INSERT PhysioData (PatientId, PhysioDataConfigId, RecordTime, Value )VALUES (@PatientId, @PhysioDataConfigId, @RecordTime, @Value )"; public static int AddPhysioData(PhysioData physioData) { string sql = InsertSql; @@ -20,6 +20,18 @@ namespace DrawGraph }; return DBHelper.ExecNonQuery(sql, para); } + public static void AddPhysioDatas(List physioData) + { + StringBuilder deleteStr = new StringBuilder(); + StringBuilder insterStr = new StringBuilder(); + foreach (var item in physioData) + { + deleteStr.Append(" Delete FROM PhysioData where RecordTime ='" + item.RecordTime + "' and PatientId='" + item.PatientId + "' and PhysioDataConfigId='" + item.PhysioDataConfigId + "' "); + insterStr.Append(" INSERT PhysioData (PatientId, PhysioDataConfigId, RecordTime, Value )VALUES ('" + item.PatientId + "' , '" + item.PhysioDataConfigId + "' ,'" + item.RecordTime + "', '" + item.ValueString + "' )"); + } + DBHelper.ExecNonQuery(deleteStr.ToString()); + DBHelper.ExecNonQuery(insterStr.ToString()); + } public static void UpdatePhysioData(PhysioData oldphysioData, PhysioData newphysioData, string OperatorName) {