diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 481fe4e45..17ca78f84 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -3369,6 +3369,16 @@ 序号标记 + + + Name + + + + + Path + + 第一层的Question @@ -11078,6 +11088,13 @@ + + + 获取手册 + + + + 获取任务附加问题 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 157f5e8c6..b71ac47a1 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -330,7 +330,28 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List AnswerList { get; set; } = new List(); } - public class GetTaskAdditionalQuestionInDto + public class GetManualListInDto + { + public Guid TrialId { get; set; } + } + + + public class GetManualListOutDto + { + + /// + /// Name + /// + public string Name { get; set; } = string.Empty; + + /// + /// Path + /// + public string Path { get; set; } = string.Empty; + } + + + public class GetTaskAdditionalQuestionInDto { //public Guid TrialReadingCriterionId { get; set; } public Guid VisitTaskId { get; set; } @@ -1364,6 +1385,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string SubjectCode { get; set; }=String.Empty; + public bool ExistsManual { get; set; } public ReadingCategory ReadingCategory { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index b794811e9..18d526daf 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -42,6 +42,7 @@ namespace IRaCIS.Application.Services private readonly IRepository _readModuleRepository; private readonly IRepository _dicomInstanceRepository; private readonly IRepository _organInfoRepository; + private readonly IRepository _trialDocumentRepository; private readonly IRepository _userRepository; private readonly IRepository _readingCriterionDictionaryRepository; private readonly IRepository _readingTrialCriterionDictionaryRepository; @@ -80,6 +81,7 @@ namespace IRaCIS.Application.Services IRepository readModuleRepository, IRepository dicomInstanceRepository, IRepository organInfoRepository, + IRepository trialDocumentRepository, IRepository userRepository, IMemoryCache cache, IRepository readingCriterionDictionaryRepository, @@ -116,6 +118,7 @@ namespace IRaCIS.Application.Services this._readModuleRepository = readModuleRepository; this._dicomInstanceRepository = dicomInstanceRepository; this._organInfoRepository = organInfoRepository; + this._trialDocumentRepository = trialDocumentRepository; this._userRepository = userRepository; this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository; this._tumorAssessmentRepository = tumorAssessmentRepository; @@ -135,11 +138,30 @@ namespace IRaCIS.Application.Services } /// - /// 获取任务附加问题 + /// 获取手册 /// /// /// [HttpPost] + public async Task> GetManualList(GetManualListInDto inDto) + { + UserTypeEnum userType = (UserTypeEnum)_userInfo.UserTypeEnumInt; + //_userInfo.UserTypeId + + return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId && x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId)) + .Select(x => new GetManualListOutDto() + { + Name = x.Name, + Path = x.Path + }).ToListAsync(); + } + + /// + /// 获取任务附加问题 + /// + /// + /// + [HttpPost] public async Task<(List, bool)> GetTaskAdditionalQuestion(GetTaskAdditionalQuestionInDto inDto) { @@ -2338,6 +2360,7 @@ namespace IRaCIS.Application.Services task.IsConvertedTask = visitTaskInfo.IsConvertedTask; var blindSubjectCode = await _visitTaskRepository.Where(x => x.Id == task.VisitTaskId).Select(x => x.BlindSubjectCode).FirstNotNullAsync(); task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode; + task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count() > 0; return task; } diff --git a/IRaCIS.Core.Domain/Document/TrialDocument.cs b/IRaCIS.Core.Domain/Document/TrialDocument.cs index 48b3cca46..b25c5f3a8 100644 --- a/IRaCIS.Core.Domain/Document/TrialDocument.cs +++ b/IRaCIS.Core.Domain/Document/TrialDocument.cs @@ -30,7 +30,6 @@ namespace IRaCIS.Core.Domain.Models public Dictionary FileType { get; set; } - public Guid FileTypeId { get; set; }