diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 56431170..ad813749 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -584,6 +584,14 @@ namespace IRaCIS.Core.Application.Contracts public string CheckDialogStr { get; set; } public DateTime? CheckBackTime { get; set; } + + public DateTime? EarliestScanDate { get; set; } + + public DateTime? LatestScanDate { get; set; } + + public List ModalityList { get; set; } + + public string Modalitys => string.Join(',', ModalityList); } @@ -1248,6 +1256,17 @@ namespace IRaCIS.Core.Application.Contracts public List DialogList { get; set; } } + public class QCCheckWithModalityView: QCCheckViewModel + { + public DateTime? EarliestScanDate { get; set; } + + public DateTime? LatestScanDate { get; set; } + + public List ModalityList { get; set; } + + public string Modalitys =>string.Join(',', ModalityList); + } + public class QCCheckViewModel { public string? TalkContent { get; set; } = String.Empty; diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 31197ac8..430b5120 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -447,7 +447,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost] - public async Task<(PageOutput, TrialSubjectAndSVConfig)> GetConsistencyVerificationList(CheckQuery checkQuery) + public async Task<(PageOutput, TrialSubjectAndSVConfig)> GetConsistencyVerificationList(CheckQuery checkQuery) { #region linq 废弃 byzhouhang 2021 11 30 //Expression> subjectLambda = x => true; @@ -507,7 +507,7 @@ namespace IRaCIS.Core.Application.Image.QA .WhereIf(checkQuery.VisitPlanArray != null && checkQuery.VisitPlanArray?.Length > 0, svExpression) //.WhereIf(!string.IsNullOrEmpty(checkQuery.VisitPlanInfo), checkQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(checkQuery.VisitPlanInfo)) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site - .ProjectTo(_mapper.ConfigurationProvider); + .ProjectTo(_mapper.ConfigurationProvider); var pageList = await query.ToPagedListAsync(checkQuery.PageIndex, checkQuery.PageSize, checkQuery.SortField, checkQuery.Asc); var config = await _repository.Where(t => t.Id == checkQuery.TrialId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException(); diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 28230637..928e72df 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -105,6 +105,9 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode)) .ForMember(d => d.CheckDialogStr, u => u.MapFrom(t => string.Join(" | ", t.CheckChallengeDialogList.OrderBy(t => t.CreateTime).Select(c => c.CreateUser.UserName + " " + c.CreateTime.ToString("yyyy-mm-dd hh:mm:ss") + " :" + c.TalkContent)))) + .ForMember(d => d.ModalityList, c => c.MapFrom(s => + (s.NoneDicomStudyList.Select(t => t.Modality) + .Union(s.StudyList.Select(k => k.ModalityForEdit))).Distinct())) ; CreateMap() @@ -397,6 +400,12 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code)) .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode)); + CreateMap().IncludeBase() + .ForMember(d => d.ModalityList, c => c.MapFrom(s => + (s.NoneDicomStudyList.Select(t => t.Modality) + .Union(s.StudyList.Select(k => k.ModalityForEdit))).Distinct())); + + //一致性核查 质疑对话 CreateMap() .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))