修改一版

This commit is contained in:
he
2022-07-13 10:40:03 +08:00
parent a273238d59
commit e0753389f0
10 changed files with 249 additions and 84 deletions
@@ -292,27 +292,21 @@ namespace IRaCIS.Core.Application.Contracts
/// </summary>
public Guid TrialId { get; set; }
/// <summary>
/// 阅片平台
/// </summary>
public int ImagePlatform { get; set; } = 1;
/// <summary>
/// 任务组织级别
/// </summary>
public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
/// <summary>
/// 影像是否有标注
/// </summary>
public bool IsImageStandard { get; set; }
/// <summary>
/// IR阅片是否显示受试者信息
/// </summary>
@@ -333,8 +327,10 @@ namespace IRaCIS.Core.Application.Contracts
/// </summary>
public int ArbitrationRule { get; set; } = 2;
/// <summary>
/// 项目标准Id
/// </summary>
public List<Guid> TrialCriterionId { get; set; }
///// <summary>
///// 全局阅片
@@ -366,23 +362,109 @@ namespace IRaCIS.Core.Application.Contracts
///// </summary>
//public bool IsReadingTaskViewInOrder { get; set; } = true;
/// <summary>
/// 项目标准集合
/// 项目分页
/// </summary>
public List<TrialReadingCriterion> TrialReadingCriterionList { get; set; }
public List<ReadingCriterionPage> ReadingCriterionPageList { get; set; }
/// <summary>
/// 项目裁判问题集合
/// </summary>
public List<TrialJudgeQuestion> TrialJudgeQuestionList { get; set; }
/// <summary>
/// 项目问题集合
/// </summary>
public List<TrialReadQuestion> TrialQuestionList { get; set; }
}
public class TrialReadQuestion
{
/// <summary>
/// 排序
/// </summary>
public int ShowOrder { get; set; }
/// <summary>
/// 分页名称
/// </summary>
public string PageName { get; set; }
/// <summary>
/// 问题名称
/// </summary>
public string QuestionName { get; set; }
/// <summary>
/// 类型
/// </summary>
public string Type { get; set; }
/// <summary>
/// 父问题触发
/// </summary>
public string ParentTriggerValue { get; set; }
/// <summary>
/// 父问题名称
/// </summary>
public string ParentQuestionName { get; set; }
/// <summary>
/// 是否是必须
/// </summary>
public bool IsRequired { get; set; }
/// <summary>
/// 类型值
/// </summary>
public string TypeValue { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnable { get; set; }
/// <summary>
/// 是否是裁判问题
/// </summary>
public bool IsJudgeQuestion { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 分组
/// </summary>
public string GroupName { get; set; }
/// <summary>
/// 答案分组
/// </summary>
public string AnswerGroup { get; set; } = string.Empty;
/// <summary>
/// 答案组合
/// </summary>
public string AnswerCombination { get; set; } = string.Empty;
/// <summary>
/// 裁判类型
/// </summary>
public JudgeTypeEnum JudgeType { get; set; }
}
public class TrialJudgeQuestion
{
public Guid ReadingQuestionCriterionTrialId { get; set; }
public Guid QuestionId { get; set; }
@@ -19,6 +19,7 @@ namespace IRaCIS.Core.Application
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
private readonly IEasyCachingProvider _provider;
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
@@ -28,6 +29,7 @@ namespace IRaCIS.Core.Application
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
IEasyCachingProvider provider
)
@@ -38,6 +40,7 @@ namespace IRaCIS.Core.Application
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
this._readingCriterionPageRepository = readingCriterionPageRepository;
this._provider = provider;
}
@@ -51,13 +54,9 @@ namespace IRaCIS.Core.Application
{
GetTrialReadingInfoOutDto trialInfo= await _trialRepository.Where(x=>x.Id==inDto.TrialId).ProjectTo<GetTrialReadingInfoOutDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
trialInfo.TrialReadingCriterionList = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).Select(x => new TrialReadingCriterion()
{
CriterionName = x.CriterionName,
Id = x.Id
}).ToListAsync();
trialInfo.TrialJudgeQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.IsJudgeQuestion)
trialInfo.ReadingCriterionPageList = await _readingCriterionPageRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
trialInfo.TrialCriterionId = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).Select(x => x.Id).ToListAsync();
trialInfo.TrialJudgeQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.IsJudgeQuestion && x.TrialId == inDto.TrialId)
.Select(x => new TrialJudgeQuestion()
{
AnswerCombination = x.AnswerCombination,
@@ -68,6 +67,11 @@ namespace IRaCIS.Core.Application
ReadingQuestionCriterionTrialId = x.ReadingQuestionCriterionTrialId
}).ToListAsync();
trialInfo.TrialQuestionList= await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm&&x.TrialId==inDto.TrialId)
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).ToListAsync();
return trialInfo;
}
@@ -228,6 +228,12 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingQuestionTrial, TrialReadQuestion>()
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
.ForMember(t => t.ParentQuestionName, u => u.MapFrom(c => c.ParentReadingQuestionTrial.QuestionName));
CreateMap<Trial, TrialSiteUserExportDto>()
.ForMember(t => t.TrialSiteUserList, u => u.Ignore());