Test_IRC_Net8
parent
b629b2eec4
commit
0030eac22e
|
|
@ -352,7 +352,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.ExistPET,GetStringFun=GetExistPET ,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, } },
|
new ReadingCalculateData (){QuestionType=QuestionType.ExistPET,GetStringFun=GetExistPET ,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, } },
|
||||||
|
|
||||||
//垂直径乘积之和(SPD)
|
//垂直径乘积之和(SPD)
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.SPD,GetDecimalFun=GetSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
new ReadingCalculateData (){QuestionType=QuestionType.SPD,GetStringFun=GetSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
||||||
|
|
||||||
// 与基线相比SPD变化的百分比
|
// 与基线相比SPD变化的百分比
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.SPDChange,GetStringFun=CompareBaselineSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
new ReadingCalculateData (){QuestionType=QuestionType.SPDChange,GetStringFun=CompareBaselineSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
||||||
|
|
@ -1861,15 +1861,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<decimal> GetSPD(ReadingCalculateDto inDto)
|
public async Task<string> GetSPD(ReadingCalculateDto inDto)
|
||||||
{
|
{
|
||||||
decimal result = 0;
|
|
||||||
var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList();
|
var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList();
|
||||||
|
|
||||||
var tableQuestionList = rowInfo.SelectMany(x => x.TableQuestionList).ToList();
|
var tableQuestionList = rowInfo.SelectMany(x => x.TableQuestionList).ToList();
|
||||||
|
if (inDto.IsBaseLine && tableQuestionList.Where(x => x.QuestionMark == QuestionMark.PPD).Count() == 0)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
decimal result = 0;
|
||||||
result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.PPD).Sum(x => x.Answer.IsNullOrEmptyReturn0());
|
result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.PPD).Sum(x => x.Answer.IsNullOrEmptyReturn0());
|
||||||
return result;
|
return result.ToString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.ExistPET,GetStringFun=GetExistPET ,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, } },
|
new ReadingCalculateData (){QuestionType=QuestionType.ExistPET,GetStringFun=GetExistPET ,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, } },
|
||||||
|
|
||||||
//垂直径乘积之和(SPD)
|
//垂直径乘积之和(SPD)
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.SPD,GetDecimalFun=GetSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
new ReadingCalculateData (){QuestionType=QuestionType.SPD,GetStringFun=GetSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
||||||
|
|
||||||
// 与基线相比SPD变化的百分比
|
// 与基线相比SPD变化的百分比
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.SPDChange,GetStringFun=CompareBaselineSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
new ReadingCalculateData (){QuestionType=QuestionType.SPDChange,GetStringFun=CompareBaselineSPD,ComputationTriggerList=new List<ComputationTrigger>(){ ComputationTrigger.InitialCalculation, ComputationTrigger.CTSave,ComputationTrigger.RemoveLesion,}},
|
||||||
|
|
@ -1861,15 +1861,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<decimal> GetSPD(ReadingCalculateDto inDto)
|
public async Task<string> GetSPD(ReadingCalculateDto inDto)
|
||||||
{
|
{
|
||||||
decimal result = 0;
|
|
||||||
var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList();
|
var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList();
|
||||||
|
|
||||||
var tableQuestionList = rowInfo.SelectMany(x => x.TableQuestionList).ToList();
|
var tableQuestionList = rowInfo.SelectMany(x => x.TableQuestionList).ToList();
|
||||||
|
if (inDto.IsBaseLine && tableQuestionList.Where(x => x.QuestionMark == QuestionMark.PPD).Count() == 0)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
decimal result = 0;
|
||||||
result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.PPD).Sum(x => x.Answer.IsNullOrEmptyReturn0());
|
result = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.PPD).Sum(x => x.Answer.IsNullOrEmptyReturn0());
|
||||||
return result;
|
return result.ToString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue