Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
						commit
						771937cf78
					
				| 
						 | 
				
			
			@ -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<string> ModalityList { get; set; }
 | 
			
		||||
 | 
			
		||||
        public string Modalitys => string.Join(',', ModalityList);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1248,6 +1256,17 @@ namespace IRaCIS.Core.Application.Contracts
 | 
			
		|||
        public List<CheckChanllengeDialogDTO> DialogList { get; set; }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class QCCheckWithModalityView: QCCheckViewModel
 | 
			
		||||
    {
 | 
			
		||||
        public DateTime? EarliestScanDate { get; set; }
 | 
			
		||||
 | 
			
		||||
        public DateTime? LatestScanDate { get; set; }
 | 
			
		||||
 | 
			
		||||
        public List<string> ModalityList { get; set; }
 | 
			
		||||
 | 
			
		||||
        public string Modalitys =>string.Join(',', ModalityList);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class QCCheckViewModel
 | 
			
		||||
    {
 | 
			
		||||
        public string? TalkContent { get; set; } = String.Empty;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -447,7 +447,7 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
        /// <param name="checkQuery"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        [HttpPost]
 | 
			
		||||
        public async Task<(PageOutput<QCCheckViewModel>, TrialSubjectAndSVConfig)> GetConsistencyVerificationList(CheckQuery checkQuery)
 | 
			
		||||
        public async Task<(PageOutput<QCCheckWithModalityView>, TrialSubjectAndSVConfig)> GetConsistencyVerificationList(CheckQuery checkQuery)
 | 
			
		||||
        {
 | 
			
		||||
            #region linq 废弃 byzhouhang  2021 11 30
 | 
			
		||||
            //Expression<Func<Subject, bool>> 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<QCCheckViewModel>(_mapper.ConfigurationProvider);
 | 
			
		||||
                        .ProjectTo<QCCheckWithModalityView>(_mapper.ConfigurationProvider);
 | 
			
		||||
 | 
			
		||||
            var pageList = await query.ToPagedListAsync(checkQuery.PageIndex, checkQuery.PageSize, checkQuery.SortField, checkQuery.Asc);
 | 
			
		||||
            var config = await _repository.Where<Trial>(t => t.Id == checkQuery.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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<VisitTask, ReadingTaskExportDto>()
 | 
			
		||||
| 
						 | 
				
			
			@ -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<SubjectVisit, QCCheckWithModalityView>().IncludeBase<SubjectVisit, QCCheckViewModel>()
 | 
			
		||||
                .ForMember(d => d.ModalityList, c => c.MapFrom(s =>
 | 
			
		||||
                (s.NoneDicomStudyList.Select(t => t.Modality)
 | 
			
		||||
                .Union(s.StudyList.Select(k => k.ModalityForEdit))).Distinct()));
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            //一致性核查 质疑对话
 | 
			
		||||
            CreateMap<CheckChallengeDialog, CheckChanllengeDialogDTO>()
 | 
			
		||||
                 .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue