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