问题修改
							parent
							
								
									8daf02246e
								
							
						
					
					
						commit
						ed6a6fb844
					
				| 
						 | 
				
			
			@ -59,7 +59,8 @@ namespace IRaCIS.Core.Application.Service
 | 
			
		|||
                ;
 | 
			
		||||
 | 
			
		||||
            CreateMap<DicomStudy, QAStudyInfoDTO>()
 | 
			
		||||
                .ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
 | 
			
		||||
                .ForMember(o => o.IsCompleteClinicalData, t =>  t.MapFrom(u => !u.ReadingClinicalDataList.Any(x=>x.ReadingClinicalDataPDFList.Count()==0)))
 | 
			
		||||
				.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
 | 
			
		||||
                .ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
 | 
			
		||||
                .ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
 | 
			
		||||
                 .ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t=>t.FailedFileCount>0)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -387,7 +387,10 @@ namespace IRaCIS.Core.Application.Contracts.DTO
 | 
			
		|||
        public string ModalityForEdit { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
        public bool IsHaveUploadFailed { get; set; }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
        public bool IsCompleteClinicalData { get; set; }
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    public class QASeriesInfoDto
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,8 +123,11 @@ namespace IRaCIS.Core.Application.Contracts
 | 
			
		|||
        public bool IsEnrollementQualificationConfirm { get; set; }
 | 
			
		||||
        public bool IsPDProgressView { get; set; }
 | 
			
		||||
 | 
			
		||||
        public bool IsHaveStudyClinicalData { get; set; }
 | 
			
		||||
 | 
			
		||||
        public string OutEnrollmentVisitName { get; set; } = String.Empty;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		public string OutEnrollmentVisitName { get; set; } = String.Empty;
 | 
			
		||||
 | 
			
		||||
        public string BodyPartTypes { get; set; } = String.Empty;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,7 +16,8 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
    {
 | 
			
		||||
        private readonly IRepository<SubjectVisit> _subjectVisitRepository;
 | 
			
		||||
        private readonly IRepository<Trial> _trialRepository;
 | 
			
		||||
        private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSet;
 | 
			
		||||
		private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
 | 
			
		||||
		private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSet;
 | 
			
		||||
        private readonly IRepository<TrialQCQuestionAnswer> _trialQCQuestionAnswerRepository;
 | 
			
		||||
        private readonly IRepository<TrialQCQuestion> _trialQCQuestionRepository;
 | 
			
		||||
        private readonly IRepository<InspectionFile> _consistencyCheckFileRepository;
 | 
			
		||||
| 
						 | 
				
			
			@ -26,7 +27,8 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
        public QCListService(
 | 
			
		||||
              IRepository<SubjectVisit> subjectVisitRepository,
 | 
			
		||||
              IRepository<Trial> trialRepository,
 | 
			
		||||
              IRepository<ClinicalDataTrialSet> clinicalDataTrialSet,
 | 
			
		||||
				IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
 | 
			
		||||
			  IRepository<ClinicalDataTrialSet> clinicalDataTrialSet,
 | 
			
		||||
              IRepository<TrialQCQuestionAnswer> trialQCQuestionAnswerRepository,
 | 
			
		||||
              IRepository<TrialQCQuestion> trialQCQuestionRepository,
 | 
			
		||||
              IReadingImageTaskService IReadingImageTaskService,
 | 
			
		||||
| 
						 | 
				
			
			@ -39,7 +41,8 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
            this._trialQCQuestionRepository = trialQCQuestionRepository;
 | 
			
		||||
            this._consistencyCheckFileRepository = consistencyCheckFileRepository;
 | 
			
		||||
            _trialRepository = trialRepository;
 | 
			
		||||
            this._clinicalDataTrialSet = clinicalDataTrialSet;
 | 
			
		||||
			this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
 | 
			
		||||
			this._clinicalDataTrialSet = clinicalDataTrialSet;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -760,12 +763,17 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
        [HttpGet("{subjectVisitId:guid}")]
 | 
			
		||||
        public async Task<(List<QAStudyInfoDTO>,object)> GetSubjectVisitUploadedStudyList(Guid subjectVisitId)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            var visit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).FirstNotNullAsync();
 | 
			
		||||
            var list= await _repository.Where<DicomStudy>(s => s.SubjectVisitId == subjectVisitId).IgnoreQueryFilters().ProjectTo<QAStudyInfoDTO>(_mapper.ConfigurationProvider).OrderBy(t=>t.StudyCode).ToListAsync();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            var config = await _repository.Where<SubjectVisit>(t => t.Id == subjectVisitId).Select(t=>t.Trial).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
 | 
			
		||||
 | 
			
		||||
            return (list, config);
 | 
			
		||||
            config.IsHaveStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.IsConfirm && x.TrialId == visit.TrialId && x.ClinicalDataLevel == ClinicalLevel.Study);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			return (list, config);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,8 +71,8 @@ namespace IRaCIS.Core.Application.Triggers
 | 
			
		|||
 | 
			
		||||
                // 检查类型  ModalityForEdit
 | 
			
		||||
                // 检查模态  Modalities
 | 
			
		||||
                var modalityForEdit = context.Entity.ModalityForEdit;
 | 
			
		||||
                if (modalityForEdit.Contains("PT") && modalityForEdit.Contains("CT"))
 | 
			
		||||
                var modalities = context.Entity.Modalities;
 | 
			
		||||
                if (modalities.Contains("PT") && modalities.Contains("CT"))
 | 
			
		||||
                {
 | 
			
		||||
					await _iClinicalAnswerService.AddStudyClinical(new Service.Reading.Dto.AddStudyClinicalInDto()
 | 
			
		||||
					{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -88,10 +88,14 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
        [ForeignKey("CreateUserId")]
 | 
			
		||||
        public User Uploader { get; set; }
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
 | 
			
		||||
		public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        //软删除
 | 
			
		||||
        public bool IsDeleted { get; set; }
 | 
			
		||||
 | 
			
		||||
		//软删除
 | 
			
		||||
		public bool IsDeleted { get; set; }
 | 
			
		||||
 | 
			
		||||
        public DateTime? DeletedTime { get; set; }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -77,9 +77,11 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
		public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
 | 
			
		||||
		public DicomStudy? DicomStudy { get; set; }
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
        [ForeignKey("TrialId")]
 | 
			
		||||
 | 
			
		||||
        public Trial Trial { get; set; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,6 +24,13 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
 | 
			
		|||
        .HasForeignKey(s => new { s.TrialId, s.SiteId })
 | 
			
		||||
        .HasPrincipalKey(c => new { c.TrialId, c.SiteId });
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
			builder
 | 
			
		||||
            .HasMany(s => s.ReadingClinicalDataList)
 | 
			
		||||
            .WithOne(c => c.DicomStudy)
 | 
			
		||||
            .HasForeignKey(s => new { s.StudyId })
 | 
			
		||||
            .HasPrincipalKey(c => new { c.Id });
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue