From 4239c94a04b508ba31c5fd6cdd64e96ed7fdfd95 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Thu, 7 Jul 2022 13:43:05 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E5=AD=A6=E5=AE=A1=E6=A0=B8=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DTO/TaskMedicalReviewViewModel.cs | 27 ++++++-
.../Allocation/TaskConsistentRuleService.cs | 14 ++--
.../Allocation/TaskMedicalReviewService.cs | 74 ++++++++++++++++---
.../Service/Allocation/_MapConfig.cs | 7 ++
IRaCIS.Core.Application/TestService.cs | 46 +++++++-----
.../Allocation/TaskMedicalReview.cs | 3 +
IRaCIS.Core.Domain/Allocation/VisitTask.cs | 2 +-
IRaCIS.Core.Domain/Visit/SubjectVisit.cs | 2 +-
.../Context/IRaCISDBContext.cs | 4 +-
9 files changed, 135 insertions(+), 44 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs
index c4ac98efd..a512508b4 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs
@@ -6,13 +6,14 @@
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.ViewModel
{
/// TaskMedicalReviewView 列表视图模型
- public class TaskMedicalReviewView: VisitTaskViewBasic
+ public class TaskMedicalReviewView : VisitTaskViewBasic
{
-
+
public int AuditState { get; set; }
public DateTime? AuditSignTime { get; set; }
public int DoctorUserIdeaEnum { get; set; }
@@ -33,6 +34,15 @@ namespace IRaCIS.Core.Application.ViewModel
public UserSimpleInfo MedicalManagerUser { get; set; }
}
+ public class GenerateMedicalReviewTaskView : VisitTaskViewBasic
+ {
+
+ public int? GeneratedMedicalReviewCount { get; set; }
+ public UserSimpleInfo DoctorUser { get; set; }
+ }
+
+
+
///TaskMedicalReviewQuery 列表查询参数模型
public class TaskMedicalReviewQuery : PageInput
{
@@ -65,11 +75,22 @@ namespace IRaCIS.Core.Application.ViewModel
+ public class ManuallyGeneratedAndAssignedMedicalReviewCommand
+ {
+ [NotDefault]
+ public Guid TrialId { get; set; }
+ [NotDefault]
+ public Guid MedicalManagerUserId { get; set; }
+
+
+ public List TaskIdList { get; set; }
+ }
+
public class AssignMedicalReviewTaskCommand
{
public List IdList { get; set; }
-
+
public Guid? MedicalManagerUserId { get; set; }
public MedicalReviewTaskOptType TaskOptType { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs
index 6dc87fb84..4df1bad94 100644
--- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs
@@ -198,13 +198,13 @@ namespace IRaCIS.Core.Application.Service
SubjectCode = c.Subject.Code,
TrialSiteCode = c.Subject.TrialSite.TrialSiteCode,
- //RelationDoctorUserList = c.SameVisitTaskList/*Where(t=>t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)*/.Select(c => new UserSimpleInfo()
- //{
- // FullName = c.DoctorUser.FullName,
- // UserCode = c.DoctorUser.UserCode,
- // UserId = c.DoctorUser.Id,
- // UserName = c.DoctorUser.UserName
- //}).ToList(),
+ RelationDoctorUserList = c.SourceSubjectVisit.VisitTaskList/*Where(t=>t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)*/.Select(c => new UserSimpleInfo()
+ {
+ FullName = c.DoctorUser.FullName,
+ UserCode = c.DoctorUser.UserCode,
+ UserId = c.DoctorUser.Id,
+ UserName = c.DoctorUser.UserName
+ }).ToList(),
IsHaveGeneratedTask = c.Subject.SubjectVisitTaskList.Any(t => t.IsAnalysisCreate && t.DoctorUserId == doctorUserId && t.TaskConsistentRuleId == filterObj.Id),
diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs
index 71534ec38..4c9112562 100644
--- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs
@@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Infrastructure;
+using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Application.Service
{
@@ -22,18 +23,19 @@ namespace IRaCIS.Core.Application.Service
private readonly IRepository _taskMedicalReviewRepository;
private readonly IRepository _trialRepository;
private readonly IRepository _trialUserRepository;
-
+ private readonly IRepository _visitTaskRepository;
private readonly IRepository _taskMedicalReviewRuleRepository;
public TaskMedicalReviewService(IRepository taskMedicalReviewRepository,
IRepository trialRepository,
IRepository trialUserRepository,
+ IRepository visitTaskRepository,
IRepository taskMedicalReviewRuleRepository)
{
_taskMedicalReviewRepository = taskMedicalReviewRepository;
this._trialRepository = trialRepository;
_trialUserRepository = trialUserRepository;
-
+ _visitTaskRepository = visitTaskRepository;
_taskMedicalReviewRuleRepository = taskMedicalReviewRuleRepository;
}
@@ -49,7 +51,9 @@ namespace IRaCIS.Core.Application.Service
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId)
.WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)
+ .WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
+ .WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
@@ -62,11 +66,58 @@ namespace IRaCIS.Core.Application.Service
}
+ ///
+ /// 产生医学审核列表
+ ///
+ ///
+ ///
+ public async Task> GetGenerateMedicalReviewTaskList(TaskMedicalReviewQuery inQuery)
+ {
+ var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId)
+ .Where(t => t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned)
+
+ .WhereIf(inQuery.SiteId != null, t => t.Subject.SiteId == inQuery.SiteId)
+ .WhereIf(inQuery.SubjectId != null, t => t.SubjectId == inQuery.SubjectId)
+ .WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent)
+ .WhereIf(inQuery.DoctorUserId != null, t => t.DoctorUserId == inQuery.DoctorUserId)
+ .WhereIf(inQuery.ReadingCategory != null, t => t.ReadingCategory == inQuery.ReadingCategory)
+ .WhereIf(inQuery.ReadingTaskState != null, t => t.ReadingTaskState == inQuery.ReadingTaskState)
+ .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))
+
+ .ProjectTo(_mapper.ConfigurationProvider);
+
+ var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.IsUrgent) + " desc", nameof(TaskMedicalReviewView.SubjectId) };
+ var pageList = await visitTaskQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
+
+
+ return pageList;
+ }
///
- /// 产生医学审核任务
+ /// 手动生成并分配医学审核
+ ///
+ ///
+ ///
+ public async Task ManuallyGeneratedAndAssignedMedicalReview(ManuallyGeneratedAndAssignedMedicalReviewCommand command)
+ {
+
+ foreach (var taskId in command.TaskIdList)
+ {
+ await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { TrialId = command.TrialId, VisitTaskId = taskId, MedicalManagerUserId = command.MedicalManagerUserId });
+ }
+
+ await _taskMedicalReviewRepository.SaveChangesAsync();
+
+ return ResponseOutput.Ok();
+ }
+
+
+ ///
+ /// 产生医学审核
///
///
+ [Obsolete]
public async Task GenerateMedicalReviewTask(GenerateMedicalReviewTaskCommand generateCommand)
{
var trialId = generateCommand.TrialId;
@@ -102,7 +153,7 @@ namespace IRaCIS.Core.Application.Service
foreach (var toGenerateTask in toGenerateTaskList)
{
- await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { DoctorUserId = (Guid)toGenerateTask.DoctorUserId, TrialId = toGenerateTask.TrialId, VisitTaskId = toGenerateTask.TaskId ,MedicalManagerUserId= defalutMIMUserId });
+ await _taskMedicalReviewRepository.AddAsync(new TaskMedicalReview() { DoctorUserId = (Guid)toGenerateTask.DoctorUserId, TrialId = toGenerateTask.TrialId, VisitTaskId = toGenerateTask.TaskId, MedicalManagerUserId = defalutMIMUserId });
}
}
@@ -157,7 +208,7 @@ namespace IRaCIS.Core.Application.Service
if (toGenerateCount > 0)
{
- var toGenerateTaskList = item.ActualVisitTaskList.ExceptBy(item.GeneratedVisitTaskList.Select(t=>t.TaskId),t=>t.TaskId).Take(toGenerateCount).ToList();
+ var toGenerateTaskList = item.ActualVisitTaskList.ExceptBy(item.GeneratedVisitTaskList.Select(t => t.TaskId), t => t.TaskId).Take(toGenerateCount).ToList();
foreach (var toGenerateTask in toGenerateTaskList)
{
@@ -184,7 +235,7 @@ namespace IRaCIS.Core.Application.Service
///
///
[HttpPost]
- public async Task<(PageOutput,object)> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery)
+ public async Task<(PageOutput, object)> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery)
{
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id)
@@ -199,9 +250,10 @@ namespace IRaCIS.Core.Application.Service
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc);
- return (pageList,new {
+ return (pageList, new
+ {
- IsConfirmMedicineQuestion= await _trialRepository.Where(x=>x.Id== inQuery.TrialId).Select(x=>x.IsConfirmMedicineQuestion).FirstOrDefaultAsync()
+ IsConfirmMedicineQuestion = await _trialRepository.Where(x => x.Id == inQuery.TrialId).Select(x => x.IsConfirmMedicineQuestion).FirstOrDefaultAsync()
});
}
@@ -220,9 +272,9 @@ namespace IRaCIS.Core.Application.Service
{
var task = await _taskMedicalReviewRepository.FirstOrDefaultAsync(t => t.Id == id);
- if (command.TaskOptType == MedicalReviewTaskOptType.Assign )
+ if (command.TaskOptType == MedicalReviewTaskOptType.Assign)
{
- if (task.MedicalManagerUserId != null && task.MedicalManagerUserId !=command.MedicalManagerUserId)
+ if (task.MedicalManagerUserId != null && task.MedicalManagerUserId != command.MedicalManagerUserId)
{
throw new BusinessValidationFailedException("当前有任务已分配给其他人,不允许分配,请刷新列表");
}
@@ -244,7 +296,7 @@ namespace IRaCIS.Core.Application.Service
}
}
-
+
await _taskMedicalReviewRepository.SaveChangesAsync();
diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
index bdde62419..f99828cc3 100644
--- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
@@ -153,6 +153,13 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate ? u.BlindSubjectCode : u.Subject.Code));
+ CreateMap()
+ .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
+ .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate ? u.BlindSubjectCode : u.Subject.Code))
+ .ForMember(o => o.GeneratedMedicalReviewCount, t => t.MapFrom(u => u.TaskMedicalReviewList.Count()))
+ ;
+
+
CreateMap()
.ForMember(o => o.UserId, t => t.MapFrom(u => u.Id))
diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs
index 4f1219c94..d1eaef945 100644
--- a/IRaCIS.Core.Application/TestService.cs
+++ b/IRaCIS.Core.Application/TestService.cs
@@ -29,54 +29,60 @@ namespace IRaCIS.Application.Services
//_cache.SetString("test" , "cacheStr");
- //var aa= _trialRepository.Where(t => t.Id == Guid.Empty).First();
+ //var aa= _trialRepository.Where(t => t.Id == Guid.Empty).First();
- //var aaabb = _trialRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result;
+ //var aaabb = _trialRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result;
- //var aaaa = _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result;
+ //var aaaa = _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result;
- //var waitModifyEntity = _dicRepository.FirstOrDefaultAsync(t => t.Id == Guid.Parse("e2b97a6c-35a6-4aa3-7f27-08da13ab33ff")).GetAwaiter().GetResult();
+ //var waitModifyEntity = _dicRepository.FirstOrDefaultAsync(t => t.Id == Guid.Parse("e2b97a6c-35a6-4aa3-7f27-08da13ab33ff")).GetAwaiter().GetResult();
- //var tt = _dicRepository.UpdateAsync(waitModifyEntity, t => new Dictionary() { Description = "xxxxx" }, true).Result;
+ //var tt = _dicRepository.UpdateAsync(waitModifyEntity, t => new Dictionary() { Description = "xxxxx" }, true).Result;
- //var tt2 = _trialRepository.UpdatePartialFromQueryAsync(Guid.Parse("543d0000-3e10-0016-77e9-08da2827228a"), t => new Trial() { Indication = "WCH测试稽查002" }, true).Result;
+ //var tt2 = _trialRepository.UpdatePartialFromQueryAsync(Guid.Parse("543d0000-3e10-0016-77e9-08da2827228a"), t => new Trial() { Indication = "WCH测试稽查002" }, true).Result;
- //var d = _repository.Where(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
- //var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
- //CultureInfo culture = CultureInfo.CurrentUICulture;
+ //var d = _repository.Where(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
+ //var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
+ //CultureInfo culture = CultureInfo.CurrentUICulture;
- //var dd = _dicRepository.UpdatePartialFields(Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
- // u => new Dictionary() { ParentId = null, Code = "test" }, true);
+ //var dd = _dicRepository.UpdatePartialFields(Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
+ // u => new Dictionary() { ParentId = null, Code = "test" }, true);
- //var ggggg = _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"), u=>new Dictionary(){Code = "test"}).Result;
+ //var ggggg = _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"), u=>new Dictionary(){Code = "test"}).Result;
- //var ddd = _dicRepository.BatchUpdateAsync(t => t.Id == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
- // u => new Dictionary() { /*ParentId = null,*/ Code = "test" }).Result;
+ //var ddd = _dicRepository.BatchUpdateAsync(t => t.Id == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
+ // u => new Dictionary() { /*ParentId = null,*/ Code = "test" }).Result;
- //var aaaaa= _trialRepository.BatchUpdateAsync(t => t.Id == Guid.Empty,
- // u => new SubjectVisit() { CurrentActionUserId = null }).Result;
+ //var aaaaa= _trialRepository.BatchUpdateAsync(t => t.Id == Guid.Empty,
+ // u => new SubjectVisit() { CurrentActionUserId = null }).Result;
- //var d = _dicRepository.UpdateFromDTOAsync(new AddOrEditBasicDic() { Id = Guid.Parse("60d86683-c33b-4349-b672-08da1e91b622"), ParentId = null, ChildGroup = null, Code = null }, true, true).Result;
- var a = 123;
+ //var d = _dicRepository.UpdateFromDTOAsync(new AddOrEditBasicDic() { Id = Guid.Parse("60d86683-c33b-4349-b672-08da1e91b622"), ParentId = null, ChildGroup = null, Code = null }, true, true).Result;
+ var a = 123;
var b = _localizer["test{0}", "测试"];
//return _localizer["test{0}", "测试"];
- return _userInfo.LocalIp;
+
+ var list = _repository.Where(t => t.Id == Guid.NewGuid()).SelectMany(t => t.VisitTaskList).ToList();
+
+ var list2 = _repository.Where(t => t.Id == Guid.NewGuid()).Select(t => t.SourceSubjectVisit).ToList();
+
+ var list3 = _repository.Where(t => t.Id == Guid.NewGuid()).SelectMany(t => t.SourceSubjectVisit.VisitTaskList).ToList();
+ return _userInfo.LocalIp;
}
- public string PostData(List testModelList)
+ public string PostData(List testModelList)
{
return string.Join(",", testModelList);
}
diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs
index bd2d813b1..f6883879d 100644
--- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs
+++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs
@@ -80,6 +80,9 @@ namespace IRaCIS.Core.Domain.Models
public Guid TrialId { get; set; }
+ ///
+ /// 冗余 废弃
+ ///
public Guid DoctorUserId { get; set; }
diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
index 018d42f53..10bb58933 100644
--- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs
+++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
@@ -101,7 +101,7 @@ namespace IRaCIS.Core.Domain.Models
//对于裁判项而言,触发裁判的列表
public List JudgeVisitList { get; set; }
-
+ public List TaskMedicalReviewList { get; set; }
//裁判任务的Id
diff --git a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs
index 37d2ac764..1e7ae54de 100644
--- a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs
+++ b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs
@@ -208,7 +208,7 @@ namespace IRaCIS.Core.Domain.Models
public List QCChallengeDialogList { get; set; } = new List();
-
+ public List VisitTaskList { get; set; } = new List();
public ReadingStatusEnum ReadingStatus { get; set; }
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index 726f641c6..8faa5fe3e 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -97,10 +97,12 @@ namespace IRaCIS.Core.Infra.EFCore
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.VisitTaskList).WithOne(t => t.SourceSubjectVisit).HasForeignKey(t=>t.SourceSubjectVisitId).HasPrincipalKey(t=>t.Id);
//modelBuilder.Entity().HasMany(t => t.AnalysisVisitTaskList).WithOne().HasForeignKey(t => t.TaskConsistentRuleId).HasPrincipalKey(u => u.SourceSubjectVisitId);
-
+ modelBuilder.Entity().HasMany(t => t.TaskMedicalReviewList).WithOne(t=>t.VisitTask).HasForeignKey(t => t.VisitTaskId);
+
modelBuilder.Entity().HasMany(t => t.ChildList).WithOne(t => t.Parent);
modelBuilder.Entity().HasMany(t => t.EarlierSubjectUserList).WithOne(t => t.OrignalSubjectUser);