diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs index 361d8fba9..67e38daa5 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/NoneDicomStudyService.cs @@ -4,6 +4,7 @@ // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- using IRaCIS.Core.Application.Filter; +using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using Medallion.Threading; @@ -34,7 +35,8 @@ namespace IRaCIS.Core.Application.Contracts [FromQuery] Guid? nonedicomStudyId, [FromQuery] bool isFilterZip, [FromQuery] Guid? visitTaskId, - [FromQuery] bool isReading) + [FromQuery] bool isReading, + [FromQuery] bool? isImageSegmentLabel) { var qcAuditState = await _subjectVisitRepository.Where(s => s.Id == subjectVisitId).Select(t => t.AuditState).FirstOrDefaultAsync(); @@ -47,21 +49,39 @@ namespace IRaCIS.Core.Application.Contracts IQueryable noneDicomStudyQueryable = default; if (visitTaskId == null || visitTaskId == Guid.Empty) { - //质控过程中,需要忽略过滤质控设置删除的检查,以及设置删除的文件,质控通过后才 - noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete) - .WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId) - .WhereIf(isReading, t => t.IsReading && t.IsDeleted == false) + if (visitTaskId == null) + { + + //质控过程中,需要忽略过滤质控设置删除的检查,以及设置删除的文件,质控通过后才 + noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete) + .WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId) + .WhereIf(isReading, t => t.IsReading && t.IsDeleted == false) + .ProjectTo(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading = isReading }); + } + else + { + //靶段标注上传后查看影像 + + noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => true, ignoreQueryFilters: isViewDelete) + .WhereIf(isReading, t => t.IsReading && t.IsDeleted == false) + .WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId) + .ProjectTo(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading = isReading }); + + } - .ProjectTo(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading = isReading }); } else { var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(t => new { t.BlindSubjectCode, t.TrialReadingCriterionId, t.TrialReadingCriterion.CriterionType, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys }).FirstNotNullAsync(); - if (taskinfo.CriterionType == CriterionType.IVUS || taskinfo.CriterionType == CriterionType.OCT) + if (taskinfo.CriterionType == CriterionType.IVUS || taskinfo.CriterionType == CriterionType.OCT && isImageSegmentLabel == true) { - + //后处理原始影像预览 + noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => true, ignoreQueryFilters: isViewDelete) + .WhereIf(isReading, t => t.IsReading && t.IsDeleted == false) + .WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId) + .ProjectTo(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, visiTaskId = visitTaskId, isReading = isReading }); } else { diff --git a/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs index 7162e8c3e..1a673eb78 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs @@ -31,6 +31,11 @@ namespace IRaCIS.Core.Application.Contracts { } + public class ImageLabelNoneDicomStudyView : NoneDicomStudyView + { + + } + ///NoneDicomStudyQuery 列表查询参数模型 public class NoneDicomStudyQuery { diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index f94b1bb1f..665a24f11 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -755,6 +755,13 @@ namespace IRaCIS.Core.Application.Service .OrderBy(t => t.CreateTime).ThenBy(t => t.FileName))) .ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode)); + CreateMap() + .ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => + s.ImageLabelNoneDicomFileList.Where(t => isFilterZip ? !t.FileType.Contains(StaticData.FileType.Zip) : true) + .Where(t => isReading ? t.IsReading && t.IsDeleted == false : true) + .OrderBy(t => t.CreateTime).ThenBy(t => t.FileName))) + .ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode)); + CreateMap() .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))