修改稽查
parent
4b10febbd2
commit
dca82016ed
|
@ -250,9 +250,6 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
var result = await _trialConfigService.ConfigTrialBasicInfo(opt.Data);
|
var result = await _trialConfigService.ConfigTrialBasicInfo(opt.Data);
|
||||||
await _inspectionService.CompletedSign(singid, result);
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public bool IsHaveGeneratedTask { get; set; }
|
public bool IsHaveGeneratedTask { get; set; }
|
||||||
|
|
||||||
|
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
||||||
public int? ValidVisitCount { get; set; }
|
public int? ValidVisitCount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -444,6 +444,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
||||||
SubjectId = t.Id,
|
SubjectId = t.Id,
|
||||||
|
|
||||||
|
IsReReadingOrBackInfluenceAnalysis=t.IsReReadingOrBackInfluenceAnalysis,
|
||||||
|
|
||||||
BlindSubjectCode = t.SubjectVisitTaskList.Where(t => t.IsAnalysisCreate && t.TrialReadingCriterionId == trialReadingCriterionId).OrderByDescending(t => t.BlindSubjectCode).Select(t => t.BlindSubjectCode).FirstOrDefault(),
|
BlindSubjectCode = t.SubjectVisitTaskList.Where(t => t.IsAnalysisCreate && t.TrialReadingCriterionId == trialReadingCriterionId).OrderByDescending(t => t.BlindSubjectCode).Select(t => t.BlindSubjectCode).FirstOrDefault(),
|
||||||
|
|
||||||
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.DoctorUserId == doctorUserId && c.IsSelfAnalysis == true && c.TrialReadingCriterionId==trialReadingCriterionId),
|
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.DoctorUserId == doctorUserId && c.IsSelfAnalysis == true && c.TrialReadingCriterionId==trialReadingCriterionId),
|
||||||
|
@ -467,6 +469,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
SourceSubjectVisitId = c.SourceSubjectVisitId,
|
SourceSubjectVisitId = c.SourceSubjectVisitId,
|
||||||
SouceReadModuleId = c.SouceReadModuleId,
|
SouceReadModuleId = c.SouceReadModuleId,
|
||||||
|
|
||||||
|
|
||||||
TrialReadingCriterionId=c.TrialReadingCriterionId,
|
TrialReadingCriterionId=c.TrialReadingCriterionId,
|
||||||
|
|
||||||
//自身一致性才有意义
|
//自身一致性才有意义
|
||||||
|
@ -555,7 +558,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
SubjectCode = t.Code,
|
SubjectCode = t.Code,
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
||||||
SubjectId = t.Id,
|
SubjectId = t.Id,
|
||||||
|
IsReReadingOrBackInfluenceAnalysis = t.IsReReadingOrBackInfluenceAnalysis,
|
||||||
|
|
||||||
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.IsSelfAnalysis == false && c.TrialReadingCriterionId==trialReadingCriterionId),
|
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.IsSelfAnalysis == false && c.TrialReadingCriterionId==trialReadingCriterionId),
|
||||||
|
|
||||||
|
|
|
@ -150,13 +150,13 @@ namespace IRaCIS.Application.Services
|
||||||
List<ReadingTaskQuestionAnswer> questionAnswers = questions.Select(x => new ReadingTaskQuestionAnswer()
|
List<ReadingTaskQuestionAnswer> questionAnswers = questions.Select(x => new ReadingTaskQuestionAnswer()
|
||||||
{
|
{
|
||||||
|
|
||||||
Answer=x.DefaultValue,
|
Answer = x.DefaultValue,
|
||||||
Id= NewId.NextGuid(),
|
Id = NewId.NextGuid(),
|
||||||
ReadingQuestionCriterionTrialId= visitTaskInfo.TrialReadingCriterionId,
|
ReadingQuestionCriterionTrialId = visitTaskInfo.TrialReadingCriterionId,
|
||||||
ReadingQuestionTrialId= x.Id,
|
ReadingQuestionTrialId = x.Id,
|
||||||
SubjectId= visitTaskInfo.SubjectId,
|
SubjectId = visitTaskInfo.SubjectId,
|
||||||
TrialId= visitTaskInfo.TrialId,
|
TrialId = visitTaskInfo.TrialId,
|
||||||
VisitTaskId=visitTaskId,
|
VisitTaskId = visitTaskId,
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ namespace IRaCIS.Application.Services
|
||||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||||
x.TaskState == TaskState.Effect &&
|
x.TaskState == TaskState.Effect &&
|
||||||
x.VisitTaskNum<= taskInfo.VisitTaskNum&&
|
x.VisitTaskNum <= taskInfo.VisitTaskNum &&
|
||||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||||
x.ReadingCategory == ReadingCategory.Visit) || x.Id == inDto.VisitTaskId)
|
x.ReadingCategory == ReadingCategory.Visit) || x.Id == inDto.VisitTaskId)
|
||||||
.Select(x => new GetRelatedVisitTaskOutDto()
|
.Select(x => new GetRelatedVisitTaskOutDto()
|
||||||
|
@ -247,7 +247,7 @@ namespace IRaCIS.Application.Services
|
||||||
var readingPastResultList = await _visitTaskRepository.Where(x =>
|
var readingPastResultList = await _visitTaskRepository.Where(x =>
|
||||||
x.TrialId == taskInfo.TrialId &&
|
x.TrialId == taskInfo.TrialId &&
|
||||||
x.SubjectId == taskInfo.SubjectId &&
|
x.SubjectId == taskInfo.SubjectId &&
|
||||||
x.VisitTaskNum<= taskInfo.VisitTaskNum&&
|
x.VisitTaskNum <= taskInfo.VisitTaskNum &&
|
||||||
x.ArmEnum == taskInfo.ArmEnum &&
|
x.ArmEnum == taskInfo.ArmEnum &&
|
||||||
x.Id != inDto.VisitTaskId &&
|
x.Id != inDto.VisitTaskId &&
|
||||||
x.DoctorUserId == taskInfo.DoctorUserId &&
|
x.DoctorUserId == taskInfo.DoctorUserId &&
|
||||||
|
@ -372,7 +372,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="visitTaskId"></param>
|
/// <param name="visitTaskId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[NonDynamicMethod]
|
[NonDynamicMethod]
|
||||||
public async Task<List<DicomReadingQuestionAnswer>> GetReadingQuestion(Guid trialReadingCriterionId,Guid? visitTaskId)
|
public async Task<List<DicomReadingQuestionAnswer>> GetReadingQuestion(Guid trialReadingCriterionId, Guid? visitTaskId)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -381,8 +381,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
//排除表格问题
|
//排除表格问题
|
||||||
var questions = await _readingQuestionTrialRepository
|
var questions = await _readingQuestionTrialRepository
|
||||||
.WhereIf(criterionIdInfo.IseCRFShowInDicomReading, x=>x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table)
|
.WhereIf(criterionIdInfo.IseCRFShowInDicomReading, x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table)
|
||||||
.WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x=>x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table)
|
.WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table)
|
||||||
|
|
||||||
.ProjectTo<DicomReadingQuestionAnswer>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
.ProjectTo<DicomReadingQuestionAnswer>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(GetReadingTableQuestionOutDto,bool)> GetCustomTableQuestionAnswer(GetCustomTableQuestionAnswerInDto inDto)
|
public async Task<(GetReadingTableQuestionOutDto, bool)> GetCustomTableQuestionAnswer(GetCustomTableQuestionAnswerInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
@ -538,7 +538,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="tableAnsweRowInfos"></param>
|
/// <param name="tableAnsweRowInfos"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[NonDynamicMethod]
|
[NonDynamicMethod]
|
||||||
public async Task<GetReadingTableQuestionOutDto> GetReadingTableQuestion(Guid trialReadingCriterionId, Guid? taskId, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos,bool isGetallQuestion=false)
|
public async Task<GetReadingTableQuestionOutDto> GetReadingTableQuestion(Guid trialReadingCriterionId, Guid? taskId, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, bool isGetallQuestion = false)
|
||||||
{
|
{
|
||||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync();
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
@ -878,7 +878,6 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (await _readingTableAnswerRowInfoRepository.AnyAsync(x => x.SplitRowId == deleteRowInfo.Id && x.MergeRowId == deleteRowInfo.Id))
|
if (await _readingTableAnswerRowInfoRepository.AnyAsync(x => x.SplitRowId == deleteRowInfo.Id && x.MergeRowId == deleteRowInfo.Id))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException($"当前病灶分裂出其他病灶或者其他病灶合并到了当前病灶,删除失败");
|
throw new BusinessValidationFailedException($"当前病灶分裂出其他病灶或者其他病灶合并到了当前病灶,删除失败");
|
||||||
|
@ -890,7 +889,7 @@ namespace IRaCIS.Application.Services
|
||||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId).Include(x=>x.ReadingQuestionTrial).OrderBy(x => x.RowIndex).ToListAsync();
|
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId).Include(x => x.ReadingQuestionTrial).OrderBy(x => x.RowIndex).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in rowInfoList.Where(x => x.RowIndex % 1 == 0))
|
foreach (var item in rowInfoList.Where(x => x.RowIndex % 1 == 0))
|
||||||
|
@ -903,11 +902,11 @@ namespace IRaCIS.Application.Services
|
||||||
measureDataStr = JsonConvert.SerializeObject(measureData);
|
measureDataStr = JsonConvert.SerializeObject(measureData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||||
{
|
{
|
||||||
RowIndex = index
|
RowIndex = index
|
||||||
});
|
});
|
||||||
|
|
||||||
await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||||
{
|
{
|
||||||
RowIndex = index,
|
RowIndex = index,
|
||||||
|
@ -931,7 +930,7 @@ namespace IRaCIS.Application.Services
|
||||||
await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||||
{
|
{
|
||||||
RowIndex = index + spiltindex,
|
RowIndex = index + spiltindex,
|
||||||
MeasureData= spiltmeasureDataStr,
|
MeasureData = spiltmeasureDataStr,
|
||||||
});
|
});
|
||||||
|
|
||||||
spiltindex += 0.01M;
|
spiltindex += 0.01M;
|
||||||
|
@ -976,7 +975,7 @@ namespace IRaCIS.Application.Services
|
||||||
if (inDto.RowIndex % 1 == 0)
|
if (inDto.RowIndex % 1 == 0)
|
||||||
{
|
{
|
||||||
var questionInfo = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.QuestionId).FirstNotNullAsync();
|
var questionInfo = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.QuestionId).FirstNotNullAsync();
|
||||||
if (questionInfo.MaxQuestionCount != null&& questionInfo.MaxQuestionCount!=0)
|
if (questionInfo.MaxQuestionCount != null && questionInfo.MaxQuestionCount != 0)
|
||||||
{
|
{
|
||||||
if (questionInfo.MaxQuestionCount <
|
if (questionInfo.MaxQuestionCount <
|
||||||
(
|
(
|
||||||
|
@ -1013,7 +1012,7 @@ namespace IRaCIS.Application.Services
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
||||||
msg=$"问题{item.QuestionName}最大相同问题数为{item.MaxRowCount.Value},当前已存在{rowCount}条!";
|
msg = $"问题{item.QuestionName}最大相同问题数为{item.MaxRowCount.Value},当前已存在{rowCount}条!";
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BusinessValidationFailedException(msg);
|
throw new BusinessValidationFailedException(msg);
|
||||||
|
@ -1036,7 +1035,7 @@ namespace IRaCIS.Application.Services
|
||||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == (inDto.RowId ?? default(Guid)));
|
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == (inDto.RowId ?? default(Guid)));
|
||||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.Id == (inDto.RowId ?? default(Guid)));
|
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.Id == (inDto.RowId ?? default(Guid)));
|
||||||
|
|
||||||
rowInfo.Id =inDto.RowId==null? NewId.NextGuid(): inDto.RowId.Value;
|
rowInfo.Id = inDto.RowId == null ? NewId.NextGuid() : inDto.RowId.Value;
|
||||||
rowInfo.TrialId = inDto.TrialId;
|
rowInfo.TrialId = inDto.TrialId;
|
||||||
rowInfo.QuestionId = inDto.QuestionId;
|
rowInfo.QuestionId = inDto.QuestionId;
|
||||||
rowInfo.MeasureData = inDto.MeasureData;
|
rowInfo.MeasureData = inDto.MeasureData;
|
||||||
|
@ -1100,55 +1099,54 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||||
|
|
||||||
// 修改编号
|
//// 修改编号
|
||||||
|
//var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
//// 获取标准表格外层问题
|
||||||
|
//var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.LesionType != null && x.ReadingTableQuestionTrialList.Any(x => x.QuestionMark == QuestionMark.AutoId))
|
||||||
|
// .SelectMany(x => x.ReadingTableQuestionTrialList).Where(x => x.QuestionMark == QuestionMark.AutoId).Select(x => new
|
||||||
|
// {
|
||||||
|
// x.ReadingQuestionId,
|
||||||
|
// TableQuestionId = x.Id,
|
||||||
|
|
||||||
// 获取标准表格外层问题
|
// }).ToListAsync();
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.LesionType != null && x.ReadingTableQuestionTrialList.Any(x => x.QuestionMark == QuestionMark.AutoId))
|
|
||||||
.SelectMany(x => x.ReadingTableQuestionTrialList).Where(x => x.QuestionMark == QuestionMark.AutoId).Select(x => new
|
|
||||||
{
|
|
||||||
x.ReadingQuestionId,
|
|
||||||
TableQuestionId = x.Id,
|
|
||||||
|
|
||||||
}).ToListAsync();
|
//var questionIds = questionList.Select(x => x.ReadingQuestionId).ToList();
|
||||||
|
|
||||||
var questionIds = questionList.Select(x => x.ReadingQuestionId).ToList();
|
//var questionMarkList = await _readingQuestionTrialRepository.Where(x => questionIds.Contains(x.Id)).Select(x => new
|
||||||
|
//{
|
||||||
|
// QuestionId = x.Id,
|
||||||
|
// x.OrderMark,
|
||||||
|
|
||||||
var questionMarkList = await _readingQuestionTrialRepository.Where(x => questionIds.Contains(x.Id)).Select(x => new
|
//}).ToListAsync();
|
||||||
{
|
|
||||||
QuestionId = x.Id,
|
|
||||||
x.OrderMark,
|
|
||||||
|
|
||||||
}).ToListAsync();
|
//var rowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && questionIds.Contains(x.QuestionId)).ToListAsync();
|
||||||
|
//List<ReadingTableQuestionAnswer> questionAnswerList = new List<ReadingTableQuestionAnswer>();
|
||||||
|
//foreach (var item in questionList)
|
||||||
|
//{
|
||||||
|
// await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == item.ReadingQuestionId
|
||||||
|
// && x.TableQuestionId == item.TableQuestionId && x.VisitTaskId == inDto.VisitTaskId);
|
||||||
|
|
||||||
var rowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && questionIds.Contains(x.QuestionId)).ToListAsync();
|
// var orderMark = questionMarkList.Where(x => x.QuestionId == item.ReadingQuestionId).Select(x => x.OrderMark).FirstOrDefault();
|
||||||
List<ReadingTableQuestionAnswer> questionAnswerList = new List<ReadingTableQuestionAnswer>();
|
|
||||||
foreach (var item in questionList)
|
|
||||||
{
|
|
||||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == item.ReadingQuestionId
|
|
||||||
&& x.TableQuestionId == item.TableQuestionId && x.VisitTaskId == inDto.VisitTaskId);
|
|
||||||
|
|
||||||
var orderMark = questionMarkList.Where(x => x.QuestionId == item.ReadingQuestionId).Select(x => x.OrderMark).FirstOrDefault();
|
// foreach (var row in rowInfo.Where(x => x.QuestionId == item.ReadingQuestionId))
|
||||||
|
// {
|
||||||
|
// questionAnswerList.Add(new ReadingTableQuestionAnswer()
|
||||||
|
// {
|
||||||
|
// Answer = orderMark + row.RowIndex.GetLesionMark(),
|
||||||
|
// Id = NewId.NextGuid(),
|
||||||
|
// QuestionId = item.ReadingQuestionId,
|
||||||
|
// RowId = row.Id,
|
||||||
|
// RowIndex = row.RowIndex,
|
||||||
|
// TableQuestionId = item.TableQuestionId,
|
||||||
|
// TrialId = taskInfo.TrialId,
|
||||||
|
// VisitTaskId = taskInfo.Id,
|
||||||
|
|
||||||
foreach (var row in rowInfo.Where(x => x.QuestionId == item.ReadingQuestionId))
|
// });
|
||||||
{
|
// }
|
||||||
questionAnswerList.Add(new ReadingTableQuestionAnswer()
|
//}
|
||||||
{
|
//await _readingTableQuestionAnswerRepository.AddRangeAsync(questionAnswerList);
|
||||||
Answer = orderMark + row.RowIndex.GetLesionMark(),
|
//await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||||
Id = NewId.NextGuid(),
|
|
||||||
QuestionId = item.ReadingQuestionId,
|
|
||||||
RowId = row.Id,
|
|
||||||
RowIndex = row.RowIndex,
|
|
||||||
TableQuestionId = item.TableQuestionId,
|
|
||||||
TrialId = taskInfo.TrialId,
|
|
||||||
VisitTaskId = taskInfo.Id,
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(questionAnswerList);
|
|
||||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1178,7 +1176,7 @@ namespace IRaCIS.Application.Services
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId
|
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId
|
||||||
&& (x.IsJudgeQuestion || (x.IsRequired == IsRequired.Required&&x.ShowQuestion==ShowQuestion.Show))
|
&& (x.IsJudgeQuestion || (x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show))
|
||||||
).ToListAsync();
|
).ToListAsync();
|
||||||
|
|
||||||
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.ReadingQuestionTrialId).ToListAsync();
|
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.ReadingQuestionTrialId).ToListAsync();
|
||||||
|
@ -1187,7 +1185,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (readingQuestionList.Count() > 0)
|
if (readingQuestionList.Count() > 0)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException($" 必填问题{ string.Join(',', readingQuestionList.Select(x => x.QuestionName))}的答案为空或未保存");
|
throw new BusinessValidationFailedException($" 必填问题{string.Join(',', readingQuestionList.Select(x => x.QuestionName))}的答案为空或未保存");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
||||||
|
@ -1272,9 +1270,10 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else if (inDto.SubjectId != null)
|
else if (inDto.SubjectId != null)
|
||||||
{
|
{
|
||||||
var subjectTaskList = (await _visitTaskService.GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto() {
|
var subjectTaskList = (await _visitTaskService.GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto()
|
||||||
TrialId= inDto.TrialId,
|
{
|
||||||
TrialReadingCriterionId=inDto.TrialReadingCriterionId,
|
TrialId = inDto.TrialId,
|
||||||
|
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||||
})).Item2;
|
})).Item2;
|
||||||
|
|
||||||
var index = 0;
|
var index = 0;
|
||||||
|
@ -1387,7 +1386,7 @@ namespace IRaCIS.Application.Services
|
||||||
task.DigitPlaces = criterionInfo.DigitPlaces;
|
task.DigitPlaces = criterionInfo.DigitPlaces;
|
||||||
task.CriterionType = criterionInfo.CriterionType;
|
task.CriterionType = criterionInfo.CriterionType;
|
||||||
|
|
||||||
var blindSubjectCode = await _visitTaskRepository.Where(x => x.Id == task.VisitTaskId).Select(x=>x.BlindSubjectCode).FirstNotNullAsync();
|
var blindSubjectCode = await _visitTaskRepository.Where(x => x.Id == task.VisitTaskId).Select(x => x.BlindSubjectCode).FirstNotNullAsync();
|
||||||
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
|
@ -464,9 +464,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//任务
|
//任务
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(VisitTask)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(VisitTask)))
|
||||||
{
|
{
|
||||||
|
@ -485,6 +482,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Dicom 阅片 签名
|
||||||
|
if (_userInfo.RequestUrl == "ReadingImageTask/SubmitDicomVisitTask")
|
||||||
|
{
|
||||||
|
//跳转阅片结果需要该参数
|
||||||
|
var subjectCode=_dbContext.Subject.Where(t=>t.Id==entity.SubjectId).Select(t=>t.Code).First();
|
||||||
|
obj = new { SubjectCode = subjectCode };
|
||||||
|
}
|
||||||
|
|
||||||
#region 裁判、肿瘤学、全局 都是通用的
|
#region 裁判、肿瘤学、全局 都是通用的
|
||||||
|
|
||||||
//裁判任务
|
//裁判任务
|
||||||
|
@ -591,13 +596,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
#region 阅片结果
|
#region 阅片结果
|
||||||
|
|
||||||
|
|
||||||
#region Resisit1.1
|
#region 暂时不区分标准
|
||||||
|
|
||||||
//保存影像质量 多条记录,只记录一条稽查
|
//保存影像质量 多条记录,只记录一条稽查
|
||||||
if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)))
|
if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)))
|
||||||
{
|
{
|
||||||
//保存影像质量
|
//1 保存影像质量 2:修改整体肿瘤评估结果
|
||||||
if (_userInfo.RequestUrl == "ReadingImageTask/changeDicomReadingQuestionAnswer")
|
if (_userInfo.RequestUrl == "ReadingImageTask/changeDicomReadingQuestionAnswer/1" || _userInfo.RequestUrl == "ReadingImageTask/changeDicomReadingQuestionAnswer/2")
|
||||||
{
|
{
|
||||||
var type = AuditOpt.Add;
|
var type = AuditOpt.Add;
|
||||||
|
|
||||||
|
@ -608,7 +613,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => taskQuestionAnswerList.Select(k => k.ReadingQuestionTrialId).Contains(t.Id)).Select(t => new { t.QuestionName, QuestionId = t.Id, t.ShowOrder }).OrderBy(t => t.ShowOrder).ToListAsync();
|
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => taskQuestionAnswerList.Select(k => k.ReadingQuestionTrialId).Contains(t.Id)).Select(t => new { t.QuestionName, QuestionId = t.Id, t.ShowOrder }).OrderBy(t => t.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var firstEntity = taskQuestionAnswerList.First();
|
var firstEntity = taskQuestionAnswerList.First();
|
||||||
|
|
||||||
var cloneEntity = firstEntity.Clone();
|
var cloneEntity = firstEntity.Clone();
|
||||||
|
@ -632,8 +636,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//病灶这里操作
|
||||||
|
if(entitys.Any(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)))
|
||||||
|
{
|
||||||
|
|
||||||
|
//删除病灶接口
|
||||||
|
if(_userInfo.RequestUrl == "ReadingImageTask/deleteReadingRowAnswer")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue