关键序列修改
continuous-integration/drone/push Build is passing Details

IRC_NewDev
he 2024-07-02 09:33:42 +08:00
parent 2354ee9174
commit 709529da87
2 changed files with 36 additions and 7 deletions

View File

@ -52,6 +52,19 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
public string ImageResizePath { get; set; }
}
public class StudyInstanceInfo
{
public int ShowOrder { get; set; }
public decimal RowIndex { get; set; }
public Guid? SeriesId { get; set; }
public Guid? StudyId { get; set; }
public Guid? InstanceId { get; set; }
}
public class InstanceBasicInfo
{
public Guid Id { get; set; }

View File

@ -32,6 +32,7 @@ namespace IRaCIS.Core.Application.Services
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
private readonly IRepository<VisitTask> _visitTaskRepository;
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
private readonly IRepository<ReadingCustomTag> _readingCustomTagRepository;
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
private readonly IRepository<ReadingPeriodPlan> _readingPeriodPlanRepository;
private readonly IRepository<Subject> _subjectRepository;
@ -50,6 +51,7 @@ namespace IRaCIS.Core.Application.Services
IRepository<DicomInstance> dicomInstanceRepository,
IRepository<VisitTask> visitTaskRepository,
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
IRepository<ReadingCustomTag> readingCustomTagRepository,
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository,
IRepository<ReadingPeriodPlan> readingPeriodPlanRepository,
IRepository<Subject> subjectRepository,
@ -70,6 +72,7 @@ namespace IRaCIS.Core.Application.Services
this._dicomInstanceRepository = dicomInstanceRepository;
this._visitTaskRepository = visitTaskRepository;
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
this._readingCustomTagRepository = readingCustomTagRepository;
this._noneDicomStudyFileRepository = noneDicomStudyFileRepository;
this._readingPeriodPlanRepository = readingPeriodPlanRepository;
_subjectRepository = subjectRepository;
@ -574,15 +577,28 @@ namespace IRaCIS.Core.Application.Services
//已经签名的任务,加关键序列
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
{
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new StudyInstanceInfo()
{
x.ReadingQuestionTrial.ShowOrder,
x.RowIndex,
x.SeriesId,
x.StudyId,
x.InstanceId,
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
RowIndex = x.RowIndex,
SeriesId = x.SeriesId,
StudyId = x.StudyId,
InstanceId = x.InstanceId,
}).ToListAsync();
var customoList = await _readingCustomTagRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
{
ShowOrder = 0,
RowIndex = 0m,
SeriesId = x.SeriesId,
StudyId = x.StudyId,
InstanceId = x.InstanceId,
}).ToListAsync();
rowInfoList.AddRange(customoList);
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
if (rowInfoList.Count > 0)
@ -649,7 +665,7 @@ namespace IRaCIS.Core.Application.Services
studyList.Add(thisVisitTaskStudy);
studyList.Insert(0,thisVisitTaskStudy);
}