|
|
|
|
@ -43,9 +43,6 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|
|
|
|
IRepository<ReadingQuestionCriterionTrial> _trialReadingCriterionRepository,
|
|
|
|
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
|
|
|
|
IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository,
|
|
|
|
|
IRepository<Segment> _segmentRepository,
|
|
|
|
|
IRepository<Segmentation> _segmentationRepository,
|
|
|
|
|
IRepository<SegmentBinding> _segmentBindingRepository,
|
|
|
|
|
IRepository<DicomInstance> _dicomInstanceRepository,
|
|
|
|
|
IRepository<DicomSeries> _dicomSeriesRepository,
|
|
|
|
|
IRepository<SubjectCanceDoctor> _subjectCanceDoctorRepository,
|
|
|
|
|
@ -2223,7 +2220,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task CopyForms(VisitTask newTask, VisitTask origenalTask)
|
|
|
|
|
private void CopyForms(VisitTask newTask, VisitTask origenalTask)
|
|
|
|
|
{
|
|
|
|
|
newTask.IsCopyLesionAnswer = true;
|
|
|
|
|
//自定义
|
|
|
|
|
@ -2241,7 +2238,6 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var readingTaskQuestionAnswerList = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var item in readingTaskQuestionAnswerList)
|
|
|
|
|
@ -2298,60 +2294,6 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 分割
|
|
|
|
|
Dictionary<Guid, Guid> segmentationRelationship = new Dictionary<Guid, Guid>() { };
|
|
|
|
|
var segmentationList = await _segmentationRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToListAsync();
|
|
|
|
|
|
|
|
|
|
foreach (var item in segmentationList)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var newSegmentationId = NewId.NextSequentialGuid();
|
|
|
|
|
segmentationRelationship.Add(item.Id, newSegmentationId);
|
|
|
|
|
item.Id = newSegmentationId;
|
|
|
|
|
item.VisitTaskId = newTask.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dictionary<Guid, Guid> segmentRelationship = new Dictionary<Guid, Guid>() { };
|
|
|
|
|
var segmentList = await _segmentRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToListAsync();
|
|
|
|
|
foreach (var item in segmentList)
|
|
|
|
|
{
|
|
|
|
|
var newSegmentationId = NewId.NextSequentialGuid();
|
|
|
|
|
segmentRelationship.Add(item.Id, newSegmentationId);
|
|
|
|
|
item.Id = newSegmentationId;
|
|
|
|
|
item.VisitTaskId = newTask.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var segmentBindingList = await _segmentBindingRepository.Where(x => x.VisitTaskId == origenalTask.Id).ToListAsync();
|
|
|
|
|
|
|
|
|
|
foreach (var item in segmentBindingList)
|
|
|
|
|
{
|
|
|
|
|
if (segmentationRelationship.ContainsKey(item.SegmentationId))
|
|
|
|
|
{
|
|
|
|
|
item.SegmentationId = segmentationRelationship[item.SegmentationId];
|
|
|
|
|
}
|
|
|
|
|
if (segmentRelationship.ContainsKey(item.SegmentId))
|
|
|
|
|
{
|
|
|
|
|
item.SegmentId = segmentRelationship[item.SegmentId];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item.RowId != null && lesionRelationship.ContainsKey(item.RowId.Value))
|
|
|
|
|
{
|
|
|
|
|
item.RowId = lesionRelationship[item.RowId.Value];
|
|
|
|
|
}
|
|
|
|
|
item.Id = NewId.NextSequentialGuid();
|
|
|
|
|
item.VisitTaskId = newTask.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_ = _segmentationRepository.AddRangeAsync(segmentationList).Result;
|
|
|
|
|
_ = _segmentRepository.AddRangeAsync(segmentList).Result;
|
|
|
|
|
_ = _segmentBindingRepository.AddRangeAsync(segmentBindingList).Result;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in readingTableAnswerRowInfoList)
|
|
|
|
|
{
|
|
|
|
|
if (item.SplitRowId != null && lesionRelationship.ContainsKey(item.SplitRowId.Value))
|
|
|
|
|
|