修改增加接口
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1104c1481e
commit
0a368c0607
|
@ -18260,6 +18260,13 @@
|
||||||
<param name="_logger"></param>
|
<param name="_logger"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.PatientService.CMoveVerify(IRaCIS.Application.Contracts.SCUCmoveCommand)">
|
||||||
|
<summary>
|
||||||
|
批量验证Cmove 检查在系统存在与否
|
||||||
|
</summary>
|
||||||
|
<param name="inCommand"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.PatientService.CmoveStudyList(IRaCIS.Application.Contracts.SCUCmoveCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomAE})">
|
<member name="M:IRaCIS.Application.Services.PatientService.CmoveStudyList(IRaCIS.Application.Contracts.SCUCmoveCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomAE})">
|
||||||
<summary>
|
<summary>
|
||||||
拉取影像
|
拉取影像
|
||||||
|
|
|
@ -100,7 +100,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode));
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode));
|
||||||
|
|
||||||
|
CreateMap<InternationalizationAddOrEdit, IRCGlobalInfoDTO>();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace IRaCIS.Application.Contracts
|
||||||
|
|
||||||
public string? ModalitiesInStudy { get; set; }
|
public string? ModalitiesInStudy { get; set; }
|
||||||
|
|
||||||
|
public string? AccessionNumber { get; set; }
|
||||||
|
|
||||||
public string? StudyDate { get; set; }
|
public string? StudyDate { get; set; }
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ namespace IRaCIS.Application.Contracts
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid PacsDicomAEId { get; set; }
|
public Guid PacsDicomAEId { get; set; }
|
||||||
|
|
||||||
public List<string> StudyIDList { get; set; }
|
public List<string> StudyInstanceUIDList { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SCUStudyView : SCUBasicInfo
|
public class SCUStudyView : SCUBasicInfo
|
||||||
|
|
|
@ -47,6 +47,7 @@ using FellowOakDicom.Network;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using DocumentFormat.OpenXml.Wordprocessing;
|
using DocumentFormat.OpenXml.Wordprocessing;
|
||||||
using System;
|
using System;
|
||||||
|
using Amazon.Runtime.Internal.Transform;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
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.PatientBirthDate, inQuery.PatientBirthDate.IsNullOrEmpty() ? "" : inQuery.PatientBirthDate);
|
||||||
//检查号 设备类型
|
//检查号 设备类型
|
||||||
request.Dataset.AddOrUpdate(DicomTag.StudyID, inQuery.StudyID.IsNullOrEmpty() ? "" : inQuery.StudyID);
|
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);
|
request.Dataset.AddOrUpdate(DicomTag.ModalitiesInStudy, inQuery.ModalitiesInStudy.IsNullOrEmpty() ? "" : inQuery.ModalitiesInStudy);
|
||||||
|
|
||||||
|
@ -2904,6 +2906,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取 检查列表
|
/// 获取 检查列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -2950,6 +2955,7 @@ namespace IRaCIS.Application.Services
|
||||||
PatientSex = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientSex, ""),
|
PatientSex = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientSex, ""),
|
||||||
PatientBirthDate = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientBirthDate, ""),
|
PatientBirthDate = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientBirthDate, ""),
|
||||||
StudyID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyID, ""),
|
StudyID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyID, ""),
|
||||||
|
AccessionNumber = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.AccessionNumber, ""),
|
||||||
ModalitiesInStudy = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.ModalitiesInStudy, ""),
|
ModalitiesInStudy = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.ModalitiesInStudy, ""),
|
||||||
StudyDate = datePart.ToString(),
|
StudyDate = datePart.ToString(),
|
||||||
StudyTime = timePart.ToString("HH:mm:ss"),
|
StudyTime = timePart.ToString("HH:mm:ss"),
|
||||||
|
@ -2968,6 +2974,26 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 批量验证Cmove 检查在系统存在与否
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inCommand"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Dictionary<string, bool>> CMoveVerify(SCUCmoveCommand inCommand)
|
||||||
|
{
|
||||||
|
var existStudyIdList = _studyRepository.Where(t => inCommand.StudyInstanceUIDList.Contains(t.StudyInstanceUid)).Select(t => t.StudyInstanceUid).ToList();
|
||||||
|
|
||||||
|
var dic = new Dictionary<string, bool>();
|
||||||
|
foreach (var item in inCommand.StudyInstanceUIDList)
|
||||||
|
{
|
||||||
|
dic.Add(item, existStudyIdList.Any(t => t == item));
|
||||||
|
}
|
||||||
|
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 拉取影像
|
/// 拉取影像
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -2976,14 +3002,6 @@ namespace IRaCIS.Application.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> CmoveStudyList(SCUCmoveCommand inCommand, [FromServices] IRepository<DicomAE> _dicomAEReposiotry)
|
public async Task<IResponseOutput> CmoveStudyList(SCUCmoveCommand inCommand, [FromServices] IRepository<DicomAE> _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<SCUStudyView>();
|
var result = new List<SCUStudyView>();
|
||||||
|
|
||||||
|
@ -2993,24 +3011,30 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (hirServer == null)
|
if (hirServer == null)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("未找到服务端AE配置,请核查后再拉取");
|
//"未找到服务端AE配置,请核查后再拉取"
|
||||||
|
return ResponseOutput.NotOk(_localizer["Patient_NoPacsAE"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (find != null)
|
if (find != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
var client = DicomClientFactory.Create(find.IP, find.Port, false, "HIRSCUAE", find.CalledAE);
|
await Task.Run(async () =>
|
||||||
client.NegotiateAsyncOps();
|
|
||||||
|
|
||||||
var cmoveRequestList = new List<DicomCMoveRequest>();
|
|
||||||
|
|
||||||
foreach (var item in inCommand.StudyIDList)
|
|
||||||
{
|
{
|
||||||
cmoveRequestList.Add(new DicomCMoveRequest(hirServer.CalledAE, item));
|
|
||||||
}
|
|
||||||
|
|
||||||
await client.AddRequestsAsync(cmoveRequestList);
|
var client = DicomClientFactory.Create(find.IP, find.Port, false, "HIRSCUAE", find.CalledAE);
|
||||||
await client.SendAsync();
|
client.NegotiateAsyncOps();
|
||||||
|
|
||||||
|
var cmoveRequestList = new List<DicomCMoveRequest>();
|
||||||
|
|
||||||
|
foreach (var item in inCommand.StudyInstanceUIDList)
|
||||||
|
{
|
||||||
|
cmoveRequestList.Add(new DicomCMoveRequest(hirServer.CalledAE, item));
|
||||||
|
}
|
||||||
|
|
||||||
|
await client.AddRequestsAsync(cmoveRequestList);
|
||||||
|
await client.SendAsync();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
Loading…
Reference in New Issue