From 73221e95a40d95942da2f7c0715ca695ad8d03d8 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Fri, 23 Sep 2022 09:57:12 +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
---
IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 2 +-
.../Service/Reading/Dto/ReadingImageTaskViewModel.cs | 8 ++++++++
.../Service/Reading/ReadingCalculateService.cs | 8 ++++----
.../Service/Reading/ReadingImageTaskService.cs | 6 ++++--
IRaCIS.Core.Application/Service/Reading/_MapConfig.cs | 6 ++++--
IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs | 4 ++--
IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs | 6 +++---
7 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 77d025cc5..6703597f1 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -7594,7 +7594,7 @@
-
+
获取子元素
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 5940f1a61..7eeccdf66 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -345,6 +345,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
}
+ public class TableAnsweRowInfo : ReadingTableAnswerRowInfo
+ {
+ public string SplitName { get; set; }
+
+ public string MergeName { get; set; }
+
+
+ }
public class ReadingTableQuestionAnswerInfo : ReadingTableQuestionAnswer
{
public int ShowOrder { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs
index baacda69d..eba4685b1 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs
@@ -898,16 +898,16 @@ namespace IRaCIS.Core.Application.Service
SODPercent = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()),
// SOD 百分比与基线期SOD相比减小≥30% bool
- SODPercentBigger30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= (decimal)0.3,
+ SODPercentBigger30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= 30,
// SOD 百分比 与基线期SOD相比减小<30% bool
- SODPercentLess30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < (decimal)0.3,
+ SODPercentLess30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < 30,
// SOD 百分比 整体访视期间最低点SOD相比增加<20%
- LowPercentLess20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < (decimal)0.2,
+ LowPercentLess20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) <20,
// SOD 百分比 比整体访视期间最低点SOD增加≥20%
- LowPercentBigger20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= (decimal)0.2,
+ LowPercentBigger20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= 20,
// SOD 变化值 比整体访视期间最低点SOD绝对增加值<5 mm
LowChangeLess5 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowestIncrease).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < 5,
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index b57a5a355..e9dda1009 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -624,7 +624,7 @@ namespace IRaCIS.Application.Services
.ProjectTo(_mapper.ConfigurationProvider)
.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
- var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
+ var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
if (formType == FormType.MultiplePage)
{
@@ -689,7 +689,7 @@ namespace IRaCIS.Application.Services
///
///
///
- private void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos)
+ private void FindChildQuestion(TrialReadQuestionData item, List questionlists, List tableQuestionLists, List tableAnswers, List tableAnsweRowInfos)
{
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
item.TableQuestions = new TrialReadTableQuestion();
@@ -743,6 +743,8 @@ namespace IRaCIS.Application.Services
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
+ answers.Add("SplitOrMergeLesionName",rowInfo.SplitName.IsNullOrEmpty()? rowInfo.MergeName: rowInfo.SplitName);
+ answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType==null?string.Empty:((int)rowInfo.SplitOrMergeType).ToString());
item.TableQuestions.Answers.Add(answers);
diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
index 9bf67fbf8..345dd9e79 100644
--- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
@@ -3,7 +3,7 @@ using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Models;
-
+using IRaCIS.Core.Infra.EFCore.Common;
namespace IRaCIS.Core.Application.Service
{
@@ -112,7 +112,9 @@ namespace IRaCIS.Core.Application.Service
CreateMap()
.ForMember(d => d.ReadingQuestionSystemId, u => u.MapFrom(s => s.Id));
-
+ CreateMap()
+ .ForMember(d => d.MergeName, u => u.MapFrom(s => s.MergeRow == null ? string.Empty : s.MergeRow.ReadingQuestionTrial.OrderMark + s.MergeRow.RowIndex.GetLesionMark()))
+ .ForMember(d => d.SplitName, u => u.MapFrom(s => s.SplitRow == null ? string.Empty : s.SplitRow.ReadingQuestionTrial.OrderMark + s.SplitRow.RowIndex.GetLesionMark()));
CreateMap()
diff --git a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs
index 77e87f72a..383b6e80a 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs
@@ -17,8 +17,8 @@ namespace IRaCIS.Core.Domain.Models
{
///
- /// 问题ID
- ///
+ /// 系统表的问题Id ReadingQuestionSystem的Id
+ ///
public Guid ReadingQuestionId { get; set; }
///
diff --git a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs
index c9340b2f3..d6b30cd51 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs
@@ -19,10 +19,10 @@ namespace IRaCIS.Core.Domain.Models
/// TrialId
///
public Guid TrialId { get; set; }
-
+
///
- /// ReadingQuestionId
- ///
+ /// 项目问题的Id ReadingQuestionTrial的id
+ ///
public Guid ReadingQuestionId { get; set; }
///