From 2e316c35fec760e9e8599df69b91fddcceb78d51 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 17 Oct 2023 16:11:38 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index f8e93eb38..19520f6bc 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -832,7 +832,7 @@ namespace IRaCIS.Core.Domain.Share Normal = 1, /// - /// 缓解 + /// 部分缓解 /// Remission = 2, @@ -854,10 +854,11 @@ namespace IRaCIS.Core.Domain.Share /// /// 肿大 /// - Swelling = 5, + Swelling = 6, } + /// /// 是(1)或否(0) /// From b72e90f0b9bbb4318627d72ef5b49d7f8a6d46e4 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 17 Oct 2023 16:46:37 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/LuganoCalculateService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 3058eb539..3e496c83e 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1786,7 +1786,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate } else { - result = SpleenAssessment.Remission; + result = SpleenAssessment.Stabilization; } return result.GetEnumInt(); } From 79c21b24cd3f92b6d34046f0c13c083cd620b92d Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 17 Oct 2023 16:57:52 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/LuganoCalculateService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 3e496c83e..d0dff3dfb 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1748,7 +1748,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate decimal percentage = 0; if (baseLineSpleenLength != 0) { - percentage = differenceValue * 100 / baseLineSpleenLength; + percentage = differenceValue * 100 / (baseLineSpleenLength-130); } // 1、基线 垂直径> 130 mm From b8c7441c92b0fe1369d970c5c1e2c1f44673691f Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 17 Oct 2023 17:48:55 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingImageTaskService.cs | 2 +- .../LuganoCalculateService.cs | 32 ++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 495dbc433..994153238 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -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(cacheKey).Value; if (value == null) { diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index d0dff3dfb..7472fc19f 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1719,6 +1719,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate public async Task 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; } From 6df90997075c231b2d7e18f808566fd1cf18ada6 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 17 Oct 2023 17:53:03 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 994153238..d89d8d989 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -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(cacheKey).Value; if (value == null) { @@ -2566,7 +2566,7 @@ namespace IRaCIS.Application.Services { 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); _provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); From 473bb64b42efe865ec80e92f687c100e156daffe Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 18 Oct 2023 09:10:20 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/LuganoCalculateService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 7472fc19f..525065fef 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1799,7 +1799,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate //2、当前访视的前面访视中 存在垂直径≤130mm //3、与最低点相比脾脏垂直径的增加值≥20 mm //4、当前垂直径 > 130 mm - else if (baseLineSpleenLength > 130 && presentSpd <= 130 && differenceLowValue >= 20 && presentSpd > 130) + else if (baseLineSpleenLength > 130 && lowSpleenLength <= 130 && differenceLowValue >= 20 && presentSpd > 130) { result = SpleenAssessment.Increase; }