From d38e8b23bd77044c9ff4798bb7545c01be0cd133 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 1 Dec 2022 10:35:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingQuestionViewModel.cs | 25 +++++++ .../ReadingQuestionService.cs | 12 ++-- .../ReadingQuestionCriterionSystem.cs | 5 ++ .../ReadingQuestionTrial.cs | 69 ++++++++++++++++++- .../ReadingTableQuestionTrial.cs | 61 ++++++++++++++++ 5 files changed, 167 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 1aeddbb6f..5c4d1c39a 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -358,6 +358,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 问题标识 /// public QuestionMark? QuestionMark { get; set; } + + public List ParentTriggerValueList { get; set; } + public List RelevanceValueList { get; set; } + } /// ReadingTableQuestionSystemAddOrEdit 列表查询参数模型 @@ -590,6 +594,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto { public Guid? Id { get; set; } + /// + /// eCRF报告是否显示在图像页面 + /// + public bool IseCRFShowInDicomReading { get; set; } = false; + /// /// 标准 /// @@ -858,6 +867,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 数据来源 /// public DataSources? DataSource { get; set; } = DataSources.ManualEntry; + + public List ParentTriggerValueList { get; set; } + public List RelevanceValueList { get; set; } + public List CalculateQuestionList { get; set; } + } public class ReadingQuestionSystemView @@ -1581,6 +1595,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// 自定义计算标记 /// public string CalculateQuestions { get; set; } = "[]"; + + + + public List ParentTriggerValueList { get; set; } + public List RelevanceValueList { get; set; } + } public class GetSystemCriterionSelectDto @@ -1621,6 +1641,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public bool IsEnable { get; set; } + /// + /// eCRF报告是否显示在图像页面 + /// + public bool IseCRFShowInDicomReading { get; set; } = false; + /// /// 标准类型 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index 31c1c8573..0bbfe7a29 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -389,6 +389,8 @@ namespace IRaCIS.Application.Services { throw new BusinessValidationFailedException("问题编号重复"); } + indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList); + indto.RelevanceValue = string.Join(',', indto.RelevanceValueList); var entity = await _readingQuestionTrialRepository.InsertOrUpdateAsync(indto, true); return ResponseOutput.Ok(entity.Id.ToString()); } @@ -525,13 +527,14 @@ namespace IRaCIS.Application.Services /// /// 新增修改想想项目表格问题 /// - /// + /// /// [HttpPost] - public async Task AddOrUpdateReadingTableQuestionTrial(ReadingTableQuestionTrialAddOrEdit addOrEditReadingTableQuestionTrial) + public async Task AddOrUpdateReadingTableQuestionTrial(ReadingTableQuestionTrialAddOrEdit indto) { - - var entity = await _readingTableQuestionTrialRepository.InsertOrUpdateAsync(addOrEditReadingTableQuestionTrial, true); + indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList); + indto.RelevanceValue = string.Join(',', indto.RelevanceValueList); + var entity = await _readingTableQuestionTrialRepository.InsertOrUpdateAsync(indto, true); return ResponseOutput.Ok(entity.Id.ToString()); @@ -726,6 +729,7 @@ namespace IRaCIS.Application.Services { SynchronizeTime = DateTime.Now, IsMustGlobalReading = systemCriterion.IsMustGlobalReading, + IseCRFShowInDicomReading=systemCriterion.IseCRFShowInDicomReading, IsGlobalReading = systemCriterion.IsMustGlobalReading ? true : trialCriterion.IsGlobalReading, }) ; diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs index 400593611..c7873d4c8 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionSystem.cs @@ -65,6 +65,11 @@ namespace IRaCIS.Core.Domain.Models /// public bool IsOncologyReading { get; set; } = false; + /// + /// eCRF报告是否显示在图像页面 + /// + public bool IseCRFShowInDicomReading { get; set; } = false; + /// /// 是否必须全局阅片 /// diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs index 5afc43561..f6a4fcaab 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs @@ -5,6 +5,7 @@ using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Collections.Generic; +using System.Linq; namespace IRaCIS.Core.Domain.Models { @@ -233,11 +234,77 @@ namespace IRaCIS.Core.Domain.Models public List ReadingTableQuestionTrialList { get; set; } + [JsonIgnore] + [NotMapped] + public List ParentTriggerValueList + { + get + { + try + { + return this.ParentTriggerValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } + + [JsonIgnore] + [NotMapped] + public List RelevanceValueList + { + get + { + try + { + return this.RelevanceValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } + + [JsonIgnore] + [NotMapped] + public List CalculateQuestionList + { + get + { + + try + { + var result = JsonConvert.DeserializeObject>(this.CalculateQuestions); + return result == null ? new List() : result; + } + catch (Exception) + { + + return new List(); + } + + } + } } - + public class CalculateInfo + { + public bool IsTable { get; set; } + + public Guid? QuestionId { get; set; } + + public Guid? TableQuestionId { get; set; } + + } diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs index 75c4a9e22..7a686c40b 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs @@ -7,6 +7,9 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Collections.Generic; +using System.Linq; + namespace IRaCIS.Core.Domain.Models { /// @@ -180,6 +183,64 @@ namespace IRaCIS.Core.Domain.Models [ForeignKey("ReadingQuestionId")] public ReadingQuestionTrial ReadingQuestionTrial { get; set; } + [JsonIgnore] + [NotMapped] + public List ParentTriggerValueList + { + get + { + try + { + return this.ParentTriggerValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } + + [JsonIgnore] + [NotMapped] + public List RelevanceValueList + { + get + { + try + { + return this.RelevanceValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } + + [JsonIgnore] + [NotMapped] + public List CalculateQuestionList + { + get + { + try + { + var result = JsonConvert.DeserializeObject>(this.CalculateQuestions); + return result == null ? new List() : result; + } + catch (Exception) + { + + return new List(); + } + + } + } + }