|
@@ -41,6 +41,7 @@ using WingInterfaceLibrary.Request.DBCopy;
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
using System.Runtime.CompilerServices;
|
|
|
using WingInterfaceLibrary.DTO.Common;
|
|
|
+using WingInterfaceLibrary.Request.User;
|
|
|
|
|
|
namespace WingAIDiagnosisService.Service
|
|
|
{
|
|
@@ -157,10 +158,12 @@ namespace WingAIDiagnosisService.Service
|
|
|
{
|
|
|
InitAISystem();
|
|
|
}
|
|
|
+ var isCaroid = false;
|
|
|
using (var imageData = new VinnoImageData(localFile, OperationMode.Open))
|
|
|
{
|
|
|
var resultData = new DiagnosisImageResult();
|
|
|
- if (DiagnosisHelper.IsCarotid(imageData))
|
|
|
+ isCaroid = DiagnosisHelper.IsCarotid(imageData);
|
|
|
+ if (isCaroid)
|
|
|
{
|
|
|
if (_isCarotidOn)
|
|
|
{
|
|
@@ -193,6 +196,25 @@ namespace WingAIDiagnosisService.Service
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
+ if (isCaroid)
|
|
|
+ {
|
|
|
+ var carotidCount = diagnosisPerImages.Count(x => x.DiagResultsForEachOrgan.Any(x => x.Organ == DiagnosisOrganEnum.CarotidArtery));
|
|
|
+ var throidCount = diagnosisPerImages.Count(x => x.DiagResultsForEachOrgan.Any(x => x.Organ == DiagnosisOrganEnum.Thyroid));
|
|
|
+ if (carotidCount > throidCount)
|
|
|
+ {
|
|
|
+ foreach (var item in diagnosisPerImages)
|
|
|
+ {
|
|
|
+ item.DiagResultsForEachOrgan = item.DiagResultsForEachOrgan?.Where(x => x.Organ == DiagnosisOrganEnum.CarotidArtery)?.ToList() ?? new List<Manage.AIDiagnosisResultPerOrgan>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ foreach (var item in diagnosisPerImages)
|
|
|
+ {
|
|
|
+ item.DiagResultsForEachOrgan = item.DiagResultsForEachOrgan?.Where(x => x.Organ == DiagnosisOrganEnum.Thyroid)?.ToList() ?? new List<Manage.AIDiagnosisResultPerOrgan>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
await AddDiagnosisResultInfosAsync(relationCode, fileUrl, diagnosisPerImages);
|
|
|
//轮廓线分隔处理
|
|
|
diagnosisPerImages = results.Select(x => new AIDiagnosisPerImageModel(x.Key, x.Value, _contourInterval)).ToList();
|
|
@@ -665,10 +687,10 @@ namespace WingAIDiagnosisService.Service
|
|
|
// reportItems.Add(new DataItemDTO { Key = "ec4c775e-601c-48cc-a1a9-f39c8629e3f7;9918912e-b702-4a2b-8b4f-61dcfb846be3;RightConclusion", Value = FormatterPlaceholder2($"NoPlaque2") });
|
|
|
reportItems.Add(new DataItemDTO { Key = "ec4c775e-601c-48cc-a1a9-f39c8629e3f7;9918912e-b702-4a2b-8b4f-61dcfb846be3;RightConclusion", Value = "" });
|
|
|
reportItems.Add(new DataItemDTO { Key = "8e467ffb-da00-4d34-9aac-34e4e8f91844;46166cb6-ad3a-4ca2-821e-bd872137fa64;RightPlaqueThick", Value = "" });
|
|
|
- reportItems.Add(new DataItemDTO { Key = "1153870e-10c8-4674-99bf-108937db1060;053091d2-8ea0-4fcb-a222-00b46f60d12f;RightPlaquePosition", Value = "" });
|
|
|
- reportItems.Add(new DataItemDTO { Key = "c82e8655-169f-42be-ac99-5e7a56329924;e77f550d-37f3-492a-98dd-a981535383a5;RightPlaqueEcho", Value = "" });
|
|
|
- reportItems.Add(new DataItemDTO { Key = "b0092e8a-25ba-4690-b70f-e3525e6aaa39;2e742ddc-fa90-47bb-ac24-664238773b30;RightStenosisRate", Value = "" });
|
|
|
- reportItems.Add(new DataItemDTO { Key = "8c7543e9-95f2-4862-b2aa-4c4cb032948e;9f8e95ee-a262-41c2-9d4b-efbc7974b397;RightCarotidAD", Value = "" });
|
|
|
+ reportItems.Add(new DataItemDTO { Key = "1153870e-10c8-4674-99bf-108937db1060;053091d2-8ea0-4fcb-a222-00b46f60d12f;RightPlaquePosition", Value = "" });
|
|
|
+ reportItems.Add(new DataItemDTO { Key = "c82e8655-169f-42be-ac99-5e7a56329924;e77f550d-37f3-492a-98dd-a981535383a5;RightPlaqueEcho", Value = "" });
|
|
|
+ reportItems.Add(new DataItemDTO { Key = "b0092e8a-25ba-4690-b70f-e3525e6aaa39;2e742ddc-fa90-47bb-ac24-664238773b30;RightStenosisRate", Value = "" });
|
|
|
+ reportItems.Add(new DataItemDTO { Key = "8c7543e9-95f2-4862-b2aa-4c4cb032948e;9f8e95ee-a262-41c2-9d4b-efbc7974b397;RightCarotidAD", Value = "" });
|
|
|
}
|
|
|
return reportItems;
|
|
|
}
|