AIR 重置
							parent
							
								
									6e6974bfdd
								
							
						
					
					
						commit
						8bc4b0d244
					
				| 
						 | 
				
			
			@ -63,11 +63,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public async Task<List<TrialReadingCriterionDto>> GetTrialCriterionList(Guid trialId,bool isHaveSigned=true)
 | 
			
		||||
        public async Task<List<TrialReadingCriterionDto>> GetTrialCriterionList(Guid trialId, bool isHaveSigned = true)
 | 
			
		||||
        {
 | 
			
		||||
            var list = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.IsConfirm)
 | 
			
		||||
                .OrderBy(t => t.ShowOrder)
 | 
			
		||||
                .Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType , ReadingInfoSignTime=t.ReadingInfoSignTime})
 | 
			
		||||
                .Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType, ReadingInfoSignTime = t.ReadingInfoSignTime })
 | 
			
		||||
                .ToListAsync();
 | 
			
		||||
 | 
			
		||||
            if (list.Count == 0)
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            return list.AsQueryable().WhereIf(isHaveSigned==true,t=>t.ReadingInfoSignTime!=null).ToList();
 | 
			
		||||
            return list.AsQueryable().WhereIf(isHaveSigned == true, t => t.ReadingInfoSignTime != null).ToList();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -103,7 +103,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == querySubjectAssign.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType,x.IsArbitrationReading,x.IsOncologyReading ,x.IsGlobalReading}).FirstOrDefaultAsync()).IfNullThrowException();
 | 
			
		||||
            var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == querySubjectAssign.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType, x.IsArbitrationReading, x.IsOncologyReading, x.IsGlobalReading }).FirstOrDefaultAsync()).IfNullThrowException();
 | 
			
		||||
 | 
			
		||||
            return (pageList, criterionConfig);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
                    if (inOrder)
 | 
			
		||||
                    {
 | 
			
		||||
 | 
			
		||||
                        if (await _subjectVisitRepository.AnyAsync(t => t.SubjectId == subjectId && t.CheckState != CheckStateEnum.CVPassed && t.IsLostVisit==false))
 | 
			
		||||
                        if (await _subjectVisitRepository.AnyAsync(t => t.SubjectId == subjectId && t.CheckState != CheckStateEnum.CVPassed && t.IsLostVisit == false))
 | 
			
		||||
                        {
 | 
			
		||||
                            var notCheckPassedMinVisitNum = await _subjectVisitRepository.Where(t => t.SubjectId == subjectId && t.CheckState != CheckStateEnum.CVPassed).OrderBy(t => t.VisitNum).Select(t => t.VisitNum).FirstOrDefaultAsync();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -186,7 +186,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
                .Where(t => t.Enroll.EnrollReadingCategoryList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId))
 | 
			
		||||
                .ProjectTo<AssignDoctorStatView>(_mapper.ConfigurationProvider, new { trialReadingCriterionId = trialReadingCriterionId }).ToListAsync();
 | 
			
		||||
 | 
			
		||||
            var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == trialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType ,x.IsArbitrationReading,x.IsOncologyReading}).FirstOrDefaultAsync()).IfNullThrowException();
 | 
			
		||||
            var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == trialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType, x.IsArbitrationReading, x.IsOncologyReading }).FirstOrDefaultAsync()).IfNullThrowException();
 | 
			
		||||
 | 
			
		||||
            return (list, criterionConfig);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -202,7 +202,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
        {
 | 
			
		||||
            var list = await _subjectUserRepository.Where(t => t.SubjectId == subjectId && t.OrignalSubjectUserId == null && t.IsConfirmed && t.TrialReadingCriterionId == trialReadingCriterionId).ProjectTo<SubjectUserDTO>(_mapper.ConfigurationProvider).ToListAsync();
 | 
			
		||||
 | 
			
		||||
            var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == trialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType,x.IsGlobalReading,x.IsOncologyReading,x.IsArbitrationReading }).FirstOrDefaultAsync()).IfNullThrowException();
 | 
			
		||||
            var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == trialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType, x.IsGlobalReading, x.IsOncologyReading, x.IsArbitrationReading }).FirstOrDefaultAsync()).IfNullThrowException();
 | 
			
		||||
 | 
			
		||||
            return (list, criterionConfig);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -897,18 +897,18 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
                    RandomReadInfo = new IRUnReadOutDto(),
 | 
			
		||||
                    IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
 | 
			
		||||
                    ReadingTool = readingTool,
 | 
			
		||||
                    IseCRFShowInDicomReading= criterionConfig.IseCRFShowInDicomReading,
 | 
			
		||||
                    IsReadingShowSubjectInfo= criterionConfig.IsReadingShowSubjectInfo,
 | 
			
		||||
                    IsReadingShowPreviousResults= criterionConfig.IsReadingShowPreviousResults,
 | 
			
		||||
                    DigitPlaces= criterionConfig.DigitPlaces,
 | 
			
		||||
                    CriterionType=criterionConfig.CriterionType,
 | 
			
		||||
                    IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
 | 
			
		||||
                    IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
 | 
			
		||||
                    IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
 | 
			
		||||
                    DigitPlaces = criterionConfig.DigitPlaces,
 | 
			
		||||
                    CriterionType = criterionConfig.CriterionType,
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
                var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
 | 
			
		||||
                   // .Where(x=>x.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == x.SouceReadModuleId || c.ReadingId == x.SourceSubjectVisitId)))
 | 
			
		||||
                       // .Where(x=>x.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == x.SouceReadModuleId || c.ReadingId == x.SourceSubjectVisitId)))
 | 
			
		||||
                       .Where(x => !x.Subject.IsDeleted);
 | 
			
		||||
 | 
			
		||||
                IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto()
 | 
			
		||||
| 
						 | 
				
			
			@ -964,7 +964,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
                SubjectId = x.Key.SubjectId,
 | 
			
		||||
                SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
 | 
			
		||||
                UnReadTaskCount = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned).Count(),
 | 
			
		||||
                ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed ||y.ReReadingApplyState==ReReadingApplyState.TrialGroupHaveApplyed),
 | 
			
		||||
                ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || y.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed),
 | 
			
		||||
                UnReadTaskList = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned).OrderBy(x => x.VisitTaskNum)
 | 
			
		||||
                .Select(u => new IRUnreadTaskView()
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			@ -977,7 +977,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
                    ReadingCategory = u.ReadingCategory,
 | 
			
		||||
                    IsAnalysisCreate = u.IsAnalysisCreate,
 | 
			
		||||
                    TrialReadingCriterionId = u.TrialReadingCriterionId,
 | 
			
		||||
                    IsClinicalDataSigned= u.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == u.SouceReadModuleId || c.ReadingId == u.SourceSubjectVisitId))
 | 
			
		||||
                    IsClinicalDataSigned = u.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == u.SouceReadModuleId || c.ReadingId == u.SourceSubjectVisitId))
 | 
			
		||||
                })
 | 
			
		||||
                //.Where(z=>z.IsClinicalDataSigned)
 | 
			
		||||
                .ToList(),
 | 
			
		||||
| 
						 | 
				
			
			@ -997,7 +997,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                result= await visitTaskQuery.ToListAsync();
 | 
			
		||||
                result = await visitTaskQuery.ToListAsync();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1048,8 +1048,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
        [UnitOfWork]
 | 
			
		||||
        public async Task<IResponseOutput> AIRReReading(AIRReReadingCommand command, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
 | 
			
		||||
        {
 | 
			
		||||
          var baseLineTaskList=  await _visitTaskRepository.Where(t => t.TrialId == command.TrialId  && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId==_userInfo.Id
 | 
			
		||||
               && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.IsBaseLine == true && t.DoctorUserId == _userInfo.Id).ToListAsync();
 | 
			
		||||
            var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
 | 
			
		||||
                 && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true && t.DoctorUserId == _userInfo.Id).ToListAsync();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            var baseLineTaskIdList = baseLineTaskList.Select(t => t.Id).ToList();
 | 
			
		||||
| 
						 | 
				
			
			@ -1074,7 +1074,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
                TrialId = command.TrialId,
 | 
			
		||||
                RequestReReadingResultEnum = RequestReReadingResult.Agree,
 | 
			
		||||
                //ConfirmReReadingList = new List<ConfirmReReadingDTO>() { new ConfirmReReadingDTO() { Id = requestRecord.Id, OriginalReReadingTaskId = task.Id } }
 | 
			
		||||
                ConfirmReReadingList = requestRecordList.Select(t=>new ConfirmReReadingDTO() { Id=t.Id,OriginalReReadingTaskId=t.OriginalReReadingTaskId}).ToList()
 | 
			
		||||
                ConfirmReReadingList = requestRecordList.Select(t => new ConfirmReReadingDTO() { Id = t.Id, OriginalReReadingTaskId = t.OriginalReReadingTaskId }).ToList()
 | 
			
		||||
            }, _visitTaskCommonService);
 | 
			
		||||
 | 
			
		||||
            return ResponseOutput.Ok();
 | 
			
		||||
| 
						 | 
				
			
			@ -1214,7 +1214,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                //AIR  不加验证
 | 
			
		||||
                if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR)
 | 
			
		||||
                {
 | 
			
		||||
                    task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1525,7 +1529,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
 | 
			
		||||
                    }
 | 
			
		||||
                    //IR申请  PM 审批  注意这里有一致性分析的申请同意  不会回退访视,在此要生成影响的访视任务
 | 
			
		||||
                    else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager ||_userInfo.UserTypeEnumInt==(int)UserTypeEnum.AIR))
 | 
			
		||||
                    else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR))
 | 
			
		||||
                    {
 | 
			
		||||
                        #region 两个IR 申请同一访视,其他人的申请记录也设置为同意   
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2349,8 +2353,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
 | 
			
		|||
                                throw new BusinessValidationFailedException("不支持重阅的任务类型");
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        if( await _visitTaskReReadingRepository.AnyAsync(t=>t.RequestReReadingType==RequestReReadingType.DocotorApply && t.RequestReReadingResultEnum==RequestReReadingResult.Default && 
 | 
			
		||||
                        t.OriginalReReadingTask.VisitTaskNum >=filterObj.VisitTaskNum &&t.OriginalReReadingTask.SubjectId==filterObj.SubjectId && t.OriginalReReadingTask.TrialReadingCriterionId ==filterObj.TrialReadingCriterionId && t.OriginalReReadingTask.IsAnalysisCreate == filterObj.IsAnalysisCreate))
 | 
			
		||||
                        if (await _visitTaskReReadingRepository.AnyAsync(t => t.RequestReReadingType == RequestReReadingType.DocotorApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default &&
 | 
			
		||||
                        t.OriginalReReadingTask.VisitTaskNum >= filterObj.VisitTaskNum && t.OriginalReReadingTask.SubjectId == filterObj.SubjectId && t.OriginalReReadingTask.TrialReadingCriterionId == filterObj.TrialReadingCriterionId && t.OriginalReReadingTask.IsAnalysisCreate == filterObj.IsAnalysisCreate))
 | 
			
		||||
                        {
 | 
			
		||||
                            isIRAppyTaskInfluenced = true;
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -193,9 +193,14 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
        public bool IsPicture { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public bool IsNeedTransalate { get; set; }
 | 
			
		||||
        public string  TranslateDictionaryName { get; set; } = String.Empty;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public bool IsDynamicTranslate { get; set; }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue