diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index f3385181c..cfef7885f 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -506,6 +506,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid VisitTaskId { get; set; } + public GlobalAnswerType GlobalAnswerType { get; set; } + public string Answer { get; set; } } @@ -517,6 +519,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string QuestionName { get; set; } public string Answer { get; set; } + + } public class OncologyVisitTaskInfo @@ -656,7 +660,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List AfterQuestionList { get; set; } } + public class GetGlobalQuestionType + { + public GlobalAnswerType GlobalAnswerType { get; set; } + public string QuestionName { get; set; } + } public class GlobalQuestionInfo { public Guid? QuestionId { get; set; } @@ -694,6 +703,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 类型 /// public string Type { get; set; } + + + public GlobalAnswerType GlobalAnswerType { get; set; } } public class GetReadingImgOutDto diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 4df57cb5d..2f8f2e28f 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -1134,7 +1134,7 @@ namespace IRaCIS.Application.Services QuestionId = lr.question.QuestionId, QuestionName = lr.question.QuestionName, Type = lr.question.Type, - + GlobalAnswerType=GlobalAnswerType.Question, AnswerGroup = lr.question.AnswerGroup, AnswerCombination = lr.question.AnswerCombination, JudgeType = lr.question.JudgeType, @@ -1142,16 +1142,26 @@ namespace IRaCIS.Application.Services }).ToList(); - var reason = new GlobalQuestionInfo() + List questionTypes = new List() { - Answer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.QuestionId == null).Select(x => x.Answer).FirstOrDefault() ?? String.Empty, - QuestionName = "原因", - Type = "input", - - + new GetGlobalQuestionType (){GlobalAnswerType=GlobalAnswerType.Reason,QuestionName="原因" }, + new GetGlobalQuestionType (){GlobalAnswerType=GlobalAnswerType.AgreeOrNot,QuestionName="是否同意访视结果" }, + new GetGlobalQuestionType (){GlobalAnswerType=GlobalAnswerType.UpdateType,QuestionName="评估更新类型" }, }; - x.AfterQuestionList.Add(reason); + + foreach (var item in questionTypes) + { + x.AfterQuestionList.Add(new GlobalQuestionInfo() + { + Answer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.GlobalAnswerType == item.GlobalAnswerType).Select(x => x.Answer).FirstOrDefault() ?? String.Empty, + QuestionName = item.QuestionName, + Type = "input", + GlobalAnswerType=item.GlobalAnswerType, + + }); + } + }); diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 4bf4fc194..660170b70 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -574,6 +574,32 @@ namespace IRaCIS.Core.Domain.Share OncologyRead = 3, } + /// + /// 全局答案类型 + /// + public enum GlobalAnswerType + { + + /// + /// 问题答案 + /// + Question = 0, + + /// + /// 原因 + /// + Reason = 1, + + /// + /// 是否同意 + /// + AgreeOrNot = 2, + + /// + /// 评估更新类型 + /// + UpdateType = 3 + } public enum QuestionMark { /// diff --git a/IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs b/IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs index a8885a942..b6b89f0f6 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingGlobalTaskInfo.cs @@ -63,10 +63,15 @@ namespace IRaCIS.Core.Domain.Models /// public Guid TrialId { get; set; } - + /// - /// SubjectId - /// + /// 全局答案类型 + /// + public GlobalAnswerType GlobalAnswerType { get; set; } + + /// + /// SubjectId + /// public Guid SubjectId { get; set; } }