diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index e02f437d7..905663ca5 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -6757,6 +6757,14 @@
+
+
+ 或者阅片答案预览
+
+
+
+
+
获取系统的阅片问题
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 4da3704f3..5c80fb192 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -671,6 +671,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public List PublicPage{ get; set; }
}
+
+
+
public class GetTrialReadingQuestionOutDto
{
public Guid ReadingQuestionTrialId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index 7bf8e6ec3..94cb19833 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -475,6 +475,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 问题类型
///
public QuestionType? QuestionType { get; set; }
+
+ ///
+ /// 是否显示在Dicom阅片中
+ ///
+ public bool IsShowInDicom { get; set; }
}
public class ReadingQuestionSystemView
@@ -586,6 +591,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 问题类型
///
public QuestionType? QuestionType { get; set; }
+
+ ///
+ /// 是否显示在Dicom阅片中
+ ///
+ public bool IsShowInDicom { get; set; }
}
@@ -874,6 +884,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 问题类型
///
public QuestionType? QuestionType { get; set; }
+
+ ///
+ /// 是否显示在Dicom阅片中
+ ///
+ public bool IsShowInDicom { get; set; } = false;
}
@@ -993,6 +1008,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 问题类型
///
public QuestionType? QuestionType { get; set; }
+
+ ///
+ /// 是否显示在Dicom阅片中
+ ///
+ public bool IsShowInDicom { get; set; } = false;
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index b5b9eb521..c21bc07c7 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -98,7 +98,20 @@ namespace IRaCIS.Application.Services
//public async Task<> GetVisitReadingQuestion(GetVisitReadingQuestionInDto inDto)
//{
+ // var readingTrialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstNotNullAsync();
+ // List qusetionList = await GetReadingAnswerView(readingTrialCriterion.Id, inDto.VisitTaskId);
+
+
+ // var groupList = qusetionList.Where(x => x.Type == "group" || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
+ // groupList.ForEach(x =>
+ // {
+ // this.FindChildQuestion(x, qusetionList);
+ // });
+
+ // groupList = groupList.Where(x => !(x.Type == "group" && x.Childrens.Count() == 0)).ToList();
+
+ // result.SinglePage = groupList;
//}
@@ -722,38 +735,9 @@ namespace IRaCIS.Application.Services
{
var result = new GetTrialReadingQuestionPageDto();
var readingTaskState = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.ReadingTaskState).FirstOrDefaultAsync();
- var query = from data in _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
+
- join page in _readingCriterionPageRepository.AsQueryable() on data.ReadingCriterionPageId ?? default(Guid) equals page.Id into pageTemp
- from leftpage in pageTemp.DefaultIfEmpty()
-
- join questionAnswer in _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId) on data.Id equals questionAnswer.ReadingQuestionTrialId into questionAnswerTemp
- from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
- select new GetTrialReadingQuestionOutDto()
- {
- ReadingQuestionTrialId = data.Id,
- ReadingQuestionCriterionTrialId = data.ReadingQuestionCriterionTrialId,
- TrialId = data.TrialId,
- Type = data.Type,
- ParentTriggerValue = data.ParentTriggerValue,
- GroupName = data.GroupName,
- QuestionName = data.QuestionName,
- IsRequired = data.IsRequired,
- ShowQuestion=data.ShowQuestion,
- ShowOrder = data.ShowOrder,
- RelevanceId=data.RelevanceId,
- RelevanceValue=data.RelevanceValue,
- ImageCount=data.ImageCount,
- ParentId = data.ParentId,
- TypeValue = data.TypeValue,
- Answer = leftquestionAnswer.Answer,
- ReadingCriterionPageId = data.ReadingCriterionPageId,
- PageName = leftpage.PageName,
- PageShowOrder = leftpage.ShowOrder,
- IsPublicPage = leftpage.IsPublicPage,
- };
-
- var qusetionList = await query.Where(x=>x.ShowQuestion!=ShowQuestion.Hide).OrderBy(x => x.ShowOrder).ToListAsync();
+ var qusetionList = await GetReadingAnswerView(inDto.ReadingQuestionCriterionTrialId,inDto.VisitTaskId);
var formType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.ReadingQuestionCriterionTrialId).Select(x => x.FormType).FirstOrDefaultAsync();
var groupList = new List();
@@ -826,9 +810,50 @@ namespace IRaCIS.Application.Services
}); ;
}
-
-
-
+
+ ///
+ /// 或者阅片答案预览
+ ///
+ ///
+ ///
+ ///
+ private async Task> GetReadingAnswerView(Guid readingQuestionCriterionTrialId,Guid? visitTaskId)
+ {
+ var query = from data in _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == readingQuestionCriterionTrialId)
+
+ join page in _readingCriterionPageRepository.AsQueryable() on data.ReadingCriterionPageId ?? default(Guid) equals page.Id into pageTemp
+ from leftpage in pageTemp.DefaultIfEmpty()
+
+ join questionAnswer in _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == visitTaskId) on data.Id equals questionAnswer.ReadingQuestionTrialId into questionAnswerTemp
+ from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
+ select new GetTrialReadingQuestionOutDto()
+ {
+ ReadingQuestionTrialId = data.Id,
+ ReadingQuestionCriterionTrialId = data.ReadingQuestionCriterionTrialId,
+ TrialId = data.TrialId,
+ Type = data.Type,
+ ParentTriggerValue = data.ParentTriggerValue,
+ GroupName = data.GroupName,
+ QuestionName = data.QuestionName,
+ IsRequired = data.IsRequired,
+ ShowQuestion = data.ShowQuestion,
+ ShowOrder = data.ShowOrder,
+ RelevanceId = data.RelevanceId,
+ RelevanceValue = data.RelevanceValue,
+ ImageCount = data.ImageCount,
+ ParentId = data.ParentId,
+ TypeValue = data.TypeValue,
+ Answer = leftquestionAnswer.Answer,
+ ReadingCriterionPageId = data.ReadingCriterionPageId,
+ PageName = leftpage.PageName,
+ PageShowOrder = leftpage.ShowOrder,
+ IsPublicPage = leftpage.IsPublicPage,
+ };
+
+ var qusetionList = await query.Where(x => x.ShowQuestion != ShowQuestion.Hide).OrderBy(x => x.ShowOrder).ToListAsync();
+
+ return qusetionList;
+ }
#endregion
#region 获取系统的阅片问题
@@ -1188,6 +1213,8 @@ namespace IRaCIS.Application.Services
});
}
}
+
+
#endregion
#region 保存任务问题
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
index 1300fe472..e3d054790 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
@@ -114,6 +114,11 @@ namespace IRaCIS.Core.Domain.Models
///
public QuestionType? QuestionType { get; set; }
+ ///
+ /// 是否显示在Dicom阅片中
+ ///
+ public bool IsShowInDicom { get; set; } = false;
+
///
/// 创建人
///
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
index c29a1db25..93144bbd6 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
@@ -152,6 +152,11 @@ namespace IRaCIS.Core.Domain.Models
///
public int? MaxQuestionCount { get; set; }
+ ///
+ /// 是否显示在Dicom阅片中
+ ///
+ public bool IsShowInDicom { get; set; } = false;
+
///
/// 分页标准
///