diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 4d64802f6..4ba6ea27b 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -184,7 +184,7 @@ - + 一次性分配所有医生 批量分配(添加),后端现在没限制 diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs index b8ce79b48..74b8f5d47 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs @@ -91,16 +91,34 @@ namespace IRaCIS.Core.Application.ViewModel public bool IsJudgeDoctor { get; set; } } + public class TaskAllocationRuleDTO : TaskAllocationRuleAddOrEdit + { + public Guid CreateUserId { get; set; } + public DateTime CreateTime { get; set; } + public DateTime UpdateTime { get; set; } + public Guid UpdateUserId { get; set; } + + public UserSimpleInfo DoctorUser { get; set; } + + public List ReadingCategoryList { get; set; } + + } + + /// TaskAllocationRuleAddOrEdit 列表查询参数模型 public class TaskAllocationRuleAddOrEdit { public Guid? Id { get; set; } public Guid TrialId { get; set; } - public int PlanReadingRatio { get; set; } - public Guid DoctorUserId { get; set; } + + public Guid EnrollId { get; set; } + //public Guid DoctorUserId { get; set; } + + + public int PlanSubjectCount { get; set; } + public bool IsEnable { get; set; } - public bool IsJudgeDoctor { get; set; } public string Note { get; set; } = string.Empty; } @@ -110,6 +128,9 @@ namespace IRaCIS.Core.Application.ViewModel public ReadingMethod ReadingType { get; set; } + [NotDefault] + public Guid EnrollId { get; set; } + public Guid? DoctorUserId { get; set; } public string UserCode { get; set; } @@ -151,7 +172,7 @@ namespace IRaCIS.Core.Application.ViewModel //重阅 产生任务 public VisitTask ReReadingTask { get; set; } - public Action< VisitTask> Action; + public Action Action; //public ReReadingApplyGenerateTaskCommand ReReadingApplyGenerateTaskCommand { get; set; } = new ReReadingApplyGenerateTaskCommand(); @@ -161,7 +182,7 @@ namespace IRaCIS.Core.Application.ViewModel //组间一致性 public List GenerataGroupConsistentTaskList { get; set; } - + } diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 1dd049e74..a6c36b728 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -321,7 +321,7 @@ namespace IRaCIS.Core.Application.ViewModel public Guid TrialId { get; set; } - public Guid SubjectId { get; set; } + public List SubjectIdList { get; set; } public List DoctorArmList { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskAllocationRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskAllocationRuleService.cs index 8947d907e..1395a4779 100644 --- a/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskAllocationRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskAllocationRuleService.cs @@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Interfaces Task AddOrUpdateTaskAllocationRule(TaskAllocationRuleAddOrEdit addOrEditTaskAllocationRule); - Task DeleteTaskAllocationRule(Guid taskAllocationRuleId, bool isJudgeDoctor); + Task DeleteTaskAllocationRule(Guid taskAllocationRuleId); } diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs index 81d3865c7..94e9ff337 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs @@ -25,48 +25,36 @@ namespace IRaCIS.Core.Application.Service private readonly IRepository _trialRepository; - + public TaskAllocationRuleService(IRepository taskAllocationRuleRepository, IRepository userRepository, IRepository trialRepository) { _taskAllocationRuleRepository = taskAllocationRuleRepository; _userRepository = userRepository; - _trialRepository= trialRepository; + _trialRepository = trialRepository; } - [HttpPost] - public async Task<(List,object)> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule) + + + + + public async Task > GetDoctorPlanAllocationRuleList(Guid trialId) { - var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t=>t.TrialId== queryTaskAllocationRule.TrialId && t.IsJudgeDoctor == queryTaskAllocationRule.IsJudgeDoctor) - .ProjectTo(_mapper.ConfigurationProvider); + var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); - var trialTaskConfig= _trialRepository.Where(t=>t.Id==queryTaskAllocationRule.TrialId).ProjectTo(_mapper.ConfigurationProvider, new { isJudgeDoctor = queryTaskAllocationRule.IsJudgeDoctor }).FirstOrDefault(); - - return (await taskAllocationRuleQueryable.ToListAsync(), trialTaskConfig); + return list; } - /// - /// 获取访视任务 应用Subject后 医生比率情况 - /// - /// - [HttpPost] - public async Task> GetSubjectApplyDoctorTaskStatList(ApplySubjectCommand assignConfirmCommand) - { - var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == assignConfirmCommand.TrialId && t.IsJudgeDoctor == assignConfirmCommand.IsJudgeDoctor) - .ProjectTo(_mapper.ConfigurationProvider, new { subjectIdList = assignConfirmCommand.SubjectIdList , isJudgeDoctor = assignConfirmCommand.IsJudgeDoctor }); - return await taskAllocationRuleQueryable.ToListAsync(); - } - public async Task AddOrUpdateTaskAllocationRule(TaskAllocationRuleAddOrEdit addOrEditTaskAllocationRule) { var verifyExp1 = new EntityVerifyExp() { - VerifyExp = t => t.DoctorUserId == addOrEditTaskAllocationRule.DoctorUserId && t.TrialId== addOrEditTaskAllocationRule.TrialId && t.IsJudgeDoctor==addOrEditTaskAllocationRule.IsJudgeDoctor, + VerifyExp = t => t.EnrollId == addOrEditTaskAllocationRule.EnrollId && t.TrialId == addOrEditTaskAllocationRule.TrialId, VerifyMsg = "已有该医生配置,不允许继续增加" }; @@ -77,10 +65,10 @@ namespace IRaCIS.Core.Application.Service } - [HttpDelete("{taskAllocationRuleId:guid}/{isJudgeDoctor:bool}")] - public async Task DeleteTaskAllocationRule( Guid taskAllocationRuleId, bool isJudgeDoctor ) + [HttpDelete("{taskAllocationRuleId:guid}")] + public async Task DeleteTaskAllocationRule(Guid taskAllocationRuleId) { - if(await _taskAllocationRuleRepository.Where(t => t.Id == taskAllocationRuleId ).AnyAsync(t => t.DoctorVisitTaskList.Where(t=>isJudgeDoctor?t.ArmEnum==Domain.Share.Arm.JudgeArm: t.ArmEnum != Domain.Share.Arm.JudgeArm).Count() > 0)) + if (await _taskAllocationRuleRepository.Where(t => t.Id == taskAllocationRuleId).AnyAsync(t => t.DoctorVisitTaskList.Any())) { return ResponseOutput.NotOk("已分配任务给该医生,不允许删除"); } @@ -91,6 +79,35 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.Ok(); } + + /// + /// 获取访视任务 应用Subject后 医生比率情况 + /// + /// + [HttpPost] + public async Task> GetSubjectApplyDoctorTaskStatList(ApplySubjectCommand assignConfirmCommand) + { + var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == assignConfirmCommand.TrialId && t.IsJudgeDoctor == assignConfirmCommand.IsJudgeDoctor) + .ProjectTo(_mapper.ConfigurationProvider, new { subjectIdList = assignConfirmCommand.SubjectIdList, isJudgeDoctor = assignConfirmCommand.IsJudgeDoctor }); + + return await taskAllocationRuleQueryable.ToListAsync(); + } + + + + [HttpPost] + public async Task<(List, object)> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule) + { + var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == queryTaskAllocationRule.TrialId /*&& t.IsJudgeDoctor == queryTaskAllocationRule.IsJudgeDoctor*/) + .ProjectTo(_mapper.ConfigurationProvider); + + + var trialTaskConfig = _trialRepository.Where(t => t.Id == queryTaskAllocationRule.TrialId).ProjectTo(_mapper.ConfigurationProvider, new { isJudgeDoctor = queryTaskAllocationRule.IsJudgeDoctor }).FirstOrDefault(); + + return (await taskAllocationRuleQueryable.ToListAsync(), trialTaskConfig); + } + + /// /// 获取项目下 医生账户信息下拉 /// @@ -98,19 +115,20 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpGet("{trialId:guid}")] - public async Task> GetDoctorUserSelectList(Guid trialId,[FromServices] IRepository _enrollRepository) + public async Task> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository _enrollRepository) { var query = from enroll in _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus >= (int)EnrollStatus.ConfirmIntoGroup) join user in _userRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId select new TrialDoctorUserSelectView() { TrialId = enroll.TrialId, - ReadingType=enroll.Trial.ReadingType, - DoctorUserId= user.Id, - FullName=user.FullName, - UserCode=user.UserCode, - UserName=user.UserName, - UserTypeEnum=user.UserTypeRole.UserTypeEnum + ReadingType = enroll.Trial.ReadingType, + EnrollId =enroll.Id, + DoctorUserId = user.Id, + FullName = user.FullName, + UserCode = user.UserCode, + UserName = user.UserName, + UserTypeEnum = user.UserTypeRole.UserTypeEnum }; return query.ToList(); diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs index 992efce5c..51510c5ed 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -72,7 +72,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task> GetGenerateMedicalReviewTaskList(GenerateMedicalReviewTaskQuery inQuery) + public async Task> GetGenerateMedicalReviewTaskList(GenerateMedicalReviewTaskQuery inQuery) { var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId) .Where(t => t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned) @@ -84,7 +84,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.ReadingCategory != null, t => t.ReadingCategory == inQuery.ReadingCategory) .WhereIf(inQuery.ReadingTaskState != null, t => t.ReadingTaskState == inQuery.ReadingTaskState) .WhereIf(inQuery.IsGeneratedJudge != null, t => t.JudgeVisitTaskId != null) - .WhereIf(inQuery.IsGlobalHaveUpdate != null, t => t.IsGlobalHaveUpdate== inQuery.IsGlobalHaveUpdate) + .WhereIf(inQuery.IsGlobalHaveUpdate != null, t => t.IsGlobalHaveUpdate == inQuery.IsGlobalHaveUpdate) .WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.TaskName.Contains(inQuery.TaskName) || t.TaskBlindName.Contains(inQuery.TaskName)) .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.Subject.Code.Contains(inQuery.SubjectCode)) @@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service foreach (var taskId in command.TaskIdList) { - await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { TrialId = command.TrialId, VisitTaskId = taskId, MedicalManagerUserId = command.MedicalManagerUserId ,AllocateTime=DateTime.Now}); + await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { TrialId = command.TrialId, VisitTaskId = taskId, MedicalManagerUserId = command.MedicalManagerUserId, AllocateTime = DateTime.Now }); } await _taskMedicalReviewRepository.SaveChangesAsync(); diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 09e183a6c..cbd739ec0 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -76,15 +76,36 @@ namespace IRaCIS.Core.Application.Service.Allocation } /// - /// + /// 一次性分配所有医生 批量分配(添加),后端现在没限制 /// /// /// - public async Task BatchAssignDoctorToSubject(BatchAssignDoctorToSubjectCommand command) + public async Task BatchAssignDoctorToSubject(BatchAssignDoctorToSubjectCommand command) { + foreach (var subjectId in command.SubjectIdList) + { + foreach (var doctorArm in command.DoctorArmList) + { + await _subjectUserRepository.AddAsync(new SubjectUser() { ArmEnum = doctorArm.ArmEnum, DoctorUserId = doctorArm.DoctorUserId, SubjectId = subjectId, AssignTime = DateTime.Now }); + } + } + + await _subjectUserRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(); } + ///// + ///// 阅片人维度 Subject统计表 + ///// + ///// + ///// + //public async Task GetDoctorSubjectStat(Guid trialId ) + //{ + // var query= from enroll in _repository.Where(t=>t.TrialId==trialId) + // join user in _repository.Where() on enroll.DoctorId equals user.DoctorId + //} @@ -1195,21 +1216,22 @@ namespace IRaCIS.Core.Application.Service.Allocation var origenalTask = (await _visitTaskRepository.Where(t => item.OriginalReReadingTaskId == t.Id).FirstOrDefaultAsync()).IfNullThrowException(); // 当前访视之前 已有任务申请 - if (trialConfig.IsReadingTaskViewInOrder ) + if (trialConfig.IsReadingTaskViewInOrder) { - //var query = _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.SubjectId == origenalTask.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit - // && t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.OriginalReReadingTask.VisitTaskNum > origenalTask.VisitTaskNum && t.RequestReReadingResultEnum == RequestReReadingResult.Default) - // .Where(t => t.OriginalReReadingTask.IsAnalysisCreate == origenalTask.IsAnalysisCreate); + var query = _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.SubjectId == origenalTask.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit + && t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.OriginalReReadingTask.VisitTaskNum > origenalTask.VisitTaskNum && t.RequestReReadingResultEnum == RequestReReadingResult.Default) + .Where(t => t.OriginalReReadingTask.IsAnalysisCreate == origenalTask.IsAnalysisCreate); - //if(await query.AnyAsync()) - //{ - // return ResponseOutput.NotOk("当前为有序阅片,当前访视之后,也申请了重阅 必须从后向前处理"); + if (await query.AnyAsync()) + { + return ResponseOutput.NotOk("当前为有序阅片,当前访视之后,也申请了重阅 必须从后向前处理"); + + } - //} } - Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState==TaskAllocationState.Allocated; + Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated; //是否是一致性分析任务 filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate); @@ -1233,6 +1255,8 @@ namespace IRaCIS.Core.Application.Service.Allocation // }); //} + + //PM申请 SPM / CPM审批 回退访视,在此不生成访视任务 if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)) { @@ -1254,7 +1278,7 @@ namespace IRaCIS.Core.Application.Service.Allocation //访视影响当前以及当前之后的 两个阅片人的 - filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum ); + filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum); #region 影响的任务 @@ -1274,6 +1298,12 @@ namespace IRaCIS.Core.Application.Service.Allocation influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id }); }); + + //将医学审核设置为失效 + + var taskIdList = influenceTaskList.Select(t => t.Id).ToList(); + + await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.VisitTaskId) && t.AuditState != MedicalReviewAuditState.HaveSigned , u => new TaskMedicalReview() { IsInvalid = false }); } //申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配 diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 6cee14247..295ab6988 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -65,6 +65,12 @@ namespace IRaCIS.Core.Application.Service ; + CreateMap() + .ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser)) + .ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Select(t=>t.ReadingCategory).ToList())); + + + CreateMap() .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.TrialSite.TrialSiteCode)) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index edef0eaac..b11f2181a 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -392,6 +392,8 @@ namespace IRaCIS.Application.Services { await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId }); + await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userId }); + await _taskAllocationRuleRepository.AddAsync(new TaskAllocationRule() { TrialId = trialId, DoctorUserId = userId }); } diff --git a/IRaCIS.Core.Domain/Allocation/SubjectUser.cs b/IRaCIS.Core.Domain/Allocation/SubjectUser.cs index 8d7055f3e..8364185d9 100644 --- a/IRaCIS.Core.Domain/Allocation/SubjectUser.cs +++ b/IRaCIS.Core.Domain/Allocation/SubjectUser.cs @@ -63,7 +63,7 @@ namespace IRaCIS.Core.Domain.Models public Arm ArmEnum { get; set; } - public bool IsConfirmed { get; set; } + public bool IsConfirmed { get; set; } = true; //该属性有值 说明该医生被替换了 分配的时候 要过滤掉 public Guid? OrignalSubjectUserId { get; set; } diff --git a/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs b/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs index 2c4894d18..3788bd910 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskAllocationRule.cs @@ -19,77 +19,36 @@ namespace IRaCIS.Core.Domain.Models { public Trial Trial { get; set; } - public Guid TrialId { get; set; } - - /// - /// CreateUserId - /// - [Required] public Guid CreateUserId { get; set; } - - /// - /// CreateTime - /// - [Required] public DateTime CreateTime { get; set; } - - /// - /// UpdateTime - /// - [Required] public DateTime UpdateTime { get; set; } - - /// - /// UpdateUserId - /// - [Required] public Guid UpdateUserId { get; set; } + public int PlanSubjectCount { get; set; } - /// - /// 计划比率 - /// - [Required] - public int PlanReadingRatio { get; set; } - + public bool IsEnable { get; set; } + + public string Note { get; set; } = string.Empty; + + public Guid EnrollId { get; set; } + + public Enroll Enroll { get; set; } + //是否是裁判医生 裁判医生单独加入 + public bool IsJudgeDoctor { get; set; } public Guid DoctorUserId { get; set; } [ForeignKey("DoctorUserId")] public User DoctorUser { get; set; } - - /// - /// IsEnable - /// - [Required] - public bool IsEnable { get; set; } - - - public string Note { get; set; } = string.Empty; - - - //是否是裁判医生 裁判医生单独加入 - public bool IsJudgeDoctor {get;set;} - - + public int PlanReadingRatio { get; set; } public List DoctorVisitTaskList { get; set; } = new List(); - ///// - ///// Arm 组 - ///// - //[Required] - //public int GroupEnum { get; set; } - ///// - ///// 分配类型 - ///// - //[Required] - //public int AllocationObjectEnum { get; set; } } diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index faba25c4e..1fdc612ad 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -11,161 +11,164 @@ using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models { - /// - ///TaskMedicalReview - /// - [Table("TaskMedicalReview")] - public class TaskMedicalReview :Entity, IAuditUpdate, IAuditAdd - { - + /// + ///TaskMedicalReview + /// + [Table("TaskMedicalReview")] + public class TaskMedicalReview : Entity, IAuditUpdate, IAuditAdd + { - /// + + /// /// CreateUserId /// - [Required] - public Guid CreateUserId { get; set; } - - /// + [Required] + public Guid CreateUserId { get; set; } + + /// /// CreateTime /// - [Required] - public DateTime CreateTime { get; set; } - - /// + [Required] + public DateTime CreateTime { get; set; } + + /// /// UpdateTime /// - [Required] - public DateTime UpdateTime { get; set; } - - /// + [Required] + public DateTime UpdateTime { get; set; } + + /// /// UpdateUserId /// - [Required] - public Guid UpdateUserId { get; set; } - - /// + [Required] + public Guid UpdateUserId { get; set; } + + /// /// 分配时间 /// - public DateTime? AllocateTime { get; set; } - - /// + public DateTime? AllocateTime { get; set; } + + /// /// 审核状态 /// - [Required] - public MedicalReviewAuditState AuditState { get; set; } - - - - /// + [Required] + public MedicalReviewAuditState AuditState { get; set; } + + + + /// /// 审核通过时间 /// - public DateTime? AuditSignTime { get; set; } - - /// + public DateTime? AuditSignTime { get; set; } + + /// /// 阅片人是否认同 /// - public MedicalReviewDoctorUserIdea DoctorUserIdeaEnum { get; set; } - - /// + public MedicalReviewDoctorUserIdea DoctorUserIdeaEnum { get; set; } + + /// /// MedicalManagerUserId /// - public Guid? MedicalManagerUserId { get; set; } + public Guid? MedicalManagerUserId { get; set; } - public User MedicalManagerUser { get; set; } + public User MedicalManagerUser { get; set; } - public Guid VisitTaskId { get; set; } + public Guid VisitTaskId { get; set; } [ForeignKey("VisitTaskId")] - public VisitTask VisitTask { get; set; } + public VisitTask VisitTask { get; set; } - public Guid TrialId { get; set; } + public Guid TrialId { get; set; } - /// - /// 冗余 废弃 - /// - public Guid DoctorUserId { get; set; } + /// + /// 冗余 废弃 + /// + public Guid DoctorUserId { get; set; } - public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; } + public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; } - /// - /// 是否有问题 - /// - public bool IsHaveQuestion { get; set; } = false; + /// + /// 是否有问题 + /// + public bool IsHaveQuestion { get; set; } = false; - /// - /// 质询问题 - /// - public string Questioning { get; set; } = string.Empty; + /// + /// 质询问题 + /// + public string Questioning { get; set; } = string.Empty; - /// - /// 图片路径 - /// - public string ImagePath { get; set; } = string.Empty; + /// + /// 图片路径 + /// + public string ImagePath { get; set; } = string.Empty; - /// - /// 审核建议 - /// - public AuditAdvice AuditAdviceEnum { get; set; } + /// + /// 审核建议 + /// + public AuditAdvice AuditAdviceEnum { get; set; } - /// - /// 是否关闭对话 - /// - public bool IsClosedDialog { get; set; } + /// + /// 是否关闭对话 + /// + public bool IsClosedDialog { get; set; } - /// - /// 保存问题的时间 - /// - public DateTime? SaveQuestionTime { get; set; } + /// + /// 保存问题的时间 + /// + public DateTime? SaveQuestionTime { get; set; } - /// - /// 不同意重阅原因 - /// - public string DisagreeReason { get; set; } = string.Empty; + /// + /// 不同意重阅原因 + /// + public string DisagreeReason { get; set; } = string.Empty; - /// - /// 是否申请重阅 - /// - public bool IsApplyHeavyReading { get; set; } = false; + /// + /// 是否申请重阅 + /// + public bool IsApplyHeavyReading { get; set; } = false; - /// - /// 保存结论时间 - /// - public DateTime? SaveConclusionTime { get; set; } + /// + /// 保存结论时间 + /// + public DateTime? SaveConclusionTime { get; set; } - /// - /// 文件名称 - /// - public string FileName { get; set; } = string.Empty; + /// + /// 文件名称 + /// + public string FileName { get; set; } = string.Empty; - public List ReadingMedicalReviewDialogList { get; set; } + public List ReadingMedicalReviewDialogList { get; set; } - /// - /// 是否发送消息 - /// - public bool IsSendMessage { get; set; } = false; + /// + /// 是否发送消息 + /// + public bool IsSendMessage { get; set; } = false; - /// - /// 医学审核对话关闭原因 - /// - public MedicalDialogClose MedicalDialogCloseEnum { get; set; } + /// + /// 医学审核对话关闭原因 + /// + public MedicalDialogClose MedicalDialogCloseEnum { get; set; } - /// - /// 对话关闭原因 - /// - public string DialogCloseReason { get; set; } = string.Empty; + /// + /// 对话关闭原因 + /// + public string DialogCloseReason { get; set; } = string.Empty; + /// + /// 无效的 + /// + public bool IsInvalid { get; set; } + } - } - -} +} diff --git a/IRaCIS.Core.Domain/Trial/Enroll.cs b/IRaCIS.Core.Domain/Trial/Enroll.cs index 9b365ae68..f462207fc 100644 --- a/IRaCIS.Core.Domain/Trial/Enroll.cs +++ b/IRaCIS.Core.Domain/Trial/Enroll.cs @@ -7,8 +7,7 @@ namespace IRaCIS.Core.Domain.Models [Table("Enroll")] public partial class Enroll : Entity,IAuditUpdate,IAuditAdd { - [ForeignKey("TrialId")] - public virtual TaskConsistentRule TaskConsistentRule { get; set; } + [ForeignKey("TrialId")] public virtual Trial Trial { get; set; } @@ -60,6 +59,15 @@ namespace IRaCIS.Core.Domain.Models public int DoctorTrialState { get; set; } + /// + /// ˺ 뵽Ŀк ֵ + /// + public Guid? DoctorUserId { get; set; } + + public User DoctorUser { get; set; } + + public TaskAllocationRule TaskAllocationRule { get; set; } + public List EnrollReadingCategoryList { get; set; } }