From 29d5b3c82da1959addeb3855b5793824aa52061a Mon Sep 17 00:00:00 2001 From: leomon Date: Sat, 12 Nov 2022 17:05:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=AF=E5=93=81=E7=BB=B4=E6=8A=A4=20?= =?UTF-8?q?=E5=89=82=E9=87=8F=E5=8D=95=E4=BD=8D=E6=8D=A2=E7=AE=97=20?= =?UTF-8?q?=E5=8C=BB=E7=96=97=E6=96=87=E4=B9=A6=E5=85=83=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIMS/AIMS.csproj | 1 + AIMS/DataDictionary/frmDrugs.Designer.cs | 184 ++++++++++-------- AIMS/DataDictionary/frmDrugs.cs | 4 + AIMS/DataDictionary/frmDrugs.resx | 3 + AIMS/DocManager/PatientRecord.cs | 2 + .../AnasRecordBill/frmAnasRecordBill2.cs | 48 ++--- .../AnasRecordBill/frmFactDrugNew.cs | 6 +- .../frmOperationSchedulePlan.cs | 8 +- AIMS/OremrUserControl/ucDocument.cs | 21 ++ AIMS/Template/手术排程模板.xlt | Bin 30720 -> 30208 bytes AIMSEntity/BLL/Extension/BDrugs.cs | 4 +- AIMSEntity/BLL/Extension/BOperationApply.cs | 4 +- AIMSEntity/BLL/Extension/BOperationRecord.cs | 1 + AIMSEntity/DAL/AutoGenerate/DDrugs.cs | 7 +- AIMSEntity/DAL/Extension/DDisease.cs | 2 +- AIMSEntity/DAL/Extension/DDrugs.cs | 18 +- AIMSEntity/DAL/Extension/DOperation.cs | 2 +- AIMSEntity/DAL/Extension/DOperationApply.cs | 10 +- AIMSEntity/DAL/Extension/DOperationRecord.cs | 2 +- AIMSEntity/DAL/Extension/DOutputLiquids.cs | 2 +- AIMSEntity/Extensions/BOperationReview.cs | 2 +- AIMSEntity/Model/AutoGenerate/Drugs.cs | 1 + AIMSEntity/ObjectQuery/DrugsMap.cs | 1 + .../DocumentEntity/DocumentDAL.cs | 14 +- DocumentManagement/UI/frmKB.Designer.cs | 78 ++++---- DocumentManagement/UI/frmKB.cs | 103 +++++----- DrawGraph/AreaManage/DrugsManage.cs | 36 ++-- DrawGraph/AreaManage/FactDrug.cs | 17 +- DrawGraph/AreaManage/FactEvents.cs | 13 +- DrawGraph/AreaManage/IconManage.cs | 47 +---- DrawGraph/AreaManage/SapManage.cs | 8 +- 31 files changed, 366 insertions(+), 283 deletions(-) diff --git a/AIMS/AIMS.csproj b/AIMS/AIMS.csproj index 7d6a1a3..1f8f152 100644 --- a/AIMS/AIMS.csproj +++ b/AIMS/AIMS.csproj @@ -781,6 +781,7 @@ frmDrugs.cs + Designer frmEvents.cs diff --git a/AIMS/DataDictionary/frmDrugs.Designer.cs b/AIMS/DataDictionary/frmDrugs.Designer.cs index 2f483ba..6789e98 100644 --- a/AIMS/DataDictionary/frmDrugs.Designer.cs +++ b/AIMS/DataDictionary/frmDrugs.Designer.cs @@ -28,11 +28,11 @@ /// private void InitializeComponent() { - System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("麻醉药"); - System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("精神I类"); - System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("精神II类"); - System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("普通药"); - System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("血液制品"); + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("麻醉药"); + System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("精神I类"); + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("精神II类"); + System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("普通药"); + System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("血液制品"); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.tsbAdd = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); @@ -44,14 +44,20 @@ this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.tsbExit = new System.Windows.Forms.ToolStripButton(); this.panel4 = new System.Windows.Forms.Panel(); + this.txtUseDose3 = new AIMS.OremrUserControl.NumTextBox(); + this.txtUseDose2 = new AIMS.OremrUserControl.NumTextBox(); + this.txtUseDose1 = new AIMS.OremrUserControl.NumTextBox(); this.txtUseRate = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.txtUnit = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.txtChannel = new System.Windows.Forms.ComboBox(); + this.label9 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); this.cboDosageUnit = new System.Windows.Forms.ComboBox(); + this.label7 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.txtStand = new System.Windows.Forms.TextBox(); this.label11 = new System.Windows.Forms.Label(); @@ -71,12 +77,7 @@ this.treeView1 = new System.Windows.Forms.TreeView(); this.panel2 = new System.Windows.Forms.Panel(); this.panel6 = new System.Windows.Forms.Panel(); - this.txtUseDose1 = new AIMS.OremrUserControl.NumTextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.txtUseDose2 = new AIMS.OremrUserControl.NumTextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.txtUseDose3 = new AIMS.OremrUserControl.NumTextBox(); + this.label10 = new System.Windows.Forms.Label(); this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Code = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -91,7 +92,9 @@ this.UseRate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Remark = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Channel = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Comment = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.IsValidColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.txtComment = new System.Windows.Forms.TextBox(); this.toolStrip1.SuspendLayout(); this.panel4.SuspendLayout(); this.panel1.SuspendLayout(); @@ -214,9 +217,11 @@ this.panel4.Controls.Add(this.cboDosageUnit); this.panel4.Controls.Add(this.label7); this.panel4.Controls.Add(this.label1); + this.panel4.Controls.Add(this.txtComment); this.panel4.Controls.Add(this.txtStand); this.panel4.Controls.Add(this.label11); this.panel4.Controls.Add(this.txtHelpCode); + this.panel4.Controls.Add(this.label10); this.panel4.Controls.Add(this.label12); this.panel4.Controls.Add(this.cboDrugKind); this.panel4.Controls.Add(this.chkIsValid); @@ -232,6 +237,27 @@ this.panel4.Size = new System.Drawing.Size(691, 179); this.panel4.TabIndex = 0; // + // txtUseDose3 + // + this.txtUseDose3.Location = new System.Drawing.Point(485, 100); + this.txtUseDose3.Name = "txtUseDose3"; + this.txtUseDose3.Size = new System.Drawing.Size(80, 23); + this.txtUseDose3.TabIndex = 564; + // + // txtUseDose2 + // + this.txtUseDose2.Location = new System.Drawing.Point(290, 100); + this.txtUseDose2.Name = "txtUseDose2"; + this.txtUseDose2.Size = new System.Drawing.Size(80, 23); + this.txtUseDose2.TabIndex = 564; + // + // txtUseDose1 + // + this.txtUseDose1.Location = new System.Drawing.Point(102, 100); + this.txtUseDose1.Name = "txtUseDose1"; + this.txtUseDose1.Size = new System.Drawing.Size(80, 23); + this.txtUseDose1.TabIndex = 564; + // // txtUseRate // this.txtUseRate.Location = new System.Drawing.Point(484, 129); @@ -280,6 +306,15 @@ this.txtChannel.Size = new System.Drawing.Size(121, 22); this.txtChannel.TabIndex = 558; // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(408, 105); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(70, 14); + this.label9.TabIndex = 557; + this.label9.Text = "常用剂量3"; + // // label5 // this.label5.AutoSize = true; @@ -289,6 +324,15 @@ this.label5.TabIndex = 557; this.label5.Text = "途径"; // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(215, 105); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(70, 14); + this.label8.TabIndex = 557; + this.label8.Text = "常用剂量2"; + // // cboDosageUnit // this.cboDosageUnit.FormattingEnabled = true; @@ -297,6 +341,15 @@ this.cboDosageUnit.Size = new System.Drawing.Size(121, 22); this.cboDosageUnit.TabIndex = 558; // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(31, 105); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(63, 14); + this.label7.TabIndex = 557; + this.label7.Text = "常用剂量"; + // // label1 // this.label1.AutoSize = true; @@ -443,6 +496,7 @@ this.UseRate, this.Remark, this.Channel, + this.Comment, this.IsValidColumn}); this.dgv.Dock = System.Windows.Forms.DockStyle.Fill; this.dgv.Location = new System.Drawing.Point(0, 0); @@ -469,27 +523,27 @@ this.treeView1.Font = new System.Drawing.Font("宋体", 11F); this.treeView1.Location = new System.Drawing.Point(0, 0); this.treeView1.Name = "treeView1"; - treeNode6.Name = "麻醉药"; - treeNode6.Text = "麻醉药"; - treeNode6.ToolTipText = "麻醉药"; - treeNode7.Name = "精神I类"; - treeNode7.Text = "精神I类"; - treeNode7.ToolTipText = "精神I类"; - treeNode8.Name = "精神II类"; - treeNode8.Text = "精神II类"; - treeNode8.ToolTipText = "精神II类"; - treeNode9.Name = "普通药"; - treeNode9.Text = "普通药"; - treeNode9.ToolTipText = "普通药"; - treeNode10.Name = "血液制品"; - treeNode10.Text = "血液制品"; - treeNode10.ToolTipText = "血液制品"; + treeNode1.Name = "麻醉药"; + treeNode1.Text = "麻醉药"; + treeNode1.ToolTipText = "麻醉药"; + treeNode2.Name = "精神I类"; + treeNode2.Text = "精神I类"; + treeNode2.ToolTipText = "精神I类"; + treeNode3.Name = "精神II类"; + treeNode3.Text = "精神II类"; + treeNode3.ToolTipText = "精神II类"; + treeNode4.Name = "普通药"; + treeNode4.Text = "普通药"; + treeNode4.ToolTipText = "普通药"; + treeNode5.Name = "血液制品"; + treeNode5.Text = "血液制品"; + treeNode5.ToolTipText = "血液制品"; this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode6, - treeNode7, - treeNode8, - treeNode9, - treeNode10}); + treeNode1, + treeNode2, + treeNode3, + treeNode4, + treeNode5}); this.treeView1.Size = new System.Drawing.Size(181, 427); this.treeView1.TabIndex = 0; this.treeView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.treeView1_MouseDoubleClick); @@ -512,53 +566,14 @@ this.panel6.Size = new System.Drawing.Size(872, 47); this.panel6.TabIndex = 9; // - // txtUseDose1 + // label10 // - this.txtUseDose1.Location = new System.Drawing.Point(102, 100); - this.txtUseDose1.Name = "txtUseDose1"; - this.txtUseDose1.Size = new System.Drawing.Size(80, 23); - this.txtUseDose1.TabIndex = 564; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(31, 105); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(63, 14); - this.label7.TabIndex = 557; - this.label7.Text = "常用剂量"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(215, 105); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(70, 14); - this.label8.TabIndex = 557; - this.label8.Text = "常用剂量2"; - // - // txtUseDose2 - // - this.txtUseDose2.Location = new System.Drawing.Point(290, 100); - this.txtUseDose2.Name = "txtUseDose2"; - this.txtUseDose2.Size = new System.Drawing.Size(80, 23); - this.txtUseDose2.TabIndex = 564; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(408, 105); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(70, 14); - this.label9.TabIndex = 557; - this.label9.Text = "常用剂量3"; - // - // txtUseDose3 - // - this.txtUseDose3.Location = new System.Drawing.Point(485, 100); - this.txtUseDose3.Name = "txtUseDose3"; - this.txtUseDose3.Size = new System.Drawing.Size(80, 23); - this.txtUseDose3.TabIndex = 564; + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(424, 49); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(49, 14); + this.label10.TabIndex = 551; + this.label10.Text = "表达式"; // // Id // @@ -659,6 +674,11 @@ this.Channel.HeaderText = "途径"; this.Channel.Name = "Channel"; // + // Comment + // + this.Comment.HeaderText = "表达式"; + this.Comment.Name = "Comment"; + // // IsValidColumn // this.IsValidColumn.DataPropertyName = "IsValid"; @@ -667,6 +687,13 @@ this.IsValidColumn.ReadOnly = true; this.IsValidColumn.Width = 75; // + // txtComment + // + this.txtComment.Location = new System.Drawing.Point(484, 46); + this.txtComment.Name = "txtComment"; + this.txtComment.Size = new System.Drawing.Size(123, 23); + this.txtComment.TabIndex = 554; + // // frmDrugs // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -740,6 +767,8 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtComment; private System.Windows.Forms.DataGridViewTextBoxColumn Id; private System.Windows.Forms.DataGridViewTextBoxColumn Code; private System.Windows.Forms.DataGridViewTextBoxColumn NameColumn; @@ -754,6 +783,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn UseRate; private System.Windows.Forms.DataGridViewTextBoxColumn Remark; private System.Windows.Forms.DataGridViewTextBoxColumn Channel; + private System.Windows.Forms.DataGridViewTextBoxColumn Comment; private System.Windows.Forms.DataGridViewTextBoxColumn IsValidColumn; } } \ No newline at end of file diff --git a/AIMS/DataDictionary/frmDrugs.cs b/AIMS/DataDictionary/frmDrugs.cs index f67d21d..268c9c7 100644 --- a/AIMS/DataDictionary/frmDrugs.cs +++ b/AIMS/DataDictionary/frmDrugs.cs @@ -68,6 +68,7 @@ namespace DataDictionary.UI txtUseDose1.Text = dgv.CurrentRow.Cells["UseDose1"].Value.ToString(); txtUseDose2.Text = dgv.CurrentRow.Cells["UseDose2"].Value.ToString(); txtUseDose3.Text = dgv.CurrentRow.Cells["UseDose3"].Value.ToString(); + txtComment.Text = dgv.CurrentRow.Cells["Comment"].Value.ToString(); if (dgv.CurrentRow.Cells["IsValidColumn"].Value.ToString() == "有效") { @@ -114,6 +115,7 @@ namespace DataDictionary.UI DrugsObj.UseDose1 = txtUseDose1.Text.Trim(); DrugsObj.UseDose2 = txtUseDose2.Text.Trim(); DrugsObj.UseDose3 = txtUseDose3.Text.Trim(); + DrugsObj.Comment = txtComment.Text.Trim(); if (chkIsValid.Checked) { DrugsObj.IsValid = 1; @@ -144,6 +146,7 @@ namespace DataDictionary.UI dgv.CurrentRow.Cells["UseDose1"].Value = txtUseDose1.Text; dgv.CurrentRow.Cells["UseDose2"].Value = txtUseDose2.Text; dgv.CurrentRow.Cells["UseDose3"].Value = txtUseDose3.Text; + dgv.CurrentRow.Cells["Comment"].Value = txtComment.Text; dgv.CurrentRow.Cells["Channel"].Value = txtChannel.Text; dgv.CurrentRow.Cells["IsValidColumn"].Value = chkIsValid.Checked == true ? "有效" : "无效"; AIMSExtension.PublicMethod.EnabledControl(panel4, false); @@ -184,6 +187,7 @@ namespace DataDictionary.UI dt.Rows[i]["UseRate"].ToString(), dt.Rows[i]["Remark"].ToString(), dt.Rows[i]["Channel"].ToString(), + dt.Rows[i]["Comment"].ToString(), dt.Rows[i]["IsValid"].ToString()); dgv.Rows[i].Cells["Id"].Selected = false; } diff --git a/AIMS/DataDictionary/frmDrugs.resx b/AIMS/DataDictionary/frmDrugs.resx index ec652ef..9eabf51 100644 --- a/AIMS/DataDictionary/frmDrugs.resx +++ b/AIMS/DataDictionary/frmDrugs.resx @@ -162,6 +162,9 @@ True + + True + True diff --git a/AIMS/DocManager/PatientRecord.cs b/AIMS/DocManager/PatientRecord.cs index 2a14721..b965013 100644 --- a/AIMS/DocManager/PatientRecord.cs +++ b/AIMS/DocManager/PatientRecord.cs @@ -102,6 +102,7 @@ namespace AIMS.DocManager public String SysTime { get; set; } public String OpeTime { get; set; } public String MedicalRecord { get; set; } + public String MedicalHistory { get; set; } public PatientLisResult LisResult { get; set; } public static PatientRecord GetPatientRecord(int patientId) @@ -193,6 +194,7 @@ namespace AIMS.DocManager patient.SysTime = dt.Rows[0]["SysTime"].ToString(); patient.OpeTime = dt.Rows[0]["OpeTime"].ToString(); patient.MedicalRecord = dt.Rows[0]["MedicalRecord"].ToString(); + patient.MedicalHistory = dt.Rows[0]["MedicalHistory"].ToString(); } patient.LisResult = PatientLisResult.GetLisResult(patient.MdrecNo); #endregion diff --git a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs index 59768dc..0d82aa4 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs @@ -1329,24 +1329,17 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { foreach (DataRow dr in dtPhysioData.Rows) { - try - { - if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue; - if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue; - if (!isCgtime(addPP.Name, dtTime)) continue; - PhysioData pdTemp = new PhysioData(); - pdTemp.RecordTime = dtTime; - pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); - pdTemp.YAisx = addPP.YAisx; - pdTemp.PhysioDataConfigId = addPP.Id; - pdTemp.PatientId = _record.Id.Value; - physioDatas.Add(pdTemp); - continue; - } - catch (Exception) - { - continue; - } + if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue; + if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue; + if (!isCgtime(addPP.Name, dtTime)) continue; + PhysioData pdTemp = new PhysioData(); + pdTemp.RecordTime = dtTime; + pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); + pdTemp.YAisx = addPP.YAisx; + pdTemp.PhysioDataConfigId = addPP.Id; + pdTemp.PatientId = _record.Id.Value; + physioDatas.Add(pdTemp); + continue; } } } @@ -1391,9 +1384,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } } - catch (Exception) + catch (Exception ex) { - //getPhysioData_Click(null, null); + PublicMethod.WriteLog(ex); } } @@ -1698,11 +1691,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI menuStrip.Items.Add(mnuAddDrug); } - /// - /// 生命体征修改痕迹 - /// - /// - /// private void btnSyatemPhysion_Click(object sender, EventArgs e) { if (PatientId == 0) return; @@ -1721,6 +1709,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { _record.RoomId = int.Parse(RoomStr); BOperationRecord.Update("RoomId=@RoomId where Id=@id ", new AIMSModel.ParameterList("@RoomId", _record.RoomId, "@id", _record.Id)); + BOperationApply.UpdateApplyRoom(_record.OperationApplyId.Value, _record.RoomId.Value, _record.PlanOperationTime); NowRoom = AIMSBLL.BOperationRoom.SelectSingle(_record.RoomId); lblRoom.Text = NowRoom.Name; } @@ -1883,10 +1872,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI private void ReviewEvent() { if (PatientId != 0) - { - SelectWorkerValue.Hidden(); - SelectDictValue.Hidden(); - SelectDictText.Hidden(); + { templateManage.OpeRecord = BOperationRecord.getRecord(_record, PatientId, RecoverId); templateManage2.OpeRecord = templateManage.OpeRecord; templateManage.BindOperationRecordValueAll(templateManage.OpeRecord); @@ -1900,6 +1886,10 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI templateManage.Bind(); templateManage2.Bind(); reDrawAnalysis(); + + SelectWorkerValue.Hidden(); + SelectDictValue.Hidden(); + SelectDictText.Hidden(); zgcAnaesRecord.Refresh(); zgcAnaesRecord2.Refresh(); diff --git a/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs index d06643a..4ae68db 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs @@ -1070,11 +1070,11 @@ namespace AIMS.PublicUI.UI try { btnSave.Focus(); - if (SaveValid(dgvDrugsSQ, 1)) Save(dgvDrugsSQ, 1); + if (SaveValid(dgvDrugsSQ, 0)) Save(dgvDrugsSQ, 0); else return; - if (SaveValid(dgvDrugsSZ, 2)) Save(dgvDrugsSZ, 2); + if (SaveValid(dgvDrugsSZ, 1)) Save(dgvDrugsSZ, 1); else return; - if (SaveValid(dgvDrugsSH, 3)) Save(dgvDrugsSH, 3); + if (SaveValid(dgvDrugsSH, 2)) Save(dgvDrugsSH, 2); else return; new frmMessageBox().Show(); diff --git a/AIMS/OperationFront/frmOperationSchedulePlan.cs b/AIMS/OperationFront/frmOperationSchedulePlan.cs index ff5054f..095273a 100644 --- a/AIMS/OperationFront/frmOperationSchedulePlan.cs +++ b/AIMS/OperationFront/frmOperationSchedulePlan.cs @@ -4145,7 +4145,7 @@ namespace AIMS.OperationFront.UI try { OperationRoom opeRoom = (sender as ToolStripItem).Tag as OperationRoom; - BOperationApply.UpdateApplyRoom(int.Parse(selApply), opeRoom.Id.Value); + BOperationApply.UpdateApplyRoom(int.Parse(selApply), opeRoom.Id.Value, dtpSearchTime.Value); outMsg = string.Format("{2} :{0} {1} ɹ", grCurrentSub.Cells["Patient"].Value, opeRoom, RoomCardManage.lastSelectOpeRoom.operationRoom.Name); RoomCardManage.WriteMsg(rtbLog, outMsg); LoadOperationInfo(RoomCardManage.lastSelectOpeRoom.operationRoom.Id.Value); @@ -4348,7 +4348,7 @@ namespace AIMS.OperationFront.UI { SchedulingTable = BPerson.GetSchedulingForSelect(dtpSearchTime.Value, "һʿ");//SSSDept[0].Id.Value RoomCardManage.SelectDgv.DataSource = SchedulingTable; - } + } } public enum workerType { @@ -4423,8 +4423,8 @@ namespace AIMS.OperationFront.UI private List lstOrderStr = new List { "̨", "", "סԺ", "", "ҽ", "", "ʱ" }; private void dgvWorkers_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { - if (RoomCardManage.lastSelectOpeRoom == null) return; - + if (RoomCardManage.lastSelectOpeRoom == null) return; + if (RoomCardManage.SelectIds == null) RoomCardManage.SelectIds = new List(); int id = Convert.ToInt32(RoomCardManage.SelectDgv.CurrentRow.Cells[1].Value); RoomCardManage.SelectIds.Clear(); diff --git a/AIMS/OremrUserControl/ucDocument.cs b/AIMS/OremrUserControl/ucDocument.cs index 1f59c3b..644481c 100644 --- a/AIMS/OremrUserControl/ucDocument.cs +++ b/AIMS/OremrUserControl/ucDocument.cs @@ -91,6 +91,27 @@ namespace AIMS.OremrUserControl //加载文档 DModel = DocumentDAL.GetDocumentbyId(DModel.Id); myEditControl.LoadDocumentFromString(DModel.XmlFile, "xml"); + + //患者基本信息二次赋值 + 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[] dr = DocumentDAL.GetReflectionList("V_OperationRecordALL").Select("KB_SEQ <> '' and Reload=1"); + var p = typeof(PatientRecord).GetProperties(); + for (int i = 0; i < dr.Count(); i++) + { + var name = dr[i].ItemArray[0].ToString(); + var value = dr[i].ItemArray[1].ToString(); + XTextInputFieldElement element = query.Where(x => x.FieldSettings.ListSource.SourceName == value).FirstOrDefault(); + PropertyInfo info = p.Where(px => px.Name == name).FirstOrDefault(); + if (element != null && info != null) + { + element.Text = info.GetValue(Patient, null).ToString(); + } + } } else { diff --git a/AIMS/Template/手术排程模板.xlt b/AIMS/Template/手术排程模板.xlt index 6c0fead952581320f58644d278b1e15447227fbe..c18c17fb78d8f7bd3bb43f81b508df8392795c3d 100644 GIT binary patch delta 4555 zcmb7I3v65E6+ZvPWCW(d@(N{iS!sgz1cv}i39iARM>c#M}iwc(r_C%(3? zjrL!i`#;Wq&iDW4e*f{ke(-bl;1xD)7a1f0dWX+UX2X+l|#Vn=bHI8j_EZj@#e@<-CP)Slgb6PuazGT_~l;)=<&tKJ{_ z<~)n-J~K~sD^8me_|)V!vlg3ZC>MUhQ>_8*8D~Or?$c zY_+@x>qA&Sj`cgX+W4E5CS9}&3c&)*iL_k{A`)4I4fklCd`!Ci&gXs`epo~*&lr6u z^xPK<)7lm+Nbl?x02+**84Ow}@ShLASkO^>k(mo?K?edCs*n(f8_n*wTyHtQ{astyaPXOzsz$af^R0qC60i3{%Dnsp70lqmWFy)p6 zut5rZcvfMt^xVR>(PdYYAE}riF=+#%$1GJKGqv}f|H)>q0 z%?YgJ;_2RV9~@H$UZvP@r^+EvGwB`SznTS5sE%tRbN^*n$_h5R?^JrI{Egq>cEwX4Xfo^HJUZ#1XiXzr|ZQ({7W5JQ~;~xS~V`( za{?>5=ydTnvLyMcOyESW-I~aGnd!-$6PR8|6S+3e>AE^M9WQMtVZ!rs@pX-T+SXFc zY(`+2zuI18J(?y8(^f1P6~FELV`n|uHfP!r3)5|@Qf*sZWZRNyOZh6@c5SNdW3p{) zrY&(H-L^i}_MB|nmT60mGu^f^)wb46YxZQ?Qg%qUb)?$vb+2O^_&&!LeBXM_5ykf{ zuX8_-x!Gwelz1 zb~h#8(E;)Wk*wviAMexs0B45)&i@$T(oTSb!~7@yem?G5ZFueLx}8s*e4QWm)Cx_d z_+8Ld&$Jr-1@M<>)-!zP&x2?4-NsRT6SKl8>@&O*k2=B4neRt45iS44hU&uZTl;sc zMpd<@p{V1oeFxA}xj`qdKo>tTbdAx(W~nZE3daWfhPIKa5MF_Om>b)We4DX$;GKR( zdXN+@9BV}BhE}{9agGbed$484z8m`vti9NCA^oUFJ00j5?C$M_9b>_;G(j!@u5l?m z7@U%z(+$3GFe;5jc141rG3f2=?;iAa`g`v2dOda+kS0QV?vpjx^o>)?0p8G_P`EEN zDlN8X(MzSF2;eq%ci-Y0DZq24@zv$1yn>=ZxypP-_eXpC9+@|6Et_k8=q!%)LUd7y z{8=tEnfml8NHz60q1=XoA;JiRUrW~>F+ zl%MQta0g;uvaba##CS)0Wl>C@95sLeL>_9d?2K9amwn}_<8QWaVWxQ5#-I=##MNiNEN~4>NM3*;`Fv+QImk%yY)u8y}vmM6@_(b3Bw$#Im z&sK zsHT4=o*u3pOQz_HJ)#on>}r z_kHGlX5M*bW_Rx$w)ZaEA5>SuOmYG|NvG5NX|`;kx)vHZ!Q3`0nH4i^-+bP379>!t z=vKaFF8oQUWNEyrtYZ?kS-gh(K+c=bE#7iTV#BX)-5i2>u$(c7!AXhp?UV3AzI6)n ztWS(q02l0MGi@8Jd7gROsP6f7qg4X0-u6?Y6{zi;=Lw^gLA&mG+Gqu^>1}b zm&({;^n1K`+@s)WcL(-+g6Q*<;Q`8ur;Pc?+UWE{h`PEEV3o@iSK}&9c*^9-BU_GX zmp#AR(H|(nAJtaYgnz4}tQm)wjN){l8rKDU7^$qrVJbhO@*p$b%}ryT$Ay^mGu!icqtGN0jWVzMt?1R^AWi8^ct zi=616x^XXU=Jkv=AYBD!kWeZoxd?cYDmg493J8h9)Q=e=bE5zL)SqG^w}?oEh=6Bl zQb-ihiIhbD?R!_mL>@6wR6w*$$P7NjiJAmN4ML(OeL&Vk|K;fi zvpgI4)ar9IUrf|2APN@{VNYFcdpRuNKBCX0CqMbfN8+z_wWLX}*oR0el?6VydUK_6 zZsUy~#%BkdKi)DC4{1`Qm1-eTu2jx#ymbAfn5bMtq|)FEwO{8dAi`ihkIF)^6OjxW z3w-dXCaAj$A%4Dju*;#Pc6As1Xw7${-v${l{T3kzYh4mceqqHRVTzk0`3IWJ@^m?Xh3P zM5>rbB$c3$rzvM^vW6og=cmL(OTkJ#=)K=ER9ylqKnA9tSFN<1_yW%+CRe0oI?eECb1h+GI+hE_h+UG! zrZd(X0fL-*j63Or^1M>&tm;C?st`r<lp!Y?CA^w@Lg2Urn2N#WIAzbmEaZ!KT}FFN}Ct5c4b=6n^Czm)Rg+;a((z-xBBRVjS| zrIht^b{BoAr0|`-E>^6K_wAIDo8f6!DLm#&fI8ljxlce1m5iSL?{dKeZRvc-tD!q{ zbx>^$bU-I;q0n)^5)_re)(mI@+*B6Brr8U}w+%abGc(DdCd$3qmRC-eD2I3h8FcwwjYspy)XIdq?CWVdXh-l3yoJ}!Ruh_(0jSp2~y zX42T&cE_youeTRq#qJ^I#KXJ4&>U+gOGgImXqQGi`R~m#>Pa2t<&^6wH&AY*9Hh+c z{0QgUD&O(=!Nmo>f-)&FV}Gn&lNPZNc@1N@R#ve}b}HH5CLEO4<7smcgR(4r*@KVd UL8X>jffEPKgZ5CS%5MPw0#sL9f&c&j diff --git a/AIMSEntity/BLL/Extension/BDrugs.cs b/AIMSEntity/BLL/Extension/BDrugs.cs index 72358f0..00bf24d 100644 --- a/AIMSEntity/BLL/Extension/BDrugs.cs +++ b/AIMSEntity/BLL/Extension/BDrugs.cs @@ -23,11 +23,11 @@ namespace AIMSBLL string sql = string.Empty; if (str == "") { - sql = string.Format("select Id,HelpCode,Name,Id code,Stand,UseDose1,UseDose2,UseDose3 from Drugs where IsValid = 1"); + sql = string.Format("select Id,HelpCode,Name,Id code,Stand,UseDose1,UseDose2,UseDose3,Comment from Drugs where IsValid = 1"); } else { - sql = string.Format("SELECT Top 26 e.Id,e.Name,Id code, Stand,UseDose1,UseDose2,UseDose3 FROM Drugs e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and IsValid = 1", str); + sql = string.Format("SELECT Top 26 e.Id,e.Name,Id code, Stand,UseDose1,UseDose2,UseDose3,Comment FROM Drugs e WHERE (Lower(Name) like '%{0}%' OR Lower(HelpCode) like '%{0}%') and IsValid = 1", str); } return DBHelper.GetDataTable(sql); } diff --git a/AIMSEntity/BLL/Extension/BOperationApply.cs b/AIMSEntity/BLL/Extension/BOperationApply.cs index 2faf39d..fef0a5e 100644 --- a/AIMSEntity/BLL/Extension/BOperationApply.cs +++ b/AIMSEntity/BLL/Extension/BOperationApply.cs @@ -75,9 +75,9 @@ namespace AIMSBLL { DOperationApply.UpdateApplyState(ApplyId, State); } - public static void UpdateApplyRoom(int ApplyId, int room) + public static void UpdateApplyRoom(int ApplyId, int room,DateTime PlanOperationTime) { - DOperationApply.UpdateApplyRoom(ApplyId, room); + DOperationApply.UpdateApplyRoom(ApplyId, room,PlanOperationTime); } public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State) { diff --git a/AIMSEntity/BLL/Extension/BOperationRecord.cs b/AIMSEntity/BLL/Extension/BOperationRecord.cs index a97b150..724e776 100644 --- a/AIMSEntity/BLL/Extension/BOperationRecord.cs +++ b/AIMSEntity/BLL/Extension/BOperationRecord.cs @@ -248,6 +248,7 @@ namespace AIMSBLL FactDrug.OperatorName = DrugAllData.Rows[i]["OperatorName"].ToString(); FactDrug.OperateDate = DateTime.Parse(DrugAllData.Rows[i]["OperateDate"].ToString()); FactDrug.AnesType = DrugAllData.Rows[i]["AnesType"].ToString(); + FactDrug.Comment = DrugAllData.Rows[i]["Comment"].ToString(); _record.FactDrugList.Add(FactDrug); } } diff --git a/AIMSEntity/DAL/AutoGenerate/DDrugs.cs b/AIMSEntity/DAL/AutoGenerate/DDrugs.cs index 9edff94..6b04d31 100644 --- a/AIMSEntity/DAL/AutoGenerate/DDrugs.cs +++ b/AIMSEntity/DAL/AutoGenerate/DDrugs.cs @@ -178,7 +178,7 @@ namespace AIMSDAL /// 影响的记录行数 internal static int ExcuteUpdateCommand(SqlCommand cmd, Drugs drugs) { - cmd.CommandText = "update Drugs set Name=@Name,HelpCode=@HelpCode,DrugKind=@DrugKind,Stand=@Stand,DosageUnit=@DosageUnit,Unit=@Unit,UseRate=@UseRate,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark,Channel=@Channel,UseDose1=@UseDose1,UseDose2=@UseDose2,UseDose3=@UseDose3 where Id=@Id"; + cmd.CommandText = "update Drugs set Name=@Name,HelpCode=@HelpCode,DrugKind=@DrugKind,Stand=@Stand,DosageUnit=@DosageUnit,Unit=@Unit,UseRate=@UseRate,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark,Channel=@Channel,UseDose1=@UseDose1,UseDose2=@UseDose2,UseDose3=@UseDose3,Comment=@Comment where Id=@Id"; //从实体中取出值放入Command的参数列表 cmd.Parameters.Add(new SqlParameter("@Name", drugs.Name == null ? (object)DBNull.Value : (object)drugs.Name)); cmd.Parameters.Add(new SqlParameter("@HelpCode", drugs.HelpCode == null ? (object)DBNull.Value : (object)drugs.HelpCode)); @@ -196,6 +196,7 @@ namespace AIMSDAL cmd.Parameters.Add(new SqlParameter("@UseDose1", drugs.UseDose1 == null ? (object)DBNull.Value : (object)drugs.UseDose1)); cmd.Parameters.Add(new SqlParameter("@UseDose2", drugs.UseDose2 == null ? (object)DBNull.Value : (object)drugs.UseDose2)); cmd.Parameters.Add(new SqlParameter("@UseDose3", drugs.UseDose3 == null ? (object)DBNull.Value : (object)drugs.UseDose3)); + cmd.Parameters.Add(new SqlParameter("@Comment", drugs.Comment == null ? (object)DBNull.Value : (object)drugs.Comment)); cmd.Parameters.Add(new SqlParameter("@Id", drugs.Id)); return cmd.ExecuteNonQuery(); } @@ -664,6 +665,10 @@ namespace AIMSDAL { entity.UseDose3 = dr["UseDose3"].ToString(); } + if (dr["Comment"] != System.DBNull.Value) + { + entity.Comment = dr["Comment"].ToString(); + } return entity; } } diff --git a/AIMSEntity/DAL/Extension/DDisease.cs b/AIMSEntity/DAL/Extension/DDisease.cs index 1ea357b..465af47 100644 --- a/AIMSEntity/DAL/Extension/DDisease.cs +++ b/AIMSEntity/DAL/Extension/DDisease.cs @@ -116,7 +116,7 @@ namespace AIMSDAL } else { - strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc"; + strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 AND (d.IcdCode LIKE '%" + HelpCode + "%' OR d.Name LIKE '%" + HelpCode + "%' OR d.HelpCode LIKE '%" + HelpCode + "%') order by UseRate desc"; } return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } diff --git a/AIMSEntity/DAL/Extension/DDrugs.cs b/AIMSEntity/DAL/Extension/DDrugs.cs index 9f43e5c..bc9e96f 100644 --- a/AIMSEntity/DAL/Extension/DDrugs.cs +++ b/AIMSEntity/DAL/Extension/DDrugs.cs @@ -15,7 +15,7 @@ namespace AIMSDAL { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [Drugs]("); - strSql.Append("Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Remark,Channel,UseDose1,UseDose2,UseDose3 "); + strSql.Append("Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment "); strSql.Append(")"); strSql.Append(" values ("); strSql.Append("'" + DrugsObj.Name + "',"); @@ -33,7 +33,8 @@ namespace AIMSDAL strSql.Append("'" + DrugsObj.Channel + "',"); strSql.Append("'" + DrugsObj.UseDose1 + "',"); strSql.Append("'" + DrugsObj.UseDose2 + "',"); - strSql.Append("'" + DrugsObj.UseDose3 + "'"); + strSql.Append("'" + DrugsObj.UseDose3 + "',"); + strSql.Append("'" + DrugsObj.Comment + "'"); strSql.Append(")"); HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); @@ -44,7 +45,7 @@ namespace AIMSDAL Drugs DrugsObj = new Drugs(); StringBuilder strSql = new StringBuilder(); strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3 "); + strSql.Append("Id,Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment "); strSql.Append(" from Drugs "); strSql.Append(" where Id=" + Id + ""); DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); @@ -76,6 +77,7 @@ namespace AIMSDAL DrugsObj.UseDose1 = ds.Tables[0].Rows[0]["UseDose1"].ToString(); DrugsObj.UseDose2 = ds.Tables[0].Rows[0]["UseDose2"].ToString(); DrugsObj.UseDose3 = ds.Tables[0].Rows[0]["UseDose3"].ToString(); + DrugsObj.Comment = ds.Tables[0].Rows[0]["Comment"].ToString(); if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") { DrugsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); @@ -87,7 +89,7 @@ namespace AIMSDAL public static DataTable GetDataTable(string DrugKind) { StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3"); + strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment"); strSql.Append(" FROM Drugs where DrugKind like '%" + DrugKind + "%'"); return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); @@ -95,7 +97,7 @@ namespace AIMSDAL public static DataTable GetDataTable(string DrugKind, string Name) { StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3"); + strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,UseRate,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment"); strSql.Append(" FROM Drugs where DrugKind like '%" + DrugKind + "%' " + (Name == "" ? "" : "and (NAME LIKE '%" + Name + "%' OR HelpCode LIKE '%" + Name + "%') ")); return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); @@ -103,20 +105,20 @@ namespace AIMSDAL public static DataTable GetDosageUnitDataTable(int UnitType) { StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid ,Code,Remark,Channel,UseDose1,UseDose2,UseDose3"); + strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid ,Code,Remark,Channel,UseDose1,UseDose2,UseDose3,Comment"); strSql.Append(" FROM DosageUnit WHERE UnitType=" + UnitType + " and IsValid=1"); return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetDataTableByHelpCode(string HelpCode) { - string strSql = "SELECT Id,Name,Stand,DosageUnit,UseDose1,UseDose2,UseDose3 FROM dbo.Drugs WHERE (NAME LIKE '%" + HelpCode + "%' OR HelpCode LIKE '%" + HelpCode + "%')"; + string strSql = "SELECT Id,Name,Stand,DosageUnit,UseDose1,UseDose2,UseDose3,Comment FROM dbo.Drugs WHERE (NAME LIKE '%" + HelpCode + "%' OR HelpCode LIKE '%" + HelpCode + "%')"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetDrugsDataTable() { - string strSql = "SELECT TOP 21 e.Id, e.Name,e.Stand,e.UseDose1,e.UseDose2,e.UseDose3 FROM Drugs e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; + string strSql = "SELECT TOP 21 e.Id, e.Name,e.Stand,e.UseDose1,e.UseDose2,e.UseDose3,Comment FROM Drugs e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; return HelperDB.DbHelperSQL.GetDataTable(strSql); } diff --git a/AIMSEntity/DAL/Extension/DOperation.cs b/AIMSEntity/DAL/Extension/DOperation.cs index dd64741..c148f4e 100644 --- a/AIMSEntity/DAL/Extension/DOperation.cs +++ b/AIMSEntity/DAL/Extension/DOperation.cs @@ -91,7 +91,7 @@ namespace AIMSDAL } else { - strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc"; + strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 AND (d.IcdCode LIKE '%" + HelpCode + "%' OR d.Name LIKE '%" + HelpCode + "%' OR d.HelpCode LIKE '%" + HelpCode + "%') order by UseRate desc"; } return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } diff --git a/AIMSEntity/DAL/Extension/DOperationApply.cs b/AIMSEntity/DAL/Extension/DOperationApply.cs index 3709fc0..37ff777 100644 --- a/AIMSEntity/DAL/Extension/DOperationApply.cs +++ b/AIMSEntity/DAL/Extension/DOperationApply.cs @@ -8,6 +8,7 @@ using AIMSObjectQuery; using HelperDB; using System.Reflection; using System.Text; +using AIMSBLL; namespace AIMSDAL { @@ -71,6 +72,13 @@ namespace AIMSDAL string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + " WHERE Id =" + ApplyId + ""; HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); } + + public static void UpdateApplyRoom(int ApplyId, int room, DateTime PlanOperationTime) + { + int PlanOrder = BOperationApply.GetMaxPlanOrder(PlanOperationTime, room) + 1; + string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + ",PlanOrder=" + PlanOrder + " WHERE Id =" + ApplyId + ""; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State) { //HHe 申请状态从 4改为3 3. 预排程 4 已排程 @@ -363,7 +371,7 @@ namespace AIMSDAL return null; } } - public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom) + public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom) { try { diff --git a/AIMSEntity/DAL/Extension/DOperationRecord.cs b/AIMSEntity/DAL/Extension/DOperationRecord.cs index 41b81cd..72c8c62 100644 --- a/AIMSEntity/DAL/Extension/DOperationRecord.cs +++ b/AIMSEntity/DAL/Extension/DOperationRecord.cs @@ -88,7 +88,7 @@ namespace AIMSDAL public static DataTable FillDrugData(int PatientId, int DrugTypeId) { - string strSql = " SELECT fd.Id,d.Id as DrugsId, d.Name AS DrugName ,fd.IsContinue,fd.Dosage,fd.DosageUnit,fd.DrugBeginTime, fd.DrugEndTime,fd.DrugChannel,fd.GiveDrugType,fd.Remark,d.DrugKind,[Density],[DensityUnit],[Velocity],[VelocityUnit],[BloodType] ,fd.[OperatorNo],fd.[OperatorName],fd.[OperateDate],fd.ParentId,d.AnesType FROM FactDrug fd " + + string strSql = " SELECT fd.Id,d.Id as DrugsId, d.Name AS DrugName ,fd.IsContinue,fd.Dosage,fd.DosageUnit,fd.DrugBeginTime, fd.DrugEndTime,fd.DrugChannel,fd.GiveDrugType,fd.Remark,d.DrugKind,[Density],[DensityUnit],[Velocity],[VelocityUnit],[BloodType] ,fd.[OperatorNo],fd.[OperatorName],fd.[OperateDate],fd.ParentId,d.AnesType,d.Comment FROM FactDrug fd " + "LEFT JOIN Drugs d ON d.Id = fd.DrugId " + "WHERE fd.PatientId=" + PatientId + " AND fd.DrugTypeId=" + DrugTypeId + " "; diff --git a/AIMSEntity/DAL/Extension/DOutputLiquids.cs b/AIMSEntity/DAL/Extension/DOutputLiquids.cs index e6353f2..76eac8b 100644 --- a/AIMSEntity/DAL/Extension/DOutputLiquids.cs +++ b/AIMSEntity/DAL/Extension/DOutputLiquids.cs @@ -118,7 +118,7 @@ namespace AIMSDAL } public static DataTable GetDataTable(string HelpCode) { - string strSql = "SELECT Id,Name FROM dbo.OutputLiquids WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')"; + string strSql = "SELECT Id,Name FROM dbo.OutputLiquids WHERE (NAME LIKE '%" + HelpCode + "%') OR (HelpCode LIKE '%" + HelpCode + "%')"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } diff --git a/AIMSEntity/Extensions/BOperationReview.cs b/AIMSEntity/Extensions/BOperationReview.cs index 11c7658..0c0f387 100644 --- a/AIMSEntity/Extensions/BOperationReview.cs +++ b/AIMSEntity/Extensions/BOperationReview.cs @@ -22,7 +22,7 @@ namespace AIMSBLL " od.OperationBodyPositionName, od.OperationPositionName," + " od.OperationDoctor, od.Assistant, od.AnesthesiaDoctor," + " od.Nurse, od.Remarks,of1.MedicalRecord,of1.MedicalRecordTime FROM V_OperationDoing od" + - " LEFT JOIN V_OperationFront of1 ON of1.PatientId = od.PatientId WHERE (of1.MdrecNo ='" + MdrecNo + "' OR of1.PatientName LIKE '" + PatientName + "%')" + + " LEFT JOIN V_OperationFront of1 ON of1.PatientId = od.PatientId WHERE (of1.MdrecNo ='" + MdrecNo + "' OR of1.PatientName LIKE '%" + PatientName + "%')" + " AND od.OperationBeginTime >='" + OperationBeginTime + "' AND od.OperationBeginTime <'" + OperationEndTime + "' AND " + " od.[State] IN ('手术结束','麻醉恢复结束')"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); diff --git a/AIMSEntity/Model/AutoGenerate/Drugs.cs b/AIMSEntity/Model/AutoGenerate/Drugs.cs index c4c084f..7d6720c 100644 --- a/AIMSEntity/Model/AutoGenerate/Drugs.cs +++ b/AIMSEntity/Model/AutoGenerate/Drugs.cs @@ -21,6 +21,7 @@ namespace AIMSModel private string operatorName; private DateTime? operateDate; + public string Comment { get; set; } public string Code { get; set; } public string Remark { get; set; } public string Channel { get; set; } diff --git a/AIMSEntity/ObjectQuery/DrugsMap.cs b/AIMSEntity/ObjectQuery/DrugsMap.cs index b5d0b52..063160a 100644 --- a/AIMSEntity/ObjectQuery/DrugsMap.cs +++ b/AIMSEntity/ObjectQuery/DrugsMap.cs @@ -26,6 +26,7 @@ namespace AIMSObjectQuery dictionary.Add("usedose1", "UseDose1"); dictionary.Add("usedose2", "UseDose2"); dictionary.Add("usedose3", "UseDose3"); + dictionary.Add("comment", "Comment"); } #region IMap 成员 diff --git a/DocumentManagement/DocumentEntity/DocumentDAL.cs b/DocumentManagement/DocumentEntity/DocumentDAL.cs index 8c42f9a..da96f62 100644 --- a/DocumentManagement/DocumentEntity/DocumentDAL.cs +++ b/DocumentManagement/DocumentEntity/DocumentDAL.cs @@ -197,7 +197,8 @@ namespace DocumentManagement KB_VALUE , KB_Reflection, KB_STYLE , - ListIndex + ListIndex , + Reload From KB_List where IsValid = 1 Order By KB_PARENT , LISTINDEX , KB_NAME"); @@ -218,6 +219,7 @@ namespace DocumentManagement { item.Style = KBEntryStyle.List; } + item.SpellCode = dt.Rows[i][7].ToString(); //if (dt.Rows[i][5].ToString() == KBEntryStyle.ListSQL.ToString()) //{ // item.Style = KBEntryStyle.ListSQL; @@ -341,8 +343,8 @@ namespace DocumentManagement public static DataTable GetReflectionList(string Vw_Info) { StringBuilder strSql = new StringBuilder(); - strSql.Append(" Select name,isnull(kb.KB_SEQ,'')as KB_SEQ FROM SysColumns syscn "); - strSql.Append(" left join (select KB_SEQ,KB_Reflection from KB_LIST where isvalid =1) kb "); + strSql.Append(" Select name,isnull(kb.KB_SEQ,'')as KB_SEQ,kb.ReLoad FROM SysColumns syscn "); + strSql.Append(" left join (select KB_SEQ,KB_Reflection,ReLoad from KB_LIST where isvalid =1) kb "); strSql.Append(" on syscn.name = kb.KB_Reflection "); strSql.Append(" Where id=Object_Id('" + Vw_Info + "') "); DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString()); @@ -366,7 +368,8 @@ namespace DocumentManagement strSql.Append(" (select isnull(MAX(listindex),0)+1 from [KB_LIST] where KB_PARENT = '" + entry.ParentID + "' and IsValid = 1),"); strSql.Append(" 1,"); strSql.Append(" '" + AIMSExtension.PublicMethod.OperatorNo + "',"); - strSql.Append(" getdate()"); + strSql.Append(" getdate(),"); + strSql.Append(" '" + entry.SpellCode + "'"); strSql.Append(" )"); DbHelperSQL.ExecNonQuery(strSql.ToString()); if (entry.Style != KBEntryStyle.ListSQL && entry.ListItems != null) @@ -413,7 +416,8 @@ namespace DocumentManagement strSql.Append(" [KB_Reflection] = '" + entry.Text2 + "',"); strSql.Append(" [KB_STYLE] = '" + Convert.ToInt32(entry.Style) + "',"); strSql.Append("OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + "',"); - strSql.Append("OperateDate= getdate()"); + strSql.Append("OperateDate= getdate(),"); + strSql.Append("Reload='" + entry.SpellCode + "'"); strSql.Append(" where KB_SEQ = '" + entry.ID + "'"); DbHelperSQL.ExecNonQuery(strSql.ToString()); if (entry.Style != KBEntryStyle.ListSQL) diff --git a/DocumentManagement/UI/frmKB.Designer.cs b/DocumentManagement/UI/frmKB.Designer.cs index eed352d..93df639 100644 --- a/DocumentManagement/UI/frmKB.Designer.cs +++ b/DocumentManagement/UI/frmKB.Designer.cs @@ -54,10 +54,13 @@ this.btnSave = new System.Windows.Forms.Button(); this.btnDel = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.cboReLoad = new System.Windows.Forms.CheckBox(); this.btnSelect = new System.Windows.Forms.Button(); this.txtParentName = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); + this.txtViewName = new System.Windows.Forms.TextBox(); this.txtName = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.tvwKB = new DCSoft.Writer.Controls.KBTreeView(); @@ -66,8 +69,6 @@ this.添加子目录ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.上移ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.下移ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.txtViewName = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.panel3.SuspendLayout(); this.groupBox4.SuspendLayout(); @@ -88,7 +89,7 @@ this.panel1.Controls.Add(this.panel2); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel1.Margin = new System.Windows.Forms.Padding(2); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(1136, 562); this.panel1.TabIndex = 1; @@ -100,7 +101,7 @@ this.panel3.Controls.Add(this.groupBox1); this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Location = new System.Drawing.Point(288, 0); - this.panel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel3.Margin = new System.Windows.Forms.Padding(2); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(848, 562); this.panel3.TabIndex = 2; @@ -179,7 +180,7 @@ this.panel5.Controls.Add(this.dgvItems); this.panel5.Dock = System.Windows.Forms.DockStyle.Top; this.panel5.Location = new System.Drawing.Point(3, 68); - this.panel5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel5.Margin = new System.Windows.Forms.Padding(2); this.panel5.Name = "panel5"; this.panel5.Size = new System.Drawing.Size(842, 217); this.panel5.TabIndex = 10; @@ -193,7 +194,7 @@ this.panel6.Dock = System.Windows.Forms.DockStyle.Top; this.panel6.Font = new System.Drawing.Font("宋体", 10.5F); this.panel6.Location = new System.Drawing.Point(467, 0); - this.panel6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel6.Margin = new System.Windows.Forms.Padding(2); this.panel6.Name = "panel6"; this.panel6.Size = new System.Drawing.Size(375, 217); this.panel6.TabIndex = 11; @@ -203,7 +204,7 @@ // this.btnReflection.Font = new System.Drawing.Font("宋体", 9F); this.btnReflection.Location = new System.Drawing.Point(224, 11); - this.btnReflection.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnReflection.Margin = new System.Windows.Forms.Padding(2); this.btnReflection.Name = "btnReflection"; this.btnReflection.Size = new System.Drawing.Size(56, 20); this.btnReflection.TabIndex = 15; @@ -232,7 +233,7 @@ // this.rtbSQL.Dock = System.Windows.Forms.DockStyle.Fill; this.rtbSQL.Location = new System.Drawing.Point(467, 0); - this.rtbSQL.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.rtbSQL.Margin = new System.Windows.Forms.Padding(2); this.rtbSQL.Name = "rtbSQL"; this.rtbSQL.Size = new System.Drawing.Size(375, 217); this.rtbSQL.TabIndex = 0; @@ -281,7 +282,7 @@ this.panel4.Dock = System.Windows.Forms.DockStyle.Top; this.panel4.Font = new System.Drawing.Font("宋体", 10.5F); this.panel4.Location = new System.Drawing.Point(3, 19); - this.panel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel4.Margin = new System.Windows.Forms.Padding(2); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(842, 49); this.panel4.TabIndex = 9; @@ -290,7 +291,7 @@ // this.rdReflection.AutoSize = true; this.rdReflection.Location = new System.Drawing.Point(297, 18); - this.rdReflection.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.rdReflection.Margin = new System.Windows.Forms.Padding(2); this.rdReflection.Name = "rdReflection"; this.rdReflection.Size = new System.Drawing.Size(81, 18); this.rdReflection.TabIndex = 2; @@ -302,7 +303,7 @@ // this.rdSQL.AutoSize = true; this.rdSQL.Location = new System.Drawing.Point(168, 18); - this.rdSQL.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.rdSQL.Margin = new System.Windows.Forms.Padding(2); this.rdSQL.Name = "rdSQL"; this.rdSQL.Size = new System.Drawing.Size(74, 18); this.rdSQL.TabIndex = 1; @@ -315,7 +316,7 @@ this.rdList.AutoSize = true; this.rdList.Checked = true; this.rdList.Location = new System.Drawing.Point(40, 18); - this.rdList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.rdList.Margin = new System.Windows.Forms.Padding(2); this.rdList.Name = "rdList"; this.rdList.Size = new System.Drawing.Size(53, 18); this.rdList.TabIndex = 0; @@ -348,6 +349,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.cboReLoad); this.groupBox1.Controls.Add(this.btnSelect); this.groupBox1.Controls.Add(this.txtParentName); this.groupBox1.Controls.Add(this.label1); @@ -363,11 +365,21 @@ this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // cboReLoad + // + this.cboReLoad.AutoSize = true; + this.cboReLoad.Location = new System.Drawing.Point(476, 65); + this.cboReLoad.Name = "cboReLoad"; + this.cboReLoad.Size = new System.Drawing.Size(110, 18); + this.cboReLoad.TabIndex = 13; + this.cboReLoad.Text = "是否二次加载"; + this.cboReLoad.UseVisualStyleBackColor = true; + // // btnSelect // this.btnSelect.Font = new System.Drawing.Font("宋体", 9F); this.btnSelect.Location = new System.Drawing.Point(239, 25); - this.btnSelect.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnSelect.Margin = new System.Windows.Forms.Padding(2); this.btnSelect.Name = "btnSelect"; this.btnSelect.Size = new System.Drawing.Size(56, 20); this.btnSelect.TabIndex = 12; @@ -392,6 +404,13 @@ this.label1.TabIndex = 9; this.label1.Text = "父节点:"; // + // txtViewName + // + this.txtViewName.Location = new System.Drawing.Point(319, 60); + this.txtViewName.Name = "txtViewName"; + this.txtViewName.Size = new System.Drawing.Size(151, 23); + this.txtViewName.TabIndex = 5; + // // txtName // this.txtName.Location = new System.Drawing.Point(84, 60); @@ -399,6 +418,15 @@ this.txtName.Size = new System.Drawing.Size(151, 23); this.txtName.TabIndex = 5; // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(243, 64); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(70, 14); + this.label8.TabIndex = 4; + this.label8.Text = "试图名称:"; + // // label3 // this.label3.AutoSize = true; @@ -414,7 +442,7 @@ this.panel2.Dock = System.Windows.Forms.DockStyle.Left; this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Name = "panel2"; - this.panel2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.panel2.Padding = new System.Windows.Forms.Padding(3); this.panel2.Size = new System.Drawing.Size(288, 562); this.panel2.TabIndex = 1; // @@ -422,12 +450,11 @@ // this.tvwKB.Dock = System.Windows.Forms.DockStyle.Fill; this.tvwKB.Font = new System.Drawing.Font("宋体", 10.5F); - this.tvwKB.HideSelection = false; this.tvwKB.Location = new System.Drawing.Point(3, 3); this.tvwKB.Name = "tvwKB"; this.tvwKB.Size = new System.Drawing.Size(282, 556); this.tvwKB.TabIndex = 1; - this.tvwKB.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvwKB_NodeMouseDoubleClick); + this.tvwKB.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvwKB_AfterSelect); this.tvwKB.MouseClick += new System.Windows.Forms.MouseEventHandler(this.tvwKB_MouseClick); // // contextMenuStrip2 @@ -469,29 +496,13 @@ this.下移ToolStripMenuItem.Text = "下移"; this.下移ToolStripMenuItem.Click += new System.EventHandler(this.下移ToolStripMenuItem_Click); // - // txtViewName - // - this.txtViewName.Location = new System.Drawing.Point(319, 60); - this.txtViewName.Name = "txtViewName"; - this.txtViewName.Size = new System.Drawing.Size(151, 23); - this.txtViewName.TabIndex = 5; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(243, 64); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(70, 14); - this.label8.TabIndex = 4; - this.label8.Text = "试图名称:"; - // // frmKB // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1136, 562); this.Controls.Add(this.panel1); - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "frmKB"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "知识库"; @@ -558,5 +569,6 @@ private System.Windows.Forms.Label label6; private System.Windows.Forms.TextBox txtViewName; private System.Windows.Forms.Label label8; + private System.Windows.Forms.CheckBox cboReLoad; } } \ No newline at end of file diff --git a/DocumentManagement/UI/frmKB.cs b/DocumentManagement/UI/frmKB.cs index b8f6fad..e5f93ad 100644 --- a/DocumentManagement/UI/frmKB.cs +++ b/DocumentManagement/UI/frmKB.cs @@ -28,6 +28,8 @@ namespace DocumentManagement tvwKB.KBLibrary = DocumentDAL.Lib; tvwKB.RefreshView(); tvwKB.ExpandAll(); + + tvwKB.SelectedNode = tvwKB.Nodes[0] ; } private void btnClear_Click(object sender, EventArgs e) @@ -202,7 +204,7 @@ namespace DocumentManagement entry.ID = "KB" + DateTime.Now.ToString("yyyyMMddHHmmssfff"); entry.Text = txtName.Text.Trim(); entry.ParentID = txtParentName.Tag == null ? null : ((KBEntry)txtParentName.Tag).ID; - //entry.SpellCode = txtReflection.Text; + entry.SpellCode = cboReLoad.Checked == true ? "1" : "0"; //判断是List还是ListSQL if (rdSQL.Checked == true) { @@ -268,15 +270,7 @@ namespace DocumentManagement private void frmKB_Load(object sender, EventArgs e) { RefreshKB(); - } - - private void tvwKB_MouseClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Right) - { - contextMenuStrip2.Show(Control.MousePosition.X, Control.MousePosition.Y); - } - } + } private void rd_CheckedChanged(object sender, EventArgs e) { @@ -305,46 +299,7 @@ namespace DocumentManagement } } } - - private void tvwKB_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) - { - btnClear_Click(null, null); - if (tvwKB.SelectedNode == null) - { - return; - } - KBEntry entry = (KBEntry)tvwKB.SelectedNode.Tag; - if (tvwKB.SelectedNode.Parent != null) - { - txtParentName.Tag = (KBEntry)tvwKB.SelectedNode.Parent.Tag; - txtParentName.Text = tvwKB.SelectedNode.Parent.Text; - } - else - { - txtParentName.Text = "无"; - } - txtName.Text = entry.Text; - txtName.Tag = entry; - //判断节点的Style - if (entry.Style == KBEntryStyle.List && entry.ListItems != null && entry.ListItems.Count > 0) - { - rdList.Checked = true; - foreach (ListItem item in entry.ListItems) - { - dgvItems.Rows.Add(item.Text, item.Value); - } - } - else if (entry.Style == KBEntryStyle.ListSQL) - { - rdSQL.Checked = true; - rtbSQL.Text = entry.Value; - } - else if (entry.Text2 != null) - { - this.rdReflection.Checked = true; - txtReflection.Text = entry.Text2.ToString(); - } - } + private void btnSelect_Click(object sender, EventArgs e) { @@ -375,5 +330,53 @@ namespace DocumentManagement MessageBox.Show("删除成功!"); } } + + private void tvwKB_MouseClick(object sender, MouseEventArgs e) + { + } + + private void tvwKB_AfterSelect(object sender, TreeViewEventArgs e) + { + if (tvwKB.SelectedNode == null) + { + return; + } + btnClear_Click(null, null); + KBEntry entry = (KBEntry)tvwKB.SelectedNode.Tag; + if (tvwKB.SelectedNode.Parent != null) + { + txtParentName.Tag = (KBEntry)tvwKB.SelectedNode.Parent.Tag; + txtParentName.Text = tvwKB.SelectedNode.Parent.Text; + } + else + { + txtParentName.Text = "无"; + } + txtName.Text = entry.Text; + txtName.Tag = entry; + if (entry.SpellCode == "1") + cboReLoad.Checked = true; + else + cboReLoad.Checked = false; + //判断节点的Style + if (entry.Style == KBEntryStyle.List && entry.ListItems != null && entry.ListItems.Count > 0) + { + rdList.Checked = true; + foreach (ListItem item in entry.ListItems) + { + dgvItems.Rows.Add(item.Text, item.Value); + } + } + else if (entry.Style == KBEntryStyle.ListSQL) + { + rdSQL.Checked = true; + rtbSQL.Text = entry.Value; + } + else if (entry.Text2 != null) + { + this.rdReflection.Checked = true; + txtReflection.Text = entry.Text2.ToString(); + } + } } } diff --git a/DrawGraph/AreaManage/DrugsManage.cs b/DrawGraph/AreaManage/DrugsManage.cs index 57504b8..22516bf 100644 --- a/DrawGraph/AreaManage/DrugsManage.cs +++ b/DrawGraph/AreaManage/DrugsManage.cs @@ -159,7 +159,7 @@ namespace DrawGraph //存在氧气从第二行开始画 if (_FactDrugList.Where(s => s.DrugName == "氧气" && s.GiveDrugType != "麻醉前用药" && s.GiveDrugType != "术后镇痛药").ToList().Count > 0) rowDrugsIndex = 1; //加药按加药时间排序 - //_FactDrugList.Sort(new FactDrugComparer()); + _FactDrugList.Sort(new FactDrugComparer()); for (int i = 0; i < _FactDrugList.Count; i++) @@ -334,7 +334,7 @@ namespace DrawGraph isSap = true; } } - if (record.DosageUnit != null && record.DosageUnit.Trim().ToLower() == "u" && record.DrugKind == "血制品") + if (record.BloodType != null && record.BloodType != "") { isSap = true; } @@ -348,10 +348,8 @@ namespace DrawGraph if (linePack == null) return; double x = linePack.RealX; RectangleFramePackObj remarkPpack = template.GetPackObjectOTag("RemarkManage_RectangleFramePackObj_2"); - float fontsize = 7f; int DrawIndex = 0; double y; - int remarkcount = 6; double StartRemarkRatio = remarkPpack.RealY; double EndRemarkRatio = remarkPpack.RealEndY; try @@ -360,22 +358,34 @@ namespace DrawGraph double allDrugDose = 0; double allOutDose = 0; myOpeRecord.FactDrugList.ForEach(drug => { - //if (drug.DrugEffectId != null && drug.DrugEffectId != 252) - //{ - if (drug.Dosage > 0)//&& (drug.DrugAccess != null && drug.DrugAccess > 0) + if (drug.DrugChannel == "ivgtt" || drug.DrugChannel == "iv") { double drugDose = 0; - if (drug.DosageUnit.Trim().ToLower() == "ml") drugDose = Convert.ToDouble(drug.Dosage); - - if (drug.DrugChannel == "ivgtt" || drug.DrugChannel == "iv") + if (drug.DosageUnit.Trim().ToLower() == "ml") { - if (drugDose >= 50) + if (drug.Dosage >= 50) { - allDrugDose += drugDose; + drugDose = Convert.ToDouble(drug.Dosage); } } + else if (drug.Comment != null && drug.Comment != "") + { + List strings = drug.Comment.Split('|').ToList(); + foreach (var items in strings) + { + //单位=100|治疗量=200|U=200|u=200 + List item = items.Split('=').ToList(); + if (item[0] == drug.DosageUnit.Trim()) + { + double dose = Convert.ToDouble(drug.Dosage) * Convert.ToDouble(item[1]); + allDrugDose += dose; + break; + } + } + + } + allDrugDose += drugDose; } - //} }); template.SetObjValue(myOpeRecord, "OperationRecord.InAmount", allDrugDose.ToString(), allDrugDose.ToString(), allDrugDose.ToString() != myOpeRecord.InAmount ? true : false); DrawIndex++; diff --git a/DrawGraph/AreaManage/FactDrug.cs b/DrawGraph/AreaManage/FactDrug.cs index b3063b5..4d576ad 100644 --- a/DrawGraph/AreaManage/FactDrug.cs +++ b/DrawGraph/AreaManage/FactDrug.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.Eventing.Reader; using System.Drawing; using System.Linq; using System.Text; @@ -23,6 +24,7 @@ namespace DrawGraph public string Remark; public string DrugKind; public string AnesType; + public string Comment; public string OperatorNo { get; set; } public string OperatorName { get; set; } @@ -35,7 +37,6 @@ namespace DrawGraph public string VelocityUnit; public string BloodType; - public int ParentId; public List ChildFactDrugList; public bool isZuDrug { get; set; } @@ -171,10 +172,10 @@ namespace DrawGraph string RemarkStr = this.Remark;// string DensityStr = Density == 0 ? "" : ((double)this.Density).ToString(); string VelocityStr = Velocity == 0 ? "" : ((double)this.Velocity).ToString(); - string s = ""; + string s = ""; if (DensityStr != "" || VelocityStr != "") { - if (this.DensityUnit != null && this.DensityUnit != "") DensityStr += this.DensityUnit ; + if (this.DensityUnit != null && this.DensityUnit != "") DensityStr += this.DensityUnit; s = (DensityStr + " " + VelocityStr).Trim(); if (DensityStr != "" && VelocityStr != "") s = DensityStr + "/" + VelocityStr; if (this.VelocityUnit != null && this.VelocityUnit != "") s += this.VelocityUnit; @@ -262,4 +263,14 @@ namespace DrawGraph } } + /// + /// 加药排序类 + /// + public class FactDrugComparer : IComparer + { + public int Compare(FactDrug x, FactDrug y) + { + return (x.DrugBeginTime.CompareTo(y.DrugBeginTime)); + } + } } diff --git a/DrawGraph/AreaManage/FactEvents.cs b/DrawGraph/AreaManage/FactEvents.cs index c56cd70..59bf3d2 100644 --- a/DrawGraph/AreaManage/FactEvents.cs +++ b/DrawGraph/AreaManage/FactEvents.cs @@ -186,6 +186,17 @@ namespace DrawGraph } } - } + } + + /// + /// 事件排序类 + /// + public class FactEventsComparer : IComparer + { + public int Compare(FactEvents x, FactEvents y) + { + return (x.EventBeginTime.Value.CompareTo(y.EventBeginTime.Value)); + } + } } diff --git a/DrawGraph/AreaManage/IconManage.cs b/DrawGraph/AreaManage/IconManage.cs index 771ec6e..7932ce0 100644 --- a/DrawGraph/AreaManage/IconManage.cs +++ b/DrawGraph/AreaManage/IconManage.cs @@ -125,9 +125,7 @@ namespace DrawGraph double span = getYPositionByListIndex(1, eventy, eventendy, 2); List eventListstr = new List(); eventListstr.Add("【事件】"); - //myOpeRecord.FactEventsList.Sort(new FactEventsComparer()); - //List eventlist = - //.GetNode(EVENTPARAMPATH, "name"); + myOpeRecord.FactEventsList.Sort(new FactEventsComparer()); //循环加药集体 for (int i = 0; i < myOpeRecord.FactEventsList.Count; i++) { @@ -146,43 +144,12 @@ namespace DrawGraph eventListstr.Add(string.Format("{0}{1}->{2} {3} {4}{5}", getNumber(i), temp.EventBeginTime.Value.ToShortTimeString(), temp.EventEndTime.Value.ToShortTimeString(), temp.EventName, "", temp.Remark == null ? "" : temp.Remark.ToString())); } - //设置事件对象的相应属性,只达到了基本解耦,封装有限,有待完善 temp.setAnasArr(ZedControl, eventstartX, eventendX, myOpeRecord.pageBegin, myOpeRecord.pageBegin.AddMinutes(EVERY_PAGE_TIME_SPAN)); try { - //循环XML文件,文件中的内容是只画图不写字的事件对旬 - //DataRow[] dr = myOpeRecord.PhysioParamList.Select("Name ='" + temp.EventName + "' ", ""); - //if (dr.Length > 0) - //{ - // temp.clearDNAndDT(ZedControl); - // string tagName = dr[0]["imgPath"].ToString(); - // temp.drawIMG(ZedControl, tagName, eventy, 0.013); - //} - //else - //{ - // int DValue = 0; - // string drawNumber = ""; - // if (drawDatetime != null && temp.EventBeginTime > drawDatetime.Value.AddMinutes(-1) && temp.EventBeginTime < drawDatetime.Value.AddMinutes(10) && LastNumber != "" && drawEvent != null) - // { - // drawEvent.clearDNAndDT(ZedControl); - // drawEvent = temp; - // drawNumber = LastNumber + "-" + getNumber(i);// (i + 1).ToString();// - // DValue = (int)(((TimeSpan)(temp.EventBeginTime - drawDatetime.Value)).TotalMinutes / 2); - // } - // else - // { - // LastNumber = getNumber(i);// (i + 1).ToString();// - // drawNumber = LastNumber; - // drawEvent = temp; - // drawDatetime = temp.EventBeginTime.Value; - // } - // //画图上的序号 - // temp.drawNumber(ZedControl, drawNumber, eventy + span - 0.001, DValue, Color.DarkBlue); - //} - //rowIndex++; - - //循环XML文件,文件中的内容是只画图不写字的事件对旬 - DataRow[] dr = myOpeRecord.PhysioParamList.Select("Name ='" + temp.EventName + "' ", ""); + string EventName = temp.EventName; + if (EventName == "喉罩") EventName = "插管"; + DataRow[] dr = myOpeRecord.PhysioParamList.Select("Name ='" + EventName + "' ", ""); if (dr.Length > 0) { temp.clearDNAndDT(ZedControl); @@ -197,18 +164,18 @@ namespace DrawGraph { drawEvent.clearDNAndDT(ZedControl); drawEvent = temp; - drawNumber = LastNumber + "-" + getNumber(i); + drawNumber = LastNumber + "-" + getNumber(i); DValue = (int)(((TimeSpan)(temp.EventBeginTime - drawDatetime.Value)).TotalMinutes / 2); } else { - LastNumber = getNumber(i); + LastNumber = getNumber(i); drawNumber = LastNumber; drawEvent = temp; drawDatetime = temp.EventBeginTime.Value; } //画图上的序号 - temp.drawNumber(ZedControl, drawNumber, eventy + span - 0.001, DValue, Color.DarkBlue); + temp.drawNumber(ZedControl, drawNumber, eventy + span - 0.001, DValue, Color.DarkBlue); } rowIndex++; } diff --git a/DrawGraph/AreaManage/SapManage.cs b/DrawGraph/AreaManage/SapManage.cs index e9c192d..0f0e305 100644 --- a/DrawGraph/AreaManage/SapManage.cs +++ b/DrawGraph/AreaManage/SapManage.cs @@ -144,7 +144,7 @@ namespace DrawGraph }); List _FactDrugList = myOpeRecord.FactDrugList.Where(s => IfInTimeExist(s.DrugBeginTime, s.End) == true).ToList(); //加药按加药时间排序 - //_FactDrugList.Sort(new FactDrugComparer()); + _FactDrugList.Sort(new FactDrugComparer()); for (int i = 0; i < _FactDrugList.Count; i++) { @@ -322,11 +322,7 @@ namespace DrawGraph { isSap = true; } - } - if (record.DosageUnit != null && record.DosageUnit.Trim().ToLower() == "u" && record.DrugKind == "血制品") - { - isSap = true; - } + } if (record.BloodType != null && record.BloodType != "") { isSap = true;