diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 0cb0ecae0..2829ee398 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -1,5 +1,6 @@ using IRaCIS.Core.Domain.Share; using MassTransit; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -141,6 +142,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string ReportMark { get; set; } = string.Empty; + /// + /// 高亮问题的答案 + /// + public string HighlightAnswer { get; set; } = "[]"; + + public List HighlightAnswerList { get; set; } = new List(); + /// /// 问题英文分组 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index e7cada86e..566e9679c 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -1,7 +1,9 @@ using IRaCIS.Core.Domain.Share; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -892,11 +894,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public string ParentDictionaryCode { get; set; } = string.Empty; + public List HighlightAnswerList { get; set; } = new List(); + - /// - /// 系统标准Id - /// - public Guid ReadingQuestionCriterionTrialId { get; set; } + + /// + /// 系统标准Id + /// + public Guid ReadingQuestionCriterionTrialId { get; set; } /// /// 是否复制病灶 @@ -1118,6 +1123,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List ParentTriggerValueList { get; set; } = new List(); public List RelevanceValueList { get; set; } = new List(); + + public List HighlightAnswerList { get; set; } = new List(); + /// /// 备注 /// @@ -1660,10 +1668,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public LimitShow LimitShow { get; set; } = LimitShow.AllShow; - /// - /// 最大答案长度 - /// - public int? MaxAnswerLength { get; set; } + + public List HighlightAnswerList { get; set; }= new List(); + + + /// + /// 最大答案长度 + /// + public int? MaxAnswerLength { get; set; } /// /// 文件类型 @@ -1728,10 +1740,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public string RelevanceValue { get; set; } = string.Empty; - /// - /// 类型 - /// - public string Type { get; set; } + /// + /// 高亮问题的答案 + /// + public string HighlightAnswer { get; set; } = "[]"; + + /// + /// 类型 + /// + public string Type { get; set; } /// /// 父问题触发 @@ -1846,6 +1863,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public bool IsAdditional { get; set; } + /// + /// 高亮问题的答案 + /// + public string HighlightAnswer { get; set; } = "[]"; + + public List HighlightAnswerList { get; set; } = new List(); + /// /// 分类算法 /// diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index f4ce30663..4089e8676 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -274,6 +274,7 @@ namespace IRaCIS.Application.Services { indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList); indto.RelevanceValue = string.Join(',', indto.RelevanceValueList); + indto.HighlightAnswer=JsonConvert.SerializeObject(indto.HighlightAnswerList); if (indto.Id != null) { var trialIdList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionSystemId == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None) @@ -439,7 +440,7 @@ namespace IRaCIS.Application.Services } indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList); indto.RelevanceValue = string.Join(',', indto.RelevanceValueList); - + indto.HighlightAnswer =JsonConvert.SerializeObject(indto.HighlightAnswerList); if (indto.Id != null) { diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index 51c3433ad..0cfebf074 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -217,6 +217,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType= ReportLayType.Group, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 分组 @@ -242,6 +244,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 问题 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 1abb95c98..22d76219b 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -213,6 +213,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit = x.CustomUnit, ReportLayType = ReportLayType.Group, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 分组 @@ -238,6 +240,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit = x.CustomUnit, ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 问题 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs index 672d3087a..c7cccd3e0 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoWithoutPETCalculateService.cs @@ -213,6 +213,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit = x.CustomUnit, ReportLayType = ReportLayType.Group, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 分组 @@ -238,6 +240,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit = x.CustomUnit, ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 问题 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index 543d30833..e13ced660 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -178,6 +178,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate CustomUnit=x.CustomUnit, Unit = x.Unit, ReportLayType=ReportLayType.Group, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 分组 @@ -204,6 +206,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 问题 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index 289356dd4..51cc7ff8f 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -171,6 +171,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType= ReportLayType.Group, + HighlightAnswer=x.HighlightAnswer, + HighlightAnswerList=x.HighlightAnswerList, }).ToList(); // 分组 @@ -196,6 +198,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 问题 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs index d19fb0e0b..e0c335572 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs @@ -167,6 +167,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType= ReportLayType.Group, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 分组 @@ -192,6 +194,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 问题 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs index 6d08584c1..55cfa4e3d 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/SelfDefineCalculateService.cs @@ -175,6 +175,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType = ReportLayType.Group, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 分组 @@ -203,6 +205,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Unit = x.Unit, CustomUnit=x.CustomUnit, ReportLayType = ReportLayType.Question, + HighlightAnswer = x.HighlightAnswer, + HighlightAnswerList = x.HighlightAnswerList, }).ToList(); // 问题 diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs index 1de10ce86..bc02ee3b4 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs @@ -217,7 +217,12 @@ namespace IRaCIS.Core.Domain.Models /// public QuestionClassify? QuestionClassify { get; set; } - [JsonIgnore] + /// + /// 高亮问题的答案 + /// + public string HighlightAnswer { get; set; } = "[]"; + + [JsonIgnore] [ForeignKey("GroupId")] public ReadingQuestionSystem GroupInfo { get; set; } @@ -272,6 +277,26 @@ namespace IRaCIS.Core.Domain.Models } + [NotMapped] + public List HighlightAnswerList + { + get + { + + try + { + var result = JsonConvert.DeserializeObject>(this.HighlightAnswer); + return result == null ? new List() : result; + } + catch (Exception) + { + + return new List(); + } + + } + } + } diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs index 5c315bf9b..7bf00b885 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs @@ -302,10 +302,15 @@ namespace IRaCIS.Core.Domain.Models [ForeignKey("GroupId")] public ReadingQuestionTrial GroupInfo { get; set; } - /// - /// 分页标准 - /// - [ForeignKey("ReadingCriterionPageId")] + /// + /// 高亮问题的答案 + /// + public string HighlightAnswer { get; set; } = "[]"; + + /// + /// 分页标准 + /// + [ForeignKey("ReadingCriterionPageId")] [JsonIgnore] public ReadingCriterionPage ReadingCriterionPage { get; set; } [JsonIgnore] @@ -380,7 +385,27 @@ namespace IRaCIS.Core.Domain.Models } } - } + [NotMapped] + public List HighlightAnswerList + { + get + { + + try + { + var result = JsonConvert.DeserializeObject>(this.HighlightAnswer); + return result == null ? new List() : result; + } + catch (Exception) + { + + return new List(); + } + + } + } + + } public class CalculateInfo