Uat_Study
parent
1dc0219fa1
commit
4b1db3a673
|
@ -1491,6 +1491,8 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNewLesionAssessment(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)" -->
|
||||||
|
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetIRECSITTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)" -->
|
||||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)" -->
|
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)" -->
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNoTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNoTargetLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||||
<summary>
|
<summary>
|
||||||
|
@ -1499,13 +1501,6 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetNewLesionEvaluate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
|
||||||
<summary>
|
|
||||||
获取新病灶评估
|
|
||||||
</summary>
|
|
||||||
<param name="inDto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.PCWG3CalculateService.GetDeleteLesionStatrIndex(IRaCIS.Core.Application.Service.Reading.Dto.DeleteReadingRowAnswerInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.PCWG3CalculateService.GetDeleteLesionStatrIndex(IRaCIS.Core.Application.Service.Reading.Dto.DeleteReadingRowAnswerInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
删除病灶获取起始病灶序号
|
删除病灶获取起始病灶序号
|
||||||
|
@ -7421,6 +7416,26 @@
|
||||||
至少有一个病灶无法评估
|
至少有一个病灶无法评估
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.ViewModel.IRECISTNewLesionAssessmentDto">
|
||||||
|
<summary>
|
||||||
|
IRECIST新病灶Dto
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.ViewModel.IRECISTNewLesionAssessmentDto.LastTaskNewLesioniUPD">
|
||||||
|
<summary>
|
||||||
|
上一次任务的新病灶评估为iUPD
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.ViewModel.IRECISTTargetLesionEvaluateDto">
|
||||||
|
<summary>
|
||||||
|
IRECIST整体肿瘤评估
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.ViewModel.IRECISTTargetLesionEvaluateDto.LastTaskLesioniUPDOriCPD">
|
||||||
|
<summary>
|
||||||
|
上一次任务的评估为iUPD或者iCPD
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.SubjectCriteriaEvaluationView">
|
<member name="T:IRaCIS.Core.Application.ViewModel.SubjectCriteriaEvaluationView">
|
||||||
<summary> SubjectCriteriaEvaluationView 列表视图模型 </summary>
|
<summary> SubjectCriteriaEvaluationView 列表视图模型 </summary>
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -129,6 +129,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public string TaskBlindName { get; set; } = string.Empty;
|
public string TaskBlindName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsConvertedTask { get; set; }
|
||||||
|
|
||||||
public bool IsAnalysisCreate { get; set; }
|
public bool IsAnalysisCreate { get; set; }
|
||||||
|
|
||||||
public bool? IsSelfAnalysis { get; set; }
|
public bool? IsSelfAnalysis { get; set; }
|
||||||
|
@ -291,6 +293,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Func<ReadingCalculateDto, Task<string>> GetStringFun { get; set; }
|
public Func<ReadingCalculateDto, Task<string>> GetStringFun { get; set; }
|
||||||
|
|
||||||
public Func<ChangeAllTaskDto,Task> ChangeAllTaskFun { get; set; }
|
public Func<ChangeAllTaskDto,Task> ChangeAllTaskFun { get; set; }
|
||||||
|
|
||||||
|
public bool IsConvertedTask { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -266,4 +266,26 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ExixtsUnevaluableState { get; set; }
|
public bool ExixtsUnevaluableState { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IRECIST新病灶Dto
|
||||||
|
/// </summary>
|
||||||
|
public class IRECISTNewLesionAssessmentDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 上一次任务的新病灶评估为iUPD
|
||||||
|
/// </summary>
|
||||||
|
public bool LastTaskNewLesioniUPD { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IRECIST整体肿瘤评估
|
||||||
|
/// </summary>
|
||||||
|
public class IRECISTTargetLesionEvaluateDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 上一次任务的评估为iUPD或者iCPD
|
||||||
|
/// </summary>
|
||||||
|
public bool LastTaskLesioniUPDOriCPD { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
ReadingCalculateDto readingData = new ReadingCalculateDto()
|
ReadingCalculateDto readingData = new ReadingCalculateDto()
|
||||||
{
|
{
|
||||||
SubjectId = visitTask.SubjectId,
|
SubjectId = visitTask.SubjectId,
|
||||||
TaskBlindName= visitTask.TaskBlindName,
|
TaskBlindName = visitTask.TaskBlindName,
|
||||||
|
IsConvertedTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync(),
|
||||||
VisitTaskId = visitTaskId,
|
VisitTaskId = visitTaskId,
|
||||||
SubjectVisitId = visitTask.SourceSubjectVisitId!.Value,
|
SubjectVisitId = visitTask.SourceSubjectVisitId!.Value,
|
||||||
QuestionInfo = questionInfos,
|
QuestionInfo = questionInfos,
|
||||||
|
|
|
@ -448,32 +448,57 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
//被评估为NE的单个靶病灶
|
//被评估为NE的单个靶病灶
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.NETarget,GetStringFun=GetNETarget},
|
new ReadingCalculateData (){QuestionType=QuestionType.NETarget,GetStringFun=GetNETarget},
|
||||||
|
|
||||||
// 与前一访视SOD相比变化量
|
// 与前一访视SOD相比变化量
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.LastVisitSODChange,GetDecimalNullFun=GetLastTaskSODChange},
|
new ReadingCalculateData (){QuestionType=QuestionType.LastVisitSODChange,GetDecimalNullFun=GetLastTaskSODChange},
|
||||||
|
|
||||||
//新靶病灶直径之和(iSOD)
|
//新靶病灶直径之和(iSOD)
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.ISOD,GetDecimalNullFun=GetiSODData},
|
new ReadingCalculateData (){QuestionType=QuestionType.ISOD,GetDecimalNullFun=GetiSODData},
|
||||||
|
|
||||||
// 与前一访视相比iSOD变化量
|
// 与前一访视相比iSOD变化量
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.LastVisitiSODChange,GetDecimalNullFun=GetISODChange},
|
new ReadingCalculateData (){QuestionType=QuestionType.LastVisitiSODChange,GetDecimalNullFun=GetISODChange},
|
||||||
|
|
||||||
//靶病灶评估
|
// 靶病灶评估
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.TargetLesion,GetStringFun=GetTargetLesionEvaluate},
|
new ReadingCalculateData (){QuestionType=QuestionType.TargetLesion,GetStringFun=GetTargetLesionEvaluate},
|
||||||
|
|
||||||
|
// IRECIST靶病灶评估
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.TargetLesion,GetStringFun=GetIRECISTTargetLesionEvaluate,IsConvertedTask=true},
|
||||||
|
|
||||||
//非靶病灶评估
|
//非靶病灶评估
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.NoTargetLesion,GetStringFun=GetNoTargetLesionEvaluate},
|
new ReadingCalculateData (){QuestionType=QuestionType.NoTargetLesion,GetStringFun=GetNoTargetLesionEvaluate},
|
||||||
|
|
||||||
//新病灶评估
|
//IRECIST非靶病灶评估
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.NewLesionEvaluation,GetStringFun=GetNewLesionEvaluate},
|
new ReadingCalculateData (){QuestionType=QuestionType.NoTargetLesion,GetStringFun=GetIRECISTNoTargetLesionEvaluate,IsConvertedTask=true},
|
||||||
|
|
||||||
|
// IRECIST新靶病灶评估
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.NewTargetLesion,GetStringFun=GetNewTargetLesionEvaluate,IsConvertedTask=true},
|
||||||
|
|
||||||
|
// IRECIST新非靶病灶评估
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.NewNoTargetLesion,GetStringFun=GetNewNoTargetLesionEvaluate,IsConvertedTask=true},
|
||||||
|
|
||||||
|
// IRECIST其它既往新病灶评估
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.OtherNewTargetLesion,GetStringFun=GetOtherNewTargetLesionEvaluate,IsConvertedTask=true},
|
||||||
|
|
||||||
|
// IRECIST触发iRECIST后新病灶评估
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.IRECISTNewTargetLesion,GetStringFun=GetNewLesionAfterTriggeringiRECSITAssessment,IsConvertedTask=true},
|
||||||
|
|
||||||
|
//IRECIST新病灶评估
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.NewLesionEvaluation,GetStringFun=GetNewLesionAssessment,IsConvertedTask=true},
|
||||||
|
|
||||||
//整体肿瘤评估
|
//整体肿瘤评估
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetTumor},
|
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetTumor},
|
||||||
|
|
||||||
|
//IRECIST整体肿瘤评估
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetIRECSITTargetLesionEvaluate,IsConvertedTask=true},
|
||||||
|
|
||||||
//是否存在疾病
|
//是否存在疾病
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.ExistDisease,GetStringFun=GetIsExistDisease},
|
new ReadingCalculateData (){QuestionType=QuestionType.ExistDisease,GetStringFun=GetIsExistDisease},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 过滤转化的
|
||||||
|
|
||||||
|
calculateList = calculateList.Where(x => x.IsConvertedTask == inDto.IsConvertedTask).ToList();
|
||||||
|
|
||||||
// 没有靶病灶只计算最后几个
|
// 没有靶病灶只计算最后几个
|
||||||
if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).Sum(x => x.TableRowInfoList.Count()) == 0)
|
if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).Sum(x => x.TableRowInfoList.Count()) == 0)
|
||||||
{
|
{
|
||||||
|
@ -2176,6 +2201,407 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
return result.GetEnumInt();
|
return result.GetEnumInt();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取新病灶评估
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取新病灶评估
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// if(新靶病灶为ND&&新非靶病灶为ND&&其它既往新病灶为ND&&不存在触发iRECIST后新病灶)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 ND
|
||||||
|
/// }
|
||||||
|
/// else if (新靶病灶为iCPD||新非靶病灶为iCPD)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (前一访视新病灶评估为iCPD && (新靶病灶有存在病灶 || 新非靶病灶有存在状态病灶 || 其它既往新病灶有存在的病灶 || 触发iRECIST后新病灶有存在病灶))
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (前一访视新病灶评估为iUPD && 新靶病灶上个访视评估为NE,本次访视评估为iUPD)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (前一访视新病灶评估为iUPD && 新非靶病灶上个访视评估为NE,本次访视评估为iUPD)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (前一访视新病灶评估为iUPD && 其它既往新病灶上个访视评估为NE或疑似,本次访视评估为iUPD)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (前一访视新病灶评估为iUPD && 触发iRECIST后新病灶评估上个访视评估为NE或否或疑似,本次访视评估为是)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (新靶病灶评估为iUPD || 新非靶病灶评估为iUPD || 其它既往新病灶评估为iUPD || 触发iRECIST后新病灶评估上个访视评估为是)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iUPD
|
||||||
|
/// }
|
||||||
|
/// else if (新靶病灶、新非靶病灶、其它既往新病灶任一项评估为NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 NE
|
||||||
|
/// }
|
||||||
|
/// else if (其它既往新病灶或触发iRECIST后新病灶评估为“疑似”)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 疑似
|
||||||
|
/// }
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetNewLesionAssessment(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
NewLesionAssessment? result = null;
|
||||||
|
var lastVisitTaskId = await GetLastVisitTaskId(inDto);
|
||||||
|
ReadingCalculateDto lastTaskCalculateDto = await _generalCalculateService.GetReadingCalculateDto(lastVisitTaskId);
|
||||||
|
IRECISTNewLesionAssessmentDto data = new IRECISTNewLesionAssessmentDto()
|
||||||
|
{
|
||||||
|
//上一次任务的新病灶评估为iUPD
|
||||||
|
LastTaskNewLesioniUPD = lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.iCPD)),
|
||||||
|
};
|
||||||
|
|
||||||
|
// if(新靶病灶为ND&&新非靶病灶为ND&&其它既往新病灶为ND&&不存在触发iRECIST后新病灶)
|
||||||
|
if(inDto.QuestionInfo.Any(x=>x.QuestionType==QuestionType.NewTargetLesion&&x.Answer.EqEnum(NewTargetLesionAssessment.ND))
|
||||||
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.ND))
|
||||||
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.ND))
|
||||||
|
&& inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TriggeringIRECSIT).SelectMany(x => x.TableRowInfoList).Count()==0)
|
||||||
|
{
|
||||||
|
// 疗效为 ND
|
||||||
|
result = NewLesionAssessment.ND;
|
||||||
|
}
|
||||||
|
// else if (新靶病灶为iCPD||新非靶病灶为iCPD)
|
||||||
|
else if(inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.iCPD))
|
||||||
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.iCPD)))
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = NewLesionAssessment.iCPD;
|
||||||
|
}
|
||||||
|
// else if (前一访视新病灶评估为iCPD && (新靶病灶有存在病灶 || 新非靶病灶有存在状态病灶 || 其它既往新病灶有存在的病灶 || 触发iRECIST后新病灶有存在病灶))
|
||||||
|
else if(data.LastTaskNewLesioniUPD&&
|
||||||
|
(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
|
||||||
|
|| inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TriggeringIRECSIT).SelectMany(x => x.TableRowInfoList).Count() > 0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = NewLesionAssessment.iCPD;
|
||||||
|
}
|
||||||
|
// else if (前一访视新病灶评估为iUPD && 新靶病灶上个访视评估为NE,本次访视评估为iUPD)
|
||||||
|
else if(data.LastTaskNewLesioniUPD &&
|
||||||
|
lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.NE))
|
||||||
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.iUPD))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = NewLesionAssessment.iCPD;
|
||||||
|
}
|
||||||
|
// else if (前一访视新病灶评估为iUPD && 新非靶病灶上个访视评估为NE,本次访视评估为iUPD)
|
||||||
|
else if(data.LastTaskNewLesioniUPD
|
||||||
|
&& lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.NE))
|
||||||
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.iUPD))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = NewLesionAssessment.iCPD;
|
||||||
|
}
|
||||||
|
// else if (前一访视新病灶评估为iUPD && 其它既往新病灶上个访视评估为NE或疑似,本次访视评估为iUPD)
|
||||||
|
else if (data.LastTaskNewLesioniUPD
|
||||||
|
&& lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && (x.Answer.EqEnum(OtherPreviousNewLesionAssessment.NE)|| x.Answer.EqEnum(OtherPreviousNewLesionAssessment.Equivocal)))
|
||||||
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.iUPD))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = NewLesionAssessment.iCPD;
|
||||||
|
}
|
||||||
|
// else if (前一访视新病灶评估为iUPD && 触发iRECIST后新病灶评估上个访视评估为NE或否或疑似,本次访视评估为是)
|
||||||
|
else if(data.LastTaskNewLesioniUPD
|
||||||
|
&& lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.IRECISTNewTargetLesion && (x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.NE)|| x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.No) || x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.Equivocal)))
|
||||||
|
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.IRECISTNewTargetLesion && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.Yes))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = NewLesionAssessment.iCPD;
|
||||||
|
}
|
||||||
|
// else if (新靶病灶评估为iUPD || 新非靶病灶评估为iUPD || 其它既往新病灶评估为iUPD || 触发iRECIST后新病灶评估上个访视评估为是)
|
||||||
|
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewTargetLesionAssessment.iUPD))
|
||||||
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewNoTargetLesion && x.Answer.EqEnum(NewNoTargetLesionAssessment.iUPD))
|
||||||
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.iUPD))
|
||||||
|
|| lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.IRECISTNewTargetLesion && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.Yes))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iUPD
|
||||||
|
result = NewLesionAssessment.iUPD;
|
||||||
|
}
|
||||||
|
// else if (新靶病灶、新非靶病灶、其它既往新病灶任一项评估为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.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.NE))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 NE
|
||||||
|
result = NewLesionAssessment.NE;
|
||||||
|
}
|
||||||
|
// else if (其它既往新病灶或触发iRECIST后新病灶评估为“疑似”)
|
||||||
|
else if (
|
||||||
|
inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.OtherNewTargetLesion && x.Answer.EqEnum(OtherPreviousNewLesionAssessment.Equivocal))
|
||||||
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.IRECISTNewTargetLesion && x.Answer.EqEnum(NewLesionAfterTriggeringiRECSITAssessment.Equivocal))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 疑似
|
||||||
|
result = NewLesionAssessment.Suspected;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return result == null ? string.Empty : ((NewLesionAssessment)result).GetEnumInt();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region iRECSIT整体肿瘤评估
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// if(上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项为iCPD)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项从前一访视非iUPD结果评估为当前访视iUPD)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCPD
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为iUPD || 非靶病灶评估为iUPD || 新病灶评估为iUPD)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iUPD
|
||||||
|
/// }
|
||||||
|
/// else if ((靶病灶评估为iCR || 非靶病灶评估为iCR) && 新病灶评估为ND)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iCR
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为iPR && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iPR
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为iPR && 非靶病灶评估为iNN或NE && 新病灶评估为否或疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iPR
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为iPR && 非靶病灶评估为iCR或ND && 新病灶评估为疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iPR
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iPR
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为iSD && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iSD
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为ND && 非靶病灶评估为iNN && 新病灶评估为ND或疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 iNN
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为ND或疑似)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 ND
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为NE && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 NE
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为ND && 非靶病灶评估为NE && 新病灶评估为否或疑似或NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 NE
|
||||||
|
/// }
|
||||||
|
/// else if (靶病灶评估为ND && 非靶病灶评估为ND && 新病灶评估为NE)
|
||||||
|
/// {
|
||||||
|
/// 疗效为 NE
|
||||||
|
/// }
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetIRECSITTargetLesionEvaluate(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var lastVisitTaskId = await GetLastVisitTaskId(inDto);
|
||||||
|
ReadingCalculateDto lastTaskCalculateDto = await _generalCalculateService.GetReadingCalculateDto(lastVisitTaskId);
|
||||||
|
OverallAssessment? result = null;
|
||||||
|
IRECISTTargetLesionEvaluateDto data = new IRECISTTargetLesionEvaluateDto()
|
||||||
|
{
|
||||||
|
LastTaskLesioniUPDOriCPD = lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.Tumor && (x.Answer.EqEnum(OverallAssessment.iCPD) || x.Answer.EqEnum(OverallAssessment.iUPD))),
|
||||||
|
};
|
||||||
|
|
||||||
|
// if(上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项为iCPD)
|
||||||
|
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))))
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = OverallAssessment.iCPD;
|
||||||
|
|
||||||
|
}
|
||||||
|
// else if (上一访视评估为iUPD或iCPD&&靶病灶评估、非靶病灶评估或新病灶评估任一项从前一访视非iUPD结果评估为当前访视iUPD)
|
||||||
|
if (data.LastTaskLesioniUPDOriCPD
|
||||||
|
&& (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))
|
||||||
|
|| lastTaskCalculateDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && !x.Answer.EqEnum(NewTargetLesionAssessment.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))
|
||||||
|
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewTargetLesion && x.Answer.EqEnum(NewLesionAssessment.iUPD)))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iCPD
|
||||||
|
result = OverallAssessment.iCPD;
|
||||||
|
}
|
||||||
|
// 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)))
|
||||||
|
{
|
||||||
|
// 疗效为 iUPD
|
||||||
|
result = OverallAssessment.iUPD;
|
||||||
|
}
|
||||||
|
// else if ((靶病灶评估为iCR || 非靶病灶评估为iCR) && 新病灶评估为ND)
|
||||||
|
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))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 iCR
|
||||||
|
result = OverallAssessment.iCR;
|
||||||
|
}
|
||||||
|
// else if (靶病灶评估为iPR && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||||
|
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.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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 iPR
|
||||||
|
result = OverallAssessment.iPR;
|
||||||
|
}
|
||||||
|
// else if (靶病灶评估为iPR && 非靶病灶评估为iNN或NE && 新病灶评估为否或疑似或NE)
|
||||||
|
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.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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 iPR
|
||||||
|
result = OverallAssessment.iPR;
|
||||||
|
}
|
||||||
|
// else if (靶病灶评估为iPR && 非靶病灶评估为iCR或ND && 新病灶评估为疑似或NE)
|
||||||
|
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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 iPR
|
||||||
|
result = OverallAssessment.iPR;
|
||||||
|
}
|
||||||
|
// 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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 iPR
|
||||||
|
result = OverallAssessment.iPR;
|
||||||
|
}
|
||||||
|
// else if (靶病灶评估为iSD && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||||
|
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iSD))
|
||||||
|
&& (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.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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 iSD
|
||||||
|
result = OverallAssessment.iSD;
|
||||||
|
}
|
||||||
|
// 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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 iNN
|
||||||
|
result = OverallAssessment.iNN;
|
||||||
|
}
|
||||||
|
// 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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 ND
|
||||||
|
result = OverallAssessment.ND;
|
||||||
|
}
|
||||||
|
// else if (靶病灶评估为NE && 非靶病灶评估为iCR,iNN,NE或ND && 新病灶评估为ND或疑似或NE)
|
||||||
|
else if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.NE))
|
||||||
|
&& (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.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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 NE
|
||||||
|
result = OverallAssessment.NE;
|
||||||
|
}
|
||||||
|
// else if (靶病灶评估为ND && 非靶病灶评估为NE && 新病灶评估为否或疑似或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.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))
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// 疗效为 NE
|
||||||
|
result = OverallAssessment.NE;
|
||||||
|
}
|
||||||
|
// 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))
|
||||||
|
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// 疗效为 NE
|
||||||
|
result = OverallAssessment.NE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result == null ? string.Empty : ((OverallAssessment)result).GetEnumInt();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
@ -2554,54 +2980,54 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取新病灶评估
|
//#region 获取新病灶评估
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 获取新病灶评估
|
///// 获取新病灶评估
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <param name="inDto"></param>
|
///// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
public async Task<string> GetNewLesionEvaluate(ReadingCalculateDto inDto)
|
//public async Task<string> GetNewLesionEvaluate(ReadingCalculateDto inDto)
|
||||||
{
|
//{
|
||||||
|
|
||||||
NewLesionAssessment result = NewLesionAssessment.No;
|
// NewLesionAssessment result = NewLesionAssessment.No;
|
||||||
if (inDto.IsBaseLine)
|
// if (inDto.IsBaseLine)
|
||||||
{
|
// {
|
||||||
return NewLesionAssessment.NA.GetEnumInt();
|
// return NewLesionAssessment.NA.GetEnumInt();
|
||||||
}
|
// }
|
||||||
|
|
||||||
var tableRows = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewLesions).SelectMany(x => x.TableRowInfoList).ToList();
|
// var tableRows = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.NewLesions).SelectMany(x => x.TableRowInfoList).ToList();
|
||||||
|
|
||||||
var tableQuestions = tableRows.SelectMany(x => x.TableQuestionList).ToList();
|
// var tableQuestions = tableRows.SelectMany(x => x.TableQuestionList).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 当前访视存在至少一个明确新病灶
|
// // 当前访视存在至少一个明确新病灶
|
||||||
if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)))
|
// if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)))
|
||||||
{
|
// {
|
||||||
result = NewLesionAssessment.Yes;
|
// result = NewLesionAssessment.Yes;
|
||||||
}
|
// }
|
||||||
//只要有任何一个新病灶状态为“无法评估”
|
// //只要有任何一个新病灶状态为“无法评估”
|
||||||
else if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.UnableEvaluate)))
|
// else if (tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.UnableEvaluate)))
|
||||||
{
|
// {
|
||||||
result = NewLesionAssessment.NE;
|
// result = NewLesionAssessment.NE;
|
||||||
}
|
// }
|
||||||
//当前访视不存在明确新病灶且存在至少一个疑似新病灶
|
// //当前访视不存在明确新病灶且存在至少一个疑似新病灶
|
||||||
else if (!tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)) &&
|
// else if (!tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Exist)) &&
|
||||||
tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Suspected))
|
// tableQuestions.Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(NewLesionState.Suspected))
|
||||||
)
|
// )
|
||||||
{
|
// {
|
||||||
result = NewLesionAssessment.Suspected;
|
// result = NewLesionAssessment.Suspected;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
result = NewLesionAssessment.No;
|
// result = NewLesionAssessment.No;
|
||||||
}
|
// }
|
||||||
return result.GetEnumInt();
|
// return result.GetEnumInt();
|
||||||
|
|
||||||
}
|
//}
|
||||||
#endregion
|
//#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -538,6 +538,8 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
NE = 4
|
NE = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 整体肿瘤评估
|
/// 整体肿瘤评估
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -660,7 +662,21 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
/// </summary>
|
/// </summary>
|
||||||
No = 3,
|
No = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// iUPD
|
||||||
|
/// </summary>
|
||||||
|
iUPD = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// iCPD
|
||||||
|
/// </summary>
|
||||||
|
iCPD = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ND
|
||||||
|
/// </summary>
|
||||||
|
ND = 6
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -164,7 +164,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
return ((int)(object)value).ToString();
|
return ((int)(object)value).ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 字符匹配枚举
|
/// 字符匹配枚举
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue