diff --git a/PEIS/Model/Enrollment/EnrollmentOrgModel.cs b/PEIS/Model/Enrollment/EnrollmentOrgModel.cs index cc846df..9e16aa9 100644 --- a/PEIS/Model/Enrollment/EnrollmentOrgModel.cs +++ b/PEIS/Model/Enrollment/EnrollmentOrgModel.cs @@ -51,11 +51,7 @@ namespace PEIS.Model.Enrollment var enrollmentPatient = $@"UPDATE Enrollment_Patient SET ExamDate = GETDATE(), SignTime = GETDATE(), SignerCode = '{Global.currentUser.Code}', Signer = '{Global.currentUser.Name}' WHERE ID = {eID} AND SignTime is null"; var enrollmentFeeItem = $@"UPDATE a SET a.IsSend = 1 FROM Enrollment_FeeItem a LEFT JOIN Enrollment_CheckCost b ON a.OrderNO = b.ID AND a.EID = b.EID WHERE b.SendTime IS NOT NULL AND a.EID = {eID};"; - var dept = $@"UPDATE Enrollment_FeeItem SET DeptCode = '01016',DeptName = '内科' WHERE FID = 844 AND EID = {eID}; - UPDATE Enrollment_FeeItem SET DeptCode = '01017',DeptName = '外科' WHERE FID = 845 AND EID = {eID}; - UPDATE Enrollment_FeeItem SET DeptCode = '01014',DeptName = '口腔科' WHERE FID = 846 AND EID = {eID}; - UPDATE Enrollment_FeeItem SET DeptCode = '01015',DeptName = '五官科' WHERE FID = 847 AND EID = {eID}; - UPDATE Enrollment_FeeItem SET DeptCode = '01012',DeptName = '心电图室' WHERE FID = 216 AND EID = {eID};"; + var dept = $@"EXEC sp_UpdateSendToDept {eID}"; // 插入分检步骤 var part = $@"EXEC sp_SyncExamPart {eID}"; diff --git a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs index e16172f..22edfd7 100644 --- a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs +++ b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs @@ -115,11 +115,7 @@ namespace PEIS.Model.Enrollment var enrollmentFeeItem = $@"UPDATE a SET a.IsSend = 1 FROM Enrollment_FeeItem a LEFT JOIN Enrollment_CheckCost b ON a.OrderNO = b.ID AND a.EID = b.EID WHERE b.SendTime IS NOT NULL AND a.EID = {EId}; "; - var dept = $@"UPDATE Enrollment_FeeItem SET DeptCode = '01016',DeptName = '内科' WHERE FID = 844 AND EID = {EId}; - UPDATE Enrollment_FeeItem SET DeptCode = '01017',DeptName = '外科' WHERE FID = 845 AND EID = {EId}; - UPDATE Enrollment_FeeItem SET DeptCode = '01014',DeptName = '口腔科' WHERE FID = 846 AND EID = {EId}; - UPDATE Enrollment_FeeItem SET DeptCode = '01015',DeptName = '五官科' WHERE FID = 847 AND EID = {EId}; - UPDATE Enrollment_FeeItem SET DeptCode = '01012',DeptName = '心电图室' WHERE FID = 216 AND EID = {EId};"; + var dept = $@"EXEC sp_UpdateSendToDept {EId}"; // 插入分检步骤 var part = $@"EXEC sp_SyncExamPart {EId}"; diff --git a/PEIS/Utils/ReportHelper.cs b/PEIS/Utils/ReportHelper.cs index 5de6840..330de0f 100644 --- a/PEIS/Utils/ReportHelper.cs +++ b/PEIS/Utils/ReportHelper.cs @@ -538,7 +538,7 @@ namespace PEIS.Utils rpt.SetParameterValue("CardNo", regInfo.CardNo); rpt.SetParameterValue("HospitalName", Global._hospital?.Name); - if (regInfo.Photo == null) + if (string.IsNullOrEmpty(regInfo.Photo)) { rpt.SetParameterValue("Avatar", regInfo.Photo); } diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.cs index 244d334..664fb51 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.cs +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.cs @@ -254,11 +254,12 @@ namespace PEIS.View.Enrollment private void DgvOrg_SelectionChanged(object sende1r, DevExpress.Data.SelectionChangedEventArgs e) // 团体列表切换 { if (!DgvOrg.GetSelectedRows().Any()) return; - // 清空数据源 EmptyDataSource(); - OnGetEnrollmentOrgGroup(Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString())); + + + if (!DgvGroup.GetSelectedRows().Any()) return; OnGetOrgPatient(); // tab页选中成员收费时,再加载人员 diff --git a/PEIS/View/Exam/PartForm.Designer.cs b/PEIS/View/Exam/PartForm.Designer.cs index fa66e0d..00bf558 100644 --- a/PEIS/View/Exam/PartForm.Designer.cs +++ b/PEIS/View/Exam/PartForm.Designer.cs @@ -157,6 +157,8 @@ this.OpsPacsImg = new PEIS.View.UControl.OpMenuSimple(); this.panelPacsRptList = new System.Windows.Forms.Panel(); this.dgcRptPacs = new DevExpress.XtraGrid.GridControl(); + this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.PrintPacs = new System.Windows.Forms.ToolStripMenuItem(); this.DgvRptPacs = new DevExpress.XtraGrid.Views.Grid.GridView(); this.colPacsTime = new DevExpress.XtraGrid.Columns.GridColumn(); this.colPacsImageTitle1 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -239,8 +241,7 @@ this.colRptExtTime = new DevExpress.XtraGrid.Columns.GridColumn(); this.colRptExtDesc = new DevExpress.XtraGrid.Columns.GridColumn(); this.superTabControl1 = new FastReport.DevComponents.DotNetBar.SuperTabControl(); - this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.PrintPacs = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPick = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerBase)).BeginInit(); this.splitContainerBase.Panel1.SuspendLayout(); this.splitContainerBase.Panel2.SuspendLayout(); @@ -305,6 +306,7 @@ this.panel14.SuspendLayout(); this.panelPacsRptList.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgcRptPacs)).BeginInit(); + this.contextMenuStrip2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgvRptPacs)).BeginInit(); this.tabPageReport.SuspendLayout(); this.panelReportBase.SuspendLayout(); @@ -325,7 +327,6 @@ this.panel2.SuspendLayout(); this.menuStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.superTabControl1)).BeginInit(); - this.contextMenuStrip2.SuspendLayout(); this.SuspendLayout(); // // splitContainerBase @@ -1913,6 +1914,20 @@ this.dgcRptPacs.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvRptPacs}); // + // contextMenuStrip2 + // + this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.PrintPacs}); + this.contextMenuStrip2.Name = "contextMenuStrip2"; + this.contextMenuStrip2.Size = new System.Drawing.Size(125, 26); + // + // PrintPacs + // + this.PrintPacs.Image = ((System.Drawing.Image)(resources.GetObject("PrintPacs.Image"))); + this.PrintPacs.Name = "PrintPacs"; + this.PrintPacs.Size = new System.Drawing.Size(124, 22); + this.PrintPacs.Text = "打印报告"; + // // DgvRptPacs // this.DgvRptPacs.Appearance.Empty.BackColor = System.Drawing.Color.WhiteSmoke; @@ -2854,6 +2869,7 @@ this.tsmiReview, this.tsmiConclusion, this.tsmiSave, + this.tsmiPick, this.strip1, this.stripTxtEid, this.strip2, @@ -3005,19 +3021,15 @@ this.superTabControl1.SelectedTabIndex = -1; this.superTabControl1.TabIndex = 0; // - // contextMenuStrip2 + // tsmiPick // - this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.PrintPacs}); - this.contextMenuStrip2.Name = "contextMenuStrip2"; - this.contextMenuStrip2.Size = new System.Drawing.Size(125, 26); - // - // PrintPacs - // - this.PrintPacs.Image = ((System.Drawing.Image)(resources.GetObject("PrintPacs.Image"))); - this.PrintPacs.Name = "PrintPacs"; - this.PrintPacs.Size = new System.Drawing.Size(124, 22); - this.PrintPacs.Text = "打印报告"; + this.tsmiPick.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.tsmiPick.Image = global::PEIS.Properties.Resources.刷新; + this.tsmiPick.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsmiPick.Name = "tsmiPick"; + this.tsmiPick.Size = new System.Drawing.Size(159, 40); + this.tsmiPick.Text = "重新提取检查结果"; + this.tsmiPick.Visible = false; // // PartForm // @@ -3098,6 +3110,7 @@ this.panel14.ResumeLayout(false); this.panelPacsRptList.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dgcRptPacs)).EndInit(); + this.contextMenuStrip2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgvRptPacs)).EndInit(); this.tabPageReport.ResumeLayout(false); this.panelReportBase.ResumeLayout(false); @@ -3122,7 +3135,6 @@ this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.superTabControl1)).EndInit(); - this.contextMenuStrip2.ResumeLayout(false); this.ResumeLayout(false); } @@ -3340,5 +3352,6 @@ private DevExpress.XtraGrid.Views.Grid.GridView gridView1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip2; private System.Windows.Forms.ToolStripMenuItem PrintPacs; + private System.Windows.Forms.ToolStripMenuItem tsmiPick; } } \ No newline at end of file diff --git a/PEIS/View/Exam/PartForm.cs b/PEIS/View/Exam/PartForm.cs index c8f1341..5b373e5 100644 --- a/PEIS/View/Exam/PartForm.cs +++ b/PEIS/View/Exam/PartForm.cs @@ -115,6 +115,8 @@ namespace PEIS.View.Exam // rdoStatus3.Click += RadioButton_Click; rdoStatus4.Click += RadioButton_Click; btnRefresh.Click += (s, e) => { OnGetPatients(); }; + // 菜单-重新提取检查结果 + tsmiPick.Click += TsmiPick_Click; //菜单-保存 tsmiSave.Click += TsmiSave_Click; //菜单-生成小结结论 @@ -436,6 +438,15 @@ namespace PEIS.View.Exam { OnGetExamPart(); //OnGetPatients(); + // 选中检查科室提取结果按钮显示 + if (_currentDept.DeptCode == "3201" || _currentDept.DeptCode == "3203" || _currentDept.DeptCode == "3204" || _currentDept.DeptCode == "3101") + { + tsmiPick.Visible = true; + } + else + { + tsmiPick.Visible = false; + } } // else // { @@ -1074,6 +1085,23 @@ namespace PEIS.View.Exam } } + /// + /// 重新提取检查结果 + /// + /// + /// + private void TsmiPick_Click(object sender, EventArgs e) + { + if (_patient.ID <= 0 || _patient.FinishTime != null || _examPart.VerifyTime != null || _examPart.GiveUpTime != null) return; + DAOHelp.ExecuteSql($@"DELETE FROM Report WHERE ID IN ( + SELECT a.ID + FROM Report a + LEFT JOIN Enrollment_FeeItem b ON (a.ReportNo = b.ID OR a.ReportNo = b.OldId) + WHERE a.EID = {_patient.ID} AND b.DeptCode = '{_examPart.DeptCode}')"); + + DAOHelp.ExecuteSql($@"EXEC sp_PacsRptInsert {_patient.ID}"); + } + /// /// 保存科室分检 ///