From ea9e7ef80231a4750b9ea33233f1e2c779012c96 Mon Sep 17 00:00:00 2001 From: leomon Date: Thu, 2 Mar 2023 09:18:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BA=BB=E9=86=89=E6=96=B9=E5=BC=8F=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=8A=A0=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frmAanesthesiaRecord.Designer.cs | 16 +++--- .../frmInstrumentRecord.cs | 8 +++ .../frmOperationInfoNew2.cs | 2 +- AIMS/OremrUserControl/ucDocument.cs | 30 +++++++++- AIMS/PublicUI/frmDrugSel.cs | 55 +++++++++++++++++-- .../DAL/Extension/DApplyAnaesthesiaMethod.cs | 2 +- DrawGraph/AreaManage/BaseInfoBottomManage.cs | 49 +++++++++++++---- DrawGraph/AreaManage/DBManage.cs | 4 +- DrawGraph/AreaManage/SelectWorkerValue.cs | 31 +++++++---- 9 files changed, 156 insertions(+), 41 deletions(-) diff --git a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs index 0ab8dc1..9b944e4 100644 --- a/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs +++ b/AIMS/OperationAanesthesia/frmAanesthesiaRecord.Designer.cs @@ -1223,7 +1223,7 @@ this.panel13.Controls.Add(this.txtOutRoom); this.panel13.Controls.Add(this.picOutRoom); this.panel13.Controls.Add(this.button5); - this.panel13.Location = new System.Drawing.Point(1159, 3); + this.panel13.Location = new System.Drawing.Point(1134, 3); this.panel13.Name = "panel13"; this.panel13.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel13.Size = new System.Drawing.Size(150, 53); @@ -1316,7 +1316,7 @@ this.panel10.Controls.Add(this.txtOperationBegin); this.panel10.Controls.Add(this.picOpeBegin); this.panel10.Controls.Add(this.button2); - this.panel10.Location = new System.Drawing.Point(511, 3); + this.panel10.Location = new System.Drawing.Point(494, 3); this.panel10.Name = "panel10"; this.panel10.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel10.Size = new System.Drawing.Size(150, 53); @@ -1409,7 +1409,7 @@ 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(835, 3); + 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); @@ -1502,7 +1502,7 @@ this.panel12.Controls.Add(this.txtAnaesthesiaEnd); this.panel12.Controls.Add(this.picAnesEnd); this.panel12.Controls.Add(this.button4); - this.panel12.Location = new System.Drawing.Point(997, 3); + this.panel12.Location = new System.Drawing.Point(974, 3); this.panel12.Name = "panel12"; this.panel12.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel12.Size = new System.Drawing.Size(150, 53); @@ -1595,7 +1595,7 @@ this.panel15.Controls.Add(this.cmbCGType); this.panel15.Controls.Add(this.txtCG); this.panel15.Controls.Add(this.picCG); - this.panel15.Location = new System.Drawing.Point(349, 3); + this.panel15.Location = new System.Drawing.Point(334, 3); this.panel15.Name = "panel15"; this.panel15.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel15.Size = new System.Drawing.Size(150, 53); @@ -1685,7 +1685,7 @@ this.panel9.Controls.Add(this.txtAnaesthesiaBegin); this.panel9.Controls.Add(this.picAnesBegin); this.panel9.Controls.Add(this.button1); - this.panel9.Location = new System.Drawing.Point(187, 3); + this.panel9.Location = new System.Drawing.Point(174, 3); this.panel9.Name = "panel9"; this.panel9.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel9.Size = new System.Drawing.Size(150, 53); @@ -1778,7 +1778,7 @@ this.panel11.Controls.Add(this.txtOperationEnd); this.panel11.Controls.Add(this.picOpeEnd); this.panel11.Controls.Add(this.button3); - this.panel11.Location = new System.Drawing.Point(673, 3); + this.panel11.Location = new System.Drawing.Point(654, 3); this.panel11.Name = "panel11"; this.panel11.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel11.Size = new System.Drawing.Size(150, 53); @@ -1871,7 +1871,7 @@ this.panel6.Controls.Add(this.txtInRoom); this.panel6.Controls.Add(this.picInRoom); this.panel6.Controls.Add(this.txtInRoom1); - this.panel6.Location = new System.Drawing.Point(25, 3); + this.panel6.Location = new System.Drawing.Point(14, 3); this.panel6.Name = "panel6"; this.panel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel6.Size = new System.Drawing.Size(150, 53); diff --git a/AIMS/OperationAanesthesia/frmInstrumentRecord.cs b/AIMS/OperationAanesthesia/frmInstrumentRecord.cs index 68aef14..5e85d69 100644 --- a/AIMS/OperationAanesthesia/frmInstrumentRecord.cs +++ b/AIMS/OperationAanesthesia/frmInstrumentRecord.cs @@ -1090,6 +1090,9 @@ namespace AIMS.OperationAanesthesia this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室; } + /// + /// 出室方法 + /// private void EndOperationOutRoom() { if (_record == null || _record.StateName != "手术中") return; @@ -1139,6 +1142,11 @@ namespace AIMS.OperationAanesthesia } } + /// + /// 出室状态 + /// + /// + /// private bool GetOpeState(ref string message) { bool isTrue = true; diff --git a/AIMS/OperationAanesthesia/frmOperationInfoNew2.cs b/AIMS/OperationAanesthesia/frmOperationInfoNew2.cs index c7f12c0..8d744c2 100644 --- a/AIMS/OperationAanesthesia/frmOperationInfoNew2.cs +++ b/AIMS/OperationAanesthesia/frmOperationInfoNew2.cs @@ -102,7 +102,7 @@ namespace AIMS.OperationAanesthesia { BasicDictionary basicDictionary = BBasicDictionary.GetBasicDictionaryByName(setDataName); if (basicDictionary == null) return; - basicDictionary.SubItem.Insert(0, new BasicDictionary() { Id = -1, Name = "" }); + //basicDictionary.SubItem.Insert(0, new BasicDictionary() { Id = -1, Name = "" }); loadCbo.DataSource = basicDictionary.SubItem; loadCbo.DisplayMember = "Name"; diff --git a/AIMS/OremrUserControl/ucDocument.cs b/AIMS/OremrUserControl/ucDocument.cs index 5a9fa22..6b82bd8 100644 --- a/AIMS/OremrUserControl/ucDocument.cs +++ b/AIMS/OremrUserControl/ucDocument.cs @@ -197,7 +197,7 @@ namespace AIMS.OremrUserControl { toolStripButton1.Visible = true; } - if (XmlFileName == "自费项目治疗同意书") + if (XmlFileName == "自费项目治疗同意书" || XmlFileName == "自费项目治疗同意书2") { toolStripButton1.Text = "选择药品"; toolStripButton1.Visible = true; @@ -398,8 +398,36 @@ namespace AIMS.OremrUserControl if (DModel.XmlFileName == "自费项目治疗同意书") { string Result = ""; + string Result1 = ""; string Result2 = ""; frmDrugSel drugSel = new frmDrugSel(); + drugSel.IsLoad = true; + drugSel.ShowDialog(); + int i = 1; + foreach (var item in drugSel.FactDrugList) + { + Result += i + "." + item.DrugName + " " + item.Dosage + "元\r\n"; + Result1 += " " + item.DrugKind + item.DosageUnit + "\r\n"; + Result2 += " " + item.DensityUnit + " " + " \r\n"; + i++; + } + var field12 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).ID == "field15").FirstOrDefault(); + if (Result != "") field12.Text = Result.ToString(); + var field13 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).ID == "field12").FirstOrDefault(); + if (Result1 != "") field13.Text = Result1.ToString(); + var field14 = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement + && (x as XTextInputFieldElement).ID == "field13").FirstOrDefault(); + if (Result2 != "") field14.Text = Result2.ToString(); + + } + if (DModel.XmlFileName == "自费项目治疗同意书2") + { + string Result = ""; + string Result2 = ""; + frmDrugSel drugSel = new frmDrugSel(); + drugSel.IsLoad = false; drugSel.ShowDialog(); int i = 1; foreach (var item in drugSel.FactDrugList) diff --git a/AIMS/PublicUI/frmDrugSel.cs b/AIMS/PublicUI/frmDrugSel.cs index 6fc1b88..69c6f5a 100644 --- a/AIMS/PublicUI/frmDrugSel.cs +++ b/AIMS/PublicUI/frmDrugSel.cs @@ -22,6 +22,7 @@ namespace AIMS.PublicUI.UI public int currentTabIndex = 1; public bool isCVhageAllSapDose = false; public int DrugTypeId; + public bool IsLoad; #region 公共成员 int x = 0; @@ -225,8 +226,15 @@ namespace AIMS.PublicUI.UI dr.Cells[3].Tag = drug.Id; dr.Cells[3].Value = drug.Name; dr.Cells[4].Value = drug.Price; - dr.Cells[5].Value = 1; - dr.Cells[6].Value = "个"; + if (drug.Name == "吸入用七氟烷") + dr.Cells[6].Value = "ml"; + else + dr.Cells[6].Value = "支"; + if (drug.Name == "复方右旋糖酐40注射液" || drug.Name == "地佐辛注射液" || drug.Name == "注射用尼可地尔" || drug.Name == "盐酸甲氧明注射液" || drug.Name == "盐酸阿扎司琼氯化钠注射液") + dr.Cells[7].Value = "100%"; + else + dr.Cells[7].Value = "10%"; + } else { @@ -234,8 +242,11 @@ namespace AIMS.PublicUI.UI dr.Cells[3].Tag = drug.Id; dr.Cells[3].Value = drug.Name; dr.Cells[4].Value = drug.Price; - dr.Cells[5].Value = 1; dr.Cells[6].Value = drug.Unit; + if (drug.Name == "电子注药泵ZZB-II-150") + dr.Cells[7].Value = "100%"; + else + dr.Cells[7].Value = "50%"; } @@ -896,12 +907,43 @@ namespace AIMS.PublicUI.UI } this.TabSelDrugs.SelectedTabChanged += new System.EventHandler(this.superTabControl1_SelectedTabChanged); TabSelDrugs.SelectedTab = TabSelDrugs.Tabs[0] as SuperTabItem; - superTabControl1_SelectedTabChanged(null, null); + + if (IsLoad == true) + { + foreach (var item in AnaesthesiaList) + { + if (item.Remark == "药品") + { + DataTable dt = BDrugs.GetDrugsByIds(item.TheEventsId.ToString()); + SelectedTab = "药品"; + foreach (DataRow dr in dt.Rows) + { + ButtonX button = new ButtonX(); + button.Tag = dr["Id"].ToString(); + lb_Click(button, null); + } + } + else + { + DataTable dt = BCharges.GetDrugsByIds(item.TheEventsId.ToString()); + SelectedTab = "耗材"; + foreach (DataRow dr in dt.Rows) + { + ButtonX button = new ButtonX(); + button.Tag = dr["Id"].ToString(); + lb_Click(button, null); + } + } + } + + } + } catch (Exception ex) { PublicMethod.WriteLog(ex); } + superTabControl1_SelectedTabChanged(null, null); } private void dgvDrugs_DataError(object sender, DataGridViewDataErrorEventArgs e) @@ -1077,8 +1119,9 @@ namespace AIMS.PublicUI.UI _dataGridView.CurrentRow.Cells[3].Value = dgvYP.Rows[index].Cells["DrugName"].Value.ToString();//药品名称 _dataGridView.CurrentRow.Cells[4].Value = dgvYP.Rows[index].Cells["Price"].Value.ToString(); - _dataGridView.CurrentRow.Cells[5].Value = 1; - _dataGridView.CurrentRow.Cells[6].Value = "个"; + //_dataGridView.CurrentRow.Cells[5].Value = 1; + _dataGridView.CurrentRow.Cells[6].Value = "支"; + _dataGridView.CurrentRow.Cells[7].Value = "10%"; index = 0; dgvYP.Visible = false; AddNewNullRows(); diff --git a/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs b/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs index 7b3c973..e5988aa 100644 --- a/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs +++ b/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs @@ -58,7 +58,7 @@ namespace AIMSDAL DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); for (int i = 0; i < dt.Rows.Count; i++) { - sb.Append(dt.Rows[i]["AnaesthesiaMethodId"].ToString() + ","); + sb.Append(dt.Rows[i]["AnaesthesiaMethodId"].ToString() + "+"); } if (sb.ToString().Length > 1) { diff --git a/DrawGraph/AreaManage/BaseInfoBottomManage.cs b/DrawGraph/AreaManage/BaseInfoBottomManage.cs index 413c8cf..97220c4 100644 --- a/DrawGraph/AreaManage/BaseInfoBottomManage.cs +++ b/DrawGraph/AreaManage/BaseInfoBottomManage.cs @@ -197,9 +197,18 @@ namespace DrawGraph ((TextBox)conl).Focus(); if (sender.PackValue != null && sender.PackValue.Trim() != "") { - if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length) - ((TextBox)conl).Text = ((TextBox)conl).Text + ","; - ((TextBox)conl).Select(((TextBox)conl).Text.Length, 1); + if (ableEdit.ClassDataSourceName == "OperationRecord.AnaesthesiaMethodName") + { + if (((TextBox)conl).Text.LastIndexOf('+') != sender.PackText.Length) + ((TextBox)conl).Text = ((TextBox)conl).Text + "+"; + ((TextBox)conl).Select(((TextBox)conl).Text.Length, 1); + } + else + { + if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length) + ((TextBox)conl).Text = ((TextBox)conl).Text + ","; + ((TextBox)conl).Select(((TextBox)conl).Text.Length, 1); + } } } ableEdit.CControl.TextChanged -= new EventHandler(CControl_TextChanged); @@ -274,11 +283,16 @@ namespace DrawGraph if (rightStr.Contains(",")) { endLength = rightStr.IndexOf(",") + (leftStr.Length - beginindex); - } - //else - //{ - // endLength = conl.Text.Length - startIndex; - //} + } + } + else if (leftStr.Contains("+")) + { + int beginindex = leftStr.LastIndexOf('+'); + startIndex = beginindex + 1; + if (rightStr.Contains("+")) + { + endLength = rightStr.IndexOf("+") + (leftStr.Length - beginindex); + } } else { @@ -286,6 +300,10 @@ namespace DrawGraph { endLength = rightStr.IndexOf(",") + leftStr.Length + 1; } + else if (rightStr.Contains("+")) + { + endLength = rightStr.IndexOf("+") + leftStr.Length + 1; + } } conl.Select(startIndex, endLength); @@ -363,9 +381,18 @@ namespace DrawGraph ((TextBox)conl).Focus(); if (sender.PackValue != null && sender.PackValue.Trim() != "") { - if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length) - ((TextBox)conl).Text = ((TextBox)conl).Text + ","; - ((TextBox)conl).Select(((TextBox)conl).Text.Length, 1); + if (ableEdit.ClassDataSourceName == "OperationRecord.AnaesthesiaMethodName") + { + if (((TextBox)conl).Text.LastIndexOf('+') != sender.PackText.Length) + ((TextBox)conl).Text = ((TextBox)conl).Text + "+"; + ((TextBox)conl).Select(((TextBox)conl).Text.Length, 1); + } + else + { + if (((TextBox)conl).Text.LastIndexOf(',') != sender.PackText.Length) + ((TextBox)conl).Text = ((TextBox)conl).Text + ","; + ((TextBox)conl).Select(((TextBox)conl).Text.Length, 1); + } } } ableEdit.CControl.TextChanged -= new EventHandler(CControl_TextChanged); diff --git a/DrawGraph/AreaManage/DBManage.cs b/DrawGraph/AreaManage/DBManage.cs index 2182d8d..de97f26 100644 --- a/DrawGraph/AreaManage/DBManage.cs +++ b/DrawGraph/AreaManage/DBManage.cs @@ -506,7 +506,7 @@ namespace DrawGraph public static int AddAnaesthesiaMethod(OperationRecord _operationRecord, string AnaesthesiaMethod) { int i = 0; - if (AnaesthesiaMethod.Trim() == "" || AnaesthesiaMethod == ",") + if (AnaesthesiaMethod.Trim() == "" || AnaesthesiaMethod == "+") { DeleteAnaesthesiaMethod(_operationRecord.PatientId.Value); i++; @@ -515,7 +515,7 @@ namespace DrawGraph { DeleteAnaesthesiaMethod(_operationRecord.PatientId.Value); i++; - string[] Operationstr = AnaesthesiaMethod.Split(','); + string[] Operationstr = AnaesthesiaMethod.Split('+'); foreach (string AnaesthesiaMethodId in Operationstr) { StringBuilder strSql = new StringBuilder(); diff --git a/DrawGraph/AreaManage/SelectWorkerValue.cs b/DrawGraph/AreaManage/SelectWorkerValue.cs index 7acf574..b2e9bc1 100644 --- a/DrawGraph/AreaManage/SelectWorkerValue.cs +++ b/DrawGraph/AreaManage/SelectWorkerValue.cs @@ -97,9 +97,18 @@ namespace DrawGraph public static string Key; public static string Value; public static string ChageText = ""; + public static char SplitChar = ','; public void Show(TemplateManage _template, object _OpeRecord, AbleEditPackObj _aEdit, string _type, bool _isUpdate = true) { + if (_aEdit.ClassDataSourceName == "OperationRecord.AnaesthesiaMethodName") + { + SplitChar = '+'; + } + else + { + SplitChar = ','; + } isUpdate = _isUpdate; type = _type; aEdit = _aEdit; @@ -156,9 +165,9 @@ namespace DrawGraph Value = aEdit.PackText; if (Value == null || Value == "") ChageText = CControl.Text; - else if (CControl.Text.Contains(",")) - ChageText = CControl.Text.Substring(CControl.Text.LastIndexOf(",") + 1, CControl.Text.Length - CControl.Text.LastIndexOf(",") - 1); - DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), ChageText, aEdit.ControlTitleText, type.ToString(), Key); + else if (CControl.Text.Contains(SplitChar)) + ChageText = CControl.Text.Substring(CControl.Text.LastIndexOf(SplitChar) + 1, CControl.Text.Length - CControl.Text.LastIndexOf(SplitChar) - 1); + DataTable dt = DBManage.GetDictDataTable((OpeRecord as OperationRecord), ChageText, aEdit.ControlTitleText, type.ToString(), Key); dgvZd.DataSource = dt; dgvZd.BringToFront(); } @@ -168,9 +177,9 @@ namespace DrawGraph if (aEdit == null) return; if (CControl.Text.Trim() != "" && CControl.Text != Value) { - string[] strs = CControl.Text.Split(','); - string[] names = Value.Split(','); - string[] ids = Key.Split(','); + string[] strs = CControl.Text.Split(SplitChar); + string[] names = Value.Split(SplitChar); + string[] ids = Key.Split(SplitChar); List namevalue = new List(); List idvalue = new List(); @@ -188,8 +197,8 @@ namespace DrawGraph } if (idvalue.Count > 0) { - Value = string.Join(",", namevalue); - Key = string.Join(",", idvalue); + Value = string.Join(SplitChar.ToString(), namevalue); + Key = string.Join(SplitChar.ToString(), idvalue); } else { @@ -235,7 +244,7 @@ namespace DrawGraph { SetContent(e.RowIndex); } - } + } public static void SetContent(int index) { if (dgvZd.Rows[index].Cells["Name"].EditedFormattedValue.ToString() != "") @@ -246,8 +255,8 @@ namespace DrawGraph if (Key != null && Key.Trim() != "") { - Key = Key + "," + id; - Value = Value + "," + name; + Key = Key + SplitChar + id; + Value = Value + SplitChar + name; } else {