diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 40b753eef..1169cd9d8 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -169,6 +169,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc idPathList = await _dicomInstanceRepository.Where(t => t.SeriesId == inCommand.SeriesId).Select(t => new InstanceIdPath { Id = t.Id, Path = t.Path }).ToListAsync(); } + var okList = new List(); + foreach (var item in idPathList) { if (item.Path.EndsWith("_MaskDicom")) @@ -178,6 +180,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var length = Guid.Empty.ToString().Length + "_MaskDicom".Length; var newPath = item.Path[..^length]; + okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath }); + await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = false }); } @@ -186,7 +190,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc await _dicomInstanceRepository.SaveChangesAsync(); - return ResponseOutput.Ok(); + return ResponseOutput.Ok(new { OkList = okList }); }