diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 72123ee2c..776e24769 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -327,6 +327,13 @@
+
+
+ PM 申请重阅 被同意 或者 PM 直接退回的时候影响
+
+
+
+
确认重阅与否 1同意 2 拒绝
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs
index abd0401d8..9249a3a51 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs
@@ -141,6 +141,25 @@ namespace IRaCIS.Core.Application.ViewModel
public string Note { get; set; } = string.Empty;
}
+ public class CancelDoctorCommand
+ {
+ public Guid TrialId { get; set; }
+ public Guid SubjectId { get; set; }
+
+ public string Note { get; set; }
+
+ }
+
+
+ public class SubjectCancelDoctorView
+ {
+ public Guid SubjectId { get; set; }
+
+ public string Note { get; set; }
+
+ public DateTime CreateTime { get; set; }
+ }
+
public class TrialDoctorUserSelectView
{
public Guid TrialId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs
index aea6d2331..efc95ed15 100644
--- a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs
@@ -25,13 +25,16 @@ namespace IRaCIS.Core.Application.Service
private readonly IRepository _trialRepository;
+ private readonly IRepository _subjectCanceDoctorRepository;
- public TaskAllocationRuleService(IRepository taskAllocationRuleRepository, IRepository userRepository, IRepository trialRepository)
+
+ public TaskAllocationRuleService(IRepository taskAllocationRuleRepository, IRepository userRepository, IRepository trialRepository, IRepository subjectCanceDoctorRepository)
{
_taskAllocationRuleRepository = taskAllocationRuleRepository;
_userRepository = userRepository;
_trialRepository = trialRepository;
+ _subjectCanceDoctorRepository = subjectCanceDoctorRepository;
}
@@ -42,7 +45,7 @@ namespace IRaCIS.Core.Application.Service
///
///
///
- public async Task<(List,object?)> GetDoctorPlanAllocationRuleList(Guid trialId)
+ public async Task<(List, object?)> GetDoctorPlanAllocationRuleList(Guid trialId)
{
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
@@ -58,7 +61,7 @@ namespace IRaCIS.Core.Application.Service
public async Task AddOrUpdateTaskAllocationRule(TaskAllocationRuleAddOrEdit addOrEditTaskAllocationRule)
{
-
+
//冗余 存
@@ -87,7 +90,7 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{taskAllocationRuleId:guid}")]
public async Task DeleteTaskAllocationRule(Guid taskAllocationRuleId)
{
- if (await _taskAllocationRuleRepository.Where(t => t.Id == taskAllocationRuleId).AnyAsync(t => t.DoctorUser.VisitTaskList.Where(u=>u.TrialId==t.TrialId).Any()))
+ if (await _taskAllocationRuleRepository.Where(t => t.Id == taskAllocationRuleId).AnyAsync(t => t.DoctorUser.VisitTaskList.Where(u => u.TrialId == t.TrialId).Any()))
{
return ResponseOutput.NotOk("已分配任务给该医生,不允许删除");
}
@@ -99,11 +102,29 @@ namespace IRaCIS.Core.Application.Service
}
+ public async Task AddSubjectCancelDoctorNote(CancelDoctorCommand command)
+ {
+ await _subjectCanceDoctorRepository.InsertOrUpdateAsync(command, true);
+
+ return ResponseOutput.Ok();
+ }
+
+ public async Task> GetSubjectCancelDoctorHistoryList(Guid subjectId)
+ {
+ var list = await _subjectCanceDoctorRepository.Where(t => t.SubjectId == subjectId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+
+ return list;
+ }
+
+
+
+
///
/// 获取访视任务 应用Subject后 医生比率情况
///
///
[HttpPost]
+ [Obsolete]
public async Task> GetSubjectApplyDoctorTaskStatList(ApplySubjectCommand assignConfirmCommand)
{
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == assignConfirmCommand.TrialId && t.IsJudgeDoctor == assignConfirmCommand.IsJudgeDoctor)
@@ -115,6 +136,7 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
+ [Obsolete]
public async Task<(List, object)> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule)
{
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == queryTaskAllocationRule.TrialId /*&& t.IsJudgeDoctor == queryTaskAllocationRule.IsJudgeDoctor*/)
@@ -147,7 +169,7 @@ namespace IRaCIS.Core.Application.Service
UserCode = user.UserCode,
UserName = user.UserName,
UserTypeEnum = user.UserTypeRole.UserTypeEnum,
- ReadingCategoryList=enroll.EnrollReadingCategoryList.Select(t=>t.ReadingCategory).ToList()
+ ReadingCategoryList = enroll.EnrollReadingCategoryList.Select(t => t.ReadingCategory).ToList()
};
@@ -159,7 +181,7 @@ namespace IRaCIS.Core.Application.Service
public async Task> GetDoctorSelectList(DoctorSelectQuery selectQuery, [FromServices] IRepository _enrollRepository)
{
var query = from allocationRule in _taskAllocationRuleRepository.Where(t => t.TrialId == selectQuery.TrialId && t.IsEnable)
- .WhereIf(selectQuery.ReadingCategory!=null,t=>t.Enroll.EnrollReadingCategoryList.Any(t=>t.ReadingCategory==selectQuery.ReadingCategory))
+ .WhereIf(selectQuery.ReadingCategory != null, t => t.Enroll.EnrollReadingCategoryList.Any(t => t.ReadingCategory == selectQuery.ReadingCategory))
join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
select new TrialDoctorUserSelectView()
{
diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
index 716ec965f..f0dd07181 100644
--- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
@@ -121,9 +121,14 @@ namespace IRaCIS.Core.Application.Service
CreateMap().IncludeBase()
.ForMember(o => o.IsReReadingOrBackInfluenceAnalysis, t => t.MapFrom(u => u.Subject.IsReReadingOrBackInfluenceAnalysis));
+
+
+ CreateMap();
+
+ CreateMap();
-
+
CreateMap()
.ForMember(o => o.ReReadingNewTaskCode, t => t.MapFrom(u => u.NewReReadingTask.TaskCode))
diff --git a/IRaCIS.Core.Domain/Visit/Subject.cs b/IRaCIS.Core.Domain/Visit/Subject.cs
index a40876077..ec5fca48c 100644
--- a/IRaCIS.Core.Domain/Visit/Subject.cs
+++ b/IRaCIS.Core.Domain/Visit/Subject.cs
@@ -93,6 +93,8 @@ namespace IRaCIS.Core.Domain.Models
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
+ public List SubjectCanceDoctorList { get; set; }
+
//是否分配了读片医生
//public bool IsAssignDoctorUser{get;set;}
}
diff --git a/IRaCIS.Core.Domain/Visit/SubjectCanceDoctor.cs b/IRaCIS.Core.Domain/Visit/SubjectCanceDoctor.cs
new file mode 100644
index 000000000..68ec2e9c6
--- /dev/null
+++ b/IRaCIS.Core.Domain/Visit/SubjectCanceDoctor.cs
@@ -0,0 +1,31 @@
+
+//--------------------------------------------------------------------
+// 此代码由T4模板自动生成 byzhouhang 20210918
+// 生成时间 2022-07-29 10:43:49
+// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+using System;
+using IRaCIS.Core.Domain.Share;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+namespace IRaCIS.Core.Domain.Models
+{
+ ///
+ ///SubjectCanceDoctor
+ ///
+ [Table("SubjectCanceDoctor")]
+ public class SubjectCanceDoctor : Entity, IAuditAdd
+ {
+
+
+ public Guid CreateUserId { get; set; }
+
+ public DateTime CreateTime { get; set; }
+
+
+ public Guid SubjectId { get; set; }
+
+ public string Note { get; set; }
+
+ }
+
+}
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index f08105442..ab94893d1 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -619,6 +619,9 @@ namespace IRaCIS.Core.Infra.EFCore
public virtual DbSet TaskInfluence { get; set; }
+ public virtual DbSet SubjectCanceDoctor { get; set; }
+
+
}
diff --git a/IRaCIS.Core.Test/DbHelper.ttinclude b/IRaCIS.Core.Test/DbHelper.ttinclude
index 7729b9af3..180a288e3 100644
--- a/IRaCIS.Core.Test/DbHelper.ttinclude
+++ b/IRaCIS.Core.Test/DbHelper.ttinclude
@@ -4,7 +4,7 @@
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
public static readonly string DbDatabase = "IRaCIS_New_Tet";
//ַ,ƴ
- public static readonly string TableName = "TaskInfluence";
+ public static readonly string TableName = "SubjectCanceDoctor";
//ļ service Ƿҳ
}
#>