1、解决心电图报告分检、总检显示问题,2、科室小结分号指定科室生成

dhzzyy
lsm 10 months ago
parent 9fceeffe70
commit 11bd5c5ca0
  1. 9
      PEIS/Model/Exam/PartModel.cs
  2. 31
      PEIS/Utils/ReportHelper.cs
  3. 23
      PEIS/View/Exam/PartForm.cs
  4. 23
      PEIS/View/Exam/TotalForm.cs

@ -199,7 +199,7 @@ namespace PEIS.Model
{
"3101", //病理科
"3201", //放射科
"3202", //超声科
"3203", //超声科
};
var index = 1;
@ -208,11 +208,16 @@ namespace PEIS.Model
if (index > 1)
summary += Environment.NewLine;
summary += $@"{index}.{items.Key}:" + Environment.NewLine;
if (!deptCodeList.Contains(deptCode))
if (!deptCodeList.Contains(deptCode) && deptCode != "0141" )
{
summary += string.Join(Environment.NewLine,
items.Select(s => $@" {s.RptItemName}:{s.TextResult} {s.Unit} {s.UnusualFlag};").ToList());
}
else if(deptCode == "0141")
{
summary += string.Join(Environment.NewLine,
items.Select(s => $@" {s.RptItemName}:{s.TextResult} {s.Unit} {s.UnusualFlag}").ToList());
}
else
{
summary += string.Join(Environment.NewLine, items.Select(s => $@" {s.TextResult}").ToList());

@ -33,37 +33,6 @@ namespace PEIS.Utils
{
public static class ReportHelper
{
// 逆时针旋转图片的函数
public static Image RotateImage(Image img)
{
// 旋转角度为负90度
float angle = -90f;
// 计算旋转后的图像的矩形范围
RectangleF bounds = new RectangleF(0, 0, img.Height, img.Width);
// 创建旋转后的位图
Bitmap rotatedImage = new Bitmap((int)bounds.Width, (int)bounds.Height);
rotatedImage.SetResolution(img.HorizontalResolution, img.VerticalResolution);
using (Graphics g = Graphics.FromImage(rotatedImage))
{
// 设置插值模式以改善旋转后图像的质量
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
// 设置旋转中心点
g.TranslateTransform(rotatedImage.Width / 2, rotatedImage.Height / 2);
// 旋转角度
g.RotateTransform(angle);
// 将旋转中心点恢复到原点
g.TranslateTransform(-img.Width / 2, -img.Height / 2);
// 绘制旋转后的图片
g.DrawImage(img, new PointF(0, 0));
}
return rotatedImage;
}
/// <summary>
/// PDF to Image
/// </summary>

@ -1,13 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Repository;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Grid;
@ -20,6 +11,15 @@ using PEIS.Model.Exam;
using PEIS.Presenter;
using PEIS.Utils;
using PEIS.View.UControl;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using static PEIS.Utils.ColorHelper;
using static PEIS.Utils.Global;
@ -1001,8 +1001,7 @@ namespace PEIS.View.Exam
var img = ReportHelper.PdfToImg(item.ReportImg);
if (img != null)
{
var newImg = ReportHelper.RotateImage(img);
Invoke(new Action(() => { picReportExt.Image = newImg; }));
Invoke(new Action(() => { picReportExt.Image = img; picReportExt.Dock = DockStyle.Fill; picReportExt.SizeMode = PictureBoxSizeMode.Zoom; }));
}
return;

@ -1,14 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Grid;
using PEIS.Base;
@ -19,6 +9,14 @@ using PEIS.Model.Exam;
using PEIS.Presenter;
using PEIS.Utils;
using PEIS.View.UControl;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using static PEIS.Utils.ColorHelper;
namespace PEIS.View.Exam
@ -954,8 +952,7 @@ namespace PEIS.View.Exam
var img = ReportHelper.PdfToImg(item.ReportImg);
if (img != null)
{
var newImg = ReportHelper.RotateImage(img);
Invoke(new Action(() => { PictureBoxReportExt.Image = newImg; }));
Invoke(new Action(() => { PictureBoxReportExt.Image = img; PictureBoxReportExt.Dock = DockStyle.Fill; PictureBoxReportExt.SizeMode = PictureBoxSizeMode.Zoom; }));
}
return;

Loading…
Cancel
Save