diff --git a/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs b/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs index 21829357..8c792494 100644 --- a/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/Interface/IQCListService.cs @@ -25,7 +25,7 @@ namespace IRaCIS.Core.Application.Image.QA Task> GetQCQuestionAnswerList(Guid subjectVisitId, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType); Task> GetSubjectVisitSelectList(Guid subjectId); - Task> GetSubjectVisitUploadedStudyList(Guid subjectVisitId); + Task<(List, object)> GetSubjectVisitUploadedStudyList(Guid subjectVisitId); Task GetUploadInitInfo(Guid subjectVisitId); Task GetVisitQCInfo(Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType); Task GetVisitQCStudyAndSeriesList(Guid subjectVisitId); diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 843fad93..83bf387d 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -1453,9 +1453,14 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpGet("{subjectVisitId:guid}")] - public async Task> GetSubjectVisitUploadedStudyList(Guid subjectVisitId) + public async Task<(List,object)> GetSubjectVisitUploadedStudyList(Guid subjectVisitId) { - return await _repository.Where(s => s.SubjectVisitId == subjectVisitId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + var list= await _repository.Where(s => s.SubjectVisitId == subjectVisitId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + + + var config = await _repository.Where(t => t.Id == subjectVisitId).Select(t=>t.Trial).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException(); + + return (list, config); }