From b9fbc6f8ea71ec3cc67e12c490bc83656d0b883c Mon Sep 17 00:00:00 2001 From: HI <15012290903@163.com> Date: Thu, 18 Jul 2024 10:13:40 +0800 Subject: [PATCH] =?UTF-8?q?+=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=A3=80=E6=9F=A5=E9=A1=B9=E7=9B=AE=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=87=BA=E7=BB=93=E6=9E=9C=EF=BC=9B=E5=9B=A2=E4=BD=93?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=90=9C=E7=B4=A2=E4=B8=96=E7=95=8C=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E5=8A=A0=E9=95=BF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/View/Enrollment/EnrollmentOrgForm.cs | 2 +- PEIS/View/MainForm.cs | 2 +- PEIS/View/UControl/StepViewer.cs | 82 ++++++++++++++++++++++- 3 files changed, 82 insertions(+), 4 deletions(-) diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.cs index d15e457..00927a6 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.cs +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.cs @@ -202,7 +202,7 @@ namespace PEIS.View.Enrollment private void EnrollmentOrgForm_Shown(object sender, EventArgs e) { - DtpBegDate.Value = DateTime.Now.AddDays(-3); + DtpBegDate.Value = DateTime.Now.AddDays(-15); DtpEndDate.Value = DateTime.Now; RiCmbExamType.Items.Add("已婚/未婚"); RiCmbExamType.Items.AddRange(Global._lstConfig.Where(a => a.Key.Equals("ExamType")).ToList().Select(a => a.Value).ToList()); diff --git a/PEIS/View/MainForm.cs b/PEIS/View/MainForm.cs index c27df2a..f31399b 100644 --- a/PEIS/View/MainForm.cs +++ b/PEIS/View/MainForm.cs @@ -29,7 +29,7 @@ namespace PEIS.View private static bool _isCloseMainForm = false; // 是否显示进度条 - private static bool _isShowStepViewer = false; + private static bool _isShowStepViewer = true; public MainForm() { diff --git a/PEIS/View/UControl/StepViewer.cs b/PEIS/View/UControl/StepViewer.cs index c16e8bf..c733604 100644 --- a/PEIS/View/UControl/StepViewer.cs +++ b/PEIS/View/UControl/StepViewer.cs @@ -181,7 +181,7 @@ namespace PEIS.View.UControl } // 签到-科室分检-总检-打印 - public List GetDataList(long? eid) + public List GetDataList2(long? eid) { var list = new List(); if (eid == null) @@ -243,7 +243,75 @@ WHERE A.EID = {Eid} AND c.VerifyTime IS NULL AND B.IsHide=0 AND A.GiveUpTime IS return list; } - public List GetDefaultDataList() + + // 签到-科室分检-总检-打印 + public List GetDataList(long? eid) + { + var list = new List(); + if (eid == null) + { + return GetDefaultDataList(); + } + + var data = DAOHelp.GetDataBySQL($@" + SELECT DISTINCT A.ID AS EID,A.Name as PatientName,A.SignTime ,A.FinishTime ,a.PrintTime + FROM Enrollment_Patient A + WHERE A.ID={eid}").FirstOrDefault(); + if (data.SignTime == null) + { + list.Add(new StepModel("签到", $"进行中", $"体检者:{eid},{data.PatientName}", true)); + list.Add(new StepModel("检验项目")); + list.Add(new StepModel("检查项目")); + list.Add(new StepModel("打印")); + return list; + } + list.Add(new StepModel("签到", $"{data.SignTime:yyyy-MM-dd HH:mm}", $"体检者:{eid},{data.PatientName}")); + + if (data.PrintTime != null || data.FinishTime != null) + { + list.Add(new StepModel("检验项目", $"已完成")); + list.Add(new StepModel("检查项目", $"已完成")); + var addItem = data.PrintTime != null + ? new StepModel("打印", $"{data.PrintTime:yyyy-MM-dd HH:mm}", "已打印", true) + : new StepModel("打印", "未打印", "", true); + list.Add(addItem); + return list; + } + var reports = DAOHelp.GetDataBySQL($@" + SELECT STUFF(( + SELECT DISTINCT ',' + req_reason + FROM lis.rmcloudlis7.dbo.vw_checked_labresult A + WHERE pat_no = '11201' AND pat_typecode = 4 + FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 1, '') AS Title,Class='检验' + union + SELECT Title,Class='检查' FROM Report WHERE EID=11201 + "); + var lisItem = reports.FirstOrDefault(p => p.Class == "检验")?.Title; + + if (!string.IsNullOrEmpty(lisItem)) + { + list.Add(new StepModel("检验项目", $"已完成", lisItem, true)); + } + else + { + list.Add(new StepModel("检验项目", $"结果未出", "",true)); + + } + var pacsItem = reports.FirstOrDefault(p => p.Class == "检查")?.Title; + if (!string.IsNullOrEmpty(pacsItem)) + { + list.Add(new StepModel("检查项目", $"已完成", pacsItem)); + } + else + { + list.Add(new StepModel("检查项目", $"结果未出", "")); + + } + list.Add(new StepModel("打印")); + return list; + } + + public List GetDefaultDataList2() { return new List() { @@ -253,6 +321,16 @@ WHERE A.EID = {Eid} AND c.VerifyTime IS NULL AND B.IsHide=0 AND A.GiveUpTime IS new StepModel("打印"), }; } + public List GetDefaultDataList() + { + return new List() + { + new StepModel("签到" ), + new StepModel("检验项目" ), + new StepModel("检查项目"), + new StepModel("打印"), + }; + } private void TimelinePanel_Paint(object sender, PaintEventArgs e) {