代码修改
parent
fea009bf0c
commit
795e128ef9
|
@ -310,7 +310,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
GlobalVisitTaskId = taskList[0].Id,
|
GlobalVisitTaskId = taskList[0].Id,
|
||||||
JudgeQuestionList = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
JudgeQuestionList = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||||
{
|
{
|
||||||
|
|
||||||
Answer = x.Answer,
|
Answer = x.Answer,
|
||||||
Type = x.Type,
|
Type = x.Type,
|
||||||
Unit = x.Unit,
|
Unit = x.Unit,
|
||||||
|
@ -347,12 +346,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var rTwoJudge = new JudgeReadingQuestion()
|
var rTwoJudge = new JudgeReadingQuestion()
|
||||||
{
|
{
|
||||||
ArmEnum = twoItem.ArmEnum,
|
ArmEnum = twoItem.ArmEnum,
|
||||||
|
|
||||||
VisitTaskId = twoItem.VisitTaskId,
|
VisitTaskId = twoItem.VisitTaskId,
|
||||||
GlobalVisitTaskId = taskList[1].Id,
|
GlobalVisitTaskId = taskList[1].Id,
|
||||||
JudgeQuestionList = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
JudgeQuestionList = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||||
{
|
{
|
||||||
|
|
||||||
Answer = x.Answer,
|
Answer = x.Answer,
|
||||||
Type = x.Type,
|
Type = x.Type,
|
||||||
Unit = x.Unit,
|
Unit = x.Unit,
|
||||||
|
@ -397,6 +394,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NA 问题答案不显示
|
||||||
switch (visitTask.TrialReadingCriterion.CriterionType)
|
switch (visitTask.TrialReadingCriterion.CriterionType)
|
||||||
{
|
{
|
||||||
case CriterionType.IVUS:
|
case CriterionType.IVUS:
|
||||||
|
@ -974,23 +972,14 @@ namespace IRaCIS.Core.Application.Service
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case JudgeTypeEnum.DifferenceAbsoluteValue:
|
case JudgeTypeEnum.DifferenceAbsoluteValue:
|
||||||
|
|
||||||
var answer1 = taskAnswer1.IsNullOrEmptyReturnNull();
|
var answer1 = taskAnswer1.IsNullOrEmptyReturnNull();
|
||||||
var answer2 = taskAnswer2.IsNullOrEmptyReturnNull();
|
var answer2 = taskAnswer2.IsNullOrEmptyReturnNull();
|
||||||
|
|
||||||
// 已经判断不相等了 所以只可能有一个为Null
|
// 已经判断不相等了 所以只可能有一个为Null
|
||||||
if (answer1 == null || answer2 == null)
|
if (answer1 == null || answer2 == null)
|
||||||
{
|
{
|
||||||
noteEqual = true;
|
noteEqual = true;
|
||||||
}
|
}
|
||||||
|
var deffaultValue = Math.Abs(taskAnswer1.IsNullOrEmptyReturn0() - taskAnswer2.IsNullOrEmptyReturn0());
|
||||||
var deffaultValue = taskAnswer1.IsNullOrEmptyReturn0() - taskAnswer2.IsNullOrEmptyReturn0();
|
|
||||||
if (deffaultValue < 0)
|
|
||||||
{
|
|
||||||
deffaultValue = 0 - deffaultValue;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
|
if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
|
||||||
{
|
{
|
||||||
if (deffaultValue > item.JudgeDifferenceValue)
|
if (deffaultValue > item.JudgeDifferenceValue)
|
||||||
|
@ -1005,22 +994,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
noteEqual = true;
|
noteEqual = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case JudgeTypeEnum.PercentageDifference:
|
case JudgeTypeEnum.PercentageDifference:
|
||||||
|
|
||||||
|
|
||||||
var answer1P = taskAnswer1.IsNullOrEmptyReturnNull();
|
var answer1P = taskAnswer1.IsNullOrEmptyReturnNull();
|
||||||
var answer2P = taskAnswer2.IsNullOrEmptyReturnNull();
|
var answer2P = taskAnswer2.IsNullOrEmptyReturnNull();
|
||||||
|
|
||||||
// 已经判断不相等了 所以只可能有一个为Null
|
// 已经判断不相等了 所以只可能有一个为Null
|
||||||
if (answer1P == null || answer2P == null)
|
if (answer1P == null || answer2P == null)
|
||||||
{
|
{
|
||||||
noteEqual = true;
|
noteEqual = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var value1 = taskAnswer1.IsNullOrEmptyReturn0();
|
var value1 = taskAnswer1.IsNullOrEmptyReturn0();
|
||||||
var value2 = taskAnswer2.IsNullOrEmptyReturn0();
|
var value2 = taskAnswer2.IsNullOrEmptyReturn0();
|
||||||
if (value1 == 0 || value2 == 0)
|
if (value1 == 0 || value2 == 0)
|
||||||
|
@ -1029,36 +1011,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
var absoluteValue = (Math.Abs(value1 - value2)*100)/(value1<value2?value1:value2) ;
|
||||||
if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
|
if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
|
||||||
{
|
{
|
||||||
if (value1 < value2)
|
noteEqual= absoluteValue > item.JudgeDifferenceValue;
|
||||||
{
|
|
||||||
noteEqual = (value2 - value1) * 100 / value1 > item.JudgeDifferenceValue;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
noteEqual = (value1 - value2) * 100 / value2 > item.JudgeDifferenceValue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (item.JudgeDifferenceType == JudgeDifferenceType.AboveOrEqual)
|
else if (item.JudgeDifferenceType == JudgeDifferenceType.AboveOrEqual)
|
||||||
{
|
{
|
||||||
if (value1 < value2)
|
noteEqual= absoluteValue >= item.JudgeDifferenceValue;
|
||||||
{
|
|
||||||
noteEqual = (value2 - value1) * 100 / value1 >= item.JudgeDifferenceValue;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
noteEqual = (value1 - value2) * 100 / value2 >= item.JudgeDifferenceValue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue