IRC_NewDev
he 2024-04-25 11:48:11 +08:00
parent 29836a9c62
commit 662648691d
2 changed files with 26 additions and 17 deletions

View File

@ -2686,9 +2686,16 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}
//PET5ps评分改变时才计算
var existPET = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.ExistPET).Select(x => x.Answer).FirstOrDefault();
//本访视无PET图像
if (existPET.EqEnum(ReadingYesOrNo.No))
{
return SUVChangeVSBaseline.NotEvaluable.GetEnumInt();
}
List<QuestionType?> needSearchTypes = new List<QuestionType?>()
//PET5ps评分改变时才计算
List<QuestionType?> needSearchTypes = new List<QuestionType?>()
{
QuestionType.PET5PS,
QuestionType.UptakeChange,
@ -2716,12 +2723,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
return SUVChangeVSBaseline.NA.GetEnumInt();
}
if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.ExistPET && x.Answer == ReadingYesOrNo.No.GetEnumInt()))
{
return SUVChangeVSBaseline.NotEvaluable.GetEnumInt();
}
var result = SUVChangeVSBaseline.NotEvaluable;
var baseLineTaskId = await GetBaseLineTaskId(inDto);
@ -2730,17 +2732,24 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
return string.Empty;
}
var baseLinePET5PS = (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.PET5PS).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
var baseLinePET5PSValue = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.PET5PS).Select(x => x.Answer).FirstOrDefaultAsync();
var existPET = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.ExistPET).Select(x => x.Answer).FirstOrDefault();
//本访视无PET图像
if (existPET.EqEnum(ReadingYesOrNo.No))
{
result = SUVChangeVSBaseline.NotEvaluable;
}
//本访视PET评分>基线PET评分
else if (PET5PS > baseLinePET5PS)
var baseLinePET5PS = baseLinePET5PSValue.IsNullOrEmptyReturn0();
// 基线为NE或者X 为空
if (baseLinePET5PSValue.EqEnum(PET5PSScore.X) || baseLinePET5PSValue.EqEnum(PET5PSScore.NE))
{
return string.Empty;
}
//本访视PET评分>基线PET评分
else if (PET5PS > baseLinePET5PS)
{
result = SUVChangeVSBaseline.Increase;
}