支持多模态查询
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2024-12-20 10:31:59 +08:00
parent 98b0b36e3b
commit c267bb34b4
5 changed files with 18723 additions and 14 deletions

View File

@ -2914,7 +2914,7 @@ namespace IRaCIS.Application.Services
#endregion #endregion
private bool CEchoTest(DicomAE find,string clientAE) private bool CEchoTest(DicomAE find, string clientAE)
{ {
var client = DicomClientFactory.Create(find.IP, find.Port, false, clientAE, find.CalledAE); var client = DicomClientFactory.Create(find.IP, find.Port, false, clientAE, find.CalledAE);
@ -2969,9 +2969,9 @@ namespace IRaCIS.Application.Services
if (find != null) if (find != null)
{ {
//测试失败 //测试失败
if (!CEchoTest(find,hirClient.CalledAE)) if (!CEchoTest(find, hirClient.CalledAE))
{ {
throw new BusinessValidationFailedException(_localizer["Patient_PacsAENotOnline"]); throw new BusinessValidationFailedException(_localizer["Patient_PacsAENotOnline"]);
} }
var @lock = _distributedLockProvider.CreateLock($"CFind"); var @lock = _distributedLockProvider.CreateLock($"CFind");
@ -3044,22 +3044,36 @@ namespace IRaCIS.Application.Services
} }
//看当前前端有没有传递modality有的话以前端为准没有的话以配置为准 构造同样数量的请求 //看当前前端有没有传递modality有的话以前端为准没有的话以配置为准 构造同样数量的请求
var requestModalityList = (inQuery.ModalitiesInStudyList != null && inQuery.ModalitiesInStudyList.Count > 0) ? inQuery.ModalitiesInStudyList : find.ModalityList; var requestModalityList = (inQuery.ModalitiesInStudyList != null && inQuery.ModalitiesInStudyList.Count > 0) ? inQuery.ModalitiesInStudyList : find.ModalityList;
requestModalityList = requestModalityList.Count == 0 ? new List<string>() { "" } : requestModalityList; if (find.IsSupportMutiModality || requestModalityList.Count == 0)
//requestModalityList = new List<string>() { "" };
var requestList = new List<DicomCFindRequest>();
foreach (var modality in requestModalityList)
{ {
var modality = string.Join($"\\", requestModalityList);
var request = CreateStudyRequest(inQuery, modality); var request = CreateStudyRequest(inQuery, modality);
request.OnResponseReceived += responseDelegate; request.OnResponseReceived += responseDelegate;
requestList.Add(request);
await client.AddRequestAsync(request);
}
else
{
var requestList = new List<DicomCFindRequest>();
foreach (var modality in requestModalityList)
{
var request = CreateStudyRequest(inQuery, modality);
request.OnResponseReceived += responseDelegate;
requestList.Add(request);
}
await client.AddRequestsAsync(requestList);
} }
await client.AddRequestsAsync(requestList);
await client.SendAsync(); await client.SendAsync();
@ -3136,7 +3150,7 @@ namespace IRaCIS.Application.Services
{ {
DicomCMoveRequest.ResponseDelegate responseDelegate = (req, response) => DicomCMoveRequest.ResponseDelegate responseDelegate = (req, response) =>
{ {
if(response.Status.State == DicomState.Failure) if (response.Status.State == DicomState.Failure)
{ {
_logger.LogError($" Cmove Pacs 状态返回失败: {response.SOPClassUID.ToJsonNotIgnoreNull()}"); _logger.LogError($" Cmove Pacs 状态返回失败: {response.SOPClassUID.ToJsonNotIgnoreNull()}");
} }

View File

@ -41,7 +41,8 @@ namespace IRaCIS.Core.Domain.Models
public int MaxStudyCount { get; set; } public int MaxStudyCount { get; set; }
[Comment("是否支持多模态查询")]
public bool IsSupportMutiModality { get; set; }
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class AEModality : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsSupportMutiModality",
table: "DicomAE",
type: "bit",
nullable: false,
defaultValue: false,
comment: "是否支持多模态查询");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsSupportMutiModality",
table: "DicomAE");
}
}
}

View File

@ -801,6 +801,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(400) .HasMaxLength(400)
.HasColumnType("nvarchar(400)"); .HasColumnType("nvarchar(400)");
b.Property<bool>("IsSupportMutiModality")
.HasColumnType("bit")
.HasComment("是否支持多模态查询");
b.Property<bool>("IsTestOK") b.Property<bool>("IsTestOK")
.HasColumnType("bit"); .HasColumnType("bit");