diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index b1ed4629e..351e54999 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -79,6 +79,12 @@
+
+
+ 获取医学经理列表
+
+
+
医学审核生成规则
@@ -1123,6 +1129,16 @@
获取访视列表
+
+
+ 是否是访视
+
+
+
+
+ 是否是基线
+
+
项目ID
@@ -4706,20 +4722,6 @@
-
-
- 验证系统问题是否设置裁片答案
-
-
-
-
-
-
- 验证项目问题是否设置裁片答案
-
-
-
-
设置系统问题标准是否完成配置
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs
index 8948c7cc9..9dbae91ad 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs
@@ -7,6 +7,7 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
+using Newtonsoft.Json;
namespace IRaCIS.Core.Application.ViewModel
{
@@ -20,6 +21,43 @@ namespace IRaCIS.Core.Application.ViewModel
public UserSimpleInfo DoctorUser { get; set; }
+
+
+ [JsonIgnore]
+ public List ActualVisitTaskIdList { get; set; }
+ [JsonIgnore]
+ public List ActualJudgeTaskIdList { get; set; }
+ [JsonIgnore]
+ public List ActualGlobalTaskIdList { get; set; }
+ [JsonIgnore]
+ public List ActualTumorTaskIdList { get; set; }
+
+
+
+
+ [JsonIgnore]
+ public List GeneratedVisitTaskIdList { get; set; }
+ [JsonIgnore]
+ public List GeneratedJudgeTaskIdList { get; set; }
+ [JsonIgnore]
+ public List GeneratedGlobalTaskIdList { get; set; }
+ [JsonIgnore]
+ public List GeneratedTumorTaskIdList { get; set; }
+
+
+ public int GeneratedVisitCount => GeneratedVisitTaskIdList.Count;
+ public int GeneratedJudgeCount => GeneratedJudgeTaskIdList.Count;
+ public int GeneratedGlobalCount => GeneratedGlobalTaskIdList.Count;
+ public int GeneratedTumorCount => GeneratedTumorTaskIdList.Count;
+
+
+
+
+ public int ActualVisitCount => ActualVisitTaskIdList.Count;
+ public int ActualJudgeCount => ActualJudgeTaskIdList.Count;
+ public int ActualGlobalCount => ActualGlobalTaskIdList.Count;
+ public int ActualTumorCount => ActualTumorTaskIdList.Count;
+
}
///TaskTaskMedicalReviewRuleQuery 列表查询参数模型
diff --git a/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs
index 11a544392..e8063f134 100644
--- a/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs
@@ -14,7 +14,7 @@ namespace IRaCIS.Core.Application.Interfaces
{
- Task> GetTaskMedicalReviewRuleList(TaskMedicalReviewRuleQuery queryTaskTaskMedicalReviewRule);
+ //Task> GetTaskMedicalReviewRuleList(TaskMedicalReviewRuleQuery queryTaskTaskMedicalReviewRule);
Task AddOrUpdateTaskMedicalReviewRule(TaskMedicalReviewRuleAddOrEdit addOrEditTaskTaskMedicalReviewRule);
diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs
index 7568aec40..26720db3d 100644
--- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs
@@ -20,9 +20,19 @@ namespace IRaCIS.Core.Application.Service
private readonly IRepository _taskMedicalReviewRepository;
- public TaskMedicalReviewService(IRepository taskMedicalReviewRepository)
+ private readonly IRepository _trialUserRepository;
+
+ private readonly IRepository _taskMedicalReviewRuleRepository;
+
+ public TaskMedicalReviewService(IRepository taskMedicalReviewRepository,IRepository trialUserRepository, IRepository taskMedicalReviewRuleRepository)
{
_taskMedicalReviewRepository = taskMedicalReviewRepository;
+
+ _trialUserRepository = trialUserRepository;
+
+ _taskMedicalReviewRuleRepository = taskMedicalReviewRuleRepository;
+
+
}
///
@@ -52,8 +62,6 @@ namespace IRaCIS.Core.Application.Service
-
-
///
/// MIM 医学审核
///
@@ -108,5 +116,16 @@ namespace IRaCIS.Core.Application.Service
}
+ ///
+ /// 获取医学经理列表
+ ///
+ ///
+ public async Task> GetMIMUserList()
+ {
+ var query = _trialUserRepository.Where(t => t.User.UserTypeEnum == Domain.Share.UserTypeEnum.MIM).Select(t => t.User).ProjectTo(_mapper.ConfigurationProvider);
+
+ return await query.ToListAsync();
+ }
+
}
}
diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs
index 797c50d55..3c013881a 100644
--- a/IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs
@@ -17,23 +17,25 @@ namespace IRaCIS.Core.Application.Service
public class TaskMedicalReviewRuleService : BaseService, ITaskMedicalReviewRuleService
{
- private readonly IRepository _taskTaskMedicalReviewRuleRepository;
+ private readonly IRepository _taskMedicalReviewRuleRepository;
- public TaskMedicalReviewRuleService(IRepository taskTaskMedicalReviewRuleRepository)
+ public TaskMedicalReviewRuleService(IRepository taskMedicalReviewRuleRepository)
{
- _taskTaskMedicalReviewRuleRepository = taskTaskMedicalReviewRuleRepository;
+ _taskMedicalReviewRuleRepository = taskMedicalReviewRuleRepository;
}
[HttpPost]
- public async Task> GetTaskMedicalReviewRuleList(TaskMedicalReviewRuleQuery inQuery)
+ public async Task<(List,object)> GetTaskMedicalReviewRuleList(TaskMedicalReviewRuleQuery inQuery)
{
- var taskTaskMedicalReviewRuleQueryable = _taskTaskMedicalReviewRuleRepository.Where(t => t.TrialId == inQuery.TrialId)
+ var taskTaskMedicalReviewRuleQueryable = _taskMedicalReviewRuleRepository.Where(t => t.TrialId == inQuery.TrialId)
.ProjectTo(_mapper.ConfigurationProvider);
- return await taskTaskMedicalReviewRuleQueryable.ToListAsync();
+ var isHaveMIM = await _repository.AnyAsync(t => t.User.UserTypeEnum == Domain.Share.UserTypeEnum.MIM);
+
+ return (await taskTaskMedicalReviewRuleQueryable.ToListAsync(),new {IsHaveMIM=isHaveMIM});
}
[HttpPost]
@@ -45,7 +47,7 @@ namespace IRaCIS.Core.Application.Service
VerifyMsg = "已有该医生配置,不允许继续增加"
};
- var entity = await _taskTaskMedicalReviewRuleRepository.InsertOrUpdateAsync(addOrEditTaskTaskMedicalReviewRule, true, verifyExp1);
+ var entity = await _taskMedicalReviewRuleRepository.InsertOrUpdateAsync(addOrEditTaskTaskMedicalReviewRule, true, verifyExp1);
return ResponseOutput.Ok(entity.Id.ToString());
@@ -55,7 +57,7 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{taskMedicalReviewRuleId:guid}")]
public async Task DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
{
- var success = await _taskTaskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId);
+ var success = await _taskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId);
return ResponseOutput.Ok();
}
diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
index a6d1d8120..63dd4738b 100644
--- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
@@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
.ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName));
- List subjectIdList=new List ();
+ List subjectIdList = new List();
bool isJudgeDoctor = false;
@@ -34,8 +34,8 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.SelfApplyedTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId == u.DoctorUserId)))
.ForMember(o => o.ApplyedTotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId != null)))
- .ForMember(o => o.SelfApplyedSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId != null)).Count()))
- .ForMember(o => o.SelfSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId ).Count()))
+ .ForMember(o => o.SelfApplyedSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId != null)).Count()))
+ .ForMember(o => o.SelfSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId).Count()))
.ForMember(o => o.ApplyedTotalSubjectCount, t => t.MapFrom(u => u.Trial.SubjectList.Count(c => c.SubjectVisitTaskList.Any(d => d.DoctorUserId != null))))
@@ -43,7 +43,7 @@ namespace IRaCIS.Core.Application.Service
//该医生未应用Subject 数量
.ForMember(o => o.WaitApplySelfSubjectCount, t => t.MapFrom(u =>
- subjectIdList.Count == 0 ? u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Where(t=> isJudgeDoctor? t.ArmEnum==Arm.JudgeArm:t.ArmEnum!= Arm.JudgeArm).Any(c => c.DoctorUserId == null)).Count()
+ subjectIdList.Count == 0 ? u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Where(t => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Any(c => c.DoctorUserId == null)).Count()
: u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && subjectIdList.Contains(t.SubjectId) && t.SubjectArmVisitTaskList.Where(t => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Any(c => c.DoctorUserId == null)).Count()
))
@@ -53,19 +53,19 @@ namespace IRaCIS.Core.Application.Service
: u.Trial.SubjectList.Where(t => subjectIdList.Contains(t.Id) && t.SubjectVisitTaskList.Where(t => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Any(c => c.DoctorUserId == null)).Count()
))
- .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 => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.DoctorUserId == null)).Count()
+ .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 => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).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 => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.DoctorUserId == null)).Count()
))
.ForMember(o => o.WaitApplyTotalTaskCount, t => t.MapFrom(u =>
subjectIdList.Count == 0 ? u.Trial.VisitTaskList.Where(t => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.DoctorUserId == null).Count()
- : u.Trial.VisitTaskList.Where(t => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.DoctorUserId == null && subjectIdList.Contains(t.SubjectId)).Count() ))
+ : u.Trial.VisitTaskList.Where(t => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.DoctorUserId == null && subjectIdList.Contains(t.SubjectId)).Count()))
+
+
+
-
-
-
;
@@ -73,7 +73,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap();
-
+
CreateMap()
.ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId))
@@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
.ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName));
- CreateMap().IncludeMembers(t=>t.NewReReadingTask)
+ CreateMap().IncludeMembers(t => t.NewReReadingTask)
.ForMember(o => o.ReReadingOriginalTaskCode, t => t.MapFrom(u => u.OriginalReReadingTask.TaskCode))
.ForMember(o => o.Id, t => t.MapFrom(u => u.Id))
@@ -144,7 +144,7 @@ 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.IsJudge, t => t.MapFrom(u => isJudgeDoctor))
- .ForMember(o => o.IsAssignedDoctorUser, t => t.MapFrom(u => u.SubjectDoctorList.Where(t=>isJudgeDoctor? t.ArmEnum == Arm.JudgeArm: t.ArmEnum != Arm.JudgeArm).Any()))
+ .ForMember(o => o.IsAssignedDoctorUser, t => t.MapFrom(u => u.SubjectDoctorList.Where(t => isJudgeDoctor ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Any()))
.ForMember(o => o.TotalDoctorUserList, t => t.MapFrom(u => u.SubjectDoctorList.Where(t => isJudgeDoctor ? true : t.ArmEnum != Arm.JudgeArm).OrderBy(t => t.ArmEnum)));
@@ -178,12 +178,25 @@ namespace IRaCIS.Core.Application.Service
- CreateMap();
+ CreateMap()
+ .ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
+ .ForMember(o => o.ActualVisitTaskIdList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Visit && t.TaskState == TaskState.Effect && t.ReadingTaskState==ReadingTaskState.HaveSigned).OrderBy(t=>t.SignTime).Select(t=>t.Id)))
+ .ForMember(o => o.ActualJudgeTaskIdList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.TaskState == TaskState.Effect &&
+ t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => t.Id)))
+ .ForMember(o => o.ActualGlobalTaskIdList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.TaskState == TaskState.Effect &&
+ t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => t.Id)))
+ .ForMember(o => o.ActualTumorTaskIdList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology && t.TaskState == TaskState.Effect &&
+ t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => t.Id)))
+
+ .ForMember(o => o.GeneratedGlobalTaskIdList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Global && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t=>t.VisitTaskId)))
+ .ForMember(o => o.GeneratedJudgeTaskIdList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Judge && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => t.VisitTaskId)))
+ .ForMember(o => o.GeneratedTumorTaskIdList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Oncology && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => t.VisitTaskId)))
+ .ForMember(o => o.GeneratedVisitTaskIdList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Visit && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => t.VisitTaskId)));
CreateMap();
-
+
}
}
diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs
index bfa6b6145..8e9088350 100644
--- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs
+++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs
@@ -80,7 +80,15 @@ namespace IRaCIS.Core.Domain.Models
[ForeignKey("VisitTaskId")]
public VisitTask VisitTask { get; set; }
+ public Guid TrialId { get; set; }
- }
+ public Guid DoctorUserId { get; set; }
+
+
+ public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; }
+
+
+
+ }
}
diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs
index 057a5e3ee..5dd76f410 100644
--- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs
+++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs
@@ -7,6 +7,8 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using System.Collections.Generic;
+
namespace IRaCIS.Core.Domain.Models
{
///
@@ -83,13 +85,21 @@ namespace IRaCIS.Core.Domain.Models
///
[Required]
public int PlanGlobalCount { get; set; }
-
+
///
- /// PlanTumorCount
- ///
+ /// PlanTumorCount
+ /// DoctorVisitTaskList { get; set; }
+
+ public List TaskMedicalReviewList { get; set; }
+
+ }
}
diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
index 689ef8e85..f445a0f30 100644
--- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs
+++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
@@ -146,6 +146,8 @@ namespace IRaCIS.Core.Domain.Models
public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
+ public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; }
+
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index 0e89c3aa6..61efb57fe 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -90,6 +90,10 @@ namespace IRaCIS.Core.Infra.EFCore
modelBuilder.Entity().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskAllocationRule).HasForeignKey(t=> new { t.DoctorUserId,t.TrialId } ).HasPrincipalKey(u=> new { u.DoctorUserId,u.TrialId });
+ modelBuilder.Entity().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
+
+ modelBuilder.Entity().HasMany(t => t.TaskMedicalReviewList).WithOne(t => t.TaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
+
modelBuilder.Entity().HasMany(t => t.SubjectArmVisitTaskList).WithOne(t=>t.SujectArm).HasForeignKey(t => new { t.SubjectId,t.ArmEnum}).HasPrincipalKey(u => new { u.SubjectId,u.ArmEnum });
modelBuilder.Entity().HasMany(t => t.JudgeVisitList).WithOne(t=>t.JudgeVisitTask);
modelBuilder.Entity().HasMany(t => t.ChildList).WithOne(t => t.Parent);