修改
This commit is contained in:
+21
-1
@@ -90,7 +90,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<GetJudgeReadingInfoOutDto> GetJudgeReadingInfo(GetJudgeReadingInfo inDto)
|
||||
{
|
||||
var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var visitTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
|
||||
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTask.TrialReadingCriterionId).Select(x => x.CriterionType).FirstNotNullAsync();
|
||||
@@ -397,6 +397,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
break;
|
||||
}
|
||||
|
||||
switch (visitTask.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
case CriterionType.IVUS:
|
||||
case CriterionType.OCT:
|
||||
|
||||
judgeInfo.VisitInfoList.ForEach(x =>
|
||||
{
|
||||
var maxNum = x.VisitTaskInfoList.Select(y => y.JudgeQuestionList.Where(z => z.Answer != "NA").Count()).MaxOrDefault();
|
||||
x.VisitTaskInfoList.ForEach(z =>
|
||||
{
|
||||
z.JudgeQuestionList=z.JudgeQuestionList.Take(maxNum).ToList();
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return judgeInfo;
|
||||
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
else if (calculate.GetDecimalNullFun != null)
|
||||
{
|
||||
var value = await calculate.GetDecimalNullFun(inDto);
|
||||
item.Answer = value == null ? string.Empty : value.Value.ToString();
|
||||
item.Answer = value == null ? "NA" : value.Value.ToString();
|
||||
}
|
||||
else if (calculate.GetStringFun != null)
|
||||
{
|
||||
@@ -943,7 +943,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
public async Task<decimal?> GetPlaque1PVA(ReadingCalculateDto inDto)
|
||||
{
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PAV).SelectMany(x => x.TableRowInfoList).Where(x=>x.TableQuestionList.Any(y=>y.QuestionMark==QuestionMark.PlaqueNumber&&y.Answer.IsNullOrEmptyReturn0()==1)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x=>x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x=>x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturnNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -954,7 +954,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
public async Task<decimal?> GetPlaque2PVA(ReadingCalculateDto inDto)
|
||||
{
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PAV).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer.IsNullOrEmptyReturn0() == 2)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturnNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -965,7 +965,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
public async Task<decimal?> GetPlaque3PVA(ReadingCalculateDto inDto)
|
||||
{
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PAV).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer.IsNullOrEmptyReturn0() == 3)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturnNull();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -815,7 +815,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
else if (calculate.GetDecimalNullFun != null)
|
||||
{
|
||||
var value = await calculate.GetDecimalNullFun(inDto);
|
||||
item.Answer = value == null ? string.Empty : value.Value.ToString();
|
||||
item.Answer = value == null ? "NA" : value.Value.ToString();
|
||||
}
|
||||
else if (calculate.GetStringFun != null)
|
||||
{
|
||||
@@ -1062,7 +1062,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
public async Task<decimal?> GetPlaque1MinFCT(ReadingCalculateDto inDto)
|
||||
{
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PatchDataStatistics).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer.IsNullOrEmptyReturn0() == 1)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.MiniMumFCT).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
.Where(x => x.QuestionMark == QuestionMark.MiniMumFCT).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturnNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1073,7 +1073,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
public async Task<decimal?> GetPlaque2MinFCT(ReadingCalculateDto inDto)
|
||||
{
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PatchDataStatistics).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer.IsNullOrEmptyReturn0() == 2)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.MiniMumFCT).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
.Where(x => x.QuestionMark == QuestionMark.MiniMumFCT).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturnNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1084,7 +1084,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
public async Task<decimal?> GetPlaque3MinFCT(ReadingCalculateDto inDto)
|
||||
{
|
||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.PatchDataStatistics).SelectMany(x => x.TableRowInfoList).Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.PlaqueNumber && y.Answer.IsNullOrEmptyReturn0() == 3)).SelectMany(x => x.TableQuestionList)
|
||||
.Where(x => x.QuestionMark == QuestionMark.MiniMumFCT).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0();
|
||||
.Where(x => x.QuestionMark == QuestionMark.MiniMumFCT).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturnNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user