Merge branch 'Test.IRC' of http://192.168.3.69:2000/XCKJ/irc-netcore-api into Test.IRC
commit
d88a0412a0
|
@ -2566,7 +2566,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]);
|
||||||
}
|
}
|
||||||
else if (timespanMin > 140)
|
else if (timespanMin > 1)
|
||||||
{
|
{
|
||||||
cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 140))) * 140);
|
cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 140))) * 140);
|
||||||
_provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5));
|
_provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5));
|
||||||
|
|
|
@ -1719,6 +1719,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
public async Task<string> GetSplenicState(Guid visitTaskId,decimal spleenLength)
|
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);
|
ReadingCalculateDto inDto = await _generalCalculateService.GetReadingCalculateDto(visitTaskId);
|
||||||
|
|
||||||
if (inDto.IsBaseLine)
|
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;
|
var result = SpleenAssessment.Stabilization;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1745,10 +1773,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
|
|
||||||
var differenceValue = presentSpd - baseLineSpleenLength;
|
var differenceValue = presentSpd - baseLineSpleenLength;
|
||||||
|
|
||||||
|
var differenceLowValue = presentSpd - lowSpleenLength;
|
||||||
decimal percentage = 0;
|
decimal percentage = 0;
|
||||||
if (baseLineSpleenLength != 0)
|
if (baseLineSpleenLength != 0)
|
||||||
{
|
{
|
||||||
percentage = differenceValue * 100 / baseLineSpleenLength;
|
percentage = differenceValue * 100 / (baseLineSpleenLength-130);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1、基线 垂直径> 130 mm
|
// 1、基线 垂直径> 130 mm
|
||||||
|
@ -1769,7 +1799,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
//2、当前访视的前面访视中 存在垂直径≤130mm
|
//2、当前访视的前面访视中 存在垂直径≤130mm
|
||||||
//3、与最低点相比脾脏垂直径的增加值≥20 mm
|
//3、与最低点相比脾脏垂直径的增加值≥20 mm
|
||||||
//4、当前垂直径 > 130 mm
|
//4、当前垂直径 > 130 mm
|
||||||
else if (baseLineSpleenLength > 130 && presentSpd <= 130 && differenceValue >= 20 && presentSpd > 130)
|
else if (baseLineSpleenLength > 130 && lowSpleenLength <= 130 && differenceLowValue >= 20 && presentSpd > 130)
|
||||||
{
|
{
|
||||||
result = SpleenAssessment.Increase;
|
result = SpleenAssessment.Increase;
|
||||||
}
|
}
|
||||||
|
@ -1786,7 +1816,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = SpleenAssessment.Remission;
|
result = SpleenAssessment.Stabilization;
|
||||||
}
|
}
|
||||||
return result.GetEnumInt();
|
return result.GetEnumInt();
|
||||||
}
|
}
|
||||||
|
|
|
@ -832,7 +832,7 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
Normal = 1,
|
Normal = 1,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 缓解
|
/// 部分缓解
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Remission = 2,
|
Remission = 2,
|
||||||
|
|
||||||
|
@ -854,10 +854,11 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 肿大
|
/// 肿大
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Swelling = 5,
|
Swelling = 6,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是(1)或否(0)
|
/// 是(1)或否(0)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue