From 6792f9e916a4f8ec25021ef31b713b6c3dfc008f Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 29 Feb 2024 16:03:28 +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 --- IRaCIS.Core.Application/Service/QC/QCListService.cs | 4 ++-- .../Reading/ClinicalData/ClinicalAnswerService.cs | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 89841ef0d..e3d5a858c 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -77,8 +77,8 @@ namespace IRaCIS.Core.Application.Image.QA var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc, string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray); var config = await _repository.Where(t => t.Id == visitSearchDTO.TrialId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException(); - config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.Subject && x.UploadRole == UploadRole.CRC); - config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.UploadRole == UploadRole.CRC); + config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataLevel == ClinicalLevel.Study) && x.UploadRole == UploadRole.CRC); + config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.SubjectVisit|| x.ClinicalDataLevel == ClinicalLevel.Study) && x.UploadRole == UploadRole.CRC); return (pageList, config); } diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs index a1424d670..761800f5b 100644 --- a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs @@ -193,6 +193,17 @@ namespace IRaCIS.Core.Application.Service ReadingId = n.VisitId, TrialId = inDto.TrialId }).ToList()); + + readingClinicalDatas.AddRange( + dataTrialSetList.Where(x => x.ClinicalDataLevel == ClinicalLevel.Study).Where(x => clinicalDataList.Where(y => y.ClinicalDataTrialSetId == x.Id && y.ReadingId == n.VisitId).Count() == 0) + .Select(x => new ReadingClinicalData() + { + ClinicalDataTrialSetId = x.Id, + IsVisit = true, + SubjectId = n.SubjectId, + ReadingId = n.VisitId, + TrialId = inDto.TrialId + }).ToList()); });