Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
commit
7d9f4864d0
|
@ -67,11 +67,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<IResponseOutput> DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
|
||||
{
|
||||
|
||||
if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any()))
|
||||
{
|
||||
//"已产生医学审核任务"
|
||||
return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]);
|
||||
}
|
||||
//if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any()))
|
||||
//{
|
||||
// //"已产生医学审核任务"
|
||||
// return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]);
|
||||
//}
|
||||
|
||||
var success = await _taskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId,true);
|
||||
|
||||
|
|
|
@ -257,27 +257,27 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
CreateMap<TaskMedicalReviewRule, TaskMedicalReviewRuleView>()
|
||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
|
||||
.ForMember(o => o.ActualVisitTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
//CreateMap<TaskMedicalReviewRule, TaskMedicalReviewRuleView>()
|
||||
// .ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
|
||||
// .ForMember(o => o.ActualVisitTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
||||
// && t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.ActualJudgeTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.ActualJudgeTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.ActualGlobalTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.ActualGlobalTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.ActualTumorTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.ActualTumorTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedGlobalTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Global && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.GeneratedGlobalTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Global && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedJudgeTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Judge && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.GeneratedJudgeTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Judge && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedTumorTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Oncology && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.GeneratedTumorTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Oncology && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedVisitTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Visit && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })));
|
||||
// .ForMember(o => o.GeneratedVisitTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Visit && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })));
|
||||
|
||||
CreateMap<TaskMedicalReviewRuleAddOrEdit, TaskMedicalReviewRule>();
|
||||
|
||||
|
|
|
@ -1005,7 +1005,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
var query = _taskMedicalReviewRepository
|
||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.DoctorUserId == _userInfo.Id)
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.Id)
|
||||
.GroupBy(t => new
|
||||
{
|
||||
t.TrialId,
|
||||
|
@ -1395,7 +1395,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
|
||||
IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.DoctorUserId == _userInfo.Id)
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.Id)
|
||||
.GroupBy(t => new { t.TrialId, t.VisitTask.TrialReadingCriterionId} )
|
||||
.Where(g=>g.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.MIM && u.AuditState == MedicalReviewAuditState.Auditing).Count()>0).CountAsync() : 0,
|
||||
|
||||
|
|
|
@ -90,10 +90,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 冗余 废弃
|
||||
/// </summary>
|
||||
public Guid DoctorUserId { get; set; }
|
||||
//public Guid DoctorUserId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; }
|
||||
//[JsonIgnore]
|
||||
//public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -41,12 +41,14 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public int PlanGlobalCount { get; set; }
|
||||
|
||||
public int PlanTumorCount { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User DoctorUser { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<VisitTask> DoctorTrialVisitTaskList { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<TaskMedicalReview> TaskMedicalReviewList { get; set; }
|
||||
|
||||
//[JsonIgnore]
|
||||
//public List<VisitTask> DoctorTrialVisitTaskList { get; set; }
|
||||
//[JsonIgnore]
|
||||
//public List<TaskMedicalReview> TaskMedicalReviewList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -134,8 +134,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
//public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; }
|
||||
//[JsonIgnore]
|
||||
//public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; }
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -70,9 +70,9 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
modelBuilder.Entity<User>().HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId).IsRequired(false);
|
||||
|
||||
|
||||
modelBuilder.Entity<TaskMedicalReviewRule>().HasMany(t => t.DoctorTrialVisitTaskList).WithOne(t => t.DoctorTaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
|
||||
//modelBuilder.Entity<TaskMedicalReviewRule>().HasMany(t => t.DoctorTrialVisitTaskList).WithOne(t => t.DoctorTaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
|
||||
|
||||
modelBuilder.Entity<TaskMedicalReviewRule>().HasMany(t => t.TaskMedicalReviewList).WithOne(t => t.TaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
|
||||
//modelBuilder.Entity<TaskMedicalReviewRule>().HasMany(t => t.TaskMedicalReviewList).WithOne(t => t.TaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
|
||||
|
||||
//会导致级联删除
|
||||
//modelBuilder.Entity<SubjectUser>().HasMany(t => t.SubjectArmVisitTaskList).WithOne(t => t.SujectArm).HasForeignKey(t => new { t.SubjectId, t.ArmEnum }).HasPrincipalKey(u => new { u.SubjectId, u.ArmEnum })
|
||||
|
|
Loading…
Reference in New Issue