From d9a44f1953ee8b87a856df07e5a2d243a2c55340 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 16 Jun 2022 14:29:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 59 +++++++++++++++++++ .../Reading/Dto/ReadingQuestionViewModel.cs | 34 ++++++++++- .../Reading/ReadingClinicalDataService.cs | 9 ++- .../Service/Reading/ReadingQuestionService.cs | 30 ++++++++++ .../Reading/ReadingQuestionSystem.cs | 5 ++ .../Reading/ReadingQuestionTrial.cs | 5 ++ 6 files changed, 138 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index cfe55a58..b2ae9cd4 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1629,6 +1629,11 @@ + + + 分组 + + 系统标准Id @@ -1664,6 +1669,11 @@ 父问题ID + + + 备注 + + 类型值 @@ -1679,6 +1689,16 @@ Id + + + 分组 + + + + + 备注 + + 系统标准Id @@ -1759,6 +1779,11 @@ 是否是裁判问题 + + + 标准ID + + 当前ID @@ -1784,6 +1809,11 @@ 问题名称 + + + 分组 + + Id @@ -1829,6 +1859,11 @@ 是否是裁判问题 + + + 备注 + + 类型值 @@ -1849,6 +1884,16 @@ 是否是裁判问题 + + + 备注 + + + + + 分组 + + 类型 @@ -4404,6 +4449,20 @@ + + + 获取项目问题分组 + + + + + + + 获取系统问题分组 + + + + 生成的阅片模块(在大列表上展示的) 阅片期 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 15b46b7e..293f90ba 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -107,6 +107,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid Id { get; set; } + /// + /// 分组 + /// + public string GroupName { get; set; } + /// /// 系统标准Id /// @@ -172,6 +177,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public Guid Id { get; set; } + /// + /// 分组 + /// + public string GroupName { get; set; } + /// /// 备注 /// @@ -278,6 +288,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public bool IsJudgeQuestion { get; set; } } + + + + public class GetTrialGroupNameListInDto + { + /// + /// 标准ID + /// + public Guid CriterionId { get; set; } + } + public class GetTrialCriterionOtherQuestionInDto { [NotDefault] @@ -313,7 +334,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public string Type { get; set; } = string.Empty; - /// /// 问题名称 /// @@ -322,6 +342,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class AddOrUpdateReadingQuestionSystemInDto { + + /// + /// 分组 + /// + public string GroupName { get; set; } + /// /// Id /// @@ -408,6 +434,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public string Remark { get; set; } = string.Empty; + + /// + /// 分组 + /// + public string GroupName { get; set; } + /// /// 类型 /// diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs index 66e8235f..6e7e617f 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs @@ -28,12 +28,14 @@ namespace IRaCIS.Application.Services private readonly IRepository _clinicalDataTrialSetRepository; private readonly IRepository _readingClinicalDataViewRepository; private readonly IRepository _previousPDFRepository; + private readonly IRepository _subjectVisitRepository; private readonly IRepository _readingClinicalDataPDFRepository; public ReadingClinicalDataService(IRepository readingClinicalDataRepository, IRepository clinicalDataTrialSetRepository, IRepository readingClinicalDataViewRepository, IRepository previousPDFRepository, + IRepository subjectVisitRepository, IRepository readingClinicalDataPDFRepository ) { @@ -41,6 +43,7 @@ namespace IRaCIS.Application.Services this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository; this._readingClinicalDataViewRepository = readingClinicalDataViewRepository; this._previousPDFRepository = previousPDFRepository; + this._subjectVisitRepository = subjectVisitRepository; this._readingClinicalDataPDFRepository = readingClinicalDataPDFRepository; } @@ -191,11 +194,11 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto) { + var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.VisitNum == 0); var result = await _readingClinicalDataViewRepository.Where(x=>x.SubjectId==inDto.SubjectId) - .Where(x=>x.ReadingId==inDto.ReadingId||x.ReadingId==null).ProjectTo(_mapper.ConfigurationProvider).ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataListOutDto.ClinicalDataSetName) : inDto.SortField, + .Where(x=>x.ReadingId==inDto.ReadingId||x.ReadingId==null) + .WhereIf(!isBaseLine,x=>x.IsCRCUpload==false).ProjectTo(_mapper.ConfigurationProvider).ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataListOutDto.ClinicalDataSetName) : inDto.SortField, inDto.Asc); - - foreach (var item in result.CurrentPageData) { item.ClinicalDataLevelName = item.ClinicalDataLevel.GetDisplayName(); diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index a0b33021..fec3fd4d 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -510,5 +510,35 @@ namespace IRaCIS.Application.Services return ResponseOutput.Result(success); } + /// + /// 获取项目问题分组 + /// + /// + /// + [HttpPost] + public async Task> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto) + { + var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId && x.Type == "group") + .Select(x => x.GroupName).ToListAsync(); + + return result; + + } + + + /// + /// 获取系统问题分组 + /// + /// + /// + [HttpPost] + public async Task> GetSystemGroupNameList(GetTrialGroupNameListInDto inDto) + { + var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == "group") + .Select(x => x.GroupName).ToListAsync(); + + return result; + + } } } diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs index 6b728237..bc32d764 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs @@ -75,6 +75,11 @@ namespace IRaCIS.Core.Domain.Models /// public string Remark { get; set; } + /// + /// 分组 + /// + public string GroupName { get; set; } + /// /// 创建人 /// diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs index 8abf83f8..48932be3 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs @@ -73,6 +73,11 @@ namespace IRaCIS.Core.Domain.Models /// public string Remark { get; set; } + /// + /// 分组 + /// + public string GroupName { get; set; } + /// /// 创建时间 ///