修改Patient 返回影响列表
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
12d8944ca7
commit
5d0c6417a4
|
@ -1,4 +1,5 @@
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
@ -1035,9 +1036,7 @@ namespace IRaCIS.Application.Contracts
|
||||||
public bool IsDeleted { get; set; }
|
public bool IsDeleted { get; set; }
|
||||||
public bool IsReading { get; set; } = true;
|
public bool IsReading { get; set; } = true;
|
||||||
|
|
||||||
public List<Guid> InstanceList { get; set; } = new List<Guid>();
|
public List<InstanceBasicInfo> InstanceInfoList { get; set; } = new List<InstanceBasicInfo>();
|
||||||
|
|
||||||
public List<string> InstancePathList { get; set; } = new List<string>();
|
|
||||||
|
|
||||||
public string ImageResizePath { get; set; }
|
public string ImageResizePath { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -703,36 +703,22 @@ namespace IRaCIS.Application.Services
|
||||||
ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime)
|
ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime)
|
||||||
.ProjectTo<PatientSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<PatientSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
var idList = await _instanceRepository.Where(s => s.StudyId == scpStudyId).OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
|
var instanceList = await _instanceRepository.Where(s => s.StudyId == scpStudyId).OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
|
||||||
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||||
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber }).ToListAsync();//.GroupBy(u => u.SeriesId);
|
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber }).ToListAsync();//.GroupBy(u => u.SeriesId);
|
||||||
|
|
||||||
foreach (var item in seriesList)
|
foreach (var series in seriesList)
|
||||||
{
|
{
|
||||||
item.InstanceList = idList.Where(s => s.SeriesId == item.Id).Select(u => u.Id).ToList();
|
series.InstanceInfoList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k =>
|
||||||
|
new InstanceBasicInfo()
|
||||||
|
{
|
||||||
|
Id = k.Id,
|
||||||
|
NumberOfFrames = k.NumberOfFrames,
|
||||||
|
HtmlPath = string.Empty,
|
||||||
|
Path = k.Path,
|
||||||
|
InstanceNumber = k.InstanceNumber,
|
||||||
|
|
||||||
//处理多帧
|
}).ToList();
|
||||||
item.InstancePathList = idList.Where(s => s.SeriesId == item.Id).OrderBy(t => t.InstanceNumber)
|
|
||||||
.SelectMany(u =>
|
|
||||||
{
|
|
||||||
|
|
||||||
if (u.NumberOfFrames > 1)
|
|
||||||
{
|
|
||||||
var pathList = new List<string>();
|
|
||||||
|
|
||||||
for (int i = 1; i <= u.NumberOfFrames; i++)
|
|
||||||
{
|
|
||||||
pathList.Add(u.Path + "?frame=" + (i - 1));
|
|
||||||
}
|
|
||||||
return pathList;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return new List<string> { u.Path };
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.ToList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue