From d8a379dd55144d0b93a9e130d1b90c7e116e4932 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 17 Jun 2022 13:19:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=BD=E5=90=8D=E7=A9=BA?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/UploadDownLoadController.cs | 1 - .../IRaCIS.Core.Application.xml | 6 +++ .../DTO/TaskAllocationRuleViewModel.cs | 4 +- .../Allocation/DTO/VisitTaskViewModel.cs | 8 ++++ .../Allocation/TaskAllocationRuleService.cs | 12 ++++++ .../Allocation/VisitTaskHelpeService.cs | 2 - .../Service/Allocation/VisitTaskService.cs | 6 +-- .../Service/Allocation/_MapConfig.cs | 40 +++++++++++-------- .../QC/DTO/PreviousSurgeryViewModel.cs | 2 +- .../Service/QC/QCOperationService.cs | 28 ++++++++++++- .../Service/Reading/ClinicalDataSetService.cs | 2 +- .../Dto/ClinicalDataServiceViewModel.cs | 2 +- .../Service/Reading/Dto/GetReadModuleDto.cs | 1 - .../Reading/Dto/ReadingClinicalDataDto.cs | 2 +- .../Reading/Dto/ReadingPeriodSetViewModel.cs | 2 +- .../Reading/Interface/IReadModuleService.cs | 2 +- .../Interface/IReadingClinicalDataService.cs | 2 +- .../Service/Reading/ReadModuleService.cs | 1 - .../Reading/ReadingClinicalDataService.cs | 1 - .../Reading/ReadingImageTaskService.cs | 1 - .../Reading/ReadingPeriodSetService.cs | 1 - .../Service/Reading/ReadingQuestionService.cs | 1 - .../Service/Visit/SubjectVisitService.cs | 1 - .../Triggers/SubjectVisitFinalVisitTrigger.cs | 1 - .../ConsistencyVerificationHandler.cs | 4 ++ IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 32 ++++++++++++++- IRaCIS.Core.Domain/Allocation/VisitTask.cs | 7 ++++ .../QC/ClinicalData/PreviousPDF.cs | 2 +- .../Reading/ClinicalDataSystemSet.cs | 2 +- .../Reading/ClinicalDataTrialSet.cs | 1 - IRaCIS.Core.Domain/Reading/ReadModule.cs | 2 +- .../Reading/ReadingClinicalData.cs | 2 +- .../Reading/ReadingClinicalDataPDF.cs | 2 +- .../Reading/ReadingPeriodPlan.cs | 2 +- .../Reading/ReadingPeriodSet.cs | 1 - .../Reading/ReadingPeriodSite.cs | 1 - .../Reading/ReadingQuestionCriterionSystem.cs | 2 +- .../Reading/ReadingQuestionCriterionTrial.cs | 2 +- .../Reading/ReadingQuestionSystem.cs | 2 +- .../Reading/ReadingQuestionTrial.cs | 2 +- .../Reading/ReadingTaskQuestionAnswer.cs | 2 +- .../Reading/View/ReadModuleView.cs | 2 +- .../Reading/View/ReadingClinicalDataView.cs | 2 +- IRaCIS.Core.Domain/Visit/SubjectVisit.cs | 3 +- .../Common/ReadingCommon.cs | 2 +- 45 files changed, 146 insertions(+), 60 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index 968eb067a..7eb6090b5 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -14,7 +14,6 @@ using IRaCIS.Core.Application.Service; using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Domain.Share.Reading; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Infrastructure; using IRaCIS.Core.Infrastructure.Extention; diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 0ccf275c9..0a20f5ca0 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -39,6 +39,12 @@ 分配规则 + + + 获取应用Subject后 医生比率情况 + + + 获取项目下 医生账户信息下拉 diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs index 6a5f3d583..1cd63736f 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs @@ -46,8 +46,8 @@ namespace IRaCIS.Core.Application.ViewModel //系统 Subject数 public int? TotalSubjectCount { get; set; } - - + //已分配但是未处理的任务量 + public int? SelfUndoTaskCount { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index a0349764a..68aefd515 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -304,6 +304,14 @@ namespace IRaCIS.Core.Application.ViewModel } + public class ApplySubjectCommand + { + public Guid TrialId { get; set; } + + public List SubjectIdList { get; set; } = new List(); + } + + public class AssignConfirmCommand { public Guid TrialId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs index 612fbf7a0..53bfc418f 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs @@ -46,6 +46,18 @@ namespace IRaCIS.Core.Application.Service } + /// + /// 获取应用Subject后 医生比率情况 + /// + /// + public async Task> GetSubjectApplyDoctorTaskStatList(ApplySubjectCommand assignConfirmCommand) + { + var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == assignConfirmCommand.TrialId) + .ProjectTo(_mapper.ConfigurationProvider, new { subjectIdList = assignConfirmCommand.SubjectIdList }); + + return await taskAllocationRuleQueryable.ToListAsync(); + } + public async Task AddOrUpdateTaskAllocationRule(TaskAllocationRuleAddOrEdit addOrEditTaskAllocationRule) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index d20aa1f26..cdcdd2a51 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -144,8 +144,6 @@ namespace IRaCIS.Core.Application.Service throw new BusinessValidationFailedException("请确认是否改了配置,或者手动分配时,只分配了一个Arm "); } - - } #endregion diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index d3bdf2d15..9cd45c4ce 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -235,7 +235,6 @@ namespace IRaCIS.Core.Application.Service } - /// /// IR 已阅片任务 /// @@ -269,8 +268,6 @@ namespace IRaCIS.Core.Application.Service } - - /// /// 获取IR 重阅影像阅片列表 /// @@ -466,6 +463,9 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.Ok(); } + + + /// /// 自动一次性分配所有未分配的 Subject 给医生 /// diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 0e5b9feab..a560bf991 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -3,6 +3,7 @@ using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Models; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Application.Service { @@ -11,6 +12,8 @@ namespace IRaCIS.Core.Application.Service public AllocationConfig() { + List subjectIdList=new List (); + CreateMap() .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) @@ -18,21 +21,26 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)) //.ForMember(o => o.ArmList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(c => c.TrialId == u.TrialId).Select(t => t.ArmEnum).Distinct())) .ForMember(o => o.TotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count())) - .ForMember(o => o.ApplyedTotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t=>t.DoctorUserId != null))) - //.ForMember(o => o.WaitApplySelfTaskCount, t => t.MapFrom(u => u.Trial.SubjectList.Where(c => c.SubjectDoctorList.Any(d => d.DoctorUserId == u.DoctorUserId)) - // .SelectMany(t=>t.SubjectVisitTaskList.Where(t=>t.DoctorUserId==null)).Count())) - - .ForMember(o => o.WaitApplySelfTaskCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(d => d.DoctorUserId == u.DoctorUserId) - .SelectMany(t => t.SubjectArmVisitTaskList.Where(t => t.DoctorUserId == null)).Count())) - + .ForMember(o => o.ApplyedTotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId != null))) + .ForMember(o => o.WaitApplySelfTaskCount, t => t.MapFrom(u => subjectIdList.Count==0? u.Trial.SubjectDoctorUserList.Where(d => d.DoctorUserId == u.DoctorUserId) + .SelectMany(t => t.SubjectArmVisitTaskList.Where(t => t.DoctorUserId == null)).Count(): + u.Trial.SubjectDoctorUserList.Where(d => d.DoctorUserId == u.DoctorUserId && subjectIdList.Contains(d.SubjectId)) + .SelectMany(t => t.SubjectArmVisitTaskList.Where(t => t.DoctorUserId == null)).Count() + )) + .ForMember(o => o.SelfUndoTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId == u.DoctorUserId && t.ReadingTaskState != ReadingTaskState.HaveSigned))) .ForMember(o => o.SelfTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId == u.DoctorUserId))) .ForMember(o => o.TotalSubjectCount, t => t.MapFrom(u => u.Trial.SubjectList.Count())) - .ForMember(o => o.ApplyedTotalSubjectCount, t => t.MapFrom(u => u.Trial.SubjectList.Count(c=>c.SubjectDoctorList.Any(d=>d.DoctorUserId==u.DoctorUserId)))) + .ForMember(o => o.ApplyedTotalSubjectCount, t => t.MapFrom(u => u.Trial.SubjectList.Count(c => c.SubjectVisitTaskList.Any(d => d.DoctorUserId !=null)))) .ForMember(o => o.SelfSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId).Count())); + + + + + CreateMap() - //.ForMember(o => o.ArmList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(c => c.TrialId == u.TrialId).Select(t => t.ArmEnum).Distinct())) + //.ForMember(o => o.ArmList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(c => c.TrialId == u.TrialId).Select(t => t.ArmEnum).Distinct())) .ForMember(o => o.TotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count())) .ForMember(o => o.SelfTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId == u.DoctorUserId))); @@ -60,7 +68,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)) - + .ForMember(o => o.HistoryReadingDoctorUserList, t => t.MapFrom(u => u.JudgeVisitList)); CreateMap() @@ -74,7 +82,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(o => o.ReReadingOriginalTaskCode, t => t.MapFrom(u => u.OriginalReReadingTask.TaskCode)) - + .ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) @@ -88,7 +96,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) ; - + @@ -105,12 +113,12 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Code)) .ForMember(o => o.IsAssignedDoctorUser, t => t.MapFrom(u => u.SubjectDoctorList.Any())) - - - .ForMember(o => o.DoctorUserList, t => t.MapFrom(u => u.SubjectDoctorList.OrderBy(t=>t.ArmEnum))); + + + .ForMember(o => o.DoctorUserList, t => t.MapFrom(u => u.SubjectDoctorList.OrderBy(t => t.ArmEnum))); CreateMap() - //.ForMember(o => o.AssignTime, t => t.MapFrom(u => u.AssignTime)) + //.ForMember(o => o.AssignTime, t => t.MapFrom(u => u.AssignTime)) .ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode)) .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) diff --git a/IRaCIS.Core.Application/Service/QC/DTO/PreviousSurgeryViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/PreviousSurgeryViewModel.cs index ed7d71f2a..2a7f39643 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/PreviousSurgeryViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/PreviousSurgeryViewModel.cs @@ -3,7 +3,7 @@ // 生成时间 2021-11-22 11:27:53 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Application.Contracts { diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 249d1fd10..e5e30e72c 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1150,16 +1150,29 @@ namespace IRaCIS.Core.Application.Image.QA dbSubjectVisit.SubmitState = SubmitStateEnum.Submitted; dbSubjectVisit.SubmitTime = DateTime.Now; + //维护统一状态 + dbSubjectVisit.ReadingStatus = ReadingStatusEnum.ImageQuality; + } //不审 直接QC通过 可能一致性核查 也可能不一致性核查 if (trialConfig.QCProcessEnum == TrialQCProcess.NotAudit) { dbSubjectVisit.AuditState = AuditStateEnum.QCPassed; + //维护统一状态 + dbSubjectVisit.ReadingStatus = ReadingStatusEnum.ConsistencyCheck; + + + // 不一致性核查 就CVPassed ToForward 否则就是待核查 dbSubjectVisit.CheckState = trialConfig.IsImageConsistencyVerification ? CheckStateEnum.ToCheck : CheckStateEnum.CVPassed; - if(dbSubjectVisit.CheckState== CheckStateEnum.CVPassed) + //维护统一状态 + dbSubjectVisit.ReadingStatus = trialConfig.IsImageConsistencyVerification ? ReadingStatusEnum.ConsistencyCheck: ReadingStatusEnum.TaskAllocate; + + + + if (dbSubjectVisit.CheckState== CheckStateEnum.CVPassed) { dbSubjectVisit.CheckPassedTime = DateTime.Now; } @@ -1170,6 +1183,7 @@ namespace IRaCIS.Core.Application.Image.QA else if (trialConfig.QCProcessEnum == TrialQCProcess.SingleAudit) { dbSubjectVisit.AuditState = AuditStateEnum.ToAudit; + } else if (trialConfig.QCProcessEnum == TrialQCProcess.DoubleAudit) { @@ -1229,6 +1243,10 @@ namespace IRaCIS.Core.Application.Image.QA await VerifyIsCanQCAsync(dbSubjectVisit); + + //维护统一状态 + dbSubjectVisit.ReadingStatus = ReadingStatusEnum.ConsistencyCheck; + //有人QC Passed if (auditState == AuditStateEnum.QCPassed) { @@ -1255,6 +1273,10 @@ namespace IRaCIS.Core.Application.Image.QA dbSubjectVisit.PreliminaryAuditUserId = _userInfo.Id; dbSubjectVisit.PreliminaryAuditTime = DateTime.Now; + + //维护统一状态 + dbSubjectVisit.ReadingStatus = trialConfig.IsImageConsistencyVerification ? ReadingStatusEnum.ConsistencyCheck : ReadingStatusEnum.TaskAllocate; + } else { @@ -1298,6 +1320,8 @@ namespace IRaCIS.Core.Application.Image.QA dbSubjectVisit.ReviewAuditTime = DateTime.Now; + //维护统一状态 + dbSubjectVisit.ReadingStatus = trialConfig.IsImageConsistencyVerification ? ReadingStatusEnum.ConsistencyCheck : ReadingStatusEnum.TaskAllocate; } else @@ -1344,6 +1368,8 @@ namespace IRaCIS.Core.Application.Image.QA } + + } dbSubjectVisit.Auditor = _userInfo.Id; dbSubjectVisit.IsTake = false; diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalDataSetService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalDataSetService.cs index 1ae66077d..fa1e70aa0 100644 --- a/IRaCIS.Core.Application/Service/Reading/ClinicalDataSetService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ClinicalDataSetService.cs @@ -7,7 +7,7 @@ using IRaCIS.Core.Application.Service.WorkLoad.DTO; using Microsoft.AspNetCore.Authorization; using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Service.Reading.Dto; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using MassTransit; namespace IRaCIS.Application.Services diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs index 65ce1bb68..0e6e86a53 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs @@ -1,4 +1,4 @@ -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; using System.Linq; diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs index 973ec1dfc..b84501643 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs @@ -1,5 +1,4 @@ using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Domain.Share.Reading; using System; using System.Collections.Generic; using System.Linq; diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs index 0d38eb1eb..89e4f3774 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingClinicalDataDto.cs @@ -1,4 +1,4 @@ -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs index 35520117a..9cb9ea374 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs @@ -1,4 +1,4 @@ -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; using System.Linq; diff --git a/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs index a51dd3a09..3da530500 100644 --- a/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/Interface/IReadModuleService.cs @@ -5,7 +5,7 @@ //-------------------------------------------------------------------- -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Application.Contracts { diff --git a/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs index f43f4e662..903f1cc1a 100644 --- a/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/Interface/IReadingClinicalDataService.cs @@ -7,7 +7,7 @@ using IRaCIS.Core.Application.Service.Inspection.DTO; using IRaCIS.Core.Application.Service.Reading.Dto; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Application.Contracts { diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index 64cae8d98..03e8c6ba2 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -7,7 +7,6 @@ using IRaCIS.Core.Application.Service.WorkLoad.DTO; using Microsoft.AspNetCore.Authorization; using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Service.Reading.Dto; -using IRaCIS.Core.Domain.Share.Reading; using MassTransit; using Panda.DynamicWebApi.Attributes; using IRaCIS.Core.Application.Contracts; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs index 6e7e617fa..954a5f2b7 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs @@ -7,7 +7,6 @@ using IRaCIS.Core.Application.Service.WorkLoad.DTO; using Microsoft.AspNetCore.Authorization; using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Service.Reading.Dto; -using IRaCIS.Core.Domain.Share.Reading; using MassTransit; using System.ComponentModel.DataAnnotations; using System.Reflection; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 550cd21a2..2b226272a 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -7,7 +7,6 @@ using IRaCIS.Core.Application.Service.WorkLoad.DTO; using Microsoft.AspNetCore.Authorization; using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Service.Reading.Dto; -using IRaCIS.Core.Domain.Share.Reading; using MassTransit; using IRaCIS.Core.Application.Service.Reading; using IRaCIS.Core.Infra.EFCore.Common; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs index 22da4cd1d..fb5abbbb0 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs @@ -7,7 +7,6 @@ using IRaCIS.Core.Application.Service.WorkLoad.DTO; using Microsoft.AspNetCore.Authorization; using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Service.Reading.Dto; -using IRaCIS.Core.Domain.Share.Reading; using MassTransit; using IRaCIS.Core.Infra.EFCore.Common; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 9ed927979..aacb4298f 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -7,7 +7,6 @@ using IRaCIS.Core.Application.Service.WorkLoad.DTO; using Microsoft.AspNetCore.Authorization; using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Application.Service.Reading.Dto; -using IRaCIS.Core.Domain.Share.Reading; using MassTransit; using IRaCIS.Core.Application.Service.Reading; using IRaCIS.Core.Infra.EFCore.Common; diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index be2f846a7..95e1c75e2 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -8,7 +8,6 @@ using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Infrastructure; using IRaCIS.Core.Application.Auth; -using IRaCIS.Core.Domain.Share.Reading; using IRaCIS.Core.Infra.EFCore.Common; using MassTransit; diff --git a/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs b/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs index 9eaca77eb..565144479 100644 --- a/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs +++ b/IRaCIS.Core.Application/Triggers/SubjectVisitFinalVisitTrigger.cs @@ -1,6 +1,5 @@ using EntityFrameworkCore.Triggered; using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Domain.Share.Reading; using IRaCIS.Core.Infrastructure; using MassTransit; diff --git a/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs b/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs index f44efb06c..b2171cfa1 100644 --- a/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs +++ b/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs @@ -156,6 +156,10 @@ namespace IRaCIS.Core.Application.MediatR.Handlers dbSV.CheckPassedTime = DateTime.Now; dbSV.CheckResult = "核对EDC数据,完全一致"; dbSV.ManualPassReason = "自动核查通过"; + + //维护状态 + dbSV.ReadingStatus = ReadingStatusEnum.TaskAllocate; + dbSV.RequestBackState = dbSV.RequestBackState== RequestBackStateEnum.CRC_RequestBack? RequestBackStateEnum.PM_NotAgree: RequestBackStateEnum.NotRequest; dbSV.CheckChallengeDialogList.Add(new CheckChallengeDialog() { SubjectVisitId = sv.SubjectVisitId, IsCheckExcelSend = true, TalkContent = dialogMsg.ToString(), UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt, CreateTime = DateTime.Now }); } diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 95c93037e..34ae63b9e 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace IRaCIS.Core.Domain.Share.Reading +namespace IRaCIS.Core.Domain.Share { /// /// 模块枚举 @@ -206,6 +206,34 @@ namespace IRaCIS.Core.Domain.Share.Reading /// public enum ReadingStatusEnum { - None=0, + /// + /// 影像上传(未提交) + /// + ImageNotSubmit = 0, + + /// + /// 影像质控(未质控通过 --已提交) + /// + ImageQuality = 1, + + /// + /// 一致性核查(未一致性核查通过 ---已质控通过) + /// + ConsistencyCheck = 2, + + /// + /// 任务分配 (一致性核查通过 --未分配) + /// + TaskAllocate = 3, + + /// + /// 影像阅片中(任务已分配--未阅片完成) + /// + ImageReading = 4, + + /// + /// 阅片完成 + /// + ReadCompleted = 5, } } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index 5870258f7..023b1c03c 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -57,6 +57,13 @@ namespace IRaCIS.Core.Domain.Models public string TaskBlindName { get; set; } = string.Empty; + //任务来源访视Id 方便回更访视读片状态 + public Guid? SourceSubjectVisitId { get; set; } + + + public Guid? SouceReadModuleId { get; set; } + + /// /// 任务类别 diff --git a/IRaCIS.Core.Domain/QC/ClinicalData/PreviousPDF.cs b/IRaCIS.Core.Domain/QC/ClinicalData/PreviousPDF.cs index a6429bc7c..006458269 100644 --- a/IRaCIS.Core.Domain/QC/ClinicalData/PreviousPDF.cs +++ b/IRaCIS.Core.Domain/QC/ClinicalData/PreviousPDF.cs @@ -3,7 +3,7 @@ // 此代码由T4模板自动生成 byzhouhang 20210918 // 生成时间 2021-12-09 11:35:31 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/IRaCIS.Core.Domain/Reading/ClinicalDataSystemSet.cs b/IRaCIS.Core.Domain/Reading/ClinicalDataSystemSet.cs index 2f25af725..cb5255bd4 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalDataSystemSet.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalDataSystemSet.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models { diff --git a/IRaCIS.Core.Domain/Reading/ClinicalDataTrialSet.cs b/IRaCIS.Core.Domain/Reading/ClinicalDataTrialSet.cs index df1f18fc5..a2f655251 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalDataTrialSet.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalDataTrialSet.cs @@ -4,7 +4,6 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/ReadModule.cs b/IRaCIS.Core.Domain/Reading/ReadModule.cs index 00ef5bd43..ef0697b78 100644 --- a/IRaCIS.Core.Domain/Reading/ReadModule.cs +++ b/IRaCIS.Core.Domain/Reading/ReadModule.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models { diff --git a/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs b/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs index 1066f5f36..42d839571 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingClinicalData.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/ReadingClinicalDataPDF.cs b/IRaCIS.Core.Domain/Reading/ReadingClinicalDataPDF.cs index adaad7703..aa5e31a44 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingClinicalDataPDF.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingClinicalDataPDF.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models { diff --git a/IRaCIS.Core.Domain/Reading/ReadingPeriodPlan.cs b/IRaCIS.Core.Domain/Reading/ReadingPeriodPlan.cs index 6fc1dcd02..d5776ee4e 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingPeriodPlan.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingPeriodPlan.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models { diff --git a/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs b/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs index 80603af06..b1c033ef8 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs @@ -4,7 +4,6 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/ReadingPeriodSite.cs b/IRaCIS.Core.Domain/Reading/ReadingPeriodSite.cs index b7e79c18f..871b99544 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingPeriodSite.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingPeriodSite.cs @@ -4,7 +4,6 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; namespace IRaCIS.Core.Domain.Models { diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs index 5ac5742cf..2cdf09e3a 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs index 8192bca3b..f9bfe580d 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs index bc32d7647..a103af67f 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs index 48932be33..d65a8ae3b 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/ReadingTaskQuestionAnswer.cs b/IRaCIS.Core.Domain/Reading/ReadingTaskQuestionAnswer.cs index a95edf035..f32503a9d 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingTaskQuestionAnswer.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingTaskQuestionAnswer.cs @@ -4,7 +4,7 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models diff --git a/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs b/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs index bc042d1c2..2ae82bbc0 100644 --- a/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs +++ b/IRaCIS.Core.Domain/Reading/View/ReadModuleView.cs @@ -1,5 +1,5 @@ using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; using System.Linq; diff --git a/IRaCIS.Core.Domain/Reading/View/ReadingClinicalDataView.cs b/IRaCIS.Core.Domain/Reading/View/ReadingClinicalDataView.cs index a3bdb5c1f..1a3dcb54f 100644 --- a/IRaCIS.Core.Domain/Reading/View/ReadingClinicalDataView.cs +++ b/IRaCIS.Core.Domain/Reading/View/ReadingClinicalDataView.cs @@ -1,5 +1,5 @@ using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; using System.Linq; diff --git a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs index e76c9bd08..84f2cc19e 100644 --- a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs +++ b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Domain.Share.Reading; using Microsoft.EntityFrameworkCore.Metadata.Internal; namespace IRaCIS.Core.Domain.Models @@ -207,6 +206,8 @@ namespace IRaCIS.Core.Domain.Models public List QCChallengeDialogList { get; set; } = new List(); + + public ReadingStatusEnum ReadingStatus { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs index e9db09029..1f493567b 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs @@ -1,6 +1,6 @@ using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; -using IRaCIS.Core.Domain.Share.Reading; +using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations;