多模态修改
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2024-12-20 11:05:33 +08:00
parent c267bb34b4
commit f7c17546da
6 changed files with 18700 additions and 20 deletions

View File

@ -20,6 +20,8 @@ namespace IRaCIS.Application.Contracts
public string? StudyID { get; set; }
public string? Modality { get; set; }
public List<string>? ModalitiesInStudyList { get; set; }
public string? AccessionNumber { get; set; }

View File

@ -48,6 +48,7 @@ using DocumentFormat.OpenXml.Wordprocessing;
using System;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
using DocumentFormat.OpenXml.Vml.Office;
using IRaCIS.Core.Infra.EFCore.Migrations;
namespace IRaCIS.Application.Services
@ -2876,6 +2877,7 @@ namespace IRaCIS.Application.Services
request.Dataset.AddOrUpdate(DicomTag.StudyID, inQuery.StudyID.IsNullOrEmpty() ? "" : inQuery.StudyID);
request.Dataset.AddOrUpdate(DicomTag.AccessionNumber, inQuery.StudyID.IsNullOrEmpty() ? "" : inQuery.AccessionNumber);
request.Dataset.AddOrUpdate(DicomTag.Modality, "");
request.Dataset.AddOrUpdate(DicomTag.ModalitiesInStudy, modality);
request.Dataset.AddOrUpdate(DicomTag.StudyDate, inQuery.StudyDate.IsNullOrEmpty() ? "" : inQuery.StudyDate);
@ -3019,6 +3021,7 @@ namespace IRaCIS.Application.Services
StudyID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyID, ""),
AccessionNumber = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.AccessionNumber, ""),
ModalitiesInStudy = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.ModalitiesInStudy, ""),
Modality = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.Modality, ""),
StudyDate = datePart.ToString("yyyy-MM-dd"),
StudyTime = timePart.ToString("HH:mm:ss"),
BodyPartExamined = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.BodyPartExamined, ""),
@ -3046,7 +3049,7 @@ namespace IRaCIS.Application.Services
//看当前前端有没有传递modality有的话以前端为准没有的话以配置为准 构造同样数量的请求
var requestModalityList = (inQuery.ModalitiesInStudyList != null && inQuery.ModalitiesInStudyList.Count > 0) ? inQuery.ModalitiesInStudyList : find.ModalityList;
if (find.IsSupportMutiModality || requestModalityList.Count == 0)
//if (find.IsSupportMutiModality || requestModalityList.Count > 0)
{
var modality = string.Join($"\\", requestModalityList);
@ -3056,22 +3059,15 @@ namespace IRaCIS.Application.Services
await client.AddRequestAsync(request);
}
else
{
//else
//{
var requestList = new List<DicomCFindRequest>();
// var request = CreateStudyRequest(inQuery, modality);
foreach (var modality in requestModalityList)
{
var request = CreateStudyRequest(inQuery, modality);
// request.OnResponseReceived += responseDelegate;
request.OnResponseReceived += responseDelegate;
requestList.Add(request);
}
await client.AddRequestsAsync(requestList);
}
// await client.AddRequestAsync(request);
//}

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 RemoveModality : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsSupportMutiModality",
table: "DicomAE");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsSupportMutiModality",
table: "DicomAE",
type: "bit",
nullable: false,
defaultValue: false,
comment: "是否支持多模态查询");
}
}
}

View File

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