获取可融合的病灶
This commit is contained in:
+66
-8
@@ -1515,19 +1515,77 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 访视任务 - Dicom 阅片 提交、修改
|
||||
|
||||
/// <summary>
|
||||
/// 保存影像质量
|
||||
/// 获取可合并的病灶
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetCanMergeLesionOutDto>> GetCanMergeLesion(GetCanMergeLesionInDto inDto)
|
||||
{
|
||||
var rowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).Include(x=>x.ReadingQuestionTrial).FirstNotNullAsync();
|
||||
|
||||
// 需要排除的状态
|
||||
var needFilterState = new List<string>();
|
||||
|
||||
switch (rowinfo.ReadingQuestionTrial.LesionType)
|
||||
{
|
||||
//状态为“消失”、“无法评估”的靶病灶不可融合;
|
||||
case LesionType.TargetLesion:
|
||||
needFilterState = new List<string>() {
|
||||
TargetState.Loss.GetEnumInt(),
|
||||
TargetState.UnableEvaluate.GetEnumInt(),
|
||||
};
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var result = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == rowinfo.VisitTaskId && x.QuestionId == rowinfo.QuestionId && x.Id != rowinfo.Id)
|
||||
// 筛选状态
|
||||
.Where(x => x.LesionAnswerList.Any(y => y.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && !needFilterState.Contains(y.Answer)))
|
||||
.Select(x => new GetCanMergeLesionOutDto()
|
||||
{
|
||||
RowId = x.Id,
|
||||
RowIndex = x.RowIndex,
|
||||
OrderMarkName = x.ReadingQuestionTrial.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
OrganInfoId = x.OrganInfoId
|
||||
}).OrderBy(x=>x.RowIndex).ToListAsync();
|
||||
|
||||
var organIds = result.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
|
||||
|
||||
result.ForEach(x =>
|
||||
{
|
||||
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
x.Part = organList.Where(y => y.Id == x.OrganInfoId).Select(y => y.PartEN).FirstIsNullReturnEmpty();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
x.Part = organList.Where(y => y.Id == x.OrganInfoId).Select(y => y.Part).FirstIsNullReturnEmpty();
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 访视任务 - Dicom 阅片 提交、修改
|
||||
|
||||
/// <summary>
|
||||
/// 保存影像质量
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user