diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index ffe29ad60..7cde056be 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -151,7 +151,7 @@ namespace IRaCIS.Core.Application.Service.Inspection ObjectRelationParentId = data.ObjectRelationParentId, GeneralId = data.GeneralId, - //TrialReadingCriterionName= leftCriterion.CriterionName + //TrialReadingCriterionName = data.TrialReadingCriterion.CriterionName }; query = query.WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId) @@ -175,7 +175,7 @@ namespace IRaCIS.Core.Application.Service.Inspection #endregion .WhereIf(dto.BatchId != null, x => x.BatchId == dto.BatchId) .WhereIf(dto.BatchId == null && dto.GeneralId != null, x => x.GeneralId == dto.GeneralId) - .WhereIf(dto.TrialReadingCriterionId == null, x => x.TrialReadingCriterionId == dto.TrialReadingCriterionId) + .WhereIf(dto.TrialReadingCriterionId != null, x => x.TrialReadingCriterionId == dto.TrialReadingCriterionId) .WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo)) diff --git a/IRaCIS.Core.Domain/Trial/DataInspection.cs b/IRaCIS.Core.Domain/Trial/DataInspection.cs index 0d3f8a2dd..9bd8b2efb 100644 --- a/IRaCIS.Core.Domain/Trial/DataInspection.cs +++ b/IRaCIS.Core.Domain/Trial/DataInspection.cs @@ -152,6 +152,8 @@ namespace IRaCIS.Core.Domain.Models public Guid? DoctorUserId { get; set; } + [ForeignKey("TrialReadingCriterionId")] + public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } }