diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs index de40a0364..8ccf68a73 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs @@ -244,8 +244,7 @@ namespace IRaCIS.Core.Application.Contracts public class GetDicomSeriesInfoInDto { - [NotDefault] - public Guid TrialId { get; set; } + public Guid SeriesId { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index 384563cff..c924db255 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -269,12 +269,12 @@ namespace IRaCIS.Core.Application.Services }).ToListAsync(); var studyIds = studyList.Select(t => t.StudyId).ToList(); - var instanceList = await _repository.Where(t => studyIds.Contains(t.StudyId) && t.TrialId == trialId) + var instanceList = await _repository.Where(t => studyIds.Contains(t.StudyId) ) .Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames,t.HtmlPath }).ToListAsync(); foreach (var t in studyList) { - t.SeriesList = await _repository.Where(s => s.StudyId == t.StudyId && s.TrialId == trialId) + t.SeriesList = await _repository.Where(s => s.StudyId == t.StudyId) .WhereIf(isReading == 1, s => s.IsReading).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); @@ -336,10 +336,9 @@ namespace IRaCIS.Core.Application.Services [HttpPost] public async Task GetDicomSeriesInfo(GetDicomSeriesInfoInDto inDto) { - var trialId = inDto.TrialId; - DicomSeriesDTO series = await _repository.Where(s =>s.Id==inDto.SeriesId && s.TrialId == trialId).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); + DicomSeriesDTO series = await _repository.Where(s =>s.Id==inDto.SeriesId ).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); - var instanceList = await _repository.Where(t => t.SeriesId==inDto.SeriesId && t.TrialId == trialId) + var instanceList = await _repository.Where(t => t.SeriesId==inDto.SeriesId ) .Select(t => new { t.SeriesId, t.StudyId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath ,t.SliceLocation}).ToListAsync(); series.InstanceList = instanceList.Where(t => t.SeriesId == series.Id).OrderByDescending(t => t.SliceLocation).ThenBy(t=>t.InstanceNumber).Select(k => k.Id).ToList(); @@ -524,7 +523,6 @@ namespace IRaCIS.Core.Application.Services [HttpPost] public async Task> GetReadingVisitStudyList(GetReadingVisitStudyListIndto indto) { - var trialId = indto.TrialId; var result = new List(); var thisRowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new @@ -546,7 +544,7 @@ namespace IRaCIS.Core.Application.Services var thisSeriesIdIds = thisRowinfo.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList(); if (thisRowinfo.Count > 0) { - var thisVisitTaskStudy = await _repository.Where(t => thisStudyIds.Contains(t.Id) && t.TrialId==trialId).Select(k => new VisitStudyDTO() + var thisVisitTaskStudy = await _repository.Where(t => thisStudyIds.Contains(t.Id) ).Select(k => new VisitStudyDTO() { InstanceCount = k.InstanceCount, @@ -560,7 +558,7 @@ namespace IRaCIS.Core.Application.Services if (thisVisitTaskStudy != null) { thisVisitTaskStudy.StudyId = default(Guid); - var item = await _repository.Where(s => thisSeriesIdIds.Contains(s.Id) && s.TrialId == trialId).OrderBy(s => s.SeriesNumber). + var item = await _repository.Where(s => thisSeriesIdIds.Contains(s.Id) ).OrderBy(s => s.SeriesNumber). ThenBy(s => s.SeriesTime) .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); @@ -570,7 +568,7 @@ namespace IRaCIS.Core.Application.Services item.InstanceList = thisRowinfo.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList(); - var tempInstanceList = await _repository.Where(t => item.InstanceList.Contains(t.Id) && t.TrialId == trialId).OrderBy(t => t.InstanceNumber) + var tempInstanceList = await _repository.Where(t => item.InstanceList.Contains(t.Id) ).OrderBy(t => t.InstanceNumber) .Select(t => new TempInstance { @@ -619,7 +617,7 @@ namespace IRaCIS.Core.Application.Services item.Description = "Key Series"; - var modalityList = await _repository.Where(s => thisSeriesIdIds.Contains(s.Id) && s.TrialId == trialId).OrderBy(s => s.SeriesNumber). + var modalityList = await _repository.Where(s => thisSeriesIdIds.Contains(s.Id) ).OrderBy(s => s.SeriesNumber). ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ; item.Modality = string.Join(",", modalityList); thisVisitTaskStudy.SeriesList.Add(item); @@ -656,12 +654,12 @@ namespace IRaCIS.Core.Application.Services }).ToListAsync(); var studyIds = studyList.Select(t => t.StudyId).ToList(); - var instanceList = await _repository.Where(t => studyIds.Contains(t.StudyId) && t.TrialId == trialId) + var instanceList = await _repository.Where(t => studyIds.Contains(t.StudyId) ) .Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames,t.WindowCenter,t.WindowWidth,t.HtmlPath }).ToListAsync(); - List seriesLists = await _repository.Where(s => studyIds.Contains(s.StudyId) && s.TrialId == trialId /*&& s.IsReading*/) + List seriesLists = await _repository.Where(s => studyIds.Contains(s.StudyId) /*&& s.IsReading*/) .WhereIf(isManualGenerate==false, t => t.IsReading) .WhereIf(isManualGenerate, t => t.SubjectCriteriaEvaluationVisitStudyFilterList.Any(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsConfirmed && t.IsReading)) .OrderBy(s => s.SeriesNumber).