diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 8acab0990..df34261c8 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1364,13 +1364,6 @@
-
-
- 保存脾尖或者脾底进行计算
-
-
-
-
获取阅片的计算数据
@@ -1786,6 +1779,13 @@
+
+
+ 获取是否是最大suvmax 病灶
+
+
+
+
测试计算
@@ -2074,13 +2074,6 @@
-
-
- 保存脾尖或者脾底进行计算
-
-
-
-
获取脾脏状态
@@ -12228,7 +12221,7 @@
- 同步项目标准字典信息
+ 同步项目标准所有信息
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
index 3a6f6edcd..1fb100478 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
@@ -11,7 +11,18 @@ using System.Reflection.Metadata.Ecma335;
namespace IRaCIS.Core.Application.Service.Reading.Dto
{
- public class GetPPDInfoInDto
+ public class GetIsSuvMaxLesionInDto
+ {
+ public Guid VisitTaskId { get; set; }
+ public Guid RowId { get; set; }
+ }
+
+ public class GetIsSuvMaxLesionOutDto
+ {
+ public bool IsSuvMaxLesion { get; set; }
+ }
+
+ public class GetPPDInfoInDto
{
public Guid VisitTaskId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/Interface/ILuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/Interface/ILuganoCalculateService.cs
index a5b030976..81624907a 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/Interface/ILuganoCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/Interface/ILuganoCalculateService.cs
@@ -22,12 +22,5 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate.Interface
///
///
Task CalculateMergeTargetLesionStatus(CalculateTargetLesionStatusInDto inDto);
-
- ///
- /// 保存脾尖或者脾底进行计算
- ///
- ///
- ///
- Task SaveSplenicCalculate(Guid visitTaskId);
}
}
diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs
index 921d1f8a8..e86ab2094 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs
@@ -398,13 +398,39 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}
#endregion
+
///
- /// 测试计算
+ /// 获取是否是最大suvmax 病灶
///
- ///
- ///
+ ///
///
- [HttpPost]
+ public async Task GetIsSuvMaxLesion(GetIsSuvMaxLesionInDto inDto)
+ {
+ ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
+
+ var maxSuv = await GetSuvMax(readingData);
+
+ var rowInfo = readingData.QuestionInfo.SelectMany(x => x.TableRowInfoList).ToList();
+ var tableQuestions = rowInfo.SelectMany(x => x.TableQuestionList).Where(x=>x.RowId==inDto.RowId).ToList();
+
+ var lesionMaxSuv = tableQuestions.Where(x => x.QuestionMark == QuestionMark.SUVmax).Select(x => x.Answer.IsNullOrEmptyReturn0()).MaxOrDefault();
+
+
+ return new GetIsSuvMaxLesionOutDto()
+ {
+ IsSuvMaxLesion = maxSuv == lesionMaxSuv
+ };
+
+
+ }
+
+ ///
+ /// 测试计算
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
public async Task TestCalculate(Guid visitTaskId, QuestionType type)
{
ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(visitTaskId);
@@ -2178,87 +2204,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}
#endregion
- ///
- /// 保存脾尖或者脾底进行计算
- ///
- ///
- ///
- public async Task SaveSplenicCalculate(Guid visitTaskId)
- {
- var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
-
- List questionTypes = new List
- {
- QuestionType.SplenicTopPosition,
- QuestionType.SplenicBottomPosition,
- QuestionType.SpleenLength,
- QuestionType.SplenicStatus,
-
- };
- var questionlist = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId &&
- questionTypes.Contains(x.QuestionType)).ToListAsync();
-
- var splenicTopQuestionId = questionlist.Where(x => x.QuestionType == QuestionType.SplenicTopPosition).Select(x => x.Id).FirstOrDefault();
- var splenicBottomQuestionId = questionlist.Where(x => x.QuestionType == QuestionType.SplenicBottomPosition).Select(x => x.Id).FirstOrDefault();
-
- decimal? spleenLength = null;
- string? splenicState = null;
-
- // 脾尖答案
- var splenicTopAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == visitTaskId && x.ReadingQuestionTrialId == splenicTopQuestionId).FirstOrDefaultAsync();
- // 脾底答案
- var splenicBottomAnswer= await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == visitTaskId && x.ReadingQuestionTrialId == splenicBottomQuestionId).FirstOrDefaultAsync();
-
- if (splenicTopAnswer != null && splenicBottomAnswer != null)
- {
- spleenLength = splenicTopAnswer.Answer.IsNullOrEmptyReturn0() - splenicBottomAnswer.Answer.IsNullOrEmptyReturn0();
- if(spleenLength<0)
- {
- spleenLength = 0 - spleenLength;
- }
- splenicState =await GetSplenicState(visitTaskId, spleenLength.Value);
- }
-
- //脾脏垂直径Id
- var spleenVerticalDiameterQuestionId = questionlist.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Id).FirstOrDefault();
- // 脾脏状态Id
- var splenicStatusQuestionId = questionlist.Where(x => x.QuestionType == QuestionType.SplenicStatus).Select(x => x.Id).FirstOrDefault();
-
- List readingTaskQuestionAnswers = new List();
- if (spleenLength != null)
- {
- readingTaskQuestionAnswers.Add(new ReadingTaskQuestionAnswer()
- {
- Answer = spleenLength.Value.ToString(),
- ReadingQuestionTrialId = spleenVerticalDiameterQuestionId,
- VisitTaskId = visitTaskId,
- SubjectId = taskinfo.SubjectId,
- TrialId = taskinfo.TrialId,
- ReadingQuestionCriterionTrialId = taskinfo.TrialReadingCriterionId,
-
- });
- }
- if (splenicState != null)
- {
- readingTaskQuestionAnswers.Add(new ReadingTaskQuestionAnswer()
- {
- Answer = splenicState.ToString(),
- ReadingQuestionTrialId = splenicStatusQuestionId,
- VisitTaskId = visitTaskId,
- SubjectId = taskinfo.SubjectId,
- TrialId = taskinfo.TrialId,
- ReadingQuestionCriterionTrialId = taskinfo.TrialReadingCriterionId,
-
- });
- }
-
- await _readingTaskQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == visitTaskId && (x.ReadingQuestionTrialId == spleenVerticalDiameterQuestionId || x.ReadingQuestionTrialId == splenicStatusQuestionId));
- await _readingTaskQuestionAnswerRepository.AddRangeAsync(readingTaskQuestionAnswers);
- await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
-
-
- }
-
#region 获取脾脏状态
///
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs
index a1b3bbd29..01c2b297d 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs
@@ -216,7 +216,7 @@ namespace IRaCIS.Core.Application
///
- /// 同步项目标准字典信息
+ /// 同步项目标准所有信息
///
///
///