diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index a416af9a5..905d0b10b 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -18260,6 +18260,13 @@
+
+
+ 批量验证Cmove 检查在系统存在与否
+
+
+
+
拉取影像
diff --git a/IRaCIS.Core.Application/Service/Common/_MapConfig.cs b/IRaCIS.Core.Application/Service/Common/_MapConfig.cs
index d55d78cb9..3108fde80 100644
--- a/IRaCIS.Core.Application/Service/Common/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Common/_MapConfig.cs
@@ -100,7 +100,8 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode));
-
+ CreateMap();
+
}
}
diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/SCUClientViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/SCUClientViewModel.cs
index 14a83c2f5..0720a8d41 100644
--- a/IRaCIS.Core.Application/Service/Visit/DTO/SCUClientViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Visit/DTO/SCUClientViewModel.cs
@@ -22,7 +22,7 @@ namespace IRaCIS.Application.Contracts
public string? ModalitiesInStudy { get; set; }
-
+ public string? AccessionNumber { get; set; }
public string? StudyDate { get; set; }
@@ -46,7 +46,7 @@ namespace IRaCIS.Application.Contracts
[NotDefault]
public Guid PacsDicomAEId { get; set; }
- public List StudyIDList { get; set; }
+ public List StudyInstanceUIDList { get; set; }
}
public class SCUStudyView : SCUBasicInfo
diff --git a/IRaCIS.Core.Application/Service/Visit/PatientService.cs b/IRaCIS.Core.Application/Service/Visit/PatientService.cs
index 19e48f9c9..bd1ed85d0 100644
--- a/IRaCIS.Core.Application/Service/Visit/PatientService.cs
+++ b/IRaCIS.Core.Application/Service/Visit/PatientService.cs
@@ -47,6 +47,7 @@ using FellowOakDicom.Network;
using Microsoft.Extensions.Logging;
using DocumentFormat.OpenXml.Wordprocessing;
using System;
+using Amazon.Runtime.Internal.Transform;
namespace IRaCIS.Application.Services
{
@@ -2873,6 +2874,7 @@ namespace IRaCIS.Application.Services
request.Dataset.AddOrUpdate(DicomTag.PatientBirthDate, inQuery.PatientBirthDate.IsNullOrEmpty() ? "" : inQuery.PatientBirthDate);
//检查号 设备类型
request.Dataset.AddOrUpdate(DicomTag.StudyID, inQuery.StudyID.IsNullOrEmpty() ? "" : inQuery.StudyID);
+ request.Dataset.AddOrUpdate(DicomTag.AccessionNumber, inQuery.StudyID.IsNullOrEmpty() ? "" : inQuery.AccessionNumber);
request.Dataset.AddOrUpdate(DicomTag.ModalitiesInStudy, inQuery.ModalitiesInStudy.IsNullOrEmpty() ? "" : inQuery.ModalitiesInStudy);
@@ -2904,6 +2906,9 @@ namespace IRaCIS.Application.Services
#endregion
+
+
+
///
/// 获取 检查列表
///
@@ -2950,6 +2955,7 @@ namespace IRaCIS.Application.Services
PatientSex = response.Dataset?.GetSingleValueOrDefault(DicomTag.PatientSex, ""),
PatientBirthDate = response.Dataset?.GetSingleValueOrDefault(DicomTag.PatientBirthDate, ""),
StudyID = response.Dataset?.GetSingleValueOrDefault(DicomTag.StudyID, ""),
+ AccessionNumber = response.Dataset?.GetSingleValueOrDefault(DicomTag.AccessionNumber, ""),
ModalitiesInStudy = response.Dataset?.GetSingleValueOrDefault(DicomTag.ModalitiesInStudy, ""),
StudyDate = datePart.ToString(),
StudyTime = timePart.ToString("HH:mm:ss"),
@@ -2968,6 +2974,26 @@ namespace IRaCIS.Application.Services
}
+ ///
+ /// 批量验证Cmove 检查在系统存在与否
+ ///
+ ///
+ ///
+ public async Task> CMoveVerify(SCUCmoveCommand inCommand)
+ {
+ var existStudyIdList = _studyRepository.Where(t => inCommand.StudyInstanceUIDList.Contains(t.StudyInstanceUid)).Select(t => t.StudyInstanceUid).ToList();
+
+ var dic = new Dictionary();
+ foreach (var item in inCommand.StudyInstanceUIDList)
+ {
+ dic.Add(item, existStudyIdList.Any(t => t == item));
+ }
+
+ return dic;
+ }
+
+
+
///
/// 拉取影像
///
@@ -2976,14 +3002,6 @@ namespace IRaCIS.Application.Services
///
public async Task CmoveStudyList(SCUCmoveCommand inCommand, [FromServices] IRepository _dicomAEReposiotry)
{
- var existStudyIdList = _studyRepository.Where(t => inCommand.StudyIDList.Contains(t.StudyId)).Select(t => t.StudyId).ToList();
-
- var needMoveList = inCommand.StudyIDList.Except(existStudyIdList).ToList();
-
- if (needMoveList.Count == 0)
- {
- return ResponseOutput.Ok();
- }
var result = new List();
@@ -2993,24 +3011,30 @@ namespace IRaCIS.Application.Services
if (hirServer == null)
{
- return ResponseOutput.NotOk("未找到服务端AE配置,请核查后再拉取");
+ //"未找到服务端AE配置,请核查后再拉取"
+ return ResponseOutput.NotOk(_localizer["Patient_NoPacsAE"]);
}
if (find != null)
{
- var client = DicomClientFactory.Create(find.IP, find.Port, false, "HIRSCUAE", find.CalledAE);
- client.NegotiateAsyncOps();
-
- var cmoveRequestList = new List();
-
- foreach (var item in inCommand.StudyIDList)
+ await Task.Run(async () =>
{
- cmoveRequestList.Add(new DicomCMoveRequest(hirServer.CalledAE, item));
- }
- await client.AddRequestsAsync(cmoveRequestList);
- await client.SendAsync();
+ var client = DicomClientFactory.Create(find.IP, find.Port, false, "HIRSCUAE", find.CalledAE);
+ client.NegotiateAsyncOps();
+
+ var cmoveRequestList = new List();
+
+ foreach (var item in inCommand.StudyInstanceUIDList)
+ {
+ cmoveRequestList.Add(new DicomCMoveRequest(hirServer.CalledAE, item));
+ }
+
+ await client.AddRequestsAsync(cmoveRequestList);
+ await client.SendAsync();
+ });
+
}
return ResponseOutput.Ok();