IRC_NewDev
he 2024-04-12 15:42:49 +08:00
parent ed6a6fb844
commit 4cedb9dbcb
1 changed files with 27 additions and 1 deletions

View File

@ -2616,7 +2616,33 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns>
public async Task<string> GetPET5PSRemark(ReadingCalculateDto inDto)
{
return string.Empty;
List<QuestionType?> needSearchTypes = new List<QuestionType?>()
{
QuestionType.PET5PS,
QuestionType.PSScoreRemarks,
};
var dataBaseDataList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && needSearchTypes.Contains(x.ReadingQuestionTrial.QuestionType)).Select(x => new
{
x.Answer,
x.ReadingQuestionTrial.QuestionType
}).ToListAsync(); ;
// 数据库中最大SUVmax
var pET5PS = dataBaseDataList.Where(x => x.QuestionType == QuestionType.PET5PS).Select(x => x.Answer).FirstIsNullReturnEmpty();
// 如果SUVmax没变 就不重新计算
if (pET5PS == (await GetPET5PS(inDto)).ToString())
{
return dataBaseDataList.Where(x => x.QuestionType == QuestionType.PSScoreRemarks).Select(x => x.Answer).FirstIsNullReturnEmpty();
}
else
{
return string.Empty;
}
}
#endregion