Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
This commit is contained in:
@@ -466,6 +466,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
TrialCriterionId= readingQuestionCriterionTrial.Id,
|
||||
OrganInfoId = x.Id,
|
||||
TrialId = readingQuestionCriterionTrial.TrialId,
|
||||
TULAT=x.TULAT,
|
||||
Classification=x.Classification,
|
||||
ClassificationEN=x.ClassificationEN,
|
||||
IsCanEditPosition=x.IsCanEditPosition,
|
||||
Part=x.Part,
|
||||
IsLymphNodes=x.IsLymphNodes,
|
||||
PartEN=x.PartEN,
|
||||
ShowOrder=x.ShowOrder,
|
||||
TULATEN=x.TULATEN,
|
||||
TULOC=x.TULOC,
|
||||
TULOCEN=x.TULOCEN,
|
||||
OrganType=x.OrganType,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
organTrialInfoList.ForEach(x => x.Id = NewId.NextGuid());
|
||||
|
||||
@@ -276,6 +276,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// 上一次任务的新病灶评估为iUPD
|
||||
/// </summary>
|
||||
public bool LastTaskNewLesioniUPD { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上一次任务的新病灶评估为iCPD
|
||||
/// </summary>
|
||||
public bool LastTaskNewLesioniCPD { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+39
-31
@@ -1319,7 +1319,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
var value = await GetSODData(inDto);
|
||||
|
||||
if (value == null || inDto.IsBaseLine)
|
||||
if (value == null || inDto.IsBaseLine || !inDto.IsConvertedTask||inDto.BeforeConvertedTaskId!=null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -1336,6 +1336,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
/// <returns></returns>
|
||||
public async Task<decimal?> GetiSODData(ReadingCalculateDto inDto)
|
||||
{
|
||||
if (!inDto.IsConvertedTask || inDto.BeforeConvertedTaskId != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (iSODData != null)
|
||||
{
|
||||
return iSODData.Value;
|
||||
@@ -1389,7 +1394,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
var value = await GetiSODData(inDto);
|
||||
|
||||
if (value == null || inDto.IsBaseLine)
|
||||
if (value == null || inDto.IsBaseLine || !inDto.IsConvertedTask || inDto.BeforeConvertedTaskId != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -2343,6 +2348,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
//上一次任务的新病灶评估为iUPD
|
||||
LastTaskNewLesioniUPD = lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.iUPD)),
|
||||
|
||||
//上一次任务的新病灶评估为iCPD
|
||||
LastTaskNewLesioniCPD = lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.iCPD)),
|
||||
};
|
||||
|
||||
// if(新靶病灶为ND&&新非靶病灶为ND&&其它既往新病灶为ND&&不存在触发iRECIST后新病灶)
|
||||
@@ -2362,7 +2370,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
result = NewLesionAssessment.iCPD;
|
||||
}
|
||||
// else if (前一访视新病灶评估为iCPD && (新靶病灶有存在病灶 || 新非靶病灶有存在状态病灶 || 其它既往新病灶有存在的病灶 || 触发iRECIST后新病灶有存在病灶))
|
||||
else if(data.LastTaskNewLesioniUPD&&
|
||||
else if(data.LastTaskNewLesioniCPD &&
|
||||
(inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewTargetLesion).SelectMany(x => x.TableRowInfoList).Count() > 0
|
||||
|| inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewNonTargetLesion).SelectMany(x => x.TableRowInfoList).Count() > 0
|
||||
|| inDto.QuestionInfo.Where(x => x.LesionType == LesionType.OtherPreviousNewLesion).SelectMany(x => x.TableRowInfoList).Count() > 0
|
||||
@@ -2375,7 +2383,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
}
|
||||
// else if (前一访视新病灶评估为iUPD && 新靶病灶上个访视评估为NE,本次访视评估为iUPD)
|
||||
else if(data.LastTaskNewLesioniUPD &&
|
||||
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.NE))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.iUPD))
|
||||
)
|
||||
{
|
||||
@@ -2589,7 +2597,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
if (data.LastTaskLesioniUPDOriCPD
|
||||
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCPD))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCPD))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.iCPD))))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.iCPD))))
|
||||
{
|
||||
// 疗效为 iCPD
|
||||
result = OverallAssessment.iCPD;
|
||||
@@ -2621,7 +2629,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
// else if (靶病灶评估为iUPD || 非靶病灶评估为iUPD || 新病灶评估为iUPD)
|
||||
else if (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))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.iUPD)))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.iUPD)))
|
||||
{
|
||||
// 疗效为 iUPD
|
||||
result = OverallAssessment.iUPD;
|
||||
@@ -2630,7 +2638,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
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.iCR)))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
)
|
||||
{
|
||||
// 疗效为 iCR
|
||||
@@ -2642,9 +2650,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|| 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.ND))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.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.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 iPR
|
||||
@@ -2655,9 +2663,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
&& (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.ND))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.No))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.No))
|
||||
|| 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.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 iPR
|
||||
@@ -2667,8 +2675,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iPR))
|
||||
&& (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.ND))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
) && (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.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 iPR
|
||||
@@ -2677,8 +2685,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
// else if (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为疑似或NE)
|
||||
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND))
|
||||
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
) && (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.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 iPR
|
||||
@@ -2690,8 +2698,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|| 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.ND))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
) && (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.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 iSD
|
||||
@@ -2700,9 +2708,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
// else if (靶病灶评估为ND && 非靶病灶评估为iNN && 新病灶评估为ND或疑似或NE)
|
||||
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iNN))
|
||||
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.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.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 iNN
|
||||
@@ -2711,8 +2719,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为ND或疑似)
|
||||
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.ND))
|
||||
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
&& (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))
|
||||
))
|
||||
{
|
||||
// 疗效为 ND
|
||||
@@ -2724,9 +2732,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|| 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.ND))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.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.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 NE
|
||||
@@ -2736,9 +2744,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND))
|
||||
&& (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.NE))
|
||||
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.No))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.Suspected))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
) && (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.No))
|
||||
|| 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.NE))
|
||||
))
|
||||
{
|
||||
// 疗效为 NE
|
||||
@@ -2747,7 +2755,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为NE)
|
||||
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.ND))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user