From a5fed78c1940bf846f43a3bfd907a61e4f03bfba Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 11 Dec 2023 14:55:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E5=BA=8A=E6=95=B0=E6=8D=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ClinicalData/ClinicalAnswerService.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs index d5055d242..f89332eb2 100644 --- a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs @@ -523,6 +523,22 @@ namespace IRaCIS.Core.Application.Service var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync(); inDto.TrialReadingCriterionId = readModule.TrialReadingCriterionId; } + + // 有全局就查全局 有肿瘤学就查肿瘤学 + + var clinicalDataLevelList = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm && x.UploadRole == UploadRole.CRC && x.ClinicalUploadType == ClinicalUploadType.Structuring).Select(x => x.ClinicalDataLevel).Distinct().ToListAsync(); + + ReadingSetType? readingSetType = null; + if (clinicalDataLevelList.Contains(ClinicalLevel.ImageRead) && !clinicalDataLevelList.Contains(ClinicalLevel.OncologyRead)) + { + readingSetType = ReadingSetType.ImageReading; + } + else if (clinicalDataLevelList.Contains(ClinicalLevel.OncologyRead) && !clinicalDataLevelList.Contains(ClinicalLevel.ImageRead)) + { + readingSetType = ReadingSetType.TumorReading; + } + + var query = _readModuleRepository.Where(x => x.TrialId == inDto.TrialId) .WhereIf(inDto.ReadModuleId != null, x => x.Id == inDto.ReadModuleId) .WhereIf(inDto.IsCRCConfirm != null, x => x.IsCRCConfirm == inDto.IsCRCConfirm) @@ -532,6 +548,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inDto.SubjectId != null, x => x.SubjectId == inDto.SubjectId) .WhereIf(inDto.StartTime != null, x => x.SubjectVisit.LatestScanDate >= inDto.StartTime) .WhereIf(inDto.EndTime != null, x => x.SubjectVisit.LatestScanDate <= inDto.EndTime) + .WhereIf(readingSetType != null, x => x.ReadingSetType== readingSetType) .Select(x => new GetCRCConfirmListOutDto() {