IRC_NewDev
parent
79c21b24cd
commit
b8c7441c92
|
@ -2549,7 +2549,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
var cacheKey = _userInfo.Id.ToString()+ "RestTime";
|
||||
|
||||
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]);
|
||||
var value = _provider.Get<string>(cacheKey).Value;
|
||||
if (value == null)
|
||||
{
|
||||
|
|
|
@ -1719,6 +1719,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
public async Task<string> GetSplenicState(Guid visitTaskId,decimal spleenLength)
|
||||
{
|
||||
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
|
||||
ReadingCalculateDto inDto = await _generalCalculateService.GetReadingCalculateDto(visitTaskId);
|
||||
|
||||
if (inDto.IsBaseLine)
|
||||
|
@ -1734,6 +1735,33 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
}
|
||||
|
||||
#region 最低
|
||||
var visitTaskIds = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
|
||||
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
|
||||
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
|
||||
x.DoctorUserId == taskinfo.DoctorUserId &&
|
||||
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
|
||||
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == taskinfo.ArmEnum
|
||||
&& x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect
|
||||
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).ToListAsync();
|
||||
|
||||
var questionId = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.QuestionType == QuestionType.SplenicStatus).Select(x => x.Id).FirstNotNullAsync();
|
||||
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)
|
||||
&& x.ReadingQuestionTrialId == questionId )
|
||||
.Select(x => new
|
||||
{
|
||||
x.Answer,
|
||||
x.VisitTaskId,
|
||||
}).ToListAsync();
|
||||
|
||||
var lowSpleenLength = answerList.Select(x => new
|
||||
{
|
||||
Answer = x.Answer.IsNullOrEmptyReturn0(),
|
||||
x.VisitTaskId
|
||||
}).OrderBy(x => x.Answer).Select(x=>x.Answer).FirstOrDefault();
|
||||
#endregion
|
||||
|
||||
|
||||
var result = SpleenAssessment.Stabilization;
|
||||
|
||||
|
||||
|
@ -1745,6 +1773,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
|
||||
var differenceValue = presentSpd - baseLineSpleenLength;
|
||||
|
||||
var differenceLowValue = presentSpd - lowSpleenLength;
|
||||
decimal percentage = 0;
|
||||
if (baseLineSpleenLength != 0)
|
||||
{
|
||||
|
@ -1769,7 +1799,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
//2、当前访视的前面访视中 存在垂直径≤130mm
|
||||
//3、与最低点相比脾脏垂直径的增加值≥20 mm
|
||||
//4、当前垂直径 > 130 mm
|
||||
else if (baseLineSpleenLength > 130 && presentSpd <= 130 && differenceValue >= 20 && presentSpd > 130)
|
||||
else if (baseLineSpleenLength > 130 && presentSpd <= 130 && differenceLowValue >= 20 && presentSpd > 130)
|
||||
{
|
||||
result = SpleenAssessment.Increase;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue