修改一版
parent
506a66cbfb
commit
ec14e515e0
|
@ -2,6 +2,9 @@
|
|||
{
|
||||
public class DicomSeriesDTO
|
||||
{
|
||||
|
||||
public bool IsDicom { get; set; } = true;
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
public string StudyInstanceUid { get; set; } = String.Empty;
|
||||
|
@ -11,6 +14,8 @@
|
|||
public string Modality { get; set; } = String.Empty;
|
||||
public string Description { get; set; }=String.Empty;
|
||||
public int InstanceCount { get; set; }
|
||||
|
||||
public string NoneDicomFileFirstFile { get; set; } = String.Empty;
|
||||
public string SliceThickness { get; set; } = String.Empty;
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
|
|
@ -192,7 +192,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public int SeriesCount { get; set; }
|
||||
public int InstanceCount { get; set; }
|
||||
|
||||
public bool IsDicom { get; set; } = true;
|
||||
|
||||
|
||||
public List<DicomSeriesDTO> SeriesList { get; set; } = new List<DicomSeriesDTO>();
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<ReadingPeriodSet> _readingPeriodSetRepository;
|
||||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
||||
private readonly IRepository<ReadingPeriodPlan> _readingPeriodPlanRepository;
|
||||
private readonly IRepository<Subject> _subjectRepository;
|
||||
|
||||
|
@ -29,6 +30,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
IRepository<Trial> trialRepository,
|
||||
IRepository<ReadingPeriodSet> readingPeriodSetRepository,
|
||||
IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository,
|
||||
IRepository<ReadingPeriodPlan> readingPeriodPlanRepository,
|
||||
IRepository<Subject> subjectRepository)
|
||||
{
|
||||
|
@ -37,6 +39,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
this._trialRepository = trialRepository;
|
||||
this._readingPeriodSetRepository = readingPeriodSetRepository;
|
||||
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
||||
this._noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
||||
this._readingPeriodPlanRepository = readingPeriodPlanRepository;
|
||||
_subjectRepository = subjectRepository;
|
||||
}
|
||||
|
@ -240,7 +243,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id,
|
||||
IsDicom=true,
|
||||
|
||||
}).ToListAsync();
|
||||
var studyIds = studyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
|
@ -265,18 +268,46 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
// 非Dicom
|
||||
|
||||
var noDicomStudyList = _noneDicomStudyRepository.Where(x => x.TrialId == trialId && x.SubjectVisitId == sujectVisitId).Select(x => new VisitStudyDTO()
|
||||
List<DicomSeriesDTO> noDicomStudyList =await _noneDicomStudyRepository.Where(x => x.TrialId == trialId && x.SubjectVisitId == sujectVisitId).Select(x => new DicomSeriesDTO()
|
||||
{
|
||||
InstanceCount = x.FileCount,
|
||||
|
||||
//
|
||||
Modalities = string.Empty,
|
||||
SeriesCount = 1,
|
||||
StudyCode = x.StudyCode,
|
||||
Modality = x.Modality,
|
||||
SiteId=x.SiteId,
|
||||
TrialId=x.TrialId,
|
||||
SubjectId=x.SubjectId,
|
||||
SubjectVisitId=x.SubjectVisitId,
|
||||
Id=x.Id,
|
||||
StudyId = x.Id,
|
||||
IsDicom = false,
|
||||
}).ToListAsync();
|
||||
|
||||
foreach (var item in noDicomStudyList)
|
||||
{
|
||||
item.NoneDicomFileFirstFile = await _noneDicomStudyFileRepository.Where(x => x.NoneDicomStudyId == item.Id).Select(x => x.Path).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
|
||||
if (studyList.Count > 0)
|
||||
{
|
||||
studyList[0].SeriesList.AddRange(noDicomStudyList);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
studyList = new List<VisitStudyDTO>()
|
||||
{
|
||||
new VisitStudyDTO(){
|
||||
InstanceCount =noDicomStudyList.Count(),
|
||||
Modalities = noDicomStudyList.Select(x=>x.Modality).FirstOrDefault(),
|
||||
SeriesCount = noDicomStudyList.Count(),
|
||||
StudyCode = noDicomStudyList.Select(x=>x.Modality).FirstOrDefault(),
|
||||
StudyId = noDicomStudyList.Select(x=>x.Id).FirstOrDefault(),
|
||||
SeriesList=noDicomStudyList,
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
return studyList;
|
||||
|
||||
//return ResponseOutput.Ok(studyList.Where(t => t.SeriesList.Count > 0).ToList());
|
||||
|
|
Loading…
Reference in New Issue