Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
he 2025-03-25 15:45:16 +08:00
commit d4b3038f6d
6 changed files with 18835 additions and 13 deletions

View File

@ -58,6 +58,8 @@ namespace IRaCIS.Core.Application.ViewModel
public int PacsSearchMaxDays { get; set; }
public PacsType PacsTypeEnum { get; set; }
public bool IsSupportMutiModality { get; set; }
}

View File

@ -136,11 +136,11 @@ namespace IRaCIS.Application.Services
var exp2 = new EntityVerifyExp<HIRHospital>()
{
VerifyExp = h => h.HospitalCode.Equals(addOrEditHIRHospital.HospitalCode) ||
h.HospitalName.Equals(addOrEditHIRHospital.HospitalName)||
h.HospitalName.Equals(addOrEditHIRHospital.HospitalName) ||
h.HospitalAliasName.Equals(addOrEditHIRHospital.HospitalAliasName),
//医院编码、名称不能重复
VerifyMsg = _localizer["Patient_RepeatHospitalCodeOrName"]
VerifyMsg = _localizer["Patient_RepeatHospitalCodeOrName"]
};
var entity = await _hIRHospitalRepository.InsertOrUpdateAsync(addOrEditHIRHospital, true, exp, exp2);
@ -3078,8 +3078,7 @@ namespace IRaCIS.Application.Services
//看当前前端有没有传递modality有的话以前端为准没有的话以配置为准 构造同样数量的请求
var requestModalityList = (inQuery.ModalitiesInStudyList != null && inQuery.ModalitiesInStudyList.Count > 0) ? inQuery.ModalitiesInStudyList : find.ModalityList;
//支持多模态的Pacs
var modality = string.Join($"\\", requestModalityList);
if (inQuery.TrialId == null)
@ -3095,16 +3094,33 @@ namespace IRaCIS.Application.Services
}
var request = CreateStudyRequest(inQuery, modality);
if (find.IsSupportMutiModality)
{
//支持多模态的Pacs
var modality = string.Join($"\\", requestModalityList);
request.OnResponseReceived += responseDelegate;
var request = CreateStudyRequest(inQuery, modality);
await client.AddRequestAsync(request);
request.OnResponseReceived += responseDelegate;
await client.AddRequestAsync(request);
}
else
{
foreach (var modality in requestModalityList)
{
var cloneInQuery = inQuery.Clone();
var request = CreateStudyRequest(cloneInQuery, modality);
request.OnResponseReceived += responseDelegate;
await client.AddRequestAsync(request);
}
}
await client.SendAsync();
}
else
{
@ -3184,7 +3200,7 @@ namespace IRaCIS.Application.Services
var request = CreateStudyRequest(cloneInQuery, "");
var request = CreateStudyRequest(cloneInQuery, find.IsSupportMutiModality ? string.Join($"\\", requestModalityList) : "");
request.OnResponseReceived += responseDelegate;
await client.AddRequestAsync(request);
@ -3211,6 +3227,11 @@ namespace IRaCIS.Application.Services
result = result.Where(t => t.IsStudyExist == false).ToList();
}
//查询的时候不支持多模态的可以去重一下,支持多模态的本身处理了分组过滤也不影响
result = result.GroupBy(t => t.StudyInstanceUID).Select(g => g.First()).ToList();
}

View File

@ -41,8 +41,8 @@ namespace IRaCIS.Core.Domain.Models
public int MaxStudyCount { get; set; }
//[Comment("是否支持多模态查询")]
//public bool IsSupportMutiModality { 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 addAEModality : 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)
.HasColumnType("nvarchar(400)");
b.Property<bool>("IsSupportMutiModality")
.HasColumnType("bit")
.HasComment("是否支持多模态查询");
b.Property<bool>("IsTestOK")
.HasColumnType("bit");