diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 0586d4a5b..e6fce89b6 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -1578,6 +1578,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public decimal? JudgeDifferenceValue { get; set; }
+ ///
+ /// 裁判百分比或绝对值的相差值匹配规则
+ ///
+ public JudgeDifferenceType? JudgeDifferenceType { get; set; }
+
public bool IsHaveChange { get; set; } = false;
public string VisitAnswer { get; set; } = string.Empty;
@@ -1820,6 +1825,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public decimal? JudgeDifferenceValue { get; set; }
+ ///
+ /// 裁判百分比或绝对值的相差值匹配规则
+ ///
+ public JudgeDifferenceType? JudgeDifferenceType { get; set; }
+
public List AnswerCombination { get; set; }
@@ -1837,6 +1847,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public decimal? JudgeDifferenceValue { get; set; }
+ ///
+ /// 裁判百分比或绝对值的相差值匹配规则
+ ///
+ public JudgeDifferenceType? JudgeDifferenceType { get; set; }
+
public string QuestionName { get; set; }
@@ -2276,6 +2291,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 裁判百分比或绝对值的相差值
///
public decimal? JudgeDifferenceValue { get; set; }
+
+ ///
+ /// 裁判百分比或绝对值的相差值匹配规则
+ ///
+ public JudgeDifferenceType? JudgeDifferenceType { get; set; }
public string AnswerGroup { get; set; }
@@ -2325,6 +2345,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 裁判百分比或绝对值的相差值
///
public decimal? JudgeDifferenceValue { get; set; }
+
+ ///
+ /// 裁判百分比或绝对值的相差值匹配规则
+ ///
+ public JudgeDifferenceType? JudgeDifferenceType { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs
index 17036a9c9..9dda8fac0 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingJudgeTaskService.cs
@@ -47,7 +47,8 @@ namespace IRaCIS.Application.Services
DictionaryCode=x.DictionaryCode,
JudgeType = x.JudgeType,
ReadingQuestionTrialId = x.Id,
- JudgeDifferenceValue= x.JudgeDifferenceValue
+ JudgeDifferenceValue= x.JudgeDifferenceValue,
+ JudgeDifferenceType=x.JudgeDifferenceType,
}).ToListAsync();
@@ -72,7 +73,7 @@ namespace IRaCIS.Application.Services
AnswerGroup = JsonConvert.SerializeObject(inDto.AnswerGroup),
AnswerCombination = JsonConvert.SerializeObject(inDto.AnswerCombination),
JudgeDifferenceValue= inDto.JudgeDifferenceValue,
-
+ JudgeDifferenceType=inDto.JudgeDifferenceType,
JudgeType = inDto.JudgeType,
});
@@ -617,6 +618,7 @@ namespace IRaCIS.Application.Services
JudgeType = question.JudgeType,
QuestionId = question.Id,
JudgeDifferenceValue=question.JudgeDifferenceValue,
+ JudgeDifferenceType=question.JudgeDifferenceType,
VisitTaskId = questionAnswer.VisitTaskId,
};
var globalVisitAnswerlist = await globalVisitQuestionQuery.ToListAsync();
@@ -625,14 +627,15 @@ namespace IRaCIS.Application.Services
foreach (var item in taskNums)
{
- List groupTasks = globalVisitAnswerlist.Where(x => x.VisitTaskNum == item).GroupBy(x => new {x.JudgeDifferenceValue, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
+ List groupTasks = globalVisitAnswerlist.Where(x => x.VisitTaskNum == item).GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
{
QuestionId = x.Key.QuestionId,
AnswerGroup = x.Key.AnswerGroup,
AnswerCombination = x.Key.AnswerCombination,
JudgeType = x.Key.JudgeType,
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
- TaskAnswerList = x.Select(y => y.Answer).ToList(),
+ JudgeDifferenceType = x.Key.JudgeDifferenceType,
+ TaskAnswerList = x.Select(y => y.Answer).ToList(),
}).ToList();
noteEqual = noteEqual || ComputeJudgeResult(groupTasks);
}
@@ -650,19 +653,21 @@ namespace IRaCIS.Application.Services
JudgeType = question.JudgeType,
QuestionId = question.Id,
JudgeDifferenceValue=question.JudgeDifferenceValue,
- VisitTaskId = questionAnswet.VisitTaskId,
+ JudgeDifferenceType = question.JudgeDifferenceType,
+ VisitTaskId = questionAnswet.VisitTaskId,
};
var questionAnswerlist = await query.ToListAsync();
// 将答案进行分组
- List groupTasks = questionAnswerlist.GroupBy(x => new {x.JudgeDifferenceValue, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
+ List groupTasks = questionAnswerlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
{
QuestionId = x.Key.QuestionId,
AnswerGroup = x.Key.AnswerGroup,
AnswerCombination = x.Key.AnswerCombination,
JudgeType = x.Key.JudgeType,
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
- TaskAnswerList = x.Select(y => y.Answer).ToList(),
+ JudgeDifferenceType = x.Key.JudgeDifferenceType,
+ TaskAnswerList = x.Select(y => y.Answer).ToList(),
}).ToList();
noteEqual = ComputeJudgeResult(groupTasks);
}
@@ -703,7 +708,7 @@ namespace IRaCIS.Application.Services
twoItem.AfterQuestionList.Where(x => x.QuestionId != null && x.IsJudgeQuestion).ToList()
).ToList();
- List globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination,x.JudgeDifferenceValue }).Select(x => new GroupTaskAnswerDto
+ List globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination,x.JudgeDifferenceValue,x.JudgeDifferenceType }).Select(x => new GroupTaskAnswerDto
{
QuestionId = x.Key.QuestionId!.Value,
AnswerGroup = x.Key.AnswerGroup,
@@ -711,6 +716,7 @@ namespace IRaCIS.Application.Services
JudgeType = x.Key.JudgeType,
TaskAnswerList = x.Select(y => y.Answer).ToList(),
JudgeDifferenceValue= x.Key.JudgeDifferenceValue,
+ JudgeDifferenceType = x.Key.JudgeDifferenceType,
}).ToList();
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
}
@@ -755,7 +761,8 @@ namespace IRaCIS.Application.Services
JudgeType = question.JudgeType,
QuestionId = question.Id,
JudgeDifferenceValue=question.JudgeDifferenceValue,
- };
+ JudgeDifferenceType = question.JudgeDifferenceType,
+ };
var visitTaskQuestions = await query.ToListAsync();
@@ -763,14 +770,15 @@ namespace IRaCIS.Application.Services
lastTask.AfterQuestionList.Where(x => x.QuestionId != null).ToList()
).ToList();
- List globalGroupTasks = newlist.GroupBy(x => new {x.JudgeDifferenceValue, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
+ List globalGroupTasks = newlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
{
QuestionId = x.Key.QuestionId!.Value,
AnswerGroup = x.Key.AnswerGroup,
AnswerCombination = x.Key.AnswerCombination,
JudgeType = x.Key.JudgeType,
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
- TaskAnswerList = x.Select(y => y.Answer).ToList(),
+ JudgeDifferenceType = x.Key.JudgeDifferenceType,
+ TaskAnswerList = x.Select(y => y.Answer).ToList(),
}).ToList();
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
}
@@ -937,11 +945,24 @@ namespace IRaCIS.Application.Services
deffaultValue =0 -deffaultValue;
}
- if (deffaultValue >= item.JudgeDifferenceValue)
+
+ if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
{
- noteEqual = true;
+ if (deffaultValue > item.JudgeDifferenceValue)
+ {
+ noteEqual = true;
+ }
+ }
+ else if(item.JudgeDifferenceType == JudgeDifferenceType.AboveOrEqual)
+ {
+ if (deffaultValue >= item.JudgeDifferenceValue)
+ {
+ noteEqual = true;
+ }
}
+
+
break;
case JudgeTypeEnum.PercentageDifference:
var value1 = taskAnswer1.IsNullOrEmptyReturn0();
@@ -952,15 +973,33 @@ namespace IRaCIS.Application.Services
}
else
{
- if (value1 < value2)
- {
- noteEqual = (value2 - value1)*100 / value1 >= item.JudgeDifferenceValue;
- }
- else
- {
- noteEqual = (value1 - value2)*100 / value2 >= item.JudgeDifferenceValue;
+ if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
+ {
+ if (value1 < value2)
+ {
+ noteEqual = (value2 - value1) * 100 / value1 > item.JudgeDifferenceValue;
+
+ }
+ else
+ {
+ noteEqual = (value1 - value2) * 100 / value2 > item.JudgeDifferenceValue;
+ }
}
+ else if (item.JudgeDifferenceType == JudgeDifferenceType.AboveOrEqual)
+ {
+ if (value1 < value2)
+ {
+ noteEqual = (value2 - value1) * 100 / value1 >= item.JudgeDifferenceValue;
+
+ }
+ else
+ {
+ noteEqual = (value1 - value2) * 100 / value2 >= item.JudgeDifferenceValue;
+ }
+ }
+
+
}
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index 2bec0137a..12726985c 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -17,10 +17,28 @@ namespace IRaCIS.Core.Domain.Share
}
- ///
- /// GetClinicalType
- ///
- public enum GetClinicalType
+ ///
+ /// 裁判匹配类型
+ ///
+ public enum JudgeDifferenceType
+ {
+ ///
+ /// >
+ ///
+ Greater = 0,
+
+ ///
+ /// ≥
+ ///
+ AboveOrEqual = 1,
+
+ }
+
+
+ ///
+ /// GetClinicalType
+ ///
+ public enum GetClinicalType
{
///
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
index 79b2d00b5..a650ec003 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
@@ -137,7 +137,12 @@ namespace IRaCIS.Core.Domain.Models
///
/// 裁判百分比或绝对值的相差值
///
- public decimal? JudgeDifferenceValue { get; set; }
+ public decimal? JudgeDifferenceValue { get; set; }
+
+ ///
+ /// 裁判百分比或绝对值的相差值匹配规则
+ ///
+ public JudgeDifferenceType? JudgeDifferenceType { get; set; }
///
/// 创建人