diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index b493a8a1f..fef2a352d 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1225,6 +1225,106 @@
排序字段
+
+
+ 非淋巴结靶病灶长径之和 decimal
+
+
+
+
+ 所有淋巴结靶病灶的短径小于10mm
+
+
+
+
+ SOD 百分比与基线期SOD相比减小≥30%
+
+
+
+
+ SOD 百分比 与基线期SOD相比减小<30%
+
+
+
+
+ SOD 百分比 整体访视期间最低点SOD相比增加
+
+
+
+
+ SOD 百分比 比整体访视期间最低点SOD增加≥20%
+
+
+
+
+ SOD 变化值 比整体访视期间最低点SOD绝对增加值<5 mm
+
+
+
+
+ 比整体访视期间最低点SOD绝对增加值≥5 mm
+
+
+
+
+ 被评估为NE的单个靶病灶 是否存在状态为不可评估的靶病灶
+
+
+
+
+ 上次访视点整体肿瘤评估
+
+
+
+
+ 当前访视点非淋巴结病灶长径>0
+
+
+
+
+ 至少一个淋巴结靶病灶短径≥10 mm
+
+
+
+
+ 该淋巴结靶病灶短径绝对增加值≥5 mm
+
+
+
+
+ 阅片计算Dto
+
+
+
+
+ 答案
+
+
+
+
+ 问题名称
+
+
+
+
+ 病灶类型
+
+
+
+
+ 答案
+
+
+
+
+ 问题Id
+
+
+
+
+ 问题标识
+
+
项目ID
@@ -3610,7 +3710,7 @@
阅片计算
-
+
计算任务
@@ -3631,14 +3731,14 @@
-
+
自动计算
-
+
获取SOD
@@ -3648,28 +3748,28 @@
-
+
非淋巴结靶病灶长径之和
-
+
与基线SOD相比变化量(mm)
-
+
与整个访视期间最低点相比增加的百分比
-
+
与整个访视期间最低点相比增加的值(mm)
@@ -3679,7 +3779,7 @@
-
+
与整个访视期间最低点相比增加的百分比
@@ -3689,7 +3789,7 @@
-
+
整个访视期间最低点访视名称
@@ -3699,35 +3799,35 @@
-
+
是否存在非淋巴结靶病灶
-
+
是否存在淋巴结靶病灶且该病灶比上一访视短径增加5MM以上
-
+
被评估为NE的单个靶病灶
-
+
整体肿瘤评估
-
+
修改与整个访视期间最低点相比增加的值(mm)
@@ -3735,7 +3835,7 @@
-
+
修改整个访视期间最低点相比增加的百分比
@@ -3752,41 +3852,41 @@
-
+
获取基线SOD
-
+
获取访视任务信息
-
+
获取上一个访视任务Id
-
+
获取靶病灶评估
-
+
获取非靶病灶评估
-
+
获取新病灶评估
@@ -4422,41 +4522,6 @@
标准 病灶类型
-
-
- 阅片计算Dto
-
-
-
-
- 答案
-
-
-
-
- 问题名称
-
-
-
-
- 病灶类型
-
-
-
-
- 答案
-
-
-
-
- 问题Id
-
-
-
-
- 问题标识
-
-
类型
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
index be845ea02..76fd80099 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs
@@ -6,7 +6,7 @@
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
-namespace IRaCIS.Core.Application.ViewModel
+namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public class CalculateTaskInDto
@@ -16,6 +16,75 @@ namespace IRaCIS.Core.Application.ViewModel
public bool IsChangeOtherTask { get; set; }
}
+ public class TargetLesionCalculateDto
+ {
+ ///
+ /// 非淋巴结靶病灶长径之和 decimal
+ ///
+ public decimal SumOfDiameter { get; set; }
+
+ ///
+ /// 所有淋巴结靶病灶的短径小于10mm
+ ///
+ public bool DiameterLessThan10 { get; set; }
+
+ ///
+ /// SOD 百分比与基线期SOD相比减小≥30%
+ ///
+ public bool SODPercentBigger30 { get; set; }
+
+ ///
+ /// SOD 百分比 与基线期SOD相比减小<30%
+ ///
+ public bool SODPercentLess30 { get; set; }
+
+ ///
+ /// SOD 百分比 整体访视期间最低点SOD相比增加
+ ///
+ public bool LowPercentLess20 { get; set; }
+
+ ///
+ /// SOD 百分比 比整体访视期间最低点SOD增加≥20%
+ ///
+ public bool LowPercentBigger20 { get; set; }
+
+ ///
+ /// SOD 变化值 比整体访视期间最低点SOD绝对增加值<5 mm
+ ///
+ public bool LowChangeLess5 { get; set; }
+
+ ///
+ /// 比整体访视期间最低点SOD绝对增加值≥5 mm
+ ///
+ public bool LowChangeBigger5 { get; set; }
+
+ ///
+ /// 被评估为NE的单个靶病灶 是否存在状态为不可评估的靶病灶
+ ///
+ public bool ExixtsNETargetLesion { get; set; }
+
+ ///
+ /// 上次访视点整体肿瘤评估
+ ///
+ public string LastTargetLesionEvaluate { get; set; }
+
+ ///
+ /// 当前访视点非淋巴结病灶长径>0
+ ///
+ public bool CurrentMajoreBigger0 { get; set; }
+
+ ///
+ /// 至少一个淋巴结靶病灶短径≥10 mm
+ ///
+ public bool CurrenShortBigger10 { get; set; }
+
+ ///
+ /// 该淋巴结靶病灶短径绝对增加值≥5 mm
+ ///
+ public bool IsAddFive { get; set; }
+
+ }
+
///
/// 阅片计算Dto
///
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 1061d3e43..0ea26fce0 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -889,6 +889,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
}
+ public class VerifyVisitTaskDto
+ {
+ public QuestionType QuestionType { get; set; }
+
+ public Func> Fun { get; set; }
+ }
+
public class VerifyVisitTaskQuestionsOutDto
{
public bool IsVerified { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs
index 36a9f5592..4ed5eff15 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingCalculateService.cs
@@ -90,41 +90,26 @@ namespace IRaCIS.Core.Application.Service
ErrorMessage=string.Empty,
};
- foreach (var item in data.QuestionInfo.Where(x => x.QuestionType != null))
+ List types = new List() {
+ new VerifyVisitTaskDto (){ QuestionType=QuestionType.TargetLesion,Fun=this.GetTargetLesionEvaluate },
+ new VerifyVisitTaskDto (){ QuestionType=QuestionType.NoTargetLesion,Fun=this.GetNoTargetLesionEvaluate },
+ new VerifyVisitTaskDto (){ QuestionType=QuestionType.NewLesions,Fun=this.GetNewLesionEvaluate }
+ };
+
+ foreach (var type in types)
{
- switch (item.QuestionType)
- {
- case QuestionType.TargetLesion:
- var targetLesionAnswer = await GetTargetLesionEvaluate(data);
- if (item.Answer != targetLesionAnswer)
- {
- result.IsVerified = false;
- var msg = $"问题【{item.QuesionName}】的答案为【{item.Answer}】但是计算答案为【{targetLesionAnswer}】";
- result.ErrorMessage += result.ErrorMessage == string.Empty ? msg : "," + msg;
- }
- break;
-
- case QuestionType.NoTargetLesion:
- var noTargetLesionAnswer = await GetNoTargetLesionEvaluate(data);
- if (item.Answer != noTargetLesionAnswer)
- {
- result.IsVerified = false;
- var msg = $"问题【{item.QuesionName}】的答案为【{item.Answer}】但是计算答案为【{noTargetLesionAnswer}】";
- result.ErrorMessage += result.ErrorMessage == string.Empty ? msg : "," + msg;
- }
- break;
- case QuestionType.NewLesions:
- var newTargetLesionAnswer = await GetNewLesionEvaluate(data);
- if (item.Answer != newTargetLesionAnswer)
- {
- result.IsVerified = false;
- var msg = $"问题【{item.QuesionName}】的答案为【{item.Answer}】但是计算答案为【{newTargetLesionAnswer}】";
- result.ErrorMessage += result.ErrorMessage == string.Empty ? msg : "," + msg;
- }
- break;
- }
- }
-
+ var question=data.QuestionInfo.Where(x => x.QuestionType == type.QuestionType).FirstOrDefault();
+ if (question != null)
+ {
+ var calculateAnswer = await type.Fun(data);
+ if (question.Answer != calculateAnswer)
+ {
+ result.IsVerified = false;
+ var msg = $"问题【{question.QuesionName}】的答案为【{question.Answer}】但是计算答案为【{calculateAnswer}】";
+ result.ErrorMessage += result.ErrorMessage == string.Empty ? msg : "," + msg;
+ }
+ }
+ }
return result;
}
@@ -798,18 +783,18 @@ namespace IRaCIS.Core.Application.Service
public async Task GetTargetLesionEvaluate(ReadingCalculateDto inDto)
{
var tableQuestion = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList();
- dynamic resultData = new
+ TargetLesionCalculateDto resultData = new TargetLesionCalculateDto()
{
- //非淋巴结靶病灶长径之和
+ //非淋巴结靶病灶长径之和 decimal
SumOfDiameter = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SumOfDiameter).Sum(x => x.Answer.IsNullOrEmptyReturn0()),
- //所有淋巴结靶病灶的短径小于10mm
+ //所有淋巴结靶病灶的短径小于10mm bool
DiameterLessThan10 = true,
- // SOD 百分比与基线期SOD相比减小≥30%
+ // SOD 百分比与基线期SOD相比减小≥30% bool
SODPercentBigger30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= (decimal)0.3,
- // SOD 百分比 与基线期SOD相比减小<30%
+ // SOD 百分比 与基线期SOD相比减小<30% bool
SODPercentLess30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < (decimal)0.3,
// SOD 百分比 整体访视期间最低点SOD相比增加<20%
@@ -872,7 +857,7 @@ namespace IRaCIS.Core.Application.Service
string result = string.Empty;
- if (resultData.calculateData == 0 && resultData.DiameterLessThan10 && !resultData.ExixtsNETargetLesion)
+ if (resultData.SumOfDiameter == 0 && resultData.DiameterLessThan10 && !resultData.ExixtsNETargetLesion)
{
result = "CR";
}