diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 3b91a7198..3aa70dbaf 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -3650,8 +3650,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common var visitTask = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).FirstOrDefaultAsync(); + + var segmentation = await _dbContext.Segmentation.Where(x => x.Id == entity.SegmentationId).FirstOrDefaultAsync(); + await InsertInspection(entity, type, x => new InspectionConvertDTO() { + SubjectId= segmentation != null ? segmentation.SubjectId : null, + SubjectVisitId = segmentation != null ? segmentation.SubjectVisitId : null, TrialReadingCriterionId = visitTask != null ? visitTask.TrialReadingCriterionId : null, }); }