diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs index 6717099d1..6f0be1f32 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs @@ -79,6 +79,11 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO public int InstanceNumber { get; set; } + public bool IsReading { get; set; } + public bool IsDeleted { get; set; } + + + public Guid? StudyId { get; set; } public List KeyFramesList { get; set; } = new List { }; diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs index 336c2880c..b9ab6ef92 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/InstanceService.cs @@ -23,9 +23,9 @@ namespace IRaCIS.Core.Application.Services ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); - var imageResizePath = await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => t.DicomSerie.ImageResizePath).FirstOrDefaultAsync(); + var seriesInfo = await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => new { t.DicomSerie.ImageResizePath,t.DicomSerie.IsDeleted,t.DicomSerie.IsReading }).FirstOrDefaultAsync(); - return ResponseOutput.Ok(list, new { ImageResizePath = imageResizePath }); + return ResponseOutput.Ok(list, seriesInfo); } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs index 460dfc729..7931a1d82 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/SeriesService.cs @@ -29,7 +29,7 @@ namespace IRaCIS.Core.Application.Services var instanceList = await _instanceRepository.Where(s => s.StudyId == studyId).OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber) .ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime) - .Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath }).ToListAsync();//.GroupBy(u => u.SeriesId); + .Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath ,t.IsReading,t.IsDeleted}).ToListAsync();//.GroupBy(u => u.SeriesId); foreach (var series in seriesList) { @@ -42,6 +42,8 @@ namespace IRaCIS.Core.Application.Services HtmlPath = k.HtmlPath, Path = k.Path, InstanceNumber = k.InstanceNumber, + IsReading=k.IsReading, + IsDeleted=k.IsDeleted }).ToList(); } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs index 72c31db41..608dc6dd2 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs @@ -84,9 +84,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() - .ForMember(o => o.IsDeleted, t => t.MapFrom(u => u.DicomSerie.IsDeleted)) - .ForMember(o => o.SliceThickness, t => t.MapFrom(u => u.DicomSerie.SliceThickness)) - .ForMember(o => o.IsReading, t => t.MapFrom(u => u.DicomSerie.IsReading)); + .ForMember(o => o.SliceThickness, t => t.MapFrom(u => u.DicomSerie.SliceThickness)); CreateMap(); CreateMap(); CreateMap(); diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index 8f285ea61..1f2645602 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -238,7 +238,7 @@ namespace IRaCIS.Core.Application.Services var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId)) .WhereIf(isReading == 1, s => s.IsReading) - .Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath }).ToListAsync(); + .Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath,t.IsDeleted,t.IsReading }).ToListAsync(); foreach (var t in studyList) { @@ -258,6 +258,8 @@ namespace IRaCIS.Core.Application.Services HtmlPath = k.HtmlPath, Path = k.Path, InstanceNumber = k.InstanceNumber, + IsReading=k.IsReading, + IsDeleted=k.IsDeleted, }).ToList(); } );