@@ -3631,8 +3631,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||
var entity = item.Entity as Segmentation;
|
||||
|
||||
|
||||
var visitTask = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).FirstOrDefaultAsync();
|
||||
|
||||
await InsertInspection<Segmentation>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
TrialReadingCriterionId = visitTask != null ? visitTask.TrialReadingCriterionId : null,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3645,9 +3648,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||
|
||||
var entity = item.Entity as Segment;
|
||||
|
||||
var visitTask = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).FirstOrDefaultAsync();
|
||||
|
||||
await InsertInspection<Segment>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
TrialReadingCriterionId = visitTask != null ? visitTask.TrialReadingCriterionId : null,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3721,7 +3726,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||
|
||||
|
||||
|
||||
var segmentation = await _dbContext.Segmentation.Where(x => x.Id == entity.SegmentationId).FirstOrDefaultAsync()?? new Segmentation() { };
|
||||
var segmentation = await _dbContext.Segmentation.Where(x => x.Id == entity.SegmentationId).Include(x=>x.VisitTask).FirstOrDefaultAsync()?? new Segmentation() { };
|
||||
|
||||
var segment= await _dbContext.Segment.Where(x => x.Id == entity.SegmentId).FirstOrDefaultAsync()?? new Segment() { };
|
||||
|
||||
@@ -3729,12 +3734,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||
var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
|
||||
Guid? trialReadingCriterionId = null;
|
||||
if (segmentation.VisitTask != null)
|
||||
{
|
||||
trialReadingCriterionId= segmentation.VisitTask.TrialReadingCriterionId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
await InsertInspection<SegmentBinding>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
TrialReadingCriterionId= trialReadingCriterionId,
|
||||
},new
|
||||
{
|
||||
segmentation.SegmentationName,
|
||||
|
||||
Reference in New Issue
Block a user