diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs
index 1936d5482..3058eb539 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs
@@ -1707,35 +1707,48 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}
#endregion
- #region 获取脾脏评估
+ #region 获取脾脏状态
///
- /// 获取脾脏评估
+ /// 获取脾脏状态
///
- ///
+ ///
+ ///
///
- public async Task GetSplenicEvaluation(ReadingCalculateDto inDto)
+ [HttpPost]
+ public async Task GetSplenicState(Guid visitTaskId,decimal spleenLength)
{
+
+ ReadingCalculateDto inDto = await _generalCalculateService.GetReadingCalculateDto(visitTaskId);
+
if (inDto.IsBaseLine)
{
- return SpleenAssessment.Stabilization.GetEnumInt();
+ if (spleenLength <= 130)
+ {
+ return SpleenAssessment.Normal.GetEnumInt();
+ }
+ else
+ {
+ return SpleenAssessment.Swelling.GetEnumInt();
+ }
+
}
var result = SpleenAssessment.Stabilization;
- var presentSpd = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
+ var presentSpd = spleenLength;
var baseLineSpleenLength = await GetBaseLineSpleenLength(inDto);
var baseLineTaskId = await GetBaseLineTaskId(inDto);
- var baseLineState= await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SplenicStatus).Select(x => x.Answer).FirstOrDefaultAsync();
+ var baseLineState = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SplenicStatus).Select(x => x.Answer).FirstOrDefaultAsync();
var differenceValue = presentSpd - baseLineSpleenLength;
decimal percentage = 0;
if (baseLineSpleenLength != 0)
{
- percentage = differenceValue*100 / baseLineSpleenLength;
+ percentage = differenceValue * 100 / baseLineSpleenLength;
}
// 1、基线 垂直径> 130 mm
@@ -1779,6 +1792,84 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}
#endregion
+ #region 获取脾脏评估
+
+ ///
+ /// 获取脾脏评估
+ ///
+ ///
+ ///
+ public async Task GetSplenicEvaluation(ReadingCalculateDto inDto)
+ {
+
+ return inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SplenicStatus).Select(x => x.Answer).FirstIsNullReturnEmpty();
+
+ //if (inDto.IsBaseLine)
+ //{
+ // return SpleenAssessment.Stabilization.GetEnumInt();
+ //}
+
+ //var result = SpleenAssessment.Stabilization;
+
+
+ //var presentSpd = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0();
+ //var baseLineSpleenLength = await GetBaseLineSpleenLength(inDto);
+
+ //var baseLineTaskId = await GetBaseLineTaskId(inDto);
+ //var baseLineState = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SplenicStatus).Select(x => x.Answer).FirstOrDefaultAsync();
+
+
+ //var differenceValue = presentSpd - baseLineSpleenLength;
+ //decimal percentage = 0;
+ //if (baseLineSpleenLength != 0)
+ //{
+ // percentage = differenceValue * 100 / baseLineSpleenLength;
+ //}
+
+ //// 1、基线 垂直径> 130 mm
+ ////2、与基线相比脾垂直径变化值≥10 mm
+ ////与基线相比脾肿大增加的百分比 > 50%
+ //if (baseLineSpleenLength > 130 && differenceValue >= 10 && percentage > 50)
+ //{
+ // result = SpleenAssessment.Increase;
+ //}
+ ////1、基线垂直径≤130mm
+ ////2、与基线相比脾垂直径变化值≥20 mm
+ ////当前垂直径 > 130 mm
+ //else if (baseLineSpleenLength <= 130 && differenceValue >= 20 && presentSpd > 130)
+ //{
+ // result = SpleenAssessment.Increase;
+ //}
+ ////1、基线 垂直径> 130 mm
+ ////2、当前访视的前面访视中 存在垂直径≤130mm
+ ////3、与最低点相比脾脏垂直径的增加值≥20 mm
+ ////4、当前垂直径 > 130 mm
+ //else if (baseLineSpleenLength > 130 && presentSpd <= 130 && differenceValue >= 20 && presentSpd > 130)
+ //{
+ // result = SpleenAssessment.Increase;
+ //}
+ //// 基线垂直径≤130mm
+ //else if (baseLineSpleenLength <= 130)
+ //{
+ // result = SpleenAssessment.Normal;
+ //}
+ ////1、基线期 状态为“肿大”
+ ////与基线相比脾肿大增加的百分比 > 50%
+ //else if (baseLineState.EqEnum(SpleenState.Swelling) && percentage > 50)
+ //{
+ // result = SpleenAssessment.Remission;
+ //}
+ //else
+ //{
+ // result = SpleenAssessment.Remission;
+ //}
+ //return result.GetEnumInt();
+
+
+ }
+ #endregion
+
+
#region PET 5PS
///