|
|
@ -799,7 +799,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
|
|
|
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
|
|
|
).Where(x =>
|
|
|
|
).Where(x =>
|
|
|
|
(x.ReadingQuestionTrial.LesionType==LesionType.TargetLesion && x.Answer == TargetState.UnableEvaluate.GetEnumInt())
|
|
|
|
(x.ReadingQuestionTrial.LesionType==LesionType.TargetLesion && x.Answer == TargetState.UnableEvaluate.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewLesions && x.Answer == NewTargetLesionState.NotEvaluable.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewLesions && x.Answer == NewLesionState.UnableEvaluate.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NonTargetLesions && x.Answer == NoTargetState.UnableEvaluate.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NonTargetLesions && x.Answer == NoTargetState.UnableEvaluate.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewTargetLesion && x.Answer == NewTargetLesionState.NotEvaluable.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewTargetLesion && x.Answer == NewTargetLesionState.NotEvaluable.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewNonTargetLesion && x.Answer == NewNoTargetLesionState.NotEvaluable.GetEnumInt())
|
|
|
|
|| (x.ReadingQuestionTrial.LesionType == LesionType.NewNonTargetLesion && x.Answer == NewNoTargetLesionState.NotEvaluable.GetEnumInt())
|
|
|
@ -1674,7 +1674,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 靶病灶疗效为 ICPD
|
|
|
|
/// 靶病灶疗效为 ICPD
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
|
/// else if (本次访视满足RECIST1.1的PD条件 && (比整体访视期间最低点SOD增加≥20 % && 比整体访视期间最低点SOD绝对增加值≥5 mm)|| (前一访视评估为iCR && 当前访视至少有一个“存在”状态的靶病灶))
|
|
|
|
/// else if (本次访视满足RECIST1.1的PD条件 && ((比整体访视期间最低点SOD增加≥20 % && 比整体访视期间最低点SOD绝对增加值≥5 mm)|| (前一访视评估为iCR && 当前访视至少有一个“存在”状态的靶病灶)))
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 靶病灶疗效为 iUPD
|
|
|
|
/// 靶病灶疗效为 iUPD
|
|
|
|
/// } else if (有任一靶病灶为NE状态)
|
|
|
|
/// } else if (有任一靶病灶为NE状态)
|
|
|
@ -1777,8 +1777,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
// 靶病灶疗效为 ICPD
|
|
|
|
// 靶病灶疗效为 ICPD
|
|
|
|
result = TargetAssessment.iCPD;
|
|
|
|
result = TargetAssessment.iCPD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// } else if (本次访视满足RECIST1.1的PD条件 && (比整体访视期间最低点SOD增加≥20 % && 比整体访视期间最低点SOD绝对增加值≥5 mm)|| (前一访视评估为iCR && 当前访视至少有一个“存在”状态的靶病灶))
|
|
|
|
// } else if (本次访视满足RECIST1.1的PD条件 && ((比整体访视期间最低点SOD增加≥20 % && 比整体访视期间最低点SOD绝对增加值≥5 mm)|| (前一访视评估为iCR && 当前访视至少有一个“存在”状态的靶病灶)))
|
|
|
|
else if (resultData.MeetRECISTPD && (resultData.LowSodAddGreaterThan20Percent && resultData.LowSodAddGreaterThan5) || (resultData.LastTaskTarget.EqEnum(TargetAssessment.iCR) && resultData.HaveExistLesion))
|
|
|
|
else if (resultData.MeetRECISTPD && ((resultData.LowSodAddGreaterThan20Percent && resultData.LowSodAddGreaterThan5) || (resultData.LastTaskTarget.EqEnum(TargetAssessment.iCR) && resultData.HaveExistLesion)))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 靶病灶疗效为 iUPD
|
|
|
|
// 靶病灶疗效为 iUPD
|
|
|
|
result = TargetAssessment.iUPD;
|
|
|
|
result = TargetAssessment.iUPD;
|
|
|
@ -1831,7 +1831,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 非靶病灶疗效为 iCPD
|
|
|
|
/// 非靶病灶疗效为 iCPD
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
|
/// else if (任一非靶病灶状态评估为“显著增大(iUPD)”)
|
|
|
|
/// else if (满足RECIST1.1的PD标准 && 任一非靶病灶状态评估为“显著增大(iUPD)”)
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 非靶病灶疗效为 iUPD
|
|
|
|
/// 非靶病灶疗效为 iUPD
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
@ -1917,8 +1917,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
// 非靶病灶疗效为 iCPD
|
|
|
|
// 非靶病灶疗效为 iCPD
|
|
|
|
result = NoTargetAssessment.iCPD;
|
|
|
|
result = NoTargetAssessment.iCPD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// else if ( 任一非靶病灶状态评估为“显著增大(iUPD)”)
|
|
|
|
// else if (满足RECIST1.1的PD标准 && 任一非靶病灶状态评估为“显著增大(iUPD)”)
|
|
|
|
else if ( data.ExistiUPD)
|
|
|
|
else if (data.RECISTPD && data.ExistiUPD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 非靶病灶疗效为 iUPD
|
|
|
|
// 非靶病灶疗效为 iUPD
|
|
|
|
result = NoTargetAssessment.iUPD;
|
|
|
|
result = NoTargetAssessment.iUPD;
|
|
|
@ -2336,7 +2336,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 疗效为 iUPD
|
|
|
|
/// 疗效为 iUPD
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
|
/// else if (新靶病灶、新非靶病灶、其它既往新病灶任一项评估为NE)
|
|
|
|
/// else if (新靶病灶、新非靶病灶、其它既往新病灶,触发iRECIST后新病灶 任一项评估为NE)
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 疗效为 NE
|
|
|
|
/// 疗效为 NE
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
@ -2439,10 +2439,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
// 疗效为 iUPD
|
|
|
|
// 疗效为 iUPD
|
|
|
|
result = NewLesionAssessment.iUPD;
|
|
|
|
result = NewLesionAssessment.iUPD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// else if (新靶病灶、新非靶病灶、其它既往新病灶任一项评估为NE)
|
|
|
|
// else if (新靶病灶、新非靶病灶、其它既往新病灶,触发iRECIST后新病灶 任一项评估为NE)
|
|
|
|
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.NE))
|
|
|
|
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.NE))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.NE))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.NE))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.NE))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.NE))
|
|
|
|
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.IRECISTNewTargetLesion && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.NE))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 疗效为 NE
|
|
|
|
// 疗效为 NE
|
|
|
@ -2547,7 +2548,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 疗效为 iUPD
|
|
|
|
/// 疗效为 iUPD
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
|
/// else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
|
|
|
|
/// else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND)|| (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) || (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 疗效为 iCR
|
|
|
|
/// 疗效为 iCR
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
@ -2555,7 +2556,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 疗效为 iPR
|
|
|
|
/// 疗效为 iPR
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
|
/// else if (靶病灶评估为iCR && 非靶病灶评估为iNN或NE && 新病灶评估为否或疑似或NE)
|
|
|
|
/// else if (靶病灶评估为iCR && 非靶病灶评估为iNN或NE && 新病灶评估为ND或疑似或NE)
|
|
|
|
/// {
|
|
|
|
/// {
|
|
|
|
/// 疗效为 iPR
|
|
|
|
/// 疗效为 iPR
|
|
|
|
/// }
|
|
|
|
/// }
|
|
|
@ -2616,24 +2617,24 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// else if (上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项从前一访视非iUPD结果评估为当前访视iUPD)
|
|
|
|
// else if (上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项从前一访视非iUPD结果评估为当前访视iUPD)
|
|
|
|
if (data.LastTaskLesioniUPDOriCPD
|
|
|
|
else if (data.LastTaskLesioniUPDOriCPD
|
|
|
|
&& (
|
|
|
|
&& (
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && !x.Answer.EqEnum(TargetAssessment.iUPD))
|
|
|
|
|
|
|
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iUPD))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
||
|
|
|
|
(
|
|
|
|
(
|
|
|
|
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && !x.Answer.EqEnum(TargetAssessment.iUPD))
|
|
|
|
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && !x.Answer.EqEnum(NoTargetAssessment.iUPD))
|
|
|
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iUPD))
|
|
|
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iUPD))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
||
|
|
|
|
||
|
|
|
|
(
|
|
|
|
(
|
|
|
|
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && !x.Answer.EqEnum(NoTargetAssessment.iUPD))
|
|
|
|
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && !x.Answer.EqEnum(NewLesionAssessment.iUPD)))
|
|
|
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iUPD))
|
|
|
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.iUPD))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
||
|
|
|
|
)
|
|
|
|
(
|
|
|
|
|
|
|
|
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && !x.Answer.EqEnum(NewLesionAssessment.iUPD)))
|
|
|
|
|
|
|
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.iUPD))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 疗效为 iCPD
|
|
|
|
// 疗效为 iCPD
|
|
|
|
result = OverallAssessment.iCPD;
|
|
|
|
result = OverallAssessment.iCPD;
|
|
|
@ -2647,7 +2648,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
result = OverallAssessment.iUPD;
|
|
|
|
result = OverallAssessment.iUPD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
|
|
|
|
// else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND) || (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) || (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
|
|
|
|
else if (
|
|
|
|
else if (
|
|
|
|
|
|
|
|
|
|
|
|
(inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
|
|
|
|
(inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
|
|
|
@ -2685,7 +2686,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
// 疗效为 iPR
|
|
|
|
// 疗效为 iPR
|
|
|
|
result = OverallAssessment.iPR;
|
|
|
|
result = OverallAssessment.iPR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// else if (靶病灶评估为iCR && 非靶病灶评估为iNN或NE && 新病灶评估为否或疑似或NE)
|
|
|
|
// else if (靶病灶评估为iCR && 非靶病灶评估为iNN或NE && 新病灶评估为ND或疑似或NE)
|
|
|
|
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
|
|
|
|
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
|
|
|
|
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iNN))
|
|
|
|
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iNN))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.NE))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.NE))
|
|
|
@ -2724,7 +2725,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
|
|
|
|
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iNN))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iNN))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.NE))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.NE))
|
|
|
|
|
|
|
|
|
|
|
|
) && (
|
|
|
|
) && (
|
|
|
|
inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
|
|
|
|
inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
|
|
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
|
|
@ -2794,18 +2795,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|
|
|
|
|
|
|
|
|
|
|
return result == null ? string.Empty : ((OverallAssessment)result).GetEnumInt();
|
|
|
|
return result == null ? string.Empty : ((OverallAssessment)result).GetEnumInt();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 转化时计算
|
|
|
|
#region 转化时计算
|
|
|
|
|
|
|
|
|
|
|
|
#region 获取转化的靶病灶评估
|
|
|
|
#region 获取转化的靶病灶评估
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 获取转化的靶病灶评估
|
|
|
|
/// 获取转化的靶病灶评估
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="inDto"></param>
|
|
|
|
/// <param name="inDto"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public async Task<string> GetConvertingTargetLesionEvaluate(ReadingCalculateDto inDto)
|
|
|
|
public async Task<string> GetConvertingTargetLesionEvaluate(ReadingCalculateDto inDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var beforeConvertedAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.BeforeConvertedTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.TargetLesion).Select(x => x.Answer).FirstOrDefaultAsync();
|
|
|
|
var beforeConvertedAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.BeforeConvertedTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.TargetLesion).Select(x => x.Answer).FirstOrDefaultAsync();
|
|
|
|
|
|
|
|
|
|
|
|