diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index de31a1e08..7539253c8 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -3772,6 +3772,161 @@ 流程配置是否确认 + + + 项目ID + + + + + 阅片方式 + + + + + 阅片平台 + + + + + 全局阅片 + + + + + 阅片模式 + + + + + 仲裁阅片 + + + + + 肿瘤学阅片 + + + + + 读片任务显示是否顺序 + + + + + 任务组织级别 + + + + + 图像是否有标注 + + + + + 阅片是否显示受试者信息 + + + + + 阅片是否显示既往结果 + + + + + 项目标准集合 + + + + + 项目裁判问题集合 + + + + + 问题名称 + + + + + 答案分组 + + + + + 答案组合 + + + + + 裁判类型 + + + + + 标准 + + + + + 项目ID + + + + + 阅片方式 + + + + + 阅片平台 + + + + + 全局阅片 + + + + + 阅片模式 + + + + + 仲裁阅片 + + + + + 肿瘤学阅片 + + + + + 读片任务显示是否顺序 + + + + + 任务组织级别 + + + + + 图像是否有标注 + + + + + 阅片是否显示受试者信息 + + + + + 阅片是否显示既往结果 + + QC流程 0 不审,1 单审,2双审 @@ -4346,6 +4501,20 @@ + + + 获取项目阅片信息 + + + + + + + 设置项目阅片信息 + + + + 获取签名文本 diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs index e84c71e64..e4f4d421c 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs @@ -285,17 +285,197 @@ namespace IRaCIS.Core.Application.Contracts public string SignCode { get; set; } = string.Empty; } - public class GetReadingInfoOutDto + public class GetTrialReadingInfoOutDto { - + /// + /// 项目ID + /// + public Guid TrialId { get; set; } + + /// + /// 阅片方式 + /// + public int ReadingMode { get; set; } = 1; + + /// + /// 阅片平台 + /// + public int ImagePlatform { get; set; } = 1; + + /// + /// 全局阅片 + /// + public bool IsGlobalReading { get; set; } = true; + + /// + /// 仲裁规则 + /// + public int ArbitrationRule { get; set; } = 2; + + /// + /// 阅片模式 + /// + public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double; + + /// + /// 仲裁阅片 + /// + public bool? IsArbitrationReading { get; set; } = true; + + /// + /// 肿瘤学阅片 + /// + public bool IsClinicalReading { get; set; } + + /// + /// 读片任务显示是否顺序 + /// + public bool IsReadingTaskViewInOrder { get; set; } = true; + + /// + /// 任务组织级别 + /// + public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; } + + /// + /// 图像是否有标注 + /// + public bool IsImageStandard { get; set; } + + /// + /// 阅片是否显示受试者信息 + /// + public bool IsReadingShowSubjectInfo { get; set; } = false; + + /// + /// 阅片是否显示既往结果 + /// + public bool IsReadingShowPreviousResults { get; set; } = false; + + /// + /// 项目标准集合 + /// + public List TrialReadingCriterionList { get; set; } + + /// + /// 项目裁判问题集合 + /// + public List TrialJudgeQuestionList { get; set; } } - public class GetReadingInfoInDto + public class TrialJudgeQuestion + { + public Guid ReadingQuestionCriterionTrialId { get; set; } + + public Guid QuestionId { get; set; } + + /// + /// 问题名称 + /// + public string QuestionName { get; set; } + + + /// + /// 答案分组 + /// + public string AnswerGroup { get; set; } = string.Empty; + + /// + /// 答案组合 + /// + public string AnswerCombination { get; set; } = string.Empty; + + /// + /// 裁判类型 + /// + public JudgeTypeEnum JudgeType { get; set; } + } + + public class TrialReadingCriterion + { + public Guid Id { get; set; } + + /// + /// 标准 + /// + public string CriterionName { get; set; } + } + + public class GetTrialReadingInfoInDto { [NotDefault] public Guid TrialId { get; set; } } + + public class SetTrialReadingInfoInDto + { + /// + /// 项目ID + /// + public Guid TrialId { get; set; } + + /// + /// 阅片方式 + /// + public int ReadingMode { get; set; } = 1; + + /// + /// 阅片平台 + /// + public int ImagePlatform { get; set; } = 1; + + /// + /// 全局阅片 + /// + public bool IsGlobalReading { get; set; } = true; + + /// + /// 阅片模式 + /// + public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double; + + /// + /// 仲裁阅片 + /// + public bool? IsArbitrationReading { get; set; } = true; + + /// + /// 肿瘤学阅片 + /// + public bool IsClinicalReading { get; set; } + + /// + /// 读片任务显示是否顺序 + /// + public bool IsReadingTaskViewInOrder { get; set; } = true; + + /// + /// 任务组织级别 + /// + public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; } + + /// + /// 图像是否有标注 + /// + public bool IsImageStandard { get; set; } + + /// + /// 阅片是否显示受试者信息 + /// + public bool IsReadingShowSubjectInfo { get; set; } = false; + + /// + /// 阅片是否显示既往结果 + /// + public bool IsReadingShowPreviousResults { get; set; } = false; + + /// + /// 仲裁规则 + /// + public int ArbitrationRule { get; set; } = 2; + } + public class SignConfirmDTO { [NotDefault] diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index db8a8b370..bf948c6cf 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -17,6 +17,7 @@ namespace IRaCIS.Core.Application private readonly IRepository _trialRepository; private readonly IRepository _trialQCQuestionRepository; private readonly IRepository _readingQuestionCriterionTrialRepository; + private readonly IRepository _readingQuestionTrialRepository; private readonly IRepository _clinicalDataTrialSetRepository; private readonly IEasyCachingProvider _provider; @@ -24,9 +25,10 @@ namespace IRaCIS.Core.Application public TrialConfigService(IRepository trialRepository, IRepository trialQCQuestionRepository, - IRepository readingQuestionCriterionTrialRepository, - IRepository clinicalDataTrialSetRepository, - IRepository taskAllocationRuleRepository, + IRepository readingQuestionCriterionTrialRepository, + IRepository readingQuestionTrialRepository, + IRepository clinicalDataTrialSetRepository, + IRepository taskAllocationRuleRepository, IEasyCachingProvider provider ) { @@ -34,10 +36,71 @@ namespace IRaCIS.Core.Application _taskAllocationRuleRepository = taskAllocationRuleRepository; this._trialQCQuestionRepository = trialQCQuestionRepository; this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository; + this._readingQuestionTrialRepository = readingQuestionTrialRepository; this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository; this._provider = provider; } + /// + /// 获取项目阅片信息 + /// + /// + /// + [HttpPost] + public async Task GetTrialReadingInfo(GetTrialReadingInfoInDto inDto) + { + GetTrialReadingInfoOutDto trialInfo= await _trialRepository.Where(x=>x.Id==inDto.TrialId).ProjectTo(_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) + .Select(x => new TrialJudgeQuestion() + { + AnswerCombination = x.AnswerCombination, + AnswerGroup = x.AnswerGroup, + JudgeType = x.JudgeType, + QuestionId = x.Id, + QuestionName = x.QuestionName, + ReadingQuestionCriterionTrialId = x.ReadingQuestionCriterionTrialId + }).ToListAsync(); + + return trialInfo; + } + + /// + /// 设置项目阅片信息 + /// + /// + /// + [HttpPost] + public async Task SetTrialReadingInfo(SetTrialReadingInfoInDto inDto) + { + await _trialRepository.UpdatePartialFromQueryAsync(inDto.TrialId, x => new Trial() + { + ReadingMode = inDto.ReadingMode, + ReadingType = inDto.ReadingType, + IsArbitrationReading = inDto.IsArbitrationReading, + IsReadingTaskViewInOrder = inDto.IsReadingTaskViewInOrder, + ReadingTaskViewEnum = inDto.ReadingTaskViewEnum, + IsImageStandard = inDto.IsImageStandard, + IsReadingShowSubjectInfo = inDto.IsReadingShowSubjectInfo, + IsReadingShowPreviousResults = inDto.IsReadingShowPreviousResults, + IsGlobalReading = inDto.IsGlobalReading, + ImagePlatform=inDto.ImagePlatform, + ArbitrationRule=inDto.ArbitrationRule, + IsClinicalReading =inDto.IsClinicalReading, + }); + + var result = await _trialRepository.SaveChangesAsync(); + + + return ResponseOutput.Ok(result); + } + /// /// 获取签名文本 /// diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs index cb7af7723..94b4f9adf 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs @@ -223,6 +223,10 @@ namespace IRaCIS.Core.Application.Service .ForMember(t => t.TrialUserList, u => u.Ignore()); + CreateMap() + .ForMember(t => t.TrialId, u => u.MapFrom(c => c.Id)); + + CreateMap() .ForMember(t => t.TrialSiteUserList, u => u.Ignore()); diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 4766719f7..b8f5aee07 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -369,6 +369,11 @@ namespace IRaCIS.Core.Domain.Models public bool IsConfirmMedicineQuestion { get; set; } = false; + /// + /// ͼǷбע + /// + public bool IsImageStandard { get; set; } + //public Guid? ReviewTypeId { get; set; } = Guid.Empty;