diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index fcd514de9..13e2b6b7d 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -10,14 +10,17 @@ namespace IRaCIS.Core.Application.Image.QA public class QCListService : BaseService, IQCListService { private readonly IRepository _subjectVisitRepository; + private readonly IRepository _consistencyCheckFileRepository; public QCListService( IRepository subjectVisitRepository, + IRepository consistencyCheckFileRepository ) { _subjectVisitRepository = subjectVisitRepository; + this._consistencyCheckFileRepository = consistencyCheckFileRepository; } @@ -407,6 +410,10 @@ namespace IRaCIS.Core.Application.Image.QA var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent) + " desc", nameof(SubjectVisit.SubjectId), nameof(SubjectVisit.VisitNum) }; var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc, string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray); + + + + var config = await _repository.Where(t => t.Id == visitSearchDTO.TrialId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException(); return (pageList, config); diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 6d5daacd3..498c7edff 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.CurrentActionUser.UserName)) .ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName)) .ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName)) - .ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any() || t.PreviousPDFList.Any() || t.PreviousSurgeryList.Any() : false)) + .ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any() || t.ReadingClinicalDataList.Any(x=>x.ClinicalDataTrialSet.UploadRole==Domain.Share.UploadRole.CRC&&x.ReadingClinicalDataPDFList.Count()>0) || t.PreviousSurgeryList.Any() : false)) .ForMember(d => d.DicomStudyCount, u => u.MapFrom(t => t.StudyList.Count())) .ForMember(d => d.NoneDicomStudyCount, u => u.MapFrom(t => t.NoneDicomStudyList.Count(t => t.NoneDicomFileList.Any()))); @@ -133,7 +133,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.MedicalNo, u => u.MapFrom(s => s.Subject.MedicalNo)) .ForMember(d => d.Sex, u => u.MapFrom(s => s.Subject.Sex)) .ForMember(d => d.Age, u => u.MapFrom(t => t.Subject.Age)) - .ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any() || t.PreviousPDFList.Any() || t.PreviousSurgeryList.Any() : false)) + .ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any() || t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0) || t.PreviousSurgeryList.Any() : false)) //.ForMember(d => d.VisitName, u => u.MapFrom(t =>t.InPlan? t.VisitStage.VisitName : t.VisitName)) //.ForMember(d => d.VisitNum, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitNum : t.VisitNum)) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs index 30714328a..0ed375cfb 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs @@ -165,7 +165,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto [Required(ErrorMessage = "ReadingId为null")] public Guid ReadingId { get; set; } - public UploadRole UploadRole { get; set; } + public UploadRole? UploadRole { get; set; } } public class GetReadingClinicalDataPDFListIndto:PageInput diff --git a/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs b/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs index 3670fd259..94fdc394b 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs @@ -20,7 +20,7 @@ namespace IRaCIS.Core.Domain.Models public Guid TrialId { get; set; } /// - /// 阅片ID + /// 阅片或者受试者ID /// public Guid ReadingId { get; set; } @@ -69,6 +69,15 @@ namespace IRaCIS.Core.Domain.Models public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; } + [ForeignKey("ReadingId")] + + public SubjectVisit SubjectVisit { get; set; } + + + [ForeignKey("ReadingId")] + + public ReadModule ReadModule { get; set; } + /// /// PDF文件 /// diff --git a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs index 84f2cc19e..37d2ac764 100644 --- a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs +++ b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs @@ -195,6 +195,8 @@ namespace IRaCIS.Core.Domain.Models public List PreviousPDFList { get; set; } + public List ReadingClinicalDataList { get; set; } + public List CheckChallengeDialogList { get; set; } = new List(); public List StudyList { get; set; } = new List();