Uat_Study
parent
8924117833
commit
bf29219da0
|
@ -534,7 +534,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}
|
||||
break;
|
||||
case QuestionType.NewBoneLesionsCount:
|
||||
|
||||
|
||||
item.Answer = (await calculate.GetIntFun(inDto)).ToString();
|
||||
|
||||
if (item.Answer=="-1")
|
||||
{
|
||||
item.Answer = nameof(YesOrNoOrNa.NA);
|
||||
}
|
||||
break;
|
||||
case QuestionType.DaysBetween:
|
||||
item.Answer = (await calculate.GetIntFun(inDto)).ToString();
|
||||
|
@ -668,26 +675,31 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
|
||||
var taskList = await GetSiteVisitForTumorList(inDto);
|
||||
|
||||
var result = 0;
|
||||
var findindex = taskList.OrderBy(x => x.VisitTaskNum).ToList().FindIndex(x => x.VisitTaskId == inDto.VisitTaskId);
|
||||
var lastCount = 0;
|
||||
|
||||
|
||||
if (findindex < 2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (findindex > 2)
|
||||
else
|
||||
{
|
||||
var lastTask = taskList.Where(x => x.VisitTaskNum < inDto.VisitTaskNum && x.VisitTaskId != inDto.VisitTaskId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
var cewBoneLesionsCountQuestionId = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.NewBoneLesionsCount).Select(x => x.QuestionId).FirstOrDefault();
|
||||
lastCount =(int) (await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == lastTask.VisitTaskId && x.ReadingQuestionTrialId == cewBoneLesionsCountQuestionId).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
|
||||
}
|
||||
|
||||
var result= inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewLesions).SelectMany(x => x.TableRowInfoList)
|
||||
var twoindex = taskList.OrderBy(x => x.VisitTaskNum).ToList()[2];
|
||||
|
||||
|
||||
result = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.AlwaysNewLesions).SelectMany(x => x.TableRowInfoList)
|
||||
.Where(x => x.FristAddTaskNum >= twoindex.VisitTaskNum && x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.State && y.Answer == EvaluationOfState.Exists.GetEnumInt())).Count()
|
||||
|
||||
+ inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewLesions).SelectMany(x => x.TableRowInfoList)
|
||||
.Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.State && y.Answer == EvaluationOfState.Exists.GetEnumInt()))
|
||||
.Count();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return lastCount+ result;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue