From 82e27d70ea1cc7142cdc0c92a546d62f8fd6dd55 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 17 Jun 2022 16:54:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 122 +--------------- .../Service/Reading/Dto/GetReadModuleDto.cs | 134 +----------------- .../Reading/Interface/IReadModuleService.cs | 2 +- .../Service/Reading/ReadModuleService.cs | 12 +- .../Reading/ReadingPeriodSetService.cs | 2 +- .../Triggers/SubjectVisitFinalVisitTrigger.cs | 2 +- IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 60 ++++---- IRaCIS.Core.Domain/Reading/ReadModule.cs | 7 - .../Reading/View/ReadModuleView.cs | 5 +- .../Common/ReadingCommon.cs | 29 +--- 10 files changed, 45 insertions(+), 330 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 9d2ff512..91b518ab 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -765,7 +765,7 @@ 模块类型 - + 状态 @@ -860,126 +860,6 @@ 状态 - - - Id(阅片期Id 或者 访视ID) - - - - - 名称 - - - - - 受试者ID - - - - - 模块类型 - - - - - 是否加急 - - - - - 访视ID - - - - - 访视名称 - - - - - 截止访视 - - - - - 截止访视名称 - - - - - 对应阅片期 - - - - - 对应Name - - - - - 状态 - - - - - 创建时间 - - - - - 受试者Code - - - - - 中心Id - - - - - 项目中心Id - - - - - 是否为末次访视 - - - - - 上一访视 - - - - - 上一访视名称 - - - - - 中心ID - - - - - 是否为访视 - - - - - 访视Num - - - - - 是否为PD进展 - - - - - 入组确认评估 - - 当前页索引 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs index b8450164..07df70a4 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs @@ -31,7 +31,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 状态 /// - public ReadModuleEnum? Status { get; set; } + public ReadingStatusEnum? ReadingStatus { get; set; } /// /// 任务名称 @@ -168,136 +168,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 状态 /// - public ReadModuleEnum? Status { get; set; } + public ReadingStatusEnum Status { get; set; } } - public class GetReadModuleOutDto - { - - /// - /// Id(阅片期Id 或者 访视ID) - /// - public Guid Id { get; set; } - - /// - /// 名称 - /// - public string Name { get; set; } - - /// - /// 受试者ID - /// - public Guid SubjectId { get; set; } - - /// - /// 模块类型 - /// - public ModuleTypeEnum ModuleType { get; set; } - - /// - /// 是否加急 - /// - public bool? IsUrgent { get; set; } - - /// - /// 访视ID - /// - public Guid SubjectVisitId { get; set; } - - - /// - /// 访视名称 - /// - public string SubjectVisitName { get; set; } - - - /// - /// 截止访视 - /// - public Guid? CutOffVisitId { get; set; } - - - /// - /// 截止访视名称 - /// - public string? CutOffVisitName { get; set; } - - /// - /// 对应阅片期 - /// - public Guid? ReadModuleId { get; set; } - - /// - /// 对应Name - /// - public string? ReadModuleName { get; set; } - - /// - /// 状态 - /// - public ReadModuleEnum? Status { get; set; } - - /// - /// 创建时间 - /// - public DateTime CreateTime { get; set; } - - /// - /// 受试者Code - /// - public string SubjectCode { get; set; } - - /// - /// 中心Id - /// - public string SiteCode { get; set; } - - /// - /// 项目中心Id - /// - public string TrialSiteCode { get; set; } - - /// - /// 是否为末次访视 - /// - public bool IsFinalVisit { get; set; } = false; - - /// - /// 上一访视 - /// - public Guid? OutPlanPreviousVisitId { get; set; } - - /// - /// 上一访视名称 - /// - public string OutPlanPreviousVisitName { get; set; } - - /// - /// 中心ID - /// - public Guid? SiteId { get; set; } - - /// - /// 是否为访视 - /// - public bool IsVisit { get; set; } - - /// - /// 访视Num - /// - public decimal? VisitNum { get; set; } - - /// - /// 是否为PD进展 - /// - public PDStateEnum PDState { get; set; } = PDStateEnum.None; - - /// - /// 入组确认评估 - /// - public bool IsEnrollmentConfirm { get; set; } = false; - - } + public class GetReadModuleResultDto @@ -377,7 +251,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public ModuleTypeEnum ModuleType { get; set; } - public ReadModuleEnum? Status { get; set; } public bool? IsUrgent { get; set; } @@ -417,7 +290,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public ModuleTypeEnum ModuleType { get; set; } - public ReadModuleEnum? Status { get; set; } public bool? IsUrgent { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs index 3da53050..8630bf0c 100644 --- a/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs @@ -11,6 +11,6 @@ namespace IRaCIS.Core.Application.Contracts { public interface IReadModuleService { - ReadModuleEnum GetVisitSubmitStateEnum(SubjectVisit visit); + } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index 03e8c6ba..a712e4f4 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -158,7 +158,7 @@ namespace IRaCIS.Application.Services .WhereIf(dto.TrialSiteCode != null && dto.TrialSiteCode != String.Empty, x => x.TrialSiteCode == dto.TrialSiteCode) .WhereIf(dto.SubjectCode != null && dto.SubjectCode != String.Empty, x => x.SubjectCode == dto.SubjectCode) .WhereIf(dto.ModuleType != null, x => x.ModuleType == dto.ModuleType) - .WhereIf(dto.Status != null, x => x.Status == dto.Status) + .WhereIf(dto.ReadingStatus != null, x => x.ReadingStatus == dto.ReadingStatus) .WhereIf(dto.Name != null, x => x.Name.Contains(dto.Name)).OrderBy(x => x.SiteCode); var subjectIds = await subjectQuery.Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync(); @@ -338,7 +338,7 @@ namespace IRaCIS.Application.Services SubjectVisitId = x.SubjectVisitId, SubjectVisitName = x.SubjectVisitName, - Status = x.Status, + Status = x.ReadingStatus, }).FirstOrDefault(); @@ -347,11 +347,11 @@ namespace IRaCIS.Application.Services var subjectVisit =await _subjectVisitRepository.FirstOrDefaultAsync(x => x.Id == readModule.SubjectVisitId); switch (readModule.Status) { - case ReadModuleEnum.ImageUpload: + case ReadingStatusEnum.ImageNotSubmit: stakeholderIds.AddRange(await _dicomInstanceRepository.Where(x => x.SubjectVisitId == readModule.SubjectVisitId).Select(x => x.CreateUserId).Distinct().ToListAsync()); stakeholderIds.AddRange(await _noneDicomStudyFileRepository.Where(x => x.NoneDicomStudy.SubjectVisitId == readModule.SubjectVisitId).Select(x => x.CreateUserId).Distinct().ToListAsync()); break; - case ReadModuleEnum.ImageQuality: + case ReadingStatusEnum.ImageQuality: if (subjectVisit.PreliminaryAuditUserId != null) { stakeholderIds.Add(subjectVisit.PreliminaryAuditUserId.Value); @@ -361,7 +361,7 @@ namespace IRaCIS.Application.Services stakeholderIds.Add(subjectVisit.ReviewAuditUserId.Value); } break; - case ReadModuleEnum.ConsistencyCheck: + case ReadingStatusEnum.TaskAllocate: if (subjectVisit.CheckUserId != null) { stakeholderIds.Add(subjectVisit.CheckUserId.Value); @@ -431,7 +431,7 @@ namespace IRaCIS.Application.Services ReadingSetType= dto.ReadingSetType, TrialId= dto.TrialId, VisitNum= visit.VisitNum, - Status = ReadModuleEnum.TaskAllocation, + ReadingStatus = ReadingStatusEnum.TaskAllocate, }); var res = await _readModuleRepository.SaveChangesAsync(); diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs index fb5abbbb..42dce5de 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs @@ -308,7 +308,7 @@ namespace IRaCIS.Application.Services SubjectVisitId = item.SubjectVisitId, ReadingSetType = item.ReadingPeriodSet.ReadingSetType, ReadingPeriodSetId = item.ReadingPeriodSet.Id, - Status = ReadModuleEnum.TaskAllocation, + ReadingStatus = ReadingStatusEnum.TaskAllocate, TrialId = readingPeriodSet.TrialId, VisitNum = item.SubjectVisit.VisitNum, }); diff --git a/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs b/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs index 56514447..1901c0ef 100644 --- a/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs +++ b/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs @@ -140,7 +140,7 @@ namespace IRaCIS.Core.Application.Triggers ReadingPeriodSetId = readingPeriodSet.Id, IsUrgent = subjectVisit.IsUrgent, SubjectVisitId = subjectVisitId, - Status = ReadModuleEnum.TaskAllocation, + ReadingStatus = ReadingStatusEnum.TaskAllocate, SubjectId = subjectVisit.SubjectId, ModuleName = "Global",// 全局阅片 ReadingSetType = ReadingSetType.ImageReading, diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 34ae63b9..9365b2c7 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -99,42 +99,42 @@ namespace IRaCIS.Core.Domain.Share Revocation=2, } - /// - /// 阅片模块状态 - /// - public enum ReadModuleEnum - { - /// - /// 影像上传 - /// - ImageUpload=0, + ///// + ///// 阅片模块状态 + ///// + //public enum ReadModuleEnum + //{ + // /// + // /// 影像上传 + // /// + // ImageUpload=0, - /// - /// 影像质控 - /// - ImageQuality = 1, + // /// + // /// 影像质控 + // /// + // ImageQuality = 1, - /// - /// 一致性核查 - /// - ConsistencyCheck = 2, + // /// + // /// 一致性核查 + // /// + // ConsistencyCheck = 2, - /// - /// 任务分配 - /// - TaskAllocation = 3, + // /// + // /// 任务分配 + // /// + // TaskAllocation = 3, - /// - /// 影像阅片 - /// - ImageRead = 4, + // /// + // /// 影像阅片 + // /// + // ImageRead = 4, - /// - /// 阅片完成 - /// - ReadComplete = 5, + // /// + // /// 阅片完成 + // /// + // ReadComplete = 5, - } + //} /// diff --git a/IRaCIS.Core.Domain/Reading/ReadModule.cs b/IRaCIS.Core.Domain/Reading/ReadModule.cs index ef0697b7..94894ecc 100644 --- a/IRaCIS.Core.Domain/Reading/ReadModule.cs +++ b/IRaCIS.Core.Domain/Reading/ReadModule.cs @@ -40,11 +40,6 @@ namespace IRaCIS.Core.Domain.Models /// public Guid SubjectVisitId { get; set; } - /// - /// 状态 - /// - public ReadModuleEnum Status { get; set; } - /// /// 创建时间 /// @@ -120,9 +115,7 @@ namespace IRaCIS.Core.Domain.Models [ForeignKey("LastVisitIdSetId")] public SubjectVisit LastSubjectVisit { get; set; } - public ReadingStatusEnum ReadingStatus { get; set; } - } diff --git a/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs b/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs index 2ae82bbc..2c846f6f 100644 --- a/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs +++ b/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs @@ -74,10 +74,7 @@ namespace IRaCIS.Core.Domain.Models /// public string? ReadModuleName { get; set; } - /// - /// 状态 - /// - public ReadModuleEnum? Status { get; set; } + /// /// 创建时间 diff --git a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs index 1f493567..ac697437 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs @@ -13,34 +13,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common { public static class ReadingCommon { - /// - /// 获取访视的状态 - /// - /// - /// - - public static ReadModuleEnum GetVisitSubmitStateEnum(SubjectVisit visit) - { - if (visit.SubmitState != SubmitStateEnum.Submitted) // 未提交 - { - return ReadModuleEnum.ImageUpload; - } - else if (visit.AuditState != AuditStateEnum.QCPassed) // 审核未通过 - { - return ReadModuleEnum.ImageQuality; - } - else if (visit.ForwardState != ForwardStateEnum.Forwarded) // 未通过一致性核查 - { - return ReadModuleEnum.ConsistencyCheck; - } - else - { - // 暂时 - return ReadModuleEnum.ReadComplete; - } - } - - + public static bool IsNullOrEmpty(this string value) { if (value == null || value == string.Empty)