tj cmove 检查
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
65369c73bf
commit
a91705b35d
|
@ -17998,6 +17998,16 @@
|
|||
数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.TJCmoveStudyCommand.StudyInstanceUIDList">
|
||||
<summary>
|
||||
C-move 检查 数组
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.TJCmoveStudyCommand.CalledAE">
|
||||
<summary>
|
||||
PacsAE 的名字
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Application.Contracts.WorkLoadDetailDTO">
|
||||
<summary>
|
||||
后台 工作量审核视图模型
|
||||
|
@ -18539,14 +18549,18 @@
|
|||
<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},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SCPInstance},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption})">
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.CmoveStudyList(IRaCIS.Application.Contracts.SCUCmoveCommand)">
|
||||
<summary>
|
||||
拉取影像
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<param name="_dicomAEReposiotry"></param>
|
||||
<param name="_scpInstanceRepository"></param>
|
||||
<param name="_basicSystemConfigConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.TjCmoveStudy(IRaCIS.Application.Contracts.TJCmoveStudyCommand)">
|
||||
<summary>
|
||||
同济医院 第三方系统 发送命令拉取影像
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
|
|
|
@ -648,40 +648,40 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
//本地测试地址接口
|
||||
|
||||
//var apiUrl = "http://192.168.40.88:8080/dock/userinfo";
|
||||
//var headers = new Dictionary<string, string>
|
||||
//{
|
||||
// { "Content-Type", "application/json" } // 根据需要添加其他头部信息
|
||||
//};
|
||||
var apiUrl = "http://192.168.40.88:8080/dock/userinfo";
|
||||
var headers = new Dictionary<string, string>
|
||||
{
|
||||
{ "Content-Type", "application/json" } // 根据需要添加其他头部信息
|
||||
};
|
||||
|
||||
//var requestData = new
|
||||
//{
|
||||
// token = token,
|
||||
// appId = "third-hirs",
|
||||
//};
|
||||
var requestData = new
|
||||
{
|
||||
token = token,
|
||||
appId = "third-hirs",
|
||||
};
|
||||
|
||||
//var tjUserInfo = await RestClientAPI.PostAsync<TJUserInfoDto>(apiUrl, requestData, headers);
|
||||
var tjUserInfo = await RestClientAPI.PostAsync<TJUserInfoDto>(apiUrl, requestData, headers);
|
||||
#endregion
|
||||
|
||||
#region 测试数据
|
||||
|
||||
var tjUserInfo = new TJUserInfoDto
|
||||
{
|
||||
Code = "200",
|
||||
Msg = "操作成功",
|
||||
Success = true,
|
||||
Data = new TJUserInfoData
|
||||
{
|
||||
UserCode = "YS10138",
|
||||
UserName = "胡学梅",
|
||||
DeptCode = "2121",
|
||||
Sex = "未知",
|
||||
Birthday = "",
|
||||
Title = "",
|
||||
UserType = "doctor",
|
||||
Roles = new List<string> { "pm", "crc" }
|
||||
}
|
||||
};
|
||||
//var tjUserInfo = new TJUserInfoDto
|
||||
//{
|
||||
// Code = "200",
|
||||
// Msg = "操作成功",
|
||||
// Success = true,
|
||||
// Data = new TJUserInfoData
|
||||
// {
|
||||
// UserCode = "YS10138",
|
||||
// UserName = "胡学梅",
|
||||
// DeptCode = "2121",
|
||||
// Sex = "未知",
|
||||
// Birthday = "",
|
||||
// Title = "",
|
||||
// UserType = "doctor",
|
||||
// Roles = new List<string> { "pm", "crc" }
|
||||
// }
|
||||
//};
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -61,4 +61,19 @@ namespace IRaCIS.Application.Contracts
|
|||
public string? ModalitiesInStudy { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TJCmoveStudyCommand
|
||||
{
|
||||
public string Token { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// C-move 检查 数组
|
||||
/// </summary>
|
||||
public List<string> StudyInstanceUIDList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///PacsAE 的名字
|
||||
/// </summary>
|
||||
public string CalledAE { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ using IRaCIS.Core.Infra.EFCore.Migrations;
|
|||
using System.Dynamic;
|
||||
using System.Threading.Channels;
|
||||
using NPOI.HSSF.Record.Chart;
|
||||
using IRaCIS.Core.Application.Helper.OtherTool;
|
||||
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
|
@ -68,6 +69,9 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<SCPImageUpload> _SCPImageUploadRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<HIRHospital> _hIRHospitalRepository,
|
||||
IRepository<DicomAE> _dicomAEReposiotry,
|
||||
IRepository<SCPInstance> _scpInstanceRepository,
|
||||
IOptionsMonitor<ServiceVerifyConfigOption> _basicSystemConfigConfig,
|
||||
ILogger<PatientService> _logger,
|
||||
IDistributedLockProvider _distributedLockProvider, IMapper _mapper, IUserInfo _userInfo, IWebHostEnvironment _hostEnvironment, IStringLocalizer _localizer, IFusionCache _fusionCache
|
||||
|
||||
|
@ -385,7 +389,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var query = _hIRHospitalRepository.Where(t => t.IsDefault == true).ProjectTo<HIRHospitalView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var hospitalInfo= await query.FirstNotNullAsync();
|
||||
var hospitalInfo = await query.FirstNotNullAsync();
|
||||
|
||||
var trialInfo = _trialRepository.Where(t => t.Id == trialId, ignoreQueryFilters: true).FirstOrDefault();
|
||||
|
||||
|
@ -3308,14 +3312,8 @@ namespace IRaCIS.Application.Services
|
|||
/// 拉取影像
|
||||
/// </summary>
|
||||
/// <param name="inCommand"></param>
|
||||
/// <param name="_dicomAEReposiotry"></param>
|
||||
/// <param name="_scpInstanceRepository"></param>
|
||||
/// <param name="_basicSystemConfigConfig"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> CmoveStudyList(SCUCmoveCommand inCommand,
|
||||
[FromServices] IRepository<DicomAE> _dicomAEReposiotry,
|
||||
[FromServices] IRepository<SCPInstance> _scpInstanceRepository,
|
||||
[FromServices] IOptionsMonitor<ServiceVerifyConfigOption> _basicSystemConfigConfig)
|
||||
public async Task<IResponseOutput> CmoveStudyList(SCUCmoveCommand inCommand)
|
||||
{
|
||||
|
||||
var result = new List<SCUStudyView>();
|
||||
|
@ -3407,7 +3405,57 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 同济医院 第三方系统 发送命令拉取影像
|
||||
/// </summary>
|
||||
/// <param name="inCommand"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> TjCmoveStudy(TJCmoveStudyCommand inCommand)
|
||||
{
|
||||
|
||||
var apiUrl = "http://192.168.40.88:8080/dock/userinfo";
|
||||
var headers = new Dictionary<string, string>
|
||||
{
|
||||
{ "Content-Type", "application/json" } // 根据需要添加其他头部信息
|
||||
};
|
||||
|
||||
var requestData = new
|
||||
{
|
||||
token = inCommand.Token,
|
||||
appId = "third-hirs",
|
||||
};
|
||||
|
||||
var tjUserInfo = await RestClientAPI.PostAsync<TJUserInfoDto>(apiUrl, requestData, headers);
|
||||
|
||||
|
||||
|
||||
if (tjUserInfo != null && tjUserInfo.Data?.Roles != null &&
|
||||
tjUserInfo.Data.Roles.Any(role => string.Equals("PM", role, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
var find = await _dicomAEReposiotry.FirstOrDefaultAsync(t => t.CalledAE == inCommand.CalledAE && t.PacsTypeEnum == PacsType.PacsServer);
|
||||
|
||||
if (find == null)
|
||||
{
|
||||
return ResponseOutput.NotOk($"{inCommand.CalledAE}在系统中未配置,请联系维护人员核查");
|
||||
}
|
||||
else
|
||||
{
|
||||
var cmoveCommand = new SCUCmoveCommand() { PacsDicomAEId = find.Id, StudyInstanceUIDList = inCommand.StudyInstanceUIDList };
|
||||
|
||||
|
||||
return await CmoveStudyList(cmoveCommand);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("未获取到该用户信息或者该用户token 不包含PM 角色");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Reference in New Issue