|
|
|
|
@ -28,6 +28,8 @@ namespace IRaCIS.Core.Application.Services
|
|
|
|
|
IRepository<Subject> _subjectRepository,
|
|
|
|
|
IRepository<DicomInstance> _dicomInstanceRepository,
|
|
|
|
|
IRepository<TaskStudy> _taskStudyRepository,
|
|
|
|
|
IRepository<TaskSeries> _taskSeriesRepository,
|
|
|
|
|
IRepository<TaskInstance> _taskInstanceRepository,
|
|
|
|
|
IServiceProvider _serviceProvider,
|
|
|
|
|
IRepository<DicomSeries> _dicomSeriesRepository,
|
|
|
|
|
IRepository<ReadingQuestionCriterionTrial> _trialReadingCriterionRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISubjectVisitService
|
|
|
|
|
@ -337,8 +339,10 @@ namespace IRaCIS.Core.Application.Services
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public async Task<DicomSeriesDTO> GetDicomSeriesInfo(GetDicomSeriesInfoInDto inDto)
|
|
|
|
|
{
|
|
|
|
|
DicomSeriesDTO series = await _dicomSeriesRepository.Where(s => s.Id == inDto.SeriesId).ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
|
|
|
|
DicomSeriesDTO? series = await _dicomSeriesRepository.Where(s => s.Id == inDto.SeriesId).ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
|
|
|
|
|
|
|
|
|
if (series != null)
|
|
|
|
|
{
|
|
|
|
|
var instanceList = await _dicomInstanceRepository.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, t.FileSize }).ToListAsync();
|
|
|
|
|
|
|
|
|
|
@ -355,11 +359,28 @@ namespace IRaCIS.Core.Application.Services
|
|
|
|
|
FileSize = k.FileSize
|
|
|
|
|
|
|
|
|
|
}).ToList();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
series = await _taskSeriesRepository .Where(s => s.Id == inDto.SeriesId).ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
|
|
|
|
|
|
|
|
|
var instanceList = await _taskInstanceRepository.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, t.FileSize }).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//series.WindowWidth = instanceList.FirstOrDefault()!.WindowWidth;
|
|
|
|
|
//series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter;
|
|
|
|
|
series.InstanceInfoList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k =>
|
|
|
|
|
new InstanceBasicInfo()
|
|
|
|
|
{
|
|
|
|
|
Id = k.Id,
|
|
|
|
|
NumberOfFrames = k.NumberOfFrames,
|
|
|
|
|
HtmlPath = k.HtmlPath,
|
|
|
|
|
Path = k.Path,
|
|
|
|
|
InstanceNumber = k.InstanceNumber,
|
|
|
|
|
FileSize = k.FileSize
|
|
|
|
|
|
|
|
|
|
}).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return series;
|
|
|
|
|
}
|
|
|
|
|
|