diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index b2aa1add4..e14a62f5b 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -337,7 +337,14 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public class GetDataInspectionOutDto : DataInspection { public string ExperimentName { get; set; } = string.Empty; + public string SubjectCode { get; set; } = string.Empty; + public string TrialName { get; set; } = string.Empty; + public string SiteCode { get; set; } = string.Empty; + public string ResearchProgramNo { get; set; } = string.Empty; + public string SubjectVisitName { get; set; } = string.Empty; + + public string RoleName { get; set; } = string.Empty; public string FirstName { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index e59a90143..c207b93b4 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -97,8 +97,8 @@ namespace IRaCIS.Core.Application.Service.Inspection ParentId = data.ParentId, ChildrenType = data.ChildrenType, JsonDetail = data.JsonDetail, - SiteName = data.SiteName, - ExperimentName = data.TrialName, + //SiteName = data.SiteName, + //ExperimentName = data.TrialName, FirstName = leftsubject.FirstName, LastName = leftsubject.LastName, Id = data.Id, @@ -124,7 +124,7 @@ namespace IRaCIS.Core.Application.Service.Inspection ParentIdentification = leftparent.Identification, OptType = leftOptType.Id, VisitNum=leftsubjectVisit.VisitNum, - IsFrontAdd=data.IsFrontAdd, + //IsFrontAdd=data.IsFrontAdd, BatchId=data.BatchId, OptTypeName = leftOptType.Value, }; diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs index b258c2bac..e54488d86 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs @@ -329,7 +329,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List CurrentPageData { get; set; } } - + + //public class GetReadModuleDtoOut public class GetReadModuleDtoOut { @@ -337,12 +338,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string TrialSiteCode { get; set; } - + public string SiteCode { get; set; } public Guid SiteId { get; set; } public Guid SubjectId { get; set; } public List Data { get; set; } + + public List ReadModuleData { get; set; } } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index 55d52813a..f1facb549 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -26,6 +26,7 @@ namespace IRaCIS.Application.Services private readonly IRepository _subjectRepository; private readonly IRepository _visitstageRepository; private readonly IRepository _userRepository; + private readonly IRepository _readModuleViewRepository; private readonly IRepository _dicomInstanceRepository; private readonly IRepository _noneDicomStudyFileRepository; private readonly IRepository _readingPeriodSetRepository; @@ -36,6 +37,7 @@ namespace IRaCIS.Application.Services IRepository subjectRepository, IRepository visitstageRepository, IRepository UserRepository, + IRepository readModuleViewRepository, IRepository dicomInstanceRepository, IRepository noneDicomStudyFileRepository, IRepository readingPeriodSetRepository, @@ -46,6 +48,7 @@ namespace IRaCIS.Application.Services this._subjectRepository = subjectRepository; this._visitstageRepository = visitstageRepository; this._userRepository = UserRepository; + this._readModuleViewRepository = readModuleViewRepository; this._dicomInstanceRepository = dicomInstanceRepository; this._noneDicomStudyFileRepository = noneDicomStudyFileRepository; this._readingPeriodSetRepository = readingPeriodSetRepository; @@ -59,118 +62,212 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task<(PageOutput,object)> GetReadModuleList(GetReadModuleDto dto) { - var subjectQuery = _subjectRepository.WhereIf(dto.TrialId!=null, x => x.TrialId == dto.TrialId) - .WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId) - .Include(x => x.SubjectVisitList).Include(x => x.Site).Include(x => x.TrialSite) - //.WhereIf(dto.TrialSiteCode != null, x => x.TrialSite.TrialSiteCode == dto.TrialSiteCode) - // .WhereIf(dto.SubjectCode != null, x => x.Code == dto.SubjectCode) - - .Select(x => new GetReadModuleDtoOut - { - TrialSiteCode = x.TrialSite.TrialSiteCode, - SiteId = x.SiteId, - SubjectCode = x.Code, - SubjectId = x.Id, - Data=x.SubjectVisitList.OrderByDescending(y=>y.VisitNum).Select(y=>new GetReadModuleOutDto() - { - Id = y.Id, //id - Name=y.VisitName, - ModuleType = y.InPlan ? ModuleTypeEnum.InPlanSubjectVisit : ModuleTypeEnum.OutPlanSubjectVisit, // 模块类型 - IsUrgent = x.IsUrgent, // 是否加急 - SubjectVisitId = y.Id, // 访视ID - SubjectVisitName=y.VisitName, // 访视名称 - Status= ReadingCommon.GetVisitSubmitStateEnum(y), // 状态 - CreateTime = y.CreateTime, // 创建时间 - SubjectCode = y.Subject.Code, // 受试者code - TrialSiteCode = x.TrialSite.TrialSiteCode, // 中心Code - VisitNum=y.VisitNum, + var subjectQuery = _readModuleViewRepository.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId) + .WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId) + .WhereIf(dto.TrialSiteCode != null, x => x.TrialSiteCode == dto.TrialSiteCode) + .WhereIf(dto.SubjectCode != null, x => x.SubjectCode == dto.SubjectCode) + .WhereIf(dto.ModuleType != null, x => x.ModuleType == dto.ModuleType) + .WhereIf(dto.Status != null, x => x.Status == dto.Status) + .WhereIf(dto.Name != null, x => x.Name.Contains(x.Name)).OrderBy(x=>x.SiteCode); - IsFinalVisit=y.IsFinalVisit, // 是否为末次评估 - OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, // 上一访视 - OutPlanPreviousVisitName = y.OutPlanPreviousVisit.VisitName, // 上一访视名称 - SiteId = x.Site.Id, // 中心ID - IsVisit=true, // 是否为访视 - PDState = y.PDState, // PD 进展 - IsEnrollmentConfirm=y.IsEnrollmentConfirm, // 入组 - SubjectId = x.Id, - }).ToList() - }); - - - - - - var pageList = await subjectQuery.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField == null|| dto.SortField==string.Empty ? "SiteCode" : dto.SortField, - dto.Asc); - - - pageList.CurrentPageData.ForEach(x => - { - var outplan = x.Data.FirstOrDefault(x => x.IsFinalVisit); - if (outplan != null) + var subjectIds =await subjectQuery.Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync(); + List ReadModuleViewList =await subjectQuery.Where(x => subjectIds.Contains(x.SubjectId)).ToListAsync(); + List getReadList = ReadModuleViewList.GroupBy(x => new { x.SubjectId, x.SiteId, x.TrialSiteCode, x.SubjectCode }) + .Select(x => new GetReadModuleDtoOut() { - x.Data = x.Data.Where(y => y.VisitNum >= outplan.VisitNum).ToList(); - } - }); - - var subjectIds = pageList.CurrentPageData.Select(x => x.SubjectId).ToList(); - - var readModules =await _readModuleRepository.Where(x => subjectIds.Contains(x.SubjectId)).Include(x=>x.SubjectVisit) - .Include(x => x.ReadModuleModel).ToListAsync(); - - pageList.CurrentPageData.ForEach(x => { - x.Data.AddRange(readModules.Where(y => y.SubjectId == x.SubjectId).Select( - y => new GetReadModuleOutDto() + TrialSiteCode = x.Key.TrialSiteCode, + SiteId = x.Key.SiteId, + SubjectCode = x.Key.SubjectCode, + SubjectId = x.Key.SubjectId, + Data = x.Select(y => new GetReadModuleOutDto() { CreateTime = y.CreateTime, + CutOffVisitId = y.CutOffVisitId, + SiteCode = y.SiteCode, + SubjectId = y.SubjectId, + CutOffVisitName = y.CutOffVisitName, + SiteId = y.SiteId, + Status = y.Status, + SubjectCode = y.SubjectCode, Id = y.Id, - Name=y.ModuleName, - SubjectId=x.SubjectId, - ModuleType=y.ModuleType, - Status= ReadingCommon.GetVisitSubmitStateEnum(y.SubjectVisit), - SubjectCode= x.SubjectCode, - TrialSiteCode = x.TrialSiteCode, - SubjectVisitId= y.SubjectVisitId, - SubjectVisitName=y.SubjectVisit?.VisitName, // 截止访视名称 - CutOffVisitId = y.SubjectVisitId, // 截止访视 - CutOffVisitName = y.SubjectVisit?.VisitName, // 截止访视名称 - ReadModuleId=y.ReadModuleId, - ReadModuleName=y.ReadModuleModel?.ModuleName, - IsUrgent = y.IsUrgent + IsEnrollmentConfirm = y.IsEnrollmentConfirm, + IsFinalVisit = y.IsFinalVisit, + SubjectVisitId = y.SubjectVisitId, + SubjectVisitName = y.SubjectVisitName, + PDState = y.PDState, + TrialSiteCode = y.TrialSiteCode, + IsUrgent = y.IsUrgent, + IsVisit = y.IsVisit, + ModuleType = y.ModuleType, + Name = y.Name, + OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, + OutPlanPreviousVisitName = y.CutOffVisitName, + ReadModuleId = y.CutOffVisitId, + ReadModuleName = y.ReadModuleName, + VisitNum = y.VisitNum + }).ToList() + }).ToList(); - })); - x.Data= x.Data.OrderBy(y => y.ModuleType).ThenBy(x=>x.VisitNum).ToList(); - }); - - pageList.CurrentPageData.ForEach(x => { - - if (dto.ModuleType != null) - { - x.Data = x.Data.Where(y => y.ModuleType == dto.ModuleType).ToList(); - } - if (dto.Status != null) - { - x.Data = x.Data.Where(y => y.Status == dto.Status).ToList(); - } - - if (dto.Name != null) - { - x.Data = x.Data.Where(y => y.Name.Contains(y.Name)).ToList(); - } - }); - - - - - return (pageList, new + PageOutput pageOutput = new PageOutput() { - MaxLength = pageList.CurrentPageData.ToList().Max(x => x.Data.Count) + + PageSize = dto.PageSize, + CurrentPageData = getReadList, + PageIndex = dto.PageIndex, + TotalCount =await subjectQuery.Select(x => x.SubjectId).Distinct().CountAsync(), + }; + + return (pageOutput, new + { + MaxLength = pageOutput.CurrentPageData.ToList().Max(x => x.Data.Count) }); + + #region 用导航属性写的 有问题 + //var subjectQuery = _subjectRepository.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId) + // .WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId) + // .Include(x => x.SubjectVisitList).Include(x => x.Site).Include(x => x.TrialSite) + // .WhereIf(dto.TrialSiteCode != null, x => x.TrialSite.TrialSiteCode == dto.TrialSiteCode) + // .WhereIf(dto.SubjectCode != null, x => x.Code == dto.SubjectCode) + + // .Select(x => new GetReadModuleDtoOut + // { + // TrialSiteCode = x.TrialSite.TrialSiteCode, + // SiteCode = x.TrialSite.TrialSiteCode, + // SiteId = x.SiteId, + // SubjectCode = x.Code, + // SubjectId = x.Id, + // Data = x.SubjectVisitList.OrderByDescending(y => y.VisitNum).Select(y => new GetReadModuleOutDto() + // { + // Id = y.Id, //id + // Name = y.VisitName, + // ModuleType = y.InPlan ? ModuleTypeEnum.InPlanSubjectVisit : ModuleTypeEnum.OutPlanSubjectVisit, // 模块类型 + // IsUrgent = x.IsUrgent, // 是否加急 + // SubjectVisitId = y.Id, // 访视ID + // SubjectVisitName = y.VisitName, // 访视名称 + // Status = ReadingCommon.GetVisitSubmitStateEnum(y), // 状态 + // CreateTime = y.CreateTime, // 创建时间 + // SubjectCode = y.Subject.Code, // 受试者code + // TrialSiteCode = x.TrialSite.TrialSiteCode, // 中心Code + // VisitNum = y.VisitNum, + + // IsFinalVisit = y.IsFinalVisit, // 是否为末次评估 + // OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, // 上一访视 + // OutPlanPreviousVisitName = y.OutPlanPreviousVisit.VisitName, // 上一访视名称 + // SiteId = x.Site.Id, // 中心ID + // IsVisit = true, // 是否为访视 + // PDState = y.PDState, // PD 进展 + // IsEnrollmentConfirm = y.IsEnrollmentConfirm, // 入组 + // SubjectId = x.Id, + // }).ToList(), + + // ReadModuleData = x.ReadModuleList.Select( + // z => new GetReadModuleOutDto() + // { + // CreateTime = z.CreateTime, + // Id = z.Id, + // Name = z.ModuleName, + // SubjectId = x.Id, + // ModuleType = z.ModuleType, + // Status = ReadingCommon.GetVisitSubmitStateEnum(z.SubjectVisit), + // SubjectCode = x.Code, + // TrialSiteCode = x.TrialSite.TrialSiteCode, + // SubjectVisitId = z.SubjectVisitId, + // SubjectVisitName = z.SubjectVisit.VisitName, // 截止访视名称 + // CutOffVisitId = z.SubjectVisitId, // 截止访视 + // CutOffVisitName = z.SubjectVisit.VisitName, // 截止访视名称 + // ReadModuleId = z.ReadModuleId, + // ReadModuleName = z.ReadModuleModel.ModuleName, + // IsUrgent = z.IsUrgent + // }).ToList(), + + + + + + // }); + + + + //if (dto.ModuleType != null) + //{ + // subjectQuery. + //} + //if (dto.Status != null) + //{ + // x.Data = x.Data.Where(y => y.Status == dto.Status).ToList(); + //} + + //if (dto.Name != null) + //{ + // x.Data = x.Data.Where(y => y.Name.Contains(y.Name)).ToList(); + //} + + + + + //var pageList = await subjectQuery.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField == null || dto.SortField == string.Empty ? "SiteCode" : dto.SortField, + // dto.Asc); + + + + + //pageList.CurrentPageData.ForEach(x => + //{ + // var outplan = x.Data.FirstOrDefault(x => x.IsFinalVisit); + // if (outplan != null) + // { + // x.Data = x.Data.Where(y => y.VisitNum >= outplan.VisitNum).ToList(); + // } + //}); + + //var subjectIds = pageList.CurrentPageData.Select(x => x.SubjectId).ToList(); + + //var readModules = await _readModuleRepository.Where(x => subjectIds.Contains(x.SubjectId)).Include(x => x.SubjectVisit) + // .Include(x => x.ReadModuleModel).ToListAsync(); + + ////pageList.CurrentPageData.ForEach(x => { + //// x.Data.AddRange(readModules.Where(y => y.SubjectId == x.SubjectId).Select( + //// y => new GetReadModuleOutDto() + //// { + //// CreateTime = y.CreateTime, + //// Id = y.Id, + //// Name=y.ModuleName, + //// SubjectId=x.SubjectId, + //// ModuleType=y.ModuleType, + //// Status= ReadingCommon.GetVisitSubmitStateEnum(y.SubjectVisit), + //// SubjectCode= x.SubjectCode, + //// TrialSiteCode = x.TrialSiteCode, + //// SubjectVisitId= y.SubjectVisitId, + //// SubjectVisitName=y.SubjectVisit?.VisitName, // 截止访视名称 + //// CutOffVisitId = y.SubjectVisitId, // 截止访视 + //// CutOffVisitName = y.SubjectVisit?.VisitName, // 截止访视名称 + //// ReadModuleId=y.ReadModuleId, + //// ReadModuleName=y.ReadModuleModel?.ModuleName, + //// IsUrgent = y.IsUrgent + + //// })); + + //// x.Data= x.Data.OrderBy(y => y.ModuleType).ThenBy(x=>x.VisitNum).ToList(); + ////}); + + //pageList.CurrentPageData.ForEach(x => { + + //}); + + + + + //return (pageList, new + //{ + // MaxLength = pageList.CurrentPageData.ToList().Max(x => x.Data.Count) + //}); + #endregion + } - + ///// diff --git a/IRaCIS.Core.Domain/Reading/ReadModule.cs b/IRaCIS.Core.Domain/Reading/ReadModule.cs index 8416fbf8c..4f2949d2c 100644 --- a/IRaCIS.Core.Domain/Reading/ReadModule.cs +++ b/IRaCIS.Core.Domain/Reading/ReadModule.cs @@ -76,6 +76,14 @@ namespace IRaCIS.Core.Domain.Models [ForeignKey("ReadModuleId")] public ReadModule ReadModuleModel { get; set; } + + /// + /// 受试者 + /// + [ForeignKey("SubjectId")] + + public Subject Subject { get; set; } + /// /// 阅片期配置 /// diff --git a/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs b/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs new file mode 100644 index 000000000..2b8a7c8e8 --- /dev/null +++ b/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs @@ -0,0 +1,142 @@ +using IRaCIS.Core.Domain.Share; +using IRaCIS.Core.Domain.Share.Reading; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IRaCIS.Core.Domain.Models +{ + public class ReadModuleView: Entity + { + /// + /// Id(阅片期Id 或者 访视ID) + /// + public new Guid Id { get; set; } + + + /// + /// 项目ID + /// + public Guid TrialId { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 受试者ID + /// + public Guid SubjectId { get; set; } + + /// + /// 模块类型 + /// + public ModuleTypeEnum ModuleType { get; set; } + + /// + /// 是否加急 + /// + public bool? IsUrgent { get; set; } + + /// + /// 访视ID + /// + public Guid SubjectVisitId { get; set; } + + + /// + /// 访视名称 + /// + public string SubjectVisitName { get; set; } + + + /// + /// 截止访视 + /// + public Guid? CutOffVisitId { get; set; } + + + /// + /// 截止访视名称 + /// + public string? CutOffVisitName { get; set; } + + /// + /// 对应阅片期 + /// + public Guid? ReadModuleId { get; set; } + + /// + /// 对应Name + /// + public string? ReadModuleName { get; set; } + + /// + /// 状态 + /// + public ReadModuleEnum? Status { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + + /// + /// 受试者Code + /// + public string SubjectCode { get; set; } + + /// + /// 中心Id + /// + public string SiteCode { get; set; } + + /// + /// 项目中心Id + /// + public string TrialSiteCode { get; set; } + + /// + /// 是否为末次访视 + /// + public bool IsFinalVisit { get; set; } = false; + + /// + /// 上一访视 + /// + public Guid? OutPlanPreviousVisitId { get; set; } + + /// + /// 上一访视名称 + /// + public string OutPlanPreviousVisitName { get; set; } + + /// + /// 中心ID + /// + public Guid SiteId { get; set; } + + /// + /// 是否为访视 + /// + public bool IsVisit { get; set; } + + /// + /// 访视Num + /// + public decimal? VisitNum { get; set; } + + /// + /// 是否为PD进展 + /// + public PDStateEnum PDState { get; set; } = PDStateEnum.None; + + /// + /// 入组确认评估 + /// + public bool IsEnrollmentConfirm { get; set; } = false; + } +} diff --git a/IRaCIS.Core.Domain/Trial/DataInspection.cs b/IRaCIS.Core.Domain/Trial/DataInspection.cs index ae43f1356..2d72037f9 100644 --- a/IRaCIS.Core.Domain/Trial/DataInspection.cs +++ b/IRaCIS.Core.Domain/Trial/DataInspection.cs @@ -108,12 +108,10 @@ namespace IRaCIS.Core.Domain.Models /// 项目名称 /// public string TrialName { get; set; } - /// /// 中心名称 /// public string SiteName { get; set; } - /// /// 受试者名称 /// @@ -129,6 +127,8 @@ namespace IRaCIS.Core.Domain.Models /// public string RoleName { get; set; } + + /// /// 中心Code /// @@ -140,7 +140,7 @@ namespace IRaCIS.Core.Domain.Models public string ResearchProgramNo { get; set; } /// - /// 对象名称 + /// 对象类型 /// public Guid? ObjectType { get; set; } @@ -159,15 +159,8 @@ namespace IRaCIS.Core.Domain.Models /// public Guid? GeneralId { get; set; } - /// - /// 是否是前端添加 - /// - public bool? IsFrontAdd { get; set; } - /// - /// 上一条json - /// - public string LastJsonDetail { get; set; } + /// /// 批次Id diff --git a/IRaCIS.Core.Domain/Visit/Subject.cs b/IRaCIS.Core.Domain/Visit/Subject.cs index 308bd0fa7..a5f0be6ba 100644 --- a/IRaCIS.Core.Domain/Visit/Subject.cs +++ b/IRaCIS.Core.Domain/Visit/Subject.cs @@ -82,6 +82,8 @@ namespace IRaCIS.Core.Domain.Models public bool IsUrgent { get; set; } + + public List ReadModuleList { get; set; } public bool IsDeleted { get; set; } public DateTime? DeletedTime { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs index 3cfc88715..10644a97f 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs @@ -25,7 +25,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common } else if (visit.AuditState != AuditStateEnum.QCPassed) // 审核未通过 { - return ReadModuleEnum.ImageUpload; + return ReadModuleEnum.ImageQuality; } else if (visit.ForwardState != ForwardStateEnum.Forwarded) // 未通过一致性核查 { diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 09fcf7056..fd9cbdab3 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -178,8 +178,8 @@ namespace IRaCIS.Core.Infra.EFCore public virtual DbSet ReadingPeriodPlan { get; set; } - public virtual DbSet ReadModule { get; set; } + public virtual DbSet ReadModuleView { get; set; } public virtual DbSet ClinicalData { get; set; }