This commit is contained in:
he
2024-09-26 15:03:01 +08:00
parent ea48967492
commit 3d6d64175b
5 changed files with 70 additions and 9 deletions
@@ -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>