返回表格问题的标记
parent
3cde829319
commit
21fdd4b0e4
|
@ -1130,6 +1130,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.TaskId).ProjectTo<SaveTableQuestionMarkInDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var qusetionList = await _readingQuestionTrialRepository
|
var qusetionList = await _readingQuestionTrialRepository
|
||||||
.Where(x => x.IsShowInDicom)
|
.Where(x => x.IsShowInDicom)
|
||||||
.WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify)
|
.WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify)
|
||||||
|
@ -1305,7 +1306,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
|
var pageGroupList = newPageQusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
|
||||||
pageGroupList.ForEach(x =>
|
pageGroupList.ForEach(x =>
|
||||||
{
|
{
|
||||||
FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId);
|
FindChildQuestion(x, newPageQusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, tableQuestionMarkList, inDto.TaskId);
|
||||||
});
|
});
|
||||||
|
|
||||||
page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList();
|
page.Childrens = pageGroupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList();
|
||||||
|
@ -1322,7 +1323,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
|
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
|
||||||
groupList.ForEach(x =>
|
groupList.ForEach(x =>
|
||||||
{
|
{
|
||||||
FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, inDto.TaskId);
|
FindChildQuestion(x, qusetionList, tableQuestionList, inDto.TableAnswers, inDto.TableAnsweRowInfos, inDto.OrganInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, tableQuestionMarkList, inDto.TaskId);
|
||||||
});
|
});
|
||||||
|
|
||||||
groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList();
|
groupList = groupList.Where(x => !(x.Type == ReadingQestionType.Group && x.Childrens.Count == 0)).ToList();
|
||||||
|
@ -1349,7 +1350,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <param name="isFirstChangeTask"></param>
|
/// <param name="isFirstChangeTask"></param>
|
||||||
/// <param name="lastTaskTableAnswer"></param>
|
/// <param name="lastTaskTableAnswer"></param>
|
||||||
/// <param name="TaskId"></param>
|
/// <param name="TaskId"></param>
|
||||||
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer, bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer, Guid? TaskId)
|
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer, bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer, List<SaveTableQuestionMarkInDto> TableQuestionMarkList, Guid? TaskId)
|
||||||
{
|
{
|
||||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList();
|
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList();
|
||||||
item.TableQuestions = new TrialReadTableQuestion();
|
item.TableQuestions = new TrialReadTableQuestion();
|
||||||
|
@ -1473,6 +1474,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
answers.Add("OtherNumberOfFrames", rowInfo == null || rowInfo.OtherNumberOfFrames == null ? string.Empty : rowInfo.OtherNumberOfFrames.ToString());
|
answers.Add("OtherNumberOfFrames", rowInfo == null || rowInfo.OtherNumberOfFrames == null ? string.Empty : rowInfo.OtherNumberOfFrames.ToString());
|
||||||
answers.Add("OtherMarkTool", rowInfo == null || rowInfo.OtherMarkTool == null ? string.Empty : rowInfo.OtherMarkTool.ToString());
|
answers.Add("OtherMarkTool", rowInfo == null || rowInfo.OtherMarkTool == null ? string.Empty : rowInfo.OtherMarkTool.ToString());
|
||||||
answers.Add("RowIndex", x.ToString());
|
answers.Add("RowIndex", x.ToString());
|
||||||
|
answers.Add("TableQuestionMarkList", rowInfo == null ? "[]" : JsonConvert.SerializeObject(TableQuestionMarkList.Where(x=>x.RowId== rowInfo.Id).ToList()));
|
||||||
answers.Add("RowId", rowInfo == null ? string.Empty : rowInfo.Id.ToString());
|
answers.Add("RowId", rowInfo == null ? string.Empty : rowInfo.Id.ToString());
|
||||||
answers.Add("MarkTool", rowInfo.MarkTool);
|
answers.Add("MarkTool", rowInfo.MarkTool);
|
||||||
answers.Add("StudyId", rowInfo.StudyId.ToString());
|
answers.Add("StudyId", rowInfo.StudyId.ToString());
|
||||||
|
@ -1504,7 +1506,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
item.Childrens.ForEach(x =>
|
item.Childrens.ForEach(x =>
|
||||||
{
|
{
|
||||||
FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, TaskId);
|
FindChildQuestion(x, questionlists, tableQuestionLists, tableAnswers, tableAnsweRowInfos, organInfos, baseLineTableAnswer, isFirstChangeTask, lastTaskTableAnswer, TableQuestionMarkList, TaskId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
CreateMap<VisitTask, VisitTaskDto>();
|
CreateMap<VisitTask, VisitTaskDto>();
|
||||||
CreateMap<SaveTableQuestionMarkInDto, ReadingTaskQuestionMark>();
|
CreateMap<SaveTableQuestionMarkInDto, ReadingTaskQuestionMark>();
|
||||||
|
CreateMap<ReadingTaskQuestionMark, SaveTableQuestionMarkInDto>();
|
||||||
CreateMap<SubmitTableQuestionInDto, ReadingTableAnswerRowInfo>()
|
CreateMap<SubmitTableQuestionInDto, ReadingTableAnswerRowInfo>()
|
||||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||||
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
|
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
|
||||||
|
|
Loading…
Reference in New Issue