Merge branch 'Test.IRC' of http://192.168.3.69:2000/XCKJ/irc-netcore-api into Test.IRC
commit
66682260a0
|
@ -1816,8 +1816,6 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var tablequestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId && x.ReadingQuestionTrial.LesionType == LesionType.NonTargetLesions).ToListAsync();
|
var tablequestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == taskinfo.TrialReadingCriterionId && x.ReadingQuestionTrial.LesionType == LesionType.NonTargetLesions).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 判断表格问题是否为空
|
// 判断表格问题是否为空
|
||||||
if (tablequestionList.Count > 0)
|
if (tablequestionList.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -510,13 +510,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
//被评估为NE的单个靶病灶
|
//被评估为NE的单个靶病灶
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.NETarget,GetStringFun=GetNETarget},
|
new ReadingCalculateData (){QuestionType=QuestionType.NETarget,GetStringFun=GetNETarget},
|
||||||
|
|
||||||
// 与触发iRECIST访视相比SOD变化量
|
// 与触发iRECIST访视相比SOD变化量
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.ComparedTriggeringSODChange,GetStringFun=GetComparedTriggeringSODChange,IsConvertedTask=true},
|
new ReadingCalculateData (){QuestionType=QuestionType.ComparedTriggeringSODChange,GetStringFun=GetComparedTriggeringSODChange,IsConvertedTask=true},
|
||||||
|
|
||||||
// 新靶病灶直径之和(iSOD)
|
// 新靶病灶直径之和(iSOD)
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.ISOD,GetDecimalNullFun=GetiSODData,IsConvertedTask=true},
|
new ReadingCalculateData (){QuestionType=QuestionType.ISOD,GetDecimalNullFun=GetiSODData,IsConvertedTask=true},
|
||||||
|
|
||||||
// 与触发iRECIST访视相比iSOD变化量
|
// 与触发iRECIST访视相比iSOD变化量
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.ComparedTriggeringiSODChange,GetStringFun=GetComparedTriggeringiSODChange,IsConvertedTask=true},
|
new ReadingCalculateData (){QuestionType=QuestionType.ComparedTriggeringiSODChange,GetStringFun=GetComparedTriggeringiSODChange,IsConvertedTask=true},
|
||||||
|
|
||||||
// 靶病灶评估
|
// 靶病灶评估
|
||||||
|
|
|
@ -635,26 +635,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ImageQualityAssessment && x.VisitTaskId == inDto.VisitTaskId && x.Answer == ImageQualityEvaluation.Abnormal.GetEnumInt()))
|
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ImageQualityAssessment && x.VisitTaskId == inDto.VisitTaskId && x.Answer == ImageQualityEvaluation.Abnormal.GetEnumInt()))
|
||||||
{
|
{
|
||||||
|
//影像质量不正常 验证
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
||||||
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State)
|
||||||
)
|
.Select(x => new
|
||||||
.Select(x => new
|
{
|
||||||
{
|
x.ReadingQuestionTrial.OrderMark,
|
||||||
x.ReadingQuestionTrial.OrderMark,
|
x.RowIndex,
|
||||||
x.RowIndex,
|
x.ReadingTableQuestionTrial.QuestionMark,
|
||||||
QuestionMark = x.ReadingTableQuestionTrial.QuestionMark,
|
x.Answer,
|
||||||
Answer = x.Answer,
|
}).ToListAsync();
|
||||||
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
|
|
||||||
|
// 错误信息
|
||||||
string errorMassage = string.Empty;
|
string errorMassage = string.Empty;
|
||||||
|
|
||||||
var rowAnswerList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.MeasureData == string.Empty || x.MeasureData == null))
|
var rowAnswerList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.MeasureData == string.Empty || x.MeasureData == null))
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
{
|
{
|
||||||
|
@ -662,37 +658,32 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
x.RowIndex,
|
x.RowIndex,
|
||||||
x.Id,
|
x.Id,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
var unableEvaluateRowIds = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.Answer == TargetState.UnableEvaluate.GetEnumInt()
|
var unableEvaluateRowIds = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.Answer == TargetState.UnableEvaluate.GetEnumInt()
|
||||||
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State)
|
||||||
)
|
.Select(x => x.RowId).Distinct().ToListAsync();
|
||||||
.Select(x => x.RowId).Distinct().ToListAsync();
|
|
||||||
|
|
||||||
|
|
||||||
List<string> measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList();
|
List<string> measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList();
|
||||||
|
|
||||||
List<string> stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList();
|
List<string> stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList();
|
||||||
|
|
||||||
|
|
||||||
List<string> allExists = measureDataList.Intersect(stateIsNullList).ToList();
|
List<string> allExists = measureDataList.Intersect(stateIsNullList).ToList();
|
||||||
|
// 取差
|
||||||
measureDataList = measureDataList.Except(allExists).ToList();
|
measureDataList = measureDataList.Except(allExists).ToList();
|
||||||
stateIsNullList = stateIsNullList.Except(allExists).ToList();
|
stateIsNullList = stateIsNullList.Except(allExists).ToList();
|
||||||
|
|
||||||
|
|
||||||
if (measureDataList.Count() > 0)
|
if (measureDataList.Count() > 0)
|
||||||
{
|
{
|
||||||
|
// 无标记
|
||||||
errorMassage += _localizer["ReadingCalculate_NoMarker", string.Join(',', measureDataList)] + ",";
|
errorMassage += _localizer["ReadingCalculate_NoMarker", string.Join(',', measureDataList)] + ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (tableAnswerList.Count > 0)
|
if (tableAnswerList.Count > 0)
|
||||||
{
|
{
|
||||||
|
// 状态为空
|
||||||
errorMassage += _localizer["ReadingCalculate_StatusIsEmpty", string.Join(',', stateIsNullList)] + ",";
|
errorMassage += _localizer["ReadingCalculate_StatusIsEmpty", string.Join(',', stateIsNullList)] + ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allExists.Count > 0)
|
if (allExists.Count > 0)
|
||||||
{
|
{
|
||||||
|
// 未做标记且状态为空
|
||||||
errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ",";
|
errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,8 +693,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
errorMassage = _localizer["ReadingCalculate_Questionable"] + errorMassage;
|
errorMassage = _localizer["ReadingCalculate_Questionable"] + errorMassage;
|
||||||
throw new BusinessValidationFailedException(errorMassage);
|
throw new BusinessValidationFailedException(errorMassage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -925,9 +925,6 @@ namespace IRaCIS.Core.Application
|
||||||
_mapper.Map(trialConfig, trialInfo);
|
_mapper.Map(trialConfig, trialInfo);
|
||||||
trialInfo.UpdateTime = DateTime.Now;
|
trialInfo.UpdateTime = DateTime.Now;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(await _repository.SaveChangesAsync());
|
return ResponseOutput.Ok(await _repository.SaveChangesAsync());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue