Uat_Study
			
			
		
		
							parent
							
								
									d34bf1ee7d
								
							
						
					
					
						commit
						eef042b469
					
				| 
						 | 
					@ -96,7 +96,7 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
        [HttpPost]
 | 
					        [HttpPost]
 | 
				
			||||||
        public async Task<List<TrialClinicalQuestionDto>> GetTrialClinicalGroupQuestionList(GetTrialGroupDto inDto)
 | 
					        public async Task<List<TrialClinicalQuestionDto>> GetTrialClinicalGroupQuestionList(GetTrialGroupDto inDto)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return await this._trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId&&x.ClinicalQuestionTypeEnum== ClinicalQuestionType.Group)
 | 
					            return await this._trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId&&x.ClinicalQuestionType== "group")
 | 
				
			||||||
                .ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
					                .ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,11 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
        [HttpPost]
 | 
					        [HttpPost]
 | 
				
			||||||
        public async Task<List<TrialClinicalQuestionDto>> GetTrialClinicalOtherQuestionList(GetTrialGroupDto inDto)
 | 
					        public async Task<List<TrialClinicalQuestionDto>> GetTrialClinicalOtherQuestionList(GetTrialGroupDto inDto)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return await this._trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && x.ClinicalQuestionTypeEnum == ClinicalQuestionType.Select)
 | 
					            var types = new List<string>()
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                "select","radio"
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            return await this._trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && types.Contains( x.ClinicalQuestionType))
 | 
				
			||||||
              .ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
					              .ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -171,7 +175,7 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
        [HttpPost]
 | 
					        [HttpPost]
 | 
				
			||||||
        public async Task<List<SystemClinicalQuestionDto>> GetSystemClinicalGroupQuestionList(GetSystemGroupDto inDto)
 | 
					        public async Task<List<SystemClinicalQuestionDto>> GetSystemClinicalGroupQuestionList(GetSystemGroupDto inDto)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return await this._systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.ClinicalQuestionTypeEnum == ClinicalQuestionType.Group)
 | 
					            return await this._systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.ClinicalQuestionType =="group")
 | 
				
			||||||
                .ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
					                .ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -184,7 +188,11 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
        [HttpPost]
 | 
					        [HttpPost]
 | 
				
			||||||
        public async Task<List<SystemClinicalQuestionDto>> GetSystemClinicalOtherQuestionList(GetSystemGroupDto inDto)
 | 
					        public async Task<List<SystemClinicalQuestionDto>> GetSystemClinicalOtherQuestionList(GetSystemGroupDto inDto)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return await this._systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.ClinicalQuestionTypeEnum == ClinicalQuestionType.Select)
 | 
					            var types = new List<string>()
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                "select","radio"
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            return await this._systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && types.Contains(x.ClinicalQuestionType))
 | 
				
			||||||
                .ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
					                .ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -292,5 +300,31 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region 同步系统问题
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public async Task SynchronizationQuestion(List<SynchronizationQuestionDto> inDto)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var trialClinicalId = inDto.Select(x => x.TrialClinicalId).ToList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            var systemClinicalId = inDto.Select(x => x.SystemClinicalId).ToList();
 | 
				
			||||||
 | 
					            var questionRelation = _trialClinicalQuestionRepository.Where(x => trialClinicalId.Contains(x.TrialClinicalId)).ToDictionary(
 | 
				
			||||||
 | 
					                     x => x.SystemClinicalQuestionId ?? default(Guid),
 | 
				
			||||||
 | 
					                     x => x.Id
 | 
				
			||||||
 | 
					                     );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            var tableQuestionRelation = _trialClinicalTableQuestionRepository.Where(x => trialClinicalId.Contains(x.TrialClinicalId)).ToDictionary(
 | 
				
			||||||
 | 
					                     x => x.SystemTableQuestionId ?? default(Guid),
 | 
				
			||||||
 | 
					                     x => x.Id
 | 
				
			||||||
 | 
					                     );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //var 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,7 +32,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 临床问题类型(分组,单选。)
 | 
					        /// 临床问题类型(分组,单选。)
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public ClinicalQuestionType ClinicalQuestionTypeEnum { get; set; }
 | 
					        public string ClinicalQuestionType { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 问题标识
 | 
					        /// 问题标识
 | 
				
			||||||
| 
						 | 
					@ -192,7 +192,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 临床问题类型(分组,单选。)
 | 
					        /// 临床问题类型(分组,单选。)
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public ClinicalTableQuestionType ClinicalTableQuestionTypeEnum { get; set; }
 | 
					        public string ClinicalTableQuestionType { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 问题标识
 | 
					        /// 问题标识
 | 
				
			||||||
| 
						 | 
					@ -314,8 +314,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #endregion
 | 
					    #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #region 同步临床数据
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public class SynchronizationQuestionDto
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 系统临床数据Id
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public Guid SystemClinicalId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 项目临床数据Id
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public Guid TrialClinicalId { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #endregion
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,6 +29,13 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            CreateMap<TrialClinicalTableQuestion, TrialClinicalTableQuestionDto>();
 | 
					            CreateMap<TrialClinicalTableQuestion, TrialClinicalTableQuestionDto>();
 | 
				
			||||||
            CreateMap<TrialClinicalTableQuestionDto, TrialClinicalTableQuestion>();
 | 
					            CreateMap<TrialClinicalTableQuestionDto, TrialClinicalTableQuestion>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            CreateMap<SystemClinicalQuestion, TrialClinicalQuestion>()
 | 
				
			||||||
 | 
					                .ForMember(d => d.SystemClinicalQuestionId, u => u.MapFrom(s => s.Id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            CreateMap<SystemClinicalTableQuestion, TrialClinicalTableQuestion>()
 | 
				
			||||||
 | 
					             .ForMember(d => d.SystemTableQuestionId, u => u.MapFrom(s => s.Id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #endregion
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            CreateMap<VisitTask, VisitTaskDto>();
 | 
					            CreateMap<VisitTask, VisitTaskDto>();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,7 +35,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 临床问题类型(分组,单选。)
 | 
					        /// 临床问题类型(分组,单选。)
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public ClinicalQuestionType ClinicalQuestionTypeEnum { get; set; }
 | 
					        public string ClinicalQuestionType { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 问题标识
 | 
					        /// 问题标识
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,7 +33,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 临床问题类型(分组,单选。)
 | 
					        /// 临床问题类型(分组,单选。)
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public ClinicalTableQuestionType ClinicalTableQuestionTypeEnum { get; set; }
 | 
					        public string ClinicalTableQuestionType { get; set; }
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
		/// <summary>
 | 
							/// <summary>
 | 
				
			||||||
        /// 问题标识
 | 
					        /// 问题标识
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,7 +35,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 临床问题类型(分组,单选。)
 | 
					        /// 临床问题类型(分组,单选。)
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public ClinicalQuestionType ClinicalQuestionTypeEnum { get; set; }
 | 
					        public string ClinicalQuestionType { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 问题标识
 | 
					        /// 问题标识
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,7 +33,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 临床问题类型(分组,单选。)
 | 
					        /// 临床问题类型(分组,单选。)
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public ClinicalTableQuestionType ClinicalTableQuestionTypeEnum { get; set; }
 | 
					        public string ClinicalTableQuestionType { get; set; }
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
		/// <summary>
 | 
							/// <summary>
 | 
				
			||||||
        /// 问题标识
 | 
					        /// 问题标识
 | 
				
			||||||
| 
						 | 
					@ -85,6 +85,11 @@ namespace IRaCIS.Core.Domain.Models
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
		public Guid QuestionId { get; set; }
 | 
							public Guid QuestionId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/// <summary>
 | 
				
			||||||
 | 
							/// 系统表格问题Id
 | 
				
			||||||
 | 
							/// </summary>
 | 
				
			||||||
 | 
					        public Guid? SystemTableQuestionId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 自定义计算标记
 | 
					        /// 自定义计算标记
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue