From 2008a1f10486ab54f048a369ba2801fb3ab9ccbf Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 23 Apr 2026 16:25:01 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 6 +++--- .../Service/ImageAndDoc/StudyService.cs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index d6bf0f90e..5e5dd9b03 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -17269,17 +17269,17 @@ - ���� + 质疑 - һ���Ժ˲� + 一致性核查 - ���� + 复制 diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 708e93db1..c4250074b 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -106,14 +106,14 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var prefix = path.Substring(1, path.LastIndexOf('/') - 1); - var maskPath = $"{Path.GetFileName(path)}.MaskImage"; + var maskPath = $"{Path.GetFileName(path)}.MaskDicom"; //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要 await _oSSService.DeleteFromPrefix(maskPath, true); - await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskPath); + var tt = await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskPath,false); - var newPath = path + ".MaskImage"; + var newPath = path + ".MaskDicom"; await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path= newPath, IsMasked = true }); } @@ -160,7 +160,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc foreach (var item in idPathList) { - if (item.Path.EndsWith(".MaskImage")) + if (item.Path.EndsWith(".MaskDicom")) { var newPath = item.Path[..^10]; From fa464e6ed8bc053b85e7bbfe64a0b68513988500 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 23 Apr 2026 16:57:50 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B4=A8=E6=8E=A7=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8C=BF=E5=90=8D=E6=A0=87=E8=AE=B0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5,=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 35 +++++++++++++++++++ .../ImageAndDoc/DTO/DicomSeriesModel.cs | 2 ++ .../Service/ImageAndDoc/SeriesService.cs | 8 +++-- .../Service/ImageAndDoc/StudyService.cs | 10 +++--- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 5e5dd9b03..51a75e0b2 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -18400,6 +18400,36 @@ ISystemDocumentService + + + 体重 + + + + + 总剂量 + + + + + 半衰期 + + + + + 注射时间 + + + + + 成像 / 采集时间 + + + + + 是否存在空字符串字段(PatientSex、PatientWeight、RadionuclideTotalDose、RadionuclideHalfLife、RadiopharmaceuticalStartTime、AcquisitionTime 任意一个为空/空字符串) + + 性别 @@ -19648,6 +19678,11 @@ 成像 / 采集时间 + + + 是否存在空字符串字段(PatientSex、PatientWeight、RadionuclideTotalDose、RadionuclideHalfLife、RadiopharmaceuticalStartTime、AcquisitionTime 任意一个为空/空字符串) + + SystemBasicDataService diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs index 6e544f94a..67d8b34cb 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs @@ -102,6 +102,8 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO public Guid? SeriesId { get; set; } + public bool? IsMasked { get; set; } + [JsonIgnore] public int ShowOrder { get; set; } [JsonIgnore] diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs index e7fbd8947..f86a2b7d0 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs @@ -72,7 +72,8 @@ namespace IRaCIS.Core.Application.Services InstanceNumber = k.InstanceNumber, IsReading = true, IsDeleted = false, - FileSize = k.FileSize + FileSize = k.FileSize, + }).ToList(); @@ -103,7 +104,7 @@ namespace IRaCIS.Core.Application.Services .WhereIf(isReading == true, t => t.IsReading == true) .OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber) .ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime) - .Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted, t.FileSize }).ToListAsync();//.GroupBy(u => u.SeriesId); + .Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted, t.FileSize ,t.IsMasked}).ToListAsync();//.GroupBy(u => u.SeriesId); foreach (var series in seriesList) @@ -119,7 +120,8 @@ namespace IRaCIS.Core.Application.Services InstanceNumber = k.InstanceNumber, IsReading = k.IsReading, IsDeleted = k.IsDeleted, - FileSize = k.FileSize + FileSize = k.FileSize, + IsMasked = k.IsMasked }).ToList(); diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index c4250074b..afa48f485 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -106,16 +106,16 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var prefix = path.Substring(1, path.LastIndexOf('/') - 1); - var maskPath = $"{Path.GetFileName(path)}.MaskDicom"; + var maskPath = path.Contains(".MaskDicom") ? $"{Path.GetFileName(path)}" : $"{Path.GetFileName(path)}.MaskDicom"; //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要 await _oSSService.DeleteFromPrefix(maskPath, true); - var tt = await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskPath,false); + await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskPath, false); - var newPath = path + ".MaskDicom"; + var newPath = path.Contains(".MaskDicom") ? path : path + ".MaskDicom"; - await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path= newPath, IsMasked = true }); + await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = true }); } catch (Exception ex) { @@ -188,7 +188,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc public async Task GetPatientInfo(GetPatientInfoInDto inDto) { var study = await _dicomStudyRepository.Where(s => s.Id == inDto.StudyId).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); - + return study; } From d807fe012636507ae8c963f2c26ace70e1a1fa8f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 23 Apr 2026 17:43:45 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9A=8F=E6=9C=BA?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=97=B6=E6=B8=85=E7=90=86=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/StudyService.cs | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index afa48f485..636c02fd1 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -94,6 +94,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var errorPathList = new List(); + var batchId = Guid.NewGuid(); + foreach (var item in idPathList) { var path = item.Path; @@ -106,14 +108,18 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var prefix = path.Substring(1, path.LastIndexOf('/') - 1); - var maskPath = path.Contains(".MaskDicom") ? $"{Path.GetFileName(path)}" : $"{Path.GetFileName(path)}.MaskDicom"; + //每次都用一个新的名字 + var maskFileName = $"{Path.GetFileName(path)}.{batchId}_MaskDicom"; - //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要 - await _oSSService.DeleteFromPrefix(maskPath, true); + if (path.Contains("_MaskDicom")) + { + //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要 + await _oSSService.DeleteFromPrefix(path, true); //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要 + } + + await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskFileName, false); - await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskPath, false); - - var newPath = path.Contains(".MaskDicom") ? path : path + ".MaskDicom"; + var newPath = $"/{prefix}/{maskFileName}"; await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = true }); } @@ -160,11 +166,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc foreach (var item in idPathList) { - if (item.Path.EndsWith(".MaskDicom")) + if (item.Path.EndsWith("_MaskDicom")) { - var newPath = item.Path[..^10]; + await _oSSService.DeleteFromPrefix(item.Path, true); - //await _oSSService.DeleteFromPrefix(newPath, true); + var length = Guid.Empty.ToString().Length + "_MaskDicom".Length; + var newPath = item.Path[..^length]; await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = false }); } From f2adb16189a62ed91807f8c108479768d9084197 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 24 Apr 2026 09:57:46 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=92=8C=E9=94=99=E8=AF=AF=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/StudyService.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 636c02fd1..40b753eef 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -92,7 +92,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc idPathList = await _dicomInstanceRepository.Where(t => t.SeriesId == inCommand.SeriesId).Select(t => new InstanceIdPath { Id = t.Id, Path = t.Path }).ToListAsync(); } - var errorPathList = new List(); + var errorList = new List(); + + var okList = new List(); var batchId = Guid.NewGuid(); @@ -116,16 +118,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要 await _oSSService.DeleteFromPrefix(path, true); //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要 } - + await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskFileName, false); var newPath = $"/{prefix}/{maskFileName}"; + okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath }); + await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = true }); } catch (Exception ex) { - errorPathList.Add(path); + + errorList.Add(new InstanceIdPath() { Id = item.Id, Path = path }); Log.Logger.Error(ex, $"StudyMaskImage Error for InstanceIdList Path:{path} {ex.Message}"); } @@ -134,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc await _dicomInstanceRepository.SaveChangesAsync(); - return ResponseOutput.Ok(errorPathList); + return ResponseOutput.Ok(new { OkList = okList, ErrorList = errorList }); } From 10f8039b1b5d3847137afc8410e047e7cb4a356a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 24 Apr 2026 10:58:55 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E7=9A=84=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 40b753eef..1169cd9d8 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -169,6 +169,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc idPathList = await _dicomInstanceRepository.Where(t => t.SeriesId == inCommand.SeriesId).Select(t => new InstanceIdPath { Id = t.Id, Path = t.Path }).ToListAsync(); } + var okList = new List(); + foreach (var item in idPathList) { if (item.Path.EndsWith("_MaskDicom")) @@ -178,6 +180,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var length = Guid.Empty.ToString().Length + "_MaskDicom".Length; var newPath = item.Path[..^length]; + okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath }); + await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = false }); } @@ -186,7 +190,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc await _dicomInstanceRepository.SaveChangesAsync(); - return ResponseOutput.Ok(); + return ResponseOutput.Ok(new { OkList = okList }); }