Compare commits

..

No commits in common. "8e520ce57942364688ead3d36ca8c8847f077b86" and "bb36c67159fa12ff29007cba2db424f29bae06ea" have entirely different histories.

4 changed files with 25 additions and 112 deletions

View File

@ -1578,11 +1578,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public decimal? JudgeDifferenceValue { get; set; }
/// <summary>
/// 裁判百分比或绝对值的相差值匹配规则
/// </summary>
public JudgeDifferenceType? JudgeDifferenceType { get; set; }
public bool IsHaveChange { get; set; } = false;
public string VisitAnswer { get; set; } = string.Empty;
@ -1825,11 +1820,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public decimal? JudgeDifferenceValue { get; set; }
/// <summary>
/// 裁判百分比或绝对值的相差值匹配规则
/// </summary>
public JudgeDifferenceType? JudgeDifferenceType { get; set; }
public List<AnswerCombinationDto> AnswerCombination { get; set; }
@ -1847,11 +1837,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public decimal? JudgeDifferenceValue { get; set; }
/// <summary>
/// 裁判百分比或绝对值的相差值匹配规则
/// </summary>
public JudgeDifferenceType? JudgeDifferenceType { get; set; }
public string QuestionName { get; set; }
@ -2291,11 +2276,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 裁判百分比或绝对值的相差值
/// </summary>
public decimal? JudgeDifferenceValue { get; set; }
/// <summary>
/// 裁判百分比或绝对值的相差值匹配规则
/// </summary>
public JudgeDifferenceType? JudgeDifferenceType { get; set; }
public string AnswerGroup { get; set; }
@ -2345,11 +2325,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 裁判百分比或绝对值的相差值
/// </summary>
public decimal? JudgeDifferenceValue { get; set; }
/// <summary>
/// 裁判百分比或绝对值的相差值匹配规则
/// </summary>
public JudgeDifferenceType? JudgeDifferenceType { get; set; }
}

View File

@ -47,8 +47,7 @@ namespace IRaCIS.Application.Services
DictionaryCode=x.DictionaryCode,
JudgeType = x.JudgeType,
ReadingQuestionTrialId = x.Id,
JudgeDifferenceValue= x.JudgeDifferenceValue,
JudgeDifferenceType=x.JudgeDifferenceType,
JudgeDifferenceValue= x.JudgeDifferenceValue
}).ToListAsync();
@ -73,7 +72,7 @@ namespace IRaCIS.Application.Services
AnswerGroup = JsonConvert.SerializeObject(inDto.AnswerGroup),
AnswerCombination = JsonConvert.SerializeObject(inDto.AnswerCombination),
JudgeDifferenceValue= inDto.JudgeDifferenceValue,
JudgeDifferenceType=inDto.JudgeDifferenceType,
JudgeType = inDto.JudgeType,
});
@ -618,7 +617,6 @@ namespace IRaCIS.Application.Services
JudgeType = question.JudgeType,
QuestionId = question.Id,
JudgeDifferenceValue=question.JudgeDifferenceValue,
JudgeDifferenceType=question.JudgeDifferenceType,
VisitTaskId = questionAnswer.VisitTaskId,
};
var globalVisitAnswerlist = await globalVisitQuestionQuery.ToListAsync();
@ -627,15 +625,14 @@ namespace IRaCIS.Application.Services
foreach (var item in taskNums)
{
List<GroupTaskAnswerDto> 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
List<GroupTaskAnswerDto> groupTasks = globalVisitAnswerlist.Where(x => x.VisitTaskNum == item).GroupBy(x => new {x.JudgeDifferenceValue, 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,
JudgeDifferenceType = x.Key.JudgeDifferenceType,
TaskAnswerList = x.Select(y => y.Answer).ToList(),
TaskAnswerList = x.Select(y => y.Answer).ToList(),
}).ToList();
noteEqual = noteEqual || ComputeJudgeResult(groupTasks);
}
@ -653,21 +650,19 @@ namespace IRaCIS.Application.Services
JudgeType = question.JudgeType,
QuestionId = question.Id,
JudgeDifferenceValue=question.JudgeDifferenceValue,
JudgeDifferenceType = question.JudgeDifferenceType,
VisitTaskId = questionAnswet.VisitTaskId,
VisitTaskId = questionAnswet.VisitTaskId,
};
var questionAnswerlist = await query.ToListAsync();
// 将答案进行分组
List<GroupTaskAnswerDto> groupTasks = questionAnswerlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
List<GroupTaskAnswerDto> groupTasks = questionAnswerlist.GroupBy(x => new {x.JudgeDifferenceValue, 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,
JudgeDifferenceType = x.Key.JudgeDifferenceType,
TaskAnswerList = x.Select(y => y.Answer).ToList(),
TaskAnswerList = x.Select(y => y.Answer).ToList(),
}).ToList();
noteEqual = ComputeJudgeResult(groupTasks);
}
@ -708,7 +703,7 @@ namespace IRaCIS.Application.Services
twoItem.AfterQuestionList.Where(x => x.QuestionId != null && x.IsJudgeQuestion).ToList()
).ToList();
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination,x.JudgeDifferenceValue,x.JudgeDifferenceType }).Select(x => new GroupTaskAnswerDto
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination,x.JudgeDifferenceValue }).Select(x => new GroupTaskAnswerDto
{
QuestionId = x.Key.QuestionId!.Value,
AnswerGroup = x.Key.AnswerGroup,
@ -716,7 +711,6 @@ 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);
}
@ -761,8 +755,7 @@ namespace IRaCIS.Application.Services
JudgeType = question.JudgeType,
QuestionId = question.Id,
JudgeDifferenceValue=question.JudgeDifferenceValue,
JudgeDifferenceType = question.JudgeDifferenceType,
};
};
var visitTaskQuestions = await query.ToListAsync();
@ -770,15 +763,14 @@ namespace IRaCIS.Application.Services
lastTask.AfterQuestionList.Where(x => x.QuestionId != null).ToList()
).ToList();
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new {x.JudgeDifferenceValue, 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,
JudgeDifferenceType = x.Key.JudgeDifferenceType,
TaskAnswerList = x.Select(y => y.Answer).ToList(),
TaskAnswerList = x.Select(y => y.Answer).ToList(),
}).ToList();
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
}
@ -945,24 +937,11 @@ namespace IRaCIS.Application.Services
deffaultValue =0 -deffaultValue;
}
if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
if (deffaultValue >= item.JudgeDifferenceValue)
{
if (deffaultValue > item.JudgeDifferenceValue)
{
noteEqual = true;
}
}
else if(item.JudgeDifferenceType == JudgeDifferenceType.AboveOrEqual)
{
if (deffaultValue >= item.JudgeDifferenceValue)
{
noteEqual = true;
}
noteEqual = true;
}
break;
case JudgeTypeEnum.PercentageDifference:
var value1 = taskAnswer1.IsNullOrEmptyReturn0();
@ -973,33 +952,15 @@ namespace IRaCIS.Application.Services
}
else
{
if (value1 < value2)
{
noteEqual = (value2 - value1)*100 / value1 >= 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
{
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;
}
}
}

View File

@ -17,28 +17,10 @@ namespace IRaCIS.Core.Domain.Share
}
/// <summary>
/// 裁判匹配类型
/// </summary>
public enum JudgeDifferenceType
{
/// <summary>
/// >
/// </summary>
Greater = 0,
/// <summary>
/// ≥
/// </summary>
AboveOrEqual = 1,
}
/// <summary>
/// GetClinicalType
/// </summary>
public enum GetClinicalType
/// <summary>
/// GetClinicalType
/// </summary>
public enum GetClinicalType
{
/// <summary>

View File

@ -137,12 +137,7 @@ namespace IRaCIS.Core.Domain.Models
/// <summary>
/// 裁判百分比或绝对值的相差值
/// </summary>
public decimal? JudgeDifferenceValue { get; set; }
/// <summary>
/// 裁判百分比或绝对值的相差值匹配规则
/// </summary>
public JudgeDifferenceType? JudgeDifferenceType { get; set; }
public decimal? JudgeDifferenceValue { get; set; }
/// <summary>
/// 创建人