Uat_Study
parent
4d0e15f755
commit
5efabe1875
|
@ -152,7 +152,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var criterionId = await _readingQuestionCriterionTrialRepository.Where(x => x.IsConfirm && x.TrialId == inDto.TrialId).Select(x => x.Id).FirstOrDefaultAsync();
|
var criterionId = await _readingQuestionCriterionTrialRepository.Where(x => x.IsConfirm && x.TrialId == inDto.TrialId).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
|
||||||
var questions = await _readingQuestionTrialRepository.Where(x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == criterionId)
|
var questions = await _readingQuestionTrialRepository.Where(x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == criterionId&&(x.Type=="table"||x.Type== "group"))
|
||||||
.ProjectTo<DicomReadingQuestionAnswer>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
.ProjectTo<DicomReadingQuestionAnswer>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
|
var answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
|
||||||
|
@ -170,13 +170,17 @@ namespace IRaCIS.Application.Services
|
||||||
private void GetDicomReadingAnswer(DicomReadingQuestionAnswer item,List<DicomReadingQuestionAnswer> questions,List<ReadingTaskQuestionAnswer> answers)
|
private void GetDicomReadingAnswer(DicomReadingQuestionAnswer item,List<DicomReadingQuestionAnswer> questions,List<ReadingTaskQuestionAnswer> answers)
|
||||||
{
|
{
|
||||||
item.Answer = answers.Where(x => x.ReadingQuestionTrialId == item.Id).Select(x => x.Answer).FirstIsNullReturnEmpty();
|
item.Answer = answers.Where(x => x.ReadingQuestionTrialId == item.Id).Select(x => x.Answer).FirstIsNullReturnEmpty();
|
||||||
item.Childrens = questions.Where(x => x.ParentId == item.Id || (x.GroupName == item.GroupName && x.ParentId == null)).ToList();
|
item.Childrens = questions.Where(x => x.ParentId == item.Id||((item.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == item.GroupName)) ).ToList();
|
||||||
|
if (item.Childrens != null && item.Childrens.Count > 0)
|
||||||
|
{
|
||||||
foreach (var question in item.Childrens)
|
foreach (var question in item.Childrens)
|
||||||
{
|
{
|
||||||
GetDicomReadingAnswer(question, questions, answers);
|
GetDicomReadingAnswer(question, questions, answers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取阅片报告
|
/// 获取阅片报告
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue