From 60a9ed0c31e2c2b9e01157451bda94f1c95fbd78 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Wed, 21 Sep 2022 14:14: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
---
.../IRaCIS.Core.Application.xml | 20 +++++++++
.../Reading/Dto/ReadingImageTaskViewModel.cs | 2 +-
.../Reading/ReadingImageTaskService.cs | 7 ++-
.../Service/Reading/_MapConfig.cs | 3 +-
.../Common/ReadingCommon.cs | 43 +++++++++++++++++++
5 files changed, 71 insertions(+), 4 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 8fa00f9dd..fa4842694 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -7503,6 +7503,26 @@
IR影像阅片
+
+
+ 拆分病灶
+
+
+
+
+
+ 合并病灶
+
+
+
+
+
+ 验证是否为基线访视任务
+
+
+
+
+
根据任务ID获取ReadingTool
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 4addce651..7bfb2b981 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -390,7 +390,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
/// RowIndex
///
- public decimal RowIndex { get; set; }
+ public string RowIndex { get; set; }
///
/// MeasureData
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index 70765e8a5..2d853e758 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -484,7 +484,7 @@ namespace IRaCIS.Application.Services
question.Childrens = rowIndexs.Select(x => new ReadingReportDto()
{
- QuestionName = question.OrderMark + x.ToString().PadLeft(2, '0'),
+ QuestionName = question.OrderMark + x.GetLesionMark(),
RowIndex = x,
}).ToList();
@@ -549,13 +549,16 @@ namespace IRaCIS.Application.Services
/// (QuestionId) 可为空
///
///
+ [HttpPost]
public async Task> GetTableAnswerRowInfoList(GetTableAnswerRowInfoInDto inDto)
{
await this.AddBaseLineAnswerToOtherTask(inDto.VisitTaskId);
- return await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
+ var result= await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
.WhereIf(inDto.QuestionId != null, x => x.QuestionId == inDto.QuestionId)
.ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex)
.ToListAsync();
+
+ return result;
}
///
diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
index 45fd6ee5e..4e8cdaa5a 100644
--- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
@@ -63,7 +63,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap()
- .ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.ReadingQuestionTrial.ShowOrder));
+ .ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.ReadingQuestionTrial.ShowOrder))
+ .ForMember(d => d.RowIndex, u => u.MapFrom(s => s.RowIndex.ToString()));
diff --git a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs
index 17ee93a2d..4c3a06649 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs
@@ -15,6 +15,49 @@ namespace IRaCIS.Core.Infra.EFCore.Common
public static class ReadingCommon
{
+ public static Dictionary SplitLesionDic = new Dictionary()
+ {
+ {1, "a" },
+ {2, "b" },
+ {3, "c" },
+ {4, "d" },
+ {5, "e" },
+ {6, "f" },
+ {7, "g" },
+ {8, "h" },
+ {9, "i" },
+ {10, "j" },
+ {11, "k" },
+ {12, "l" },
+ {13, "m" },
+ {14, "n" },
+ {15, "o" },
+ {16, "p" },
+ {17, "q" },
+ {18, "r" },
+ {19, "s" },
+ {20, "t" },
+ {21, "u" },
+ {22, "v" },
+ {23, "w" },
+ {24, "x" },
+ {25, "y" },
+ {26, "z" },
+
+ };
+
+ public static string GetLesionMark(this decimal value)
+ {
+ if (value % 1 == 0)
+ {
+ return decimal.ToInt32(value).ToString().PadLeft(2, '0');
+ }
+ else
+ {
+ return Math.Floor(value).ToString().PadLeft(2, '0') + SplitLesionDic[decimal.ToInt32((value % 1) * 100)];
+ }
+ }
+
public static Dictionary TaskNumDic = new Dictionary()
{
{ReadingCategory.Visit, 0 },