diff --git a/AIMS/DataDictionary/frmApplianceSelect.cs b/AIMS/DataDictionary/frmApplianceSelect.cs index 34bab70..67b4a4b 100644 --- a/AIMS/DataDictionary/frmApplianceSelect.cs +++ b/AIMS/DataDictionary/frmApplianceSelect.cs @@ -10,6 +10,7 @@ using System.Xml.Linq; using AIMSBLL; using AIMSExtension; using AIMSModel; +using DCSoftDotfuscate; using static System.Windows.Forms.AxHost; namespace AIMS.PublicUI.UI @@ -398,20 +399,41 @@ namespace AIMS.PublicUI.UI private void buttonX1_Click(object sender, EventArgs e) { - Appliance app = new Appliance(); - app.Name = txtQuery.Text.Trim(); - app.HCode = PublicMethod.GetFirstLetter(txtQuery.Text.Trim()); - app.ApplianceType = 0; - app.IsValid = 1; - app.OperatorId = PublicMethod.OperatorId; - app.OperatorTime = DateTime.Now; int num = 0; - app.UseRate = 0; - num = BAppliance.Insert(app); + Appliance app = new Appliance(); + app = BAppliance.SelectSingle(" Name = '" + txtQuery.Text.Trim() + "'", null); + if (app != null && app.Id != null && app.Id > 0) + { + num = app.Id.Value; + } + else + { + app = new Appliance(); + app.Name = txtQuery.Text.Trim(); + app.HCode = PublicMethod.GetFirstLetter(txtQuery.Text.Trim()); + app.ApplianceType = 0; + app.IsValid = 1; + app.OperatorId = PublicMethod.OperatorId; + app.OperatorTime = DateTime.Now; + app.UseRate = 0; + num = BAppliance.Insert(app); + } + if (num > 0) { - MessageBox.Show("保存成功!"); + DataRow ydr = ydt.NewRow(); + ydr["Id"] = num; + ydr["Name"] = app.Name; + ydr["ApplianceNumber"] = "0"; + ydt.Rows.Add(ydr); + BindDgvY(ydt); + txtQuery.Text = ""; } } + + private void txtQuery_MouseClick(object sender, MouseEventArgs e) + { + txtQuery.Text = ""; + } } } diff --git a/AIMS/DataDictionary/frmApplianceSelect.designer.cs b/AIMS/DataDictionary/frmApplianceSelect.designer.cs index 95e2e0a..dfa5ea8 100644 --- a/AIMS/DataDictionary/frmApplianceSelect.designer.cs +++ b/AIMS/DataDictionary/frmApplianceSelect.designer.cs @@ -28,11 +28,12 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.txtQuery = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label3 = new System.Windows.Forms.Label(); + this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); this.btnSave = new DevComponents.DotNetBar.ButtonX(); this.cboType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.lblUseName = new System.Windows.Forms.Label(); @@ -64,7 +65,6 @@ this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -106,6 +106,7 @@ this.txtQuery.Name = "txtQuery"; this.txtQuery.Size = new System.Drawing.Size(124, 21); this.txtQuery.TabIndex = 4; + this.txtQuery.MouseClick += new System.Windows.Forms.MouseEventHandler(this.txtQuery_MouseClick); this.txtQuery.TextChanged += new System.EventHandler(this.txtQuery_TextChanged); // // label3 @@ -117,6 +118,16 @@ this.label3.TabIndex = 3; this.label3.Text = "器械名称"; // + // buttonX1 + // + this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.buttonX1.Location = new System.Drawing.Point(627, 13); + this.buttonX1.Name = "buttonX1"; + this.buttonX1.Size = new System.Drawing.Size(39, 30); + this.buttonX1.TabIndex = 2; + this.buttonX1.Text = "新增"; + this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click); + // // btnSave // this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -287,14 +298,14 @@ this.yId, this.yName, this.ApplianceNumber}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvY.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvY.DefaultCellStyle = dataGridViewCellStyle3; this.dgvY.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvY.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); this.dgvY.Location = new System.Drawing.Point(3, 22); @@ -355,14 +366,14 @@ this.Index, this.Select, this.oName}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvD.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvD.DefaultCellStyle = dataGridViewCellStyle4; this.dgvD.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvD.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); this.dgvD.Location = new System.Drawing.Point(3, 22); @@ -444,16 +455,6 @@ this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; this.dataGridViewTextBoxColumn6.ReadOnly = true; // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.Location = new System.Drawing.Point(627, 13); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(39, 30); - this.buttonX1.TabIndex = 2; - this.buttonX1.Text = "新增"; - this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click); - // // frmApplianceSelect // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/AIMS/DocManager/frmDocument3.designer.cs b/AIMS/DocManager/frmDocument3.designer.cs index c2c32b5..6a65dd4 100644 --- a/AIMS/DocManager/frmDocument3.designer.cs +++ b/AIMS/DocManager/frmDocument3.designer.cs @@ -363,7 +363,7 @@ // // this.lblPatient.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.lblPatient.Location = new System.Drawing.Point(166, 8); + this.lblPatient.Location = new System.Drawing.Point(166, 10); this.lblPatient.Margin = new System.Windows.Forms.Padding(2); this.lblPatient.Name = "lblPatient"; this.lblPatient.Size = new System.Drawing.Size(534, 26); diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.Designer.cs b/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.Designer.cs index 6f93a36..27da14f 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.Designer.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.Designer.cs @@ -97,7 +97,6 @@ this.panel16 = new System.Windows.Forms.Panel(); this.txtBG = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.picBG = new System.Windows.Forms.PictureBox(); - this.button9 = new System.Windows.Forms.Button(); this.panel12 = new System.Windows.Forms.Panel(); this.txtAnaesthesiaEnd = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.picAnesEnd = new System.Windows.Forms.PictureBox(); @@ -120,6 +119,7 @@ this.txtInRoom1 = new System.Windows.Forms.Button(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.cmbBGType = new System.Windows.Forms.ComboBox(); this.panel3.SuspendLayout(); this.panel14.SuspendLayout(); this.panel4.SuspendLayout(); @@ -1209,9 +1209,9 @@ // panel16 // this.panel16.BackColor = System.Drawing.Color.AliceBlue; + this.panel16.Controls.Add(this.cmbBGType); this.panel16.Controls.Add(this.txtBG); this.panel16.Controls.Add(this.picBG); - this.panel16.Controls.Add(this.button9); this.panel16.Location = new System.Drawing.Point(814, 3); this.panel16.Name = "panel16"; this.panel16.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); @@ -1283,22 +1283,6 @@ this.picBG.TabIndex = 42; this.picBG.TabStop = false; // - // button9 - // - this.button9.BackColor = System.Drawing.Color.Transparent; - this.button9.FlatAppearance.BorderSize = 0; - this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button9.Font = new System.Drawing.Font("微软雅黑", 10.5F); - this.button9.ImageAlign = System.Drawing.ContentAlignment.BottomLeft; - this.button9.Location = new System.Drawing.Point(39, -3); - this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(100, 25); - this.button9.TabIndex = 41; - this.button9.Tag = ""; - this.button9.Text = "拔管"; - this.button9.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.button9.UseVisualStyleBackColor = false; - // // panel12 // this.panel12.BackColor = System.Drawing.Color.AliceBlue; @@ -1768,6 +1752,19 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(147, 71); this.flowLayoutPanel1.TabIndex = 0; // + // cmbBGType + // + this.cmbBGType.Font = new System.Drawing.Font("微软雅黑", 9F); + this.cmbBGType.FormattingEnabled = true; + this.cmbBGType.Items.AddRange(new object[] { + "拔管", + "拔喉罩"}); + this.cmbBGType.Location = new System.Drawing.Point(42, 0); + this.cmbBGType.Name = "cmbBGType"; + this.cmbBGType.Size = new System.Drawing.Size(101, 25); + this.cmbBGType.TabIndex = 48; + this.cmbBGType.Text = "拔管"; + // // frmAanesthesiaPainlessRecord // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1874,7 +1871,6 @@ private System.Windows.Forms.Panel panel16; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtBG; private System.Windows.Forms.PictureBox picBG; - private System.Windows.Forms.Button button9; private System.Windows.Forms.Panel panel12; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtAnaesthesiaEnd; private System.Windows.Forms.PictureBox picAnesEnd; @@ -1911,5 +1907,6 @@ public DevComponents.DotNetBar.Controls.CircularProgress circularProgress1; private DrawGraph.ZedGraphControl zgcAnaesRecord; private System.Windows.Forms.Button button6; + private System.Windows.Forms.ComboBox cmbBGType; } } \ No newline at end of file diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.cs b/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.cs index 8b617fb..440fc2d 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaPainlessRecord.cs @@ -524,7 +524,7 @@ namespace AIMS.OperationAanesthesia curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(0, "txtCG", cmbCGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(0, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + InsertOrUpdateEventTime(0, "txtBG", cmbBGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(0, "txtOperationBegin", "手术开始", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); @@ -582,7 +582,7 @@ namespace AIMS.OperationAanesthesia curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(1, "txtCG", cmbCGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(1, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + InsertOrUpdateEventTime(1, "txtBG", cmbBGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(1, "txtOperationEnd", "手术结束", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); @@ -623,7 +623,7 @@ namespace AIMS.OperationAanesthesia DeleteEventTime("txtOperationEnd", "手术结束", tb, ref Inevent); DeleteEventTime("txtAnaesthesiaEnd", "麻醉完成", tb, ref Inevent); DeleteEventTime("txtCG", cmbCGType.Text, tb, ref Inevent); - DeleteEventTime("txtBG", "拔管", tb, ref Inevent); + DeleteEventTime("txtBG", cmbBGType.Text, tb, ref Inevent); } else { @@ -698,8 +698,9 @@ namespace AIMS.OperationAanesthesia BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); UpdatePhysioDataResp(); } - if (Inevent != null && Inevent.EventName == "拔管") + if (Inevent != null && Inevent.EventName == cmbBGType.Text) { + _record.InBGType = ""; _record.SpileOutTime = null; this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); @@ -813,8 +814,9 @@ namespace AIMS.OperationAanesthesia UpdatePhysioDataResp(); } - if (Inevent != null && Inevent.EventName == "拔管" && _record.SpileOutTime != Inevent.EventBeginTime) + if (Inevent != null && Inevent.EventName == cmbBGType.Text && _record.SpileOutTime != Inevent.EventBeginTime) { + _record.InBGType = cmbBGType.Text; _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)); @@ -1899,13 +1901,24 @@ namespace AIMS.OperationAanesthesia txtCG.Tag = _record.SpileInTime.Value; txtCG.Value = _record.SpileInTime.Value; this.picCG.BackgroundImage = global::AIMS.Properties.Resources.置管_select; + + if (_record.SpileOutTime == null) + { + if (_record.InCGType == "插管") cmbBGType.Text = "拔管"; + if (_record.InCGType == "喉罩") cmbBGType.Text = "拔喉罩"; + } + + this.cmbCGType.SelectedIndexChanged += new System.EventHandler(this.cmbCGType_SelectedIndexChanged); } if (_record.SpileOutTime != null) { + this.cmbBGType.SelectedIndexChanged -= new System.EventHandler(this.cmbBGType_SelectedIndexChanged); + cmbBGType.Text = _record.InBGType; txtBG.CustomFormat = "MM-dd HH:mm"; txtBG.Tag = _record.SpileOutTime.Value; txtBG.Value = _record.SpileOutTime.Value; this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管_select; + this.cmbBGType.SelectedIndexChanged += new System.EventHandler(this.cmbBGType_SelectedIndexChanged); } if (_record.OperationBeginTime != null) { @@ -2210,6 +2223,26 @@ namespace AIMS.OperationAanesthesia frmSafety.PatientId = PatientId; frmSafety.Show(); } + private void cmbCGType_SelectedIndexChanged(object sender, EventArgs e) + { + _record.InCGType = cmbCGType.Text; + if (txtCG.CustomFormat != " " && txtCG.Tag != null) + { + DrawGraph.FactEvents Inevent = null; + InsertOrUpdateEventTime(2, "txtCG", cmbCGType.Text, txtCG, txtCG.Value, ref Inevent); + ReviewEvent(); + } + } + private void cmbBGType_SelectedIndexChanged(object sender, EventArgs e) + { + _record.InBGType = cmbBGType.Text; + if (txtBG.CustomFormat != " " && txtBG.Tag != null) + { + DrawGraph.FactEvents Inevent = null; + InsertOrUpdateEventTime(2, "txtBG", cmbBGType.Text, txtBG, txtBG.Value, ref Inevent); + ReviewEvent(); + } + } private void button6_Click_1(object sender, EventArgs e) { if (PatientId != 0) diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs index f4af1be..65a1716 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs @@ -107,9 +107,9 @@ this.picOpeBegin = new System.Windows.Forms.PictureBox(); this.button2 = new System.Windows.Forms.Button(); this.panel16 = new System.Windows.Forms.Panel(); + this.cmbBGType = new System.Windows.Forms.ComboBox(); this.txtBG = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.picBG = new System.Windows.Forms.PictureBox(); - this.button9 = new System.Windows.Forms.Button(); this.panel12 = new System.Windows.Forms.Panel(); this.txtAnaesthesiaEnd = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.picAnesEnd = new System.Windows.Forms.PictureBox(); @@ -1430,15 +1430,28 @@ // panel16 // this.panel16.BackColor = System.Drawing.Color.AliceBlue; + this.panel16.Controls.Add(this.cmbBGType); this.panel16.Controls.Add(this.txtBG); this.panel16.Controls.Add(this.picBG); - this.panel16.Controls.Add(this.button9); this.panel16.Location = new System.Drawing.Point(814, 3); this.panel16.Name = "panel16"; this.panel16.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel16.Size = new System.Drawing.Size(150, 53); this.panel16.TabIndex = 56; // + // cmbBGType + // + this.cmbBGType.Font = new System.Drawing.Font("微软雅黑", 9F); + this.cmbBGType.FormattingEnabled = true; + this.cmbBGType.Items.AddRange(new object[] { + "拔管", + "拔喉罩"}); + this.cmbBGType.Location = new System.Drawing.Point(42, 0); + this.cmbBGType.Name = "cmbBGType"; + this.cmbBGType.Size = new System.Drawing.Size(101, 25); + this.cmbBGType.TabIndex = 47; + this.cmbBGType.Text = "拔管"; + // // txtBG // this.txtBG.AutoAdvance = true; @@ -1504,22 +1517,6 @@ this.picBG.TabIndex = 42; this.picBG.TabStop = false; // - // button9 - // - this.button9.BackColor = System.Drawing.Color.Transparent; - this.button9.FlatAppearance.BorderSize = 0; - this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button9.Font = new System.Drawing.Font("微软雅黑", 10.5F); - this.button9.ImageAlign = System.Drawing.ContentAlignment.BottomLeft; - this.button9.Location = new System.Drawing.Point(39, -3); - this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(100, 25); - this.button9.TabIndex = 41; - this.button9.Tag = ""; - this.button9.Text = "拔管"; - this.button9.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.button9.UseVisualStyleBackColor = false; - // // panel12 // this.panel12.BackColor = System.Drawing.Color.AliceBlue; @@ -2056,7 +2053,7 @@ private System.Windows.Forms.Panel panel5; private System.Windows.Forms.Panel panel7; private System.Windows.Forms.Panel plTitleEventTime; - private PublicUI.UI.DrawPanel panel8; + private PublicUI.UI.DrawPanel panel8; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label lblSpo2; private System.Windows.Forms.Label lblDia; @@ -2117,7 +2114,6 @@ private System.Windows.Forms.Panel panel16; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtBG; private System.Windows.Forms.PictureBox picBG; - private System.Windows.Forms.Button button9; private System.Windows.Forms.Panel panel12; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtAnaesthesiaEnd; private System.Windows.Forms.PictureBox picAnesEnd; @@ -2151,5 +2147,6 @@ private System.Windows.Forms.Panel btnUpPage; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Button button10; + private System.Windows.Forms.ComboBox cmbBGType; } } \ No newline at end of file diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs index 09f8eb9..d640171 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.cs @@ -4,6 +4,7 @@ using AIMS.PublicUI.UI; using AIMSBLL; using AIMSExtension; using AIMSModel; +using DCSoftDotfuscate; using DevComponents.DotNetBar; using DevComponents.DotNetBar.Controls; using DevComponents.Editors.DateTimeAdv; @@ -548,7 +549,7 @@ namespace AIMS.OperationAanesthesia curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(0, "txtCG", cmbCGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(0, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + InsertOrUpdateEventTime(0, "txtBG", cmbBGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(0, "txtOperationBegin", "手术开始", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); @@ -606,7 +607,7 @@ namespace AIMS.OperationAanesthesia curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(1, "txtCG", cmbCGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(1, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + InsertOrUpdateEventTime(1, "txtBG", cmbBGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(1, "txtOperationEnd", "手术结束", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); @@ -647,7 +648,7 @@ namespace AIMS.OperationAanesthesia DeleteEventTime("txtOperationEnd", "手术结束", tb, ref Inevent); DeleteEventTime("txtAnaesthesiaEnd", "麻醉完成", tb, ref Inevent); DeleteEventTime("txtCG", cmbCGType.Text, tb, ref Inevent); - DeleteEventTime("txtBG", "拔管", tb, ref Inevent); + DeleteEventTime("txtBG", cmbBGType.Text, tb, ref Inevent); } else { @@ -722,8 +723,9 @@ namespace AIMS.OperationAanesthesia BOperationRecord.Update(" SpileInTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); UpdatePhysioDataResp(); } - if (Inevent != null && Inevent.EventName == "拔管") + if (Inevent != null && Inevent.EventName == cmbBGType.Text) { + _record.InBGType = ""; _record.SpileOutTime = null; this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); @@ -776,10 +778,18 @@ namespace AIMS.OperationAanesthesia { curTimeTemp = _record.lastPageBegin; } - if (state != 1) + if (state == 0) { Inevent = BFactEvents.Insert(PatientId, EventName, curTimeTemp, curTimeTemp, RecoverId); } + else if (state == 2) + { + string eventName = ""; + if (EventName == "插管" || EventName == "喉罩") eventName = "'3','9'"; + if (EventName == "拔管" || EventName == "拔喉罩") eventName = "'4','10'"; + BFactEvents.Delete(" EventId in (" + eventName + ") and PatientId=" + PatientId, null); + Inevent = BFactEvents.Insert(PatientId, EventName, curTimeTemp, curTimeTemp, RecoverId); + } else { updateEventTime(EventName, curTimeTemp, ref Inevent); @@ -837,8 +847,9 @@ namespace AIMS.OperationAanesthesia UpdatePhysioDataResp(); } - if (Inevent != null && Inevent.EventName == "拔管" && _record.SpileOutTime != Inevent.EventBeginTime) + if (Inevent != null && Inevent.EventName == cmbBGType.Text && _record.SpileOutTime != Inevent.EventBeginTime) { + _record.InBGType = cmbBGType.Text; _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)); @@ -904,7 +915,7 @@ namespace AIMS.OperationAanesthesia { if (templateManage2 != null) templateManage2.SetPYL(); - } + } private void plRefresh_Click(object sender, EventArgs e) { if (PatientId == 0) return; @@ -2062,18 +2073,30 @@ namespace AIMS.OperationAanesthesia } if (_record.SpileInTime != null) { + this.cmbCGType.SelectedIndexChanged -= new System.EventHandler(this.cmbCGType_SelectedIndexChanged); cmbCGType.Text = _record.InCGType; txtCG.CustomFormat = "MM-dd HH:mm"; txtCG.Tag = _record.SpileInTime.Value; txtCG.Value = _record.SpileInTime.Value; this.picCG.BackgroundImage = global::AIMS.Properties.Resources.置管_select; + + if (_record.SpileOutTime == null) + { + if (_record.InCGType == "插管") cmbBGType.Text = "拔管"; + if (_record.InCGType == "喉罩") cmbBGType.Text = "拔喉罩"; + } + + this.cmbCGType.SelectedIndexChanged += new System.EventHandler(this.cmbCGType_SelectedIndexChanged); } if (_record.SpileOutTime != null) { + this.cmbBGType.SelectedIndexChanged -= new System.EventHandler(this.cmbBGType_SelectedIndexChanged); + cmbBGType.Text = _record.InBGType; txtBG.CustomFormat = "MM-dd HH:mm"; txtBG.Tag = _record.SpileOutTime.Value; txtBG.Value = _record.SpileOutTime.Value; this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管_select; + this.cmbBGType.SelectedIndexChanged += new System.EventHandler(this.cmbBGType_SelectedIndexChanged); } if (_record.OperationBeginTime != null) { @@ -2385,6 +2408,26 @@ namespace AIMS.OperationAanesthesia frmSafety.PatientId = PatientId; frmSafety.Show(); } + private void cmbCGType_SelectedIndexChanged(object sender, EventArgs e) + { + _record.InCGType = cmbCGType.Text; + if (txtCG.CustomFormat != " " && txtCG.Tag != null) + { + DrawGraph.FactEvents Inevent = null; + InsertOrUpdateEventTime(2, "txtCG", cmbCGType.Text, txtCG, txtCG.Value, ref Inevent); + ReviewEvent(); + } + } + private void cmbBGType_SelectedIndexChanged(object sender, EventArgs e) + { + _record.InBGType = cmbBGType.Text; + if (txtBG.CustomFormat != " " && txtBG.Tag != null) + { + DrawGraph.FactEvents Inevent = null; + InsertOrUpdateEventTime(2, "txtBG", cmbBGType.Text, txtBG, txtBG.Value, ref Inevent); + ReviewEvent(); + } + } #endregion } diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaRecover.Designer.cs b/AIMS/OperationAanesthesia/frmAanesthesiaRecover.Designer.cs index 691908d..ea7071d 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaRecover.Designer.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaRecover.Designer.cs @@ -91,7 +91,6 @@ this.panel16 = new System.Windows.Forms.Panel(); this.txtBG = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.picBG = new System.Windows.Forms.PictureBox(); - this.button9 = new System.Windows.Forms.Button(); this.panel12 = new System.Windows.Forms.Panel(); this.txtAnaesthesiaEnd = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); this.picAnesEnd = new System.Windows.Forms.PictureBox(); @@ -101,6 +100,7 @@ this.picInRoom = new System.Windows.Forms.PictureBox(); this.txtInRoom1 = new System.Windows.Forms.Button(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.cmbBGType = new System.Windows.Forms.ComboBox(); this.panel3.SuspendLayout(); this.panel14.SuspendLayout(); this.panel4.SuspendLayout(); @@ -1029,9 +1029,9 @@ // panel16 // this.panel16.BackColor = System.Drawing.Color.AliceBlue; + this.panel16.Controls.Add(this.cmbBGType); this.panel16.Controls.Add(this.txtBG); this.panel16.Controls.Add(this.picBG); - this.panel16.Controls.Add(this.button9); this.panel16.Location = new System.Drawing.Point(167, 3); this.panel16.Name = "panel16"; this.panel16.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); @@ -1103,22 +1103,6 @@ this.picBG.TabIndex = 42; this.picBG.TabStop = false; // - // button9 - // - this.button9.BackColor = System.Drawing.Color.Transparent; - this.button9.FlatAppearance.BorderSize = 0; - this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button9.Font = new System.Drawing.Font("微软雅黑", 10.5F); - this.button9.ImageAlign = System.Drawing.ContentAlignment.BottomLeft; - this.button9.Location = new System.Drawing.Point(39, -3); - this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(100, 25); - this.button9.TabIndex = 41; - this.button9.Tag = ""; - this.button9.Text = "拔管"; - this.button9.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.button9.UseVisualStyleBackColor = false; - // // panel12 // this.panel12.BackColor = System.Drawing.Color.AliceBlue; @@ -1313,6 +1297,19 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(147, 71); this.flowLayoutPanel1.TabIndex = 0; // + // cmbBGType + // + this.cmbBGType.Font = new System.Drawing.Font("微软雅黑", 9F); + this.cmbBGType.FormattingEnabled = true; + this.cmbBGType.Items.AddRange(new object[] { + "拔管", + "拔喉罩"}); + this.cmbBGType.Location = new System.Drawing.Point(40, 0); + this.cmbBGType.Name = "cmbBGType"; + this.cmbBGType.Size = new System.Drawing.Size(101, 25); + this.cmbBGType.TabIndex = 48; + this.cmbBGType.Text = "拔管"; + // // frmAanesthesiaRecover // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1400,7 +1397,6 @@ private System.Windows.Forms.Panel panel16; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtBG; private System.Windows.Forms.PictureBox picBG; - private System.Windows.Forms.Button button9; public DevComponents.DotNetBar.Controls.CircularProgress circularProgress1; private System.Windows.Forms.Button btnsbwh; private System.Windows.Forms.Button btnzsk; @@ -1425,5 +1421,6 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox cmbBGType; } } \ No newline at end of file diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaRecover.cs b/AIMS/OperationAanesthesia/frmAanesthesiaRecover.cs index cef7182..f7490ea 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaRecover.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaRecover.cs @@ -337,7 +337,7 @@ namespace AIMS.OperationAanesthesia DateTime curTimeTemp = new DateTime(nowtime.Year, nowtime.Month, nowtime.Day, nowtime.Hour, nowtime.Minute, 0); InsertOrUpdateEventTime(0, "txtInRoom", "入室", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(0, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + InsertOrUpdateEventTime(0, "txtBG", cmbBGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(0, "txtAnaesthesiaEnd", "麻醉完成", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); @@ -385,7 +385,7 @@ namespace AIMS.OperationAanesthesia //} InsertOrUpdateEventTime(1, "txtInRoom", "入室", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(1, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + InsertOrUpdateEventTime(1, "txtBG", cmbBGType.Text, tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); InsertOrUpdateEventTime(1, "txtAnaesthesiaEnd", "麻醉完成", tb, curTimeTemp, ref Inevent); curTimeTemp = curTimeTemp.AddSeconds(2); @@ -420,7 +420,7 @@ namespace AIMS.OperationAanesthesia if (_record.StateName == "麻醉复苏中") { DeleteEventTime("txtAnaesthesiaEnd", "麻醉完成", tb, ref Inevent); - DeleteEventTime("txtBG", "拔管", tb, ref Inevent); + DeleteEventTime("txtBG", cmbBGType.Text, tb, ref Inevent); } else { @@ -468,8 +468,9 @@ namespace AIMS.OperationAanesthesia this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束; BOperationRecord.Update(" AnesthesiaEndTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); } - if (Inevent != null && Inevent.EventName == "拔管") + if (Inevent != null && Inevent.EventName == cmbBGType.Text) { + _record.InBGType = ""; _record.SpileOutTime = null; this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; BOperationRecord.Update(" SpileOutTime=null where Id=@id ", new AIMSModel.ParameterList("@id", _record.Id)); @@ -541,8 +542,9 @@ namespace AIMS.OperationAanesthesia this.picInRoom.BackgroundImage = global::AIMS.Properties.Resources.入手术室_select; BOperationRecord.Update("InRoomTime=@InRoom where Id=@id ", new AIMSModel.ParameterList("@InRoom", _record.InRoomTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), "@id", _record.Id)); } - if (Inevent != null && Inevent.EventName == "拔管" && _record.SpileOutTime != Inevent.EventBeginTime) + if (Inevent != null && Inevent.EventName == cmbBGType.Text && _record.SpileOutTime != Inevent.EventBeginTime) { + _record.InBGType = cmbBGType.Text; _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)); @@ -1425,6 +1427,7 @@ namespace AIMS.OperationAanesthesia } if (_record.SpileOutTime != null) { + cmbBGType.Text = _record.InBGType; txtBG.CustomFormat = "MM-dd HH:mm"; txtBG.Tag = _record.SpileOutTime.Value; txtBG.Value = _record.SpileOutTime.Value; diff --git a/AIMS/OperationAanesthesia/frmFactEventsNew.cs b/AIMS/OperationAanesthesia/frmFactEventsNew.cs index 39194a4..510b8a6 100644 --- a/AIMS/OperationAanesthesia/frmFactEventsNew.cs +++ b/AIMS/OperationAanesthesia/frmFactEventsNew.cs @@ -367,7 +367,7 @@ namespace AIMS.PublicUI.UI { b = true; } - if (objectName == "插管" || objectName == "拔管" || objectName == "喉罩") + if (objectName == "插管" || objectName == "拔管" || objectName == "喉罩" || objectName == "拔喉罩") { b = false; } @@ -594,6 +594,12 @@ namespace AIMS.PublicUI.UI 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.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) { _record.OperationEndTime = _event.EventBeginTime; IsChage = true; @@ -646,6 +652,12 @@ namespace AIMS.PublicUI.UI BOperationRecord.Update(" SpileOutTime=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(); // keyValuePairs.Add("@InRoomTime", _record.InRoomTime.HasValue ? (object)_record.InRoomTime.Value : (object)DBNull.Value); diff --git a/AIMS/OperationAanesthesia/frmInstrumentRecord2.Designer.cs b/AIMS/OperationAanesthesia/frmInstrumentRecord2.Designer.cs index 9cc7cd9..ab28b49 100644 --- a/AIMS/OperationAanesthesia/frmInstrumentRecord2.Designer.cs +++ b/AIMS/OperationAanesthesia/frmInstrumentRecord2.Designer.cs @@ -33,6 +33,7 @@ this.panel2 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel14 = new System.Windows.Forms.Panel(); + this.button10 = new System.Windows.Forms.Button(); this.button9 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.button8 = new System.Windows.Forms.Button(); @@ -108,7 +109,6 @@ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.writerCommandControler1 = new DCSoft.Writer.Commands.WriterCommandControler(this.components); - this.button10 = new System.Windows.Forms.Button(); this.panel3.SuspendLayout(); this.panel14.SuspendLayout(); this.panel4.SuspendLayout(); @@ -183,6 +183,27 @@ this.panel14.Size = new System.Drawing.Size(160, 931); this.panel14.TabIndex = 5; // + // button10 + // + this.button10.BackColor = System.Drawing.Color.Transparent; + this.button10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.button10.Cursor = System.Windows.Forms.Cursors.Hand; + this.button10.Dock = System.Windows.Forms.DockStyle.Top; + this.button10.FlatAppearance.BorderSize = 0; + this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button10.Font = new System.Drawing.Font("微软雅黑", 11F); + this.button10.ForeColor = System.Drawing.Color.DimGray; + this.button10.Image = global::AIMS.Properties.Resources.安全检查; + this.button10.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.button10.Location = new System.Drawing.Point(0, 700); + this.button10.Name = "button10"; + this.button10.Size = new System.Drawing.Size(160, 50); + this.button10.TabIndex = 19; + this.button10.Text = " 安全核查"; + this.button10.UseVisualStyleBackColor = false; + this.button10.Visible = false; + this.button10.Click += new System.EventHandler(this.button10_Click); + // // button9 // this.button9.BackColor = System.Drawing.Color.Transparent; @@ -219,9 +240,8 @@ this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(160, 50); this.button1.TabIndex = 16; - this.button1.Text = " 新增器械"; + this.button1.Text = " 重置器械"; this.button1.UseVisualStyleBackColor = false; - this.button1.Visible = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // button8 @@ -1405,26 +1425,6 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(147, 71); this.flowLayoutPanel1.TabIndex = 0; // - // button10 - // - this.button10.BackColor = System.Drawing.Color.Transparent; - this.button10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.button10.Cursor = System.Windows.Forms.Cursors.Hand; - this.button10.Dock = System.Windows.Forms.DockStyle.Top; - this.button10.FlatAppearance.BorderSize = 0; - this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button10.Font = new System.Drawing.Font("微软雅黑", 11F); - this.button10.ForeColor = System.Drawing.Color.DimGray; - this.button10.Image = global::AIMS.Properties.Resources.安全检查; - this.button10.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button10.Location = new System.Drawing.Point(0, 700); - this.button10.Name = "button10"; - this.button10.Size = new System.Drawing.Size(160, 50); - this.button10.TabIndex = 19; - this.button10.Text = " 安全核查"; - this.button10.UseVisualStyleBackColor = false; - this.button10.Click += new System.EventHandler(this.button10_Click); - // // frmInstrumentRecord2 // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs b/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs index 8e69c37..ac62a5e 100644 --- a/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs +++ b/AIMS/OperationAanesthesia/frmInstrumentRecord2.cs @@ -687,35 +687,63 @@ namespace AIMS.OperationAanesthesia } private void btnTemplate_Click(object sender, EventArgs e) { - if (superTabMain.SelectedTab.Name == "spTabQXQDD") + if (_applianceUseType == null) + _applianceUseType = new List(); + frmSelectApplianceUseType ReturnApply = new frmSelectApplianceUseType(); + ReturnApply._SelectApplianceUseType = _applianceUseType; + ReturnApply.IsRedio = false; + ReturnApply.IsLoadOne = false; + DialogResult ddr = ReturnApply.ShowDialog(); + _appliance = ReturnApply._appliance; + if (ddr == System.Windows.Forms.DialogResult.OK && _appliance != null && _applianceUseType.Count > 1) { - if (_applianceUseType == null) - _applianceUseType = new List(); - frmSelectApplianceUseType ReturnApply = new frmSelectApplianceUseType(); - ReturnApply._SelectApplianceUseType = _applianceUseType; - DialogResult ddr = ReturnApply.ShowDialog(); - _appliance = ReturnApply._appliance; - if (ddr == System.Windows.Forms.DialogResult.OK && _appliance != null && _applianceUseType[0].Id != 1) + Incount = 9; + FullUcControlsToPanel(QXList, _appliance, _record.InstrumentList, ref i1, ref j1); + for (int nulli = Incount; nulli < 69; nulli++) { - FullUcControlsToPanel(QXList, _appliance, _record.InstrumentList, ref i1, ref j1); - //if (_appliance.Rows.Count > 60) - // MessageBox.Show("超出打印数量!"); - } - } - else - { - if (_applianceUseType2 == null) - _applianceUseType2 = new List(); - frmSelectApplianceUseType ReturnApply = new frmSelectApplianceUseType(); - ReturnApply._SelectApplianceUseType = _applianceUseType2; - DialogResult ddr = ReturnApply.ShowDialog(); - _appliance2 = ReturnApply._appliance; - if (ddr == System.Windows.Forms.DialogResult.OK && _appliance2 != null && _applianceUseType[0].Id != 1) - { - //FullUcControlsToPanel(panelQXList2, _appliance2, _record.InstrumentList2, ref i2, ref j2); - //if (_appliance.Rows.Count > 60) - // MessageBox.Show("超出打印数量!"); + var BillText = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli]).FirstOrDefault(); + if (BillText != null && BillText.Text != "") + { + BillText.Text = ""; + BillText.FormulaValue = ""; + BillText.InnerText = ""; + + var BillText2 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "A").FirstOrDefault(); + if (BillText2 != null && BillText2.Text != "") + { + BillText2.Text = ""; + BillText2.FormulaValue = ""; + BillText2.InnerText = ""; + } + var BillText3 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "B").FirstOrDefault(); + if (BillText3 != null && BillText3.Text != "") + { + BillText3.Text = ""; + BillText3.FormulaValue = ""; + BillText3.InnerText = ""; + } + var BillText4 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "C").FirstOrDefault(); + if (BillText4 != null && BillText4.Text != "") + { + BillText4.Text = ""; + BillText4.FormulaValue = ""; + BillText4.InnerText = ""; + } + var BillText5 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "D").FirstOrDefault(); + if (BillText5 != null && BillText5.Text != "") + { + BillText5.Text = ""; + BillText5.FormulaValue = ""; + BillText5.InnerText = ""; + } + } } + myEditControl.Document.EditorRefreshView(); } } private void tsbExePlan_Click(object sender, EventArgs e) @@ -1304,7 +1332,6 @@ namespace AIMS.OperationAanesthesia /// 物品数据表 private void FullUcControlsToPanel(List panel, DataTable dt, OperationRecordInstrumentList Instrument, ref int i, ref int j) { - //i = 0; j = 0; Incount = 0; foreach (DataRow dr in dt.Rows) { if (Incount >= 70) @@ -1315,24 +1342,42 @@ namespace AIMS.OperationAanesthesia { BillText.OuterText = dr["Id"].ToString(); BillText.Text = dr["Name"].ToString(); + BillText.FormulaValue = dr["Name"].ToString(); + BillText.InnerText = dr["Name"].ToString(); string ApplianceNumber = dr["ApplianceNumber"].ToString(); var BillText2 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement && (x as XTextInputFieldElement).Name == QXList[Incount] + "A").FirstOrDefault(); if (BillText2 != null && BillText2.Text == "") + { BillText2.Text = ApplianceNumber; + BillText2.FormulaValue = ApplianceNumber; + BillText2.InnerText = ApplianceNumber; + } var BillText3 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement && (x as XTextInputFieldElement).Name == QXList[Incount] + "B").FirstOrDefault(); if (BillText3 != null && BillText3.Text == "") + { BillText3.Text = "0"; + BillText3.FormulaValue = "0"; + BillText3.InnerText = "0"; + } var BillText4 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement && (x as XTextInputFieldElement).Name == QXList[Incount] + "C").FirstOrDefault(); if (BillText4 != null && BillText4.Text == "") + { BillText4.Text = ApplianceNumber; + BillText4.FormulaValue = ApplianceNumber; + BillText4.InnerText = ApplianceNumber; + } var BillText5 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement && (x as XTextInputFieldElement).Name == QXList[Incount] + "D").FirstOrDefault(); if (BillText5 != null && BillText5.Text == "") + { BillText5.Text = ApplianceNumber; + BillText5.FormulaValue = ApplianceNumber; + BillText5.InnerText = ApplianceNumber; + } } Incount++; @@ -1347,42 +1392,89 @@ namespace AIMS.OperationAanesthesia private void button1_Click(object sender, EventArgs e) { - if (superTabMain.SelectedTab.Name == "spTabQXQDD") + for (int nulli = 0; nulli < 10; nulli++) { - ApplianceRecord app = new ApplianceRecord(); - app.OperationRecordId = _record.Id.Value; - UCOperationGoodsBill5 uc = new UCOperationGoodsBill5(app); - uc.SelectTextBoxEvent += Uc_SelectTextBoxEvent; - uc.lblGoodsName.ReadOnly = false; - uc.GoodsNumber = ""; - //uc.Location = new Point((uc.Width) * i1, (uc.Height - 1) * j1); - if (_record.InstrumentList.ApplianceRecordList != null) _record.InstrumentList.ApplianceRecordList.Add(app); - //panelQXList.Controls.Add(uc); - j1++; - if (j1 == 25) - { - j1 = 0; - i1++; + var BillText = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli]).FirstOrDefault(); + if (BillText != null) + { + var BillText2 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "A").FirstOrDefault(); + if (BillText2 != null && BillText2.Text != "") + { + BillText2.Text = "0"; + BillText2.FormulaValue = "0"; + BillText2.InnerText = "0"; + } + var BillText3 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "B").FirstOrDefault(); + if (BillText3 != null && BillText3.Text != "") + { + BillText3.Text = "0"; + BillText3.FormulaValue = "0"; + BillText3.InnerText = "0"; + } + var BillText4 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "C").FirstOrDefault(); + if (BillText4 != null && BillText4.Text != "") + { + BillText4.Text = "0"; + BillText4.FormulaValue = "0"; + BillText4.InnerText = "0"; + } + var BillText5 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "D").FirstOrDefault(); + if (BillText5 != null && BillText5.Text != "") + { + BillText5.Text = "0"; + BillText5.FormulaValue = "0"; + BillText5.InnerText = "0"; + } } } - else + for (int nulli = 9; nulli < 69; nulli++) { - ApplianceRecord app = new ApplianceRecord(); - app.OperationRecordId = _record.Id.Value; - UCOperationGoodsBill5 uc = new UCOperationGoodsBill5(app); - uc.SelectTextBoxEvent += Uc_SelectTextBoxEvent; - uc.lblGoodsName.ReadOnly = false; - uc.GoodsNumber = ""; - //uc.Location = new Point((uc.Width) * i2, (uc.Height - 1) * j2); - if (_record.InstrumentList2.ApplianceRecordList != null) _record.InstrumentList2.ApplianceRecordList.Add(app); - //panelQXList2.Controls.Add(uc); - j2++; - if (j2 == 25) + var BillText = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli]).FirstOrDefault(); + if (BillText != null) { - j2 = 0; - i2++; - } + BillText.Text = ""; + BillText.FormulaValue = ""; + BillText.InnerText = ""; + var BillText2 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "A").FirstOrDefault(); + if (BillText2 != null && BillText2.Text != "") + { + BillText2.Text = ""; + BillText2.FormulaValue = ""; + BillText2.InnerText = ""; + } + var BillText3 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "B").FirstOrDefault(); + if (BillText3 != null && BillText3.Text != "") + { + BillText3.Text = ""; + BillText3.FormulaValue = ""; + BillText3.InnerText = ""; + } + var BillText4 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "C").FirstOrDefault(); + if (BillText4 != null && BillText4.Text != "") + { + BillText4.Text = ""; + BillText4.FormulaValue = ""; + BillText4.InnerText = ""; + } + var BillText5 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).Name == QXList[nulli] + "D").FirstOrDefault(); + if (BillText5 != null && BillText5.Text != "") + { + BillText5.Text = ""; + BillText5.FormulaValue = ""; + BillText5.InnerText = ""; + } + } } } @@ -1453,18 +1545,9 @@ namespace AIMS.OperationAanesthesia private void PanelSave_Click(object sender, EventArgs e) { PanelSave.Select(); - if (superTabMain.SelectedTab.Name == "spTabQXQDD") - { - SaveInstrument(sender); - ReviewEvent(); - new frmMessageBox().Show(); - } - //else - //{ - // SaveInstrument2(sender); - // ReviewEvent(); - // new frmMessageBox().Show(); - //} + SaveInstrument(sender); + ReviewEvent(); + new frmMessageBox().Show(); } private void SaveInstrument(object sender) @@ -1706,28 +1789,14 @@ namespace AIMS.OperationAanesthesia { if (_record == null || _record.Id == 0) return; plPrintBrowse.Select(); - if (superTabMain.SelectedTab.Name == "spTabQXQDD") - { - SaveInstrument(sender); - } - //else - //{ - // SaveInstrument2(sender); - //} + SaveInstrument(sender); myEditControl.ExecuteCommand("FilePrintPreview", true, null); plRefresh_Click(null, null); } private void button9_Click(object sender, EventArgs e) { - if (superTabMain.SelectedTab.Name == "spTabQXQDD") - { - TextBoxAddEventSources(QXList, @"/"); - } - else - { - //TextBoxAddEventSources(panelQX2, @"/"); - } + TextBoxAddEventSources(QXList, @"/"); } private void TextBoxAddEventSources(List _panel, string TextValue) @@ -1803,14 +1872,7 @@ namespace AIMS.OperationAanesthesia if (_record == null || _record.Id == 0) return; plPrint.Select(); - if (superTabMain.SelectedTab.Name == "spTabQXQDD") - { - SaveInstrument(sender); - } - //else - //{ - // SaveInstrument2(sender); - //} + SaveInstrument(sender); try { myEditControl.ExecuteCommand("FilePrint", true, null); diff --git a/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs b/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs index 2106719..edd61b4 100644 --- a/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs +++ b/AIMS/OperationAanesthesia/frmSelectPatientGoodsBill2.cs @@ -3,6 +3,7 @@ using AIMSBLL; using AIMSExtension; using AIMSModel; using AxNsoOfficeLib; +using DocumentManagement; using DrawGraph; using System; using System.Collections.Generic; @@ -390,6 +391,12 @@ namespace AIMS.OperationAanesthesia BOperationRecord.DeleteOperationRecordData(RecorId, PatientId, 1); HelperDB.DbHelperSQL.CommitTrans(); + PrintDocument DModel = DocumentDAL.GetDocumentbyName("手术护理记录单", PatientId); + if (DModel != null && DModel.Id > 0) + { + DocumentDAL.DeletePrintDocument(DModel); + } + if (isMainOpen == false) { FillDgv(); diff --git a/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs b/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs index 489e002..fe66007 100644 --- a/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs +++ b/AIMS/OperationAanesthesia/frmSelectPatientNew2.cs @@ -13,6 +13,7 @@ using AIMSBLL; using DCSoftDotfuscate; using System.Net; using AIMSExtension; +using DocumentManagement; namespace AIMS.OperationAanesthesia { @@ -22,7 +23,7 @@ namespace AIMS.OperationAanesthesia public int SelPatientId; public int SelApplyId; public bool isMainOpen = false; - public AIMS.OperationAanesthesia.frmAanesthesiaRecord tempfrmAnasRecord; + public AIMS.OperationAanesthesia.frmAanesthesiaRecord tempfrmAnasRecord; public frmSelectPatientNew2() { @@ -30,9 +31,9 @@ namespace AIMS.OperationAanesthesia } private void frmSelectPatientNew2_Load(object sender, EventArgs e) - { - ControlExtension.GetOperationSiteRoom(labelSite, CboOperationSite,cboRoom); - + { + ControlExtension.GetOperationSiteRoom(labelSite, CboOperationSite, cboRoom); + FillDgv(); this.cboRoom.SelectedIndexChanged += new System.EventHandler(this.cboRoom_SelectedIndexChanged); @@ -359,7 +360,6 @@ namespace AIMS.OperationAanesthesia HelperDB.DbHelperSQL.BeginTrans(); BOperationApply.UpdateApplyState(applyId, 4); BOperationRecord.DeleteOperationRecordData(RecorId, PatientId, 1); - HelperDB.DbHelperSQL.CommitTrans(); if (isMainOpen == false) { @@ -506,7 +506,7 @@ namespace AIMS.OperationAanesthesia } private void CboOperationSite_SelectedIndexChanged(object sender, EventArgs e) { - ControlExtension.SetOperationSiteRoom(CboOperationSite,cboRoom); + ControlExtension.SetOperationSiteRoom(CboOperationSite, cboRoom); //FillDgv(); } } diff --git a/AIMS/OperationAanesthesia/oldSystemCode/frmSelectApplianceUseType.cs b/AIMS/OperationAanesthesia/oldSystemCode/frmSelectApplianceUseType.cs index 403c696..efe3402 100644 --- a/AIMS/OperationAanesthesia/oldSystemCode/frmSelectApplianceUseType.cs +++ b/AIMS/OperationAanesthesia/oldSystemCode/frmSelectApplianceUseType.cs @@ -30,6 +30,8 @@ namespace AIMS.OperationAanesthesia public List listNew = new List(); public int allNumber = 0; + public bool IsRedio = true; + public bool IsLoadOne = true; public frmSelectApplianceUseType() { @@ -50,7 +52,7 @@ namespace AIMS.OperationAanesthesia /// private void LoadApplianceUseType() { - _applianceUseType = BApplianceUseType.Select("IsValid=1 ", new ParameterList(), RecursiveType.None, 0); + _applianceUseType = BApplianceUseType.Select("IsValid=1 "+(IsLoadOne?"":" and id>1"), new ParameterList(), RecursiveType.None, 0); //_applianceUseType.Insert(0, new ApplianceUseType() { Id = -1, Name = "" }); this.cboGoodsType.Items.AddRange(_applianceUseType.ToArray()); cboGoodsType.ValueMember = "Id"; @@ -116,6 +118,7 @@ namespace AIMS.OperationAanesthesia newDataTable = _appliance.Clone(); foreach (ApplianceUseType item in _SelectApplianceUseType) { + if (IsLoadOne == false && item.Id == 1) continue; if (item.TheApplianceId != null && item.TheApplianceId != "") { DataTable dt = BAppliance.GetApplianiceNumberByIds(item.TheApplianceId, item.ApplianceNumber); @@ -166,41 +169,46 @@ namespace AIMS.OperationAanesthesia private void dgvApplianceUseType_CellClick(object sender, DataGridViewCellEventArgs e) { if (dgvApplianceUseType.CurrentRow == null) return; - //if (dgvApplianceUseType.CurrentRow.Cells[0].EditedFormattedValue.ToString() == "True") - //{ - // dgvApplianceUseType.CurrentRow.Cells[0].Value = false; - // _nowApplianceUseType = _SelectApplianceUseType.Where(a => a.Id == int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString())).ToList()[0]; - // _SelectApplianceUseType.Remove(_nowApplianceUseType); - //} - //else - //{ - - // dgvApplianceUseType.CurrentRow.Cells[0].Value = true; - // _nowApplianceUseType = BApplianceUseType.SelectSingle(int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString()), RecursiveType.None, 0); - // _SelectApplianceUseType.Add(_nowApplianceUseType); - //} - - if (dgvApplianceUseType.CurrentRow.Cells[0].EditedFormattedValue.ToString() == "True") + if (IsRedio == false) { - dgvApplianceUseType.CurrentRow.Cells[0].Value = false; - _nowApplianceUseType = _SelectApplianceUseType.Where(a => a.Id == int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString())).ToList()[0]; - _SelectApplianceUseType.Remove(_nowApplianceUseType); + if (dgvApplianceUseType.CurrentRow.Cells[0].EditedFormattedValue.ToString() == "True") + { + dgvApplianceUseType.CurrentRow.Cells[0].Value = false; + _nowApplianceUseType = _SelectApplianceUseType.Where(a => a.Id == int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString())).ToList()[0]; + _SelectApplianceUseType.Remove(_nowApplianceUseType); + } + else + { + + dgvApplianceUseType.CurrentRow.Cells[0].Value = true; + _nowApplianceUseType = BApplianceUseType.SelectSingle(int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString()), RecursiveType.None, 0); + _SelectApplianceUseType.Add(_nowApplianceUseType); + } } else { - dgvApplianceUseType.CurrentRow.Cells[0].Value = true; - _nowApplianceUseType = BApplianceUseType.SelectSingle(int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString()), RecursiveType.None, 0); - _SelectApplianceUseType.Add(_nowApplianceUseType); - - foreach (DataGridViewRow item in dgvApplianceUseType.Rows) + if (dgvApplianceUseType.CurrentRow.Cells[0].EditedFormattedValue.ToString() == "True") { - if (item != dgvApplianceUseType.CurrentRow) - if (item.Cells[0].EditedFormattedValue.ToString() == "True") - { - item.Cells[0].Value = false; - _nowApplianceUseType = _SelectApplianceUseType.Where(a => a.Id == int.Parse(item.Cells["Id1"].Value.ToString())).ToList()[0]; - _SelectApplianceUseType.Remove(_nowApplianceUseType); - } + dgvApplianceUseType.CurrentRow.Cells[0].Value = false; + _nowApplianceUseType = _SelectApplianceUseType.Where(a => a.Id == int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString())).ToList()[0]; + _SelectApplianceUseType.Remove(_nowApplianceUseType); + } + else + { + dgvApplianceUseType.CurrentRow.Cells[0].Value = true; + _nowApplianceUseType = BApplianceUseType.SelectSingle(int.Parse(dgvApplianceUseType.CurrentRow.Cells["Id1"].Value.ToString()), RecursiveType.None, 0); + _SelectApplianceUseType.Add(_nowApplianceUseType); + + foreach (DataGridViewRow item in dgvApplianceUseType.Rows) + { + if (item != dgvApplianceUseType.CurrentRow) + if (item.Cells[0].EditedFormattedValue.ToString() == "True") + { + item.Cells[0].Value = false; + _nowApplianceUseType = _SelectApplianceUseType.Where(a => a.Id == int.Parse(item.Cells["Id1"].Value.ToString())).ToList()[0]; + _SelectApplianceUseType.Remove(_nowApplianceUseType); + } + } } } diff --git a/AIMS/OremrUserControl/ucDocument.Designer.cs b/AIMS/OremrUserControl/ucDocument.Designer.cs index 4c90509..242a854 100644 --- a/AIMS/OremrUserControl/ucDocument.Designer.cs +++ b/AIMS/OremrUserControl/ucDocument.Designer.cs @@ -58,14 +58,9 @@ this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripSeparator(); - this.labPacs = new DevComponents.DotNetBar.LabelX(); - this.txtPacs = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); - this.panelExPacs = new DevComponents.DotNetBar.PanelEx(); this.toolStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.writerCommandControler1)).BeginInit(); this.cmEdit.SuspendLayout(); - this.panelExPacs.SuspendLayout(); this.SuspendLayout(); // // toolStrip1 @@ -306,74 +301,10 @@ this.toolStripMenuItem8.Name = "toolStripMenuItem8"; this.toolStripMenuItem8.Size = new System.Drawing.Size(121, 6); // - // labPacs - // - // - // - // - this.labPacs.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labPacs.Dock = System.Windows.Forms.DockStyle.Top; - this.labPacs.Location = new System.Drawing.Point(0, 0); - this.labPacs.Name = "labPacs"; - this.labPacs.Size = new System.Drawing.Size(238, 23); - this.labPacs.TabIndex = 0; - this.labPacs.TextAlignment = System.Drawing.StringAlignment.Center; - // - // txtPacs - // - // - // - // - this.txtPacs.Border.Class = "TextBoxBorder"; - this.txtPacs.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.txtPacs.Dock = System.Windows.Forms.DockStyle.Top; - this.txtPacs.Location = new System.Drawing.Point(0, 23); - this.txtPacs.Multiline = true; - this.txtPacs.Name = "txtPacs"; - this.txtPacs.PreventEnterBeep = true; - this.txtPacs.Size = new System.Drawing.Size(238, 237); - this.txtPacs.TabIndex = 1; - // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Dock = System.Windows.Forms.DockStyle.Fill; - this.buttonX1.Location = new System.Drawing.Point(0, 260); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(238, 27); - this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.buttonX1.TabIndex = 2; - this.buttonX1.Text = "关闭"; - this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click); - // - // panelExPacs - // - this.panelExPacs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.panelExPacs.CanvasColor = System.Drawing.SystemColors.Control; - this.panelExPacs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelExPacs.Controls.Add(this.buttonX1); - this.panelExPacs.Controls.Add(this.txtPacs); - this.panelExPacs.Controls.Add(this.labPacs); - this.panelExPacs.DisabledBackColor = System.Drawing.Color.Empty; - this.panelExPacs.Location = new System.Drawing.Point(615, 0); - this.panelExPacs.Name = "panelExPacs"; - this.panelExPacs.Size = new System.Drawing.Size(238, 287); - this.panelExPacs.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelExPacs.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.panelExPacs.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.panelExPacs.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelExPacs.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panelExPacs.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelExPacs.Style.GradientAngle = 90; - this.panelExPacs.TabIndex = 6; - this.panelExPacs.Visible = false; - // // ucDocument // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.panelExPacs); this.Controls.Add(this.myEditControl); this.Controls.Add(this.toolStrip1); this.Margin = new System.Windows.Forms.Padding(2); @@ -384,7 +315,6 @@ this.toolStrip1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.writerCommandControler1)).EndInit(); this.cmEdit.ResumeLayout(false); - this.panelExPacs.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -419,9 +349,5 @@ private System.Windows.Forms.ToolStripButton toolStripButton1; public System.Windows.Forms.ToolStrip toolStrip1; public DCSoft.Writer.Controls.WriterControl myEditControl; - private DevComponents.DotNetBar.LabelX labPacs; - private DevComponents.DotNetBar.Controls.TextBoxX txtPacs; - private DevComponents.DotNetBar.ButtonX buttonX1; - public DevComponents.DotNetBar.PanelEx panelExPacs; } } diff --git a/AIMS/OremrUserControl/ucDocument.cs b/AIMS/OremrUserControl/ucDocument.cs index 6b208f1..77305f5 100644 --- a/AIMS/OremrUserControl/ucDocument.cs +++ b/AIMS/OremrUserControl/ucDocument.cs @@ -208,6 +208,11 @@ namespace AIMS.OremrUserControl toolStripButton1.Text = "选择自费项目"; toolStripButton1.Visible = true; } + else if (XmlFileName == "麻醉术前访视评估单") + { + toolStripButton1.Text = "提取检验数据"; + toolStripButton1.Visible = true; + } } void myEditControl_AfterExecuteCommand(object eventSender, DCSoft.Writer.Commands.WriterCommandEventArgs args) @@ -499,13 +504,34 @@ namespace AIMS.OremrUserControl if (Result2 != "") field13.Text = Result2.ToString(); } + else if (DModel.XmlFileName == "麻醉术前访视评估单") + { + if (Patient.LisResult != null && Patient.LisResult.PATIENT_ID != null) + { + //患者基本信息赋值 + var query = from XTextElement in myEditControl.Document.Fields.ToArray() + where XTextElement is XTextInputFieldElement + && (XTextElement as XTextInputFieldElement).FieldSettings != null + && (XTextElement as XTextInputFieldElement).FieldSettings.EditStyle != InputFieldEditStyle.Date + && (XTextElement as XTextInputFieldElement).FieldSettings.ListSource != null + select XTextElement as XTextInputFieldElement; + DataRow[] drr = DocumentDAL.GetReflectionList("V_LisResult").Select("KB_SEQ <> ''"); + var lis = typeof(PatientLisResult).GetProperties(); + for (int i = 0; i < drr.Count(); i++) + { + var name = drr[i].ItemArray[0].ToString(); + var value = drr[i].ItemArray[1].ToString(); + XTextInputFieldElement element = query.Where(x => x.FieldSettings.ListSource.SourceName == value).FirstOrDefault(); + PropertyInfo info = lis.Where(px => px.Name == name).FirstOrDefault(); + if (element != null && info != null) + { + element.Text = info.GetValue(Patient.LisResult, null).ToString(); + } + } + } + } } - - private void buttonX1_Click(object sender, EventArgs e) - { - panelExPacs.Visible = false; - } - + private void tsbCheckout_Click(object sender, EventArgs e) { if (tsbCheckout.Text == " 查看痕迹") diff --git a/AIMSEntity/BLL/Extension/BOperationRecord.cs b/AIMSEntity/BLL/Extension/BOperationRecord.cs index 717dd2c..3fefb8b 100644 --- a/AIMSEntity/BLL/Extension/BOperationRecord.cs +++ b/AIMSEntity/BLL/Extension/BOperationRecord.cs @@ -156,7 +156,7 @@ namespace AIMSBLL if (_record.SpileWard == null || _record.SpileWard == "") _record.SpileWard = "手术室"; if (_record.MuscleStrengthRecovery == null || _record.MuscleStrengthRecovery == "") - _record.MuscleStrengthRecovery = "差"; + _record.MuscleStrengthRecovery = "好"; if (_record.CoughReflex == null || _record.CoughReflex == "") _record.CoughReflex = "有"; if (_record.InOperaRoomState == null || _record.InOperaRoomState == "") @@ -420,6 +420,12 @@ namespace AIMSBLL } if (FactEventsObj.EventName == "拔管") { + _record.InBGType = FactEventsObj.EventName; + _record.SpileOutTime = FactEventsObj.EventBeginTime; + } + if (FactEventsObj.EventName == "拔喉罩") + { + _record.InBGType = FactEventsObj.EventName; _record.SpileOutTime = FactEventsObj.EventBeginTime; } } diff --git a/AIMSEntity/BLL/Extension/BOperationTemplate.cs b/AIMSEntity/BLL/Extension/BOperationTemplate.cs index d383ca7..ed74400 100644 --- a/AIMSEntity/BLL/Extension/BOperationTemplate.cs +++ b/AIMSEntity/BLL/Extension/BOperationTemplate.cs @@ -51,7 +51,17 @@ namespace AIMSBLL { DateTime NewInRoomTime = AIMSExtension.PublicMethod.SystemDate(); DataTable dt = DOperationTemplate.GetDataTable(TemplateName, TypeId); + DateTime drugMinTime = InRoomTime; DataRow[] drugdr = dt.Select("ItemKindName='药品' and Spare5='0' "); + if (drugdr.Length > 0) drugMinTime = DateTime.Parse(drugdr[0]["BeginTime"].ToString()); + foreach (var item in drugdr) + { + if (drugMinTime > DateTime.Parse(item["BeginTime"].ToString())) + { + drugMinTime = DateTime.Parse(item["BeginTime"].ToString()); + } + } + foreach (DataRow dr in drugdr) { int DrugId = int.Parse(dr["ItemId"].ToString()); @@ -60,8 +70,8 @@ namespace AIMSBLL FactDrug FactDrugObj = new FactDrug(); FactDrugObj.PatientId = PatientId; FactDrugObj.DrugId = DrugId; - TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(drugMinTime); + TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(drugMinTime); FactDrugObj.DrugBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); FactDrugObj.DrugEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); @@ -166,8 +176,8 @@ namespace AIMSBLL FactEvents FactEventObj = new FactEvents(); FactEventObj.PatientId = PatientId; FactEventObj.EventId = EventId; - TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(drugMinTime); + TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(drugMinTime); FactEventObj.EventBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); FactEventObj.EventEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); @@ -197,8 +207,8 @@ namespace AIMSBLL FactOutputLiquids FactOutputLiquidsObj = new FactOutputLiquids(); FactOutputLiquidsObj.PatientId = PatientId; FactOutputLiquidsObj.OutputLiquidsId = OutputLiquidsId; - TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(drugMinTime); + TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(drugMinTime); FactOutputLiquidsObj.BeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); FactOutputLiquidsObj.EndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); @@ -228,7 +238,7 @@ namespace AIMSBLL foreach (DataRow dr in PhysioParamdr) { int PhysioParamId = int.Parse(dr["ItemId"].ToString()); - TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(drugMinTime); PhysioData PhysioDataObj = new PhysioData(); PhysioDataObj.PatientId = _record.Id.Value; PhysioDataObj.RecordTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); diff --git a/DocumentManagement/DocumentEntity/DocumentDAL.cs b/DocumentManagement/DocumentEntity/DocumentDAL.cs index ee19526..0fc197f 100644 --- a/DocumentManagement/DocumentEntity/DocumentDAL.cs +++ b/DocumentManagement/DocumentEntity/DocumentDAL.cs @@ -1022,6 +1022,20 @@ namespace DocumentManagement throw ex; } } + public static void DeletePrintDocument(PrintDocument model) + { + try + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete from [PrintDocument] "); + strSql.Append(" where Id=" + model.Id); + DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } public static void DeletePrintDocument2(PrintDocument model) { diff --git a/DrawGraph/AreaManage/DrugsManage.cs b/DrawGraph/AreaManage/DrugsManage.cs index 4c64e7e..e4e418c 100644 --- a/DrawGraph/AreaManage/DrugsManage.cs +++ b/DrawGraph/AreaManage/DrugsManage.cs @@ -202,11 +202,11 @@ namespace DrawGraph } else if (item.DrugChannel == "备用") { - myOpeRecord.StandbyListstr.Add(string.Format("{0}{1} {2} {3}{4}{5}", "", ((item.DrugBeginTime == item.DrugEndTime) ? item.DrugBeginTime.ToShortTimeString() : item.DrugBeginTime.ToShortTimeString()) + "->" + item.DrugEndTime.ToShortTimeString(), item.DrugName.Trim(), dose, "","")); + myOpeRecord.StandbyListstr.Add(string.Format("{0}{1} {2} {3}{4}{5}", "", ((item.DrugBeginTime == item.DrugEndTime) ? item.DrugBeginTime.ToShortTimeString() : item.DrugBeginTime.ToShortTimeString() + "->" + item.DrugEndTime.ToShortTimeString()), item.DrugName.Trim(), dose, "","")); } else if (item.DrugChannel == "配药") { - myOpeRecord.BackListstr.Add(string.Format("{0}{1} {2} {3}{4}{5}", "", ((item.DrugBeginTime == item.DrugEndTime) ? item.DrugBeginTime.ToShortTimeString() : item.DrugBeginTime.ToShortTimeString()) + "->" + item.DrugEndTime.ToShortTimeString(), item.DrugName.Trim(), dose, "","")); + myOpeRecord.BackListstr.Add(string.Format("{0}{1} {2} {3}{4}{5}", "", ((item.DrugBeginTime == item.DrugEndTime) ? item.DrugBeginTime.ToShortTimeString() : item.DrugBeginTime.ToShortTimeString() + "->" + item.DrugEndTime.ToShortTimeString()), item.DrugName.Trim(), dose, "","")); } else if (item.GiveDrugType == "麻醉诱导用药") { @@ -228,7 +228,7 @@ namespace DrawGraph }); List _FactDrugList = myOpeRecord.FactDrugList.Where(s => IfInTimeExist(s.DrugBeginTime, s.End) == true).ToList(); //存在氧气从第二行开始画 - if (_FactDrugList.Where(s => s.DrugName == "氧气" && s.GiveDrugType != "麻醉前用药" && s.GiveDrugType != "术后镇痛药" && s.GiveDrugType != "麻醉诱导用药").ToList().Count > 0) rowDrugsIndex = 1; + if (_FactDrugList.Where(s => s.DrugName == "氧气" && s.GiveDrugType != "麻醉前用药" && s.GiveDrugType != "术后镇痛药" && s.GiveDrugType != "麻醉诱导用药" ).ToList().Count > 0) rowDrugsIndex = 1; //加药按加药时间排序 _FactDrugList.Sort(new FactDrugComparer()); @@ -236,7 +236,7 @@ namespace DrawGraph for (int i = 0; i < _FactDrugList.Count; i++) { FactDrug temp = _FactDrugList[i]; - if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" || temp.GiveDrugType == "麻醉诱导用药") continue; + if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" || temp.GiveDrugType == "麻醉诱导用药" || temp.DrugChannel == "配药") continue; //子药不画 if (temp.ParentId > 0) continue; bool isEqual = false; @@ -255,7 +255,7 @@ namespace DrawGraph for (int j = 0; j < i; j++) { FactDrug addDrug1 = _FactDrugList[j]; - if (addDrug1.GiveDrugType == "麻醉前用药" || addDrug1.GiveDrugType == "术后镇痛药" || addDrug1.GiveDrugType == "麻醉诱导用药" || addDrug1.DrugChannel == "备用") continue; + if (addDrug1.GiveDrugType == "麻醉前用药" || addDrug1.GiveDrugType == "术后镇痛药" || addDrug1.GiveDrugType == "麻醉诱导用药" || addDrug1.DrugChannel == "备用" || addDrug1.DrugChannel == "配药") continue; if (addDrug1.ChildFactDrugList == null) addDrug1.ChildFactDrugList = new List(); //如果加药品ID相同并且加加药ID不同,则认为加了同一种加药 if (addDrug1.Equal(temp) && temp.ParentId == 0 && addDrug1.ParentId == 0 && addDrug1.ChildFactDrugList.Count == 0 && temp.ChildFactDrugList.Count == 0) @@ -408,7 +408,7 @@ namespace DrawGraph dose += temp.DosageUnit; } } - DrugListstr.Add(string.Format("({0}){1} {2} {3}{4}{5}", i + 1, (temp.DrugBeginTime == temp.DrugEndTime) ? temp.DrugBeginTime.ToShortTimeString() : temp.DrugBeginTime.ToShortTimeString() + "->" + temp.DrugEndTime.ToShortTimeString(), temp.DrugName.Trim(), dose, "", temp.DrugChannel == null ? "" : " " + temp.DrugChannel.ToString())); + DrugListstr.Add(string.Format("({0}){1} {2} {3}{4}{5}", i + 1, (temp.DrugBeginTime == temp.DrugEndTime) ? temp.DrugBeginTime.ToShortTimeString() : (temp.DrugBeginTime.ToShortTimeString() + "->" + temp.DrugEndTime.ToShortTimeString()), temp.DrugName.Trim(), dose, "", temp.DrugChannel == null ? "" : " " + temp.DrugChannel.ToString())); //DrugListstr.Append(" "); } diff --git a/DrawGraph/AreaManage/OperationRecord.cs b/DrawGraph/AreaManage/OperationRecord.cs index 6d53f03..0c7f13f 100644 --- a/DrawGraph/AreaManage/OperationRecord.cs +++ b/DrawGraph/AreaManage/OperationRecord.cs @@ -1223,6 +1223,8 @@ namespace DrawGraph [NoCreatControlAttributs] public string InCGType; [NoCreatControlAttributs] + public string InBGType; + [NoCreatControlAttributs] public string MedicalRecord; [NoCreatControlAttributs] public string StateName; diff --git a/DrawGraph/AreaManage/RemarkManage.cs b/DrawGraph/AreaManage/RemarkManage.cs index f3219de..6e03312 100644 --- a/DrawGraph/AreaManage/RemarkManage.cs +++ b/DrawGraph/AreaManage/RemarkManage.cs @@ -95,7 +95,7 @@ namespace DrawGraph int remarkRow = 0; int AllRemarkRow = 0; float fontsize = 6f; - int fontlength = 34; + int fontlength = 33; try { myOpeRecord.ClearEventstr(ZedControl); diff --git a/DrawGraph/AreaManage/SapManage.cs b/DrawGraph/AreaManage/SapManage.cs index 117ebe5..5c8680c 100644 --- a/DrawGraph/AreaManage/SapManage.cs +++ b/DrawGraph/AreaManage/SapManage.cs @@ -227,7 +227,7 @@ namespace DrawGraph for (int i = 0; i < _FactDrugList.Count; i++) { FactDrug temp = _FactDrugList[i]; - if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" || temp.GiveDrugType == "麻醉诱导用药") continue; + if (temp.GiveDrugType == "麻醉前用药" || temp.GiveDrugType == "术后镇痛药" || temp.DrugChannel == "备用" ||temp.DrugChannel == "配药" || temp.GiveDrugType == "麻醉诱导用药") continue; //子药不画 if (temp.ParentId > 0) continue; bool isEqual = false;