修改影响列表

Uat_Study
hang 2022-07-25 13:47:45 +08:00
parent 23e20a208b
commit 72a070086d
13 changed files with 206 additions and 91 deletions

View File

@ -4,10 +4,10 @@
"Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" "Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"
}, },
"JwtSetting": { "JwtSetting": {
"SecurityKey": "3e6dbfa227234a03977a2f421bdb7f4f", // "SecurityKey": "3e6dbfa227234a03977a2f421bdb7f4f", // <EFBFBD><EFBFBD>Կ
"Issuer": "IRaCIS", // "Issuer": "IRaCIS", // <EFBFBD><EFBFBD><EFBFBD>
"Audience": "ZhiZhun", // "Audience": "ZhiZhun", // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
"TokenExpireDays": "7" // 7day "TokenExpireDays": "7" // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>7day<EFBFBD><EFBFBD>
}, },
"IpRateLimiting": { "IpRateLimiting": {
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each "EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
@ -80,7 +80,7 @@
"DefaultPassword": "123456" "DefaultPassword": "123456"
} }
//访 dicom ... ip //<EFBFBD><EFBFBD>վ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD>Ϊ<EFBFBD>˷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> dicom <EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>... ʵ<EFBFBD><EFBFBD>ֲ<EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD>ӷ<EFBFBD><EFBFBD>أ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>ǰip<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>

View File

@ -205,19 +205,7 @@ namespace IRaCIS.Core.Application.ViewModel
public ReReadingOrBackOptType OptType { get; set; } public ReReadingOrBackOptType OptType { get; set; }
} }
public enum ReReadingOrBackOptType
{
//取消分配
CancelAssign=0,
//失效
Abandon=1,
//重阅重置
Return=2,
}
public class VisitTaskSimpleView public class VisitTaskSimpleView
{ {
public Guid Id { get; set; } public Guid Id { get; set; }

View File

@ -240,6 +240,8 @@ namespace IRaCIS.Core.Application.ViewModel
public string? TaskCode { get; set; } public string? TaskCode { get; set; }
public String? TrialSiteCode { get; set; }
public ReReadingApplyState? ReReadingApplyState { get; set; } public ReReadingApplyState? ReReadingApplyState { get; set; }

View File

@ -688,6 +688,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory) .WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode) || t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
@ -724,6 +726,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode) || t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
@ -763,6 +767,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory) .WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
.WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState)
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode) || t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
@ -803,6 +808,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
.WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState)
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => t.OriginalReReadingTask.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode) || t.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.OriginalReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.OriginalReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate)
@ -841,6 +847,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
.WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState)
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => t.OriginalReReadingTask.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode) || t.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.NewReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.NewReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate)
@ -872,6 +879,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId) .WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
.WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState) .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState)
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => t.OriginalReReadingTask.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode) || t.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.NewReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.NewReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate)
@ -1046,6 +1054,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory) .WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState) .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState) .WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode) || t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
@ -1296,8 +1305,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
#region 影响的任务 #region 影响的任务
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).First();
foreach (var influenceTask in influenceTaskList) foreach (var influenceTask in influenceTaskList)
{ {
//处理申请的任务 //处理申请的任务
@ -1305,18 +1318,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
{ {
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
influenceTaskList.ForEach(t => //influenceTaskList.ForEach(t =>
{ //{
//记录实际影像的任务 // //记录实际影像的任务
// influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
//});
influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
});
//将医学审核设置为失效 //将医学审核设置为失效
var taskIdList = influenceTaskList.Select(t => t.Id).ToList(); var taskIdList = influenceTaskList.Select(t => t.Id).ToList();
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.VisitTaskId) && t.AuditState == MedicalReviewAuditState.WaitAudit, u => new TaskMedicalReview() { IsInvalid = false });
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.VisitTaskId) && t.AuditState != MedicalReviewAuditState.HaveSigned, u => new TaskMedicalReview() { IsInvalid = false });
} }
//申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配 //申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
@ -1325,10 +1337,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
influenceTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading) else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
else else
{ {
@ -1336,6 +1351,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
influenceTask.AllocateTime = null; influenceTask.AllocateTime = null;
influenceTask.SuggesteFinishedTime = null; influenceTask.SuggesteFinishedTime = null;
influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate; influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.CancelAssign });
} }
} }
//当前访视 //当前访视
@ -1344,10 +1361,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
influenceTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
} }
@ -1411,6 +1432,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).First();
foreach (var influenceTask in influenceTaskList) foreach (var influenceTask in influenceTaskList)
{ {
//处理申请的任务 //处理申请的任务
@ -1418,22 +1441,28 @@ namespace IRaCIS.Core.Application.Service.Allocation
{ {
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
influenceTaskList.ForEach(t => //influenceTaskList.ForEach(t =>
{ //{
//记录实际影像的任务 // //记录实际影像的任务
influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id }); // influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
}); //});
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
influenceTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
} }
} }
@ -1504,6 +1533,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).First();
foreach (var influenceTask in influenceTaskList) foreach (var influenceTask in influenceTaskList)
{ {
@ -1512,12 +1543,18 @@ namespace IRaCIS.Core.Application.Service.Allocation
{ {
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
influenceTaskList.ForEach(t => //influenceTaskList.ForEach(t =>
{ //{
//记录实际影像的任务 // //记录实际影像的任务
influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id }); // 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.WaitAudit, u => new TaskMedicalReview() { IsInvalid = false });
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
//处理其他任务 //处理其他任务
else else
@ -1525,10 +1562,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
influenceTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
@ -1594,6 +1635,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync(); var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).First();
foreach (var influenceTask in influenceTaskList) foreach (var influenceTask in influenceTaskList)
{ {
//申请原任务处理 //申请原任务处理
@ -1601,23 +1644,28 @@ namespace IRaCIS.Core.Application.Service.Allocation
{ {
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand); ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
influenceTaskList.ForEach(t => //influenceTaskList.ForEach(t =>
{ //{
//记录实际影像的任务 // //记录实际影像的任务
influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id }); // influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
}); //});
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
influenceTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
trakingOrigenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
} }
@ -1874,18 +1922,21 @@ namespace IRaCIS.Core.Application.Service.Allocation
#region 方式二 #region 方式二
var origenalTask = influenceTaskList.Where(t => t.Id == task.Id).First();
foreach (var influenceTask in influenceTaskList) foreach (var influenceTask in influenceTaskList)
{ {
//同意的访视
if (influenceTask.Id == task.Id) ////同意的访视 因为要记录具体的操作,所以废弃
{ //if (influenceTask.Id == task.Id)
influenceTaskList.ForEach(t => //{
{ // influenceTaskList.ForEach(t =>
//记录实际影像的任务 // {
// //记录实际影像的任务
influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id }); // influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
}); // });
} //}
//申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配 //申请的访视 要不是重阅重置,要不就是失效 不会存在取消分配
if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != task.VisitTaskNum) if (influenceTask.ReadingCategory == ReadingCategory.Visit && influenceTask.VisitTaskNum != task.VisitTaskNum)
@ -1894,10 +1945,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
influenceTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id,OptType=ReReadingOrBackOptType.Return });
} }
else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading) else if (influenceTask.ReadingTaskState == ReadingTaskState.Reading)
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
else else
{ {
@ -1905,6 +1959,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
influenceTask.AllocateTime = null; influenceTask.AllocateTime = null;
influenceTask.SuggesteFinishedTime = null; influenceTask.SuggesteFinishedTime = null;
influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate; influenceTask.TaskAllocationState = TaskAllocationState.NotAllocate;
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.CancelAssign });
} }
} }
else else
@ -1914,10 +1970,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
influenceTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
influenceTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
} }
@ -1956,28 +2014,34 @@ namespace IRaCIS.Core.Application.Service.Allocation
var currentVisitList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == task.SourceSubjectVisitId && t.ReadingCategory == ReadingCategory.Visit && t.TaskState == TaskState.Effect && t.VisitTaskNum == task.VisitTaskNum, true).ToListAsync(); var currentVisitList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == task.SourceSubjectVisitId && t.ReadingCategory == ReadingCategory.Visit && t.TaskState == TaskState.Effect && t.VisitTaskNum == task.VisitTaskNum, true).ToListAsync();
foreach (var visitTask in currentVisitList) var origenalTask = currentVisitList.Where(t => t.Id == task.Id).First();
foreach (var influenceTask in currentVisitList)
{ {
if (visitTask.ReadingTaskState == ReadingTaskState.HaveSigned) if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{ {
//另外阅片人完成阅片了 就设置为重阅重置 //另外阅片人完成阅片了 就设置为重阅重置
visitTask.TaskState = TaskState.HaveReturned; influenceTask.TaskState = TaskState.HaveReturned;
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Return });
} }
else else
{ {
visitTask.TaskState = TaskState.Adbandon; influenceTask.TaskState = TaskState.Adbandon;
origenalTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = influenceTask.Id, OptType = ReReadingOrBackOptType.Abandon });
} }
//同意的访视 ////同意的访视
if (visitTask.Id == task.Id) //if (influenceTask.Id == task.Id)
{ //{
currentVisitList.ForEach(t => // currentVisitList.ForEach(t =>
{ // {
//记录实际影像的任务 // //记录实际影像的任务
visitTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id }); // influenceTask.TaskInfluenceList.Add(new TaskInfluence() { InfluenceTaskId = t.Id });
}); // });
} //}
} }
} }
@ -2365,7 +2429,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns> /// <returns></returns>
public async Task<List<InfluenceTaskInfo>> GetInfluencedTaskList(Guid taskId) public async Task<List<InfluenceTaskInfo>> GetInfluencedTaskList(Guid taskId)
{ {
var list = await _repository.Where<TaskInfluence>(t => t.OriginalTaskId == taskId).Select(t => t.InfluenceTask).ProjectTo<InfluenceTaskInfo>(_mapper.ConfigurationProvider).ToListAsync(); var list = await _repository.Where<TaskInfluence>(t => t.OriginalTaskId == taskId)/*.Select(t => t.InfluenceTask)*/.ProjectTo<InfluenceTaskInfo>(_mapper.ConfigurationProvider).ToListAsync();
return list; return list;
} }

View File

@ -71,8 +71,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap<TaskAllocationRule, AssignDoctorStatView>().IncludeBase<TaskAllocationRule, TaskAllocationRuleDTO>() CreateMap<TaskAllocationRule, AssignDoctorStatView>().IncludeBase<TaskAllocationRule, TaskAllocationRuleDTO>()
.ForMember(o => o.AssignedSubjectCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Select(t=>t.SubjectId).Distinct().Count())) .ForMember(o => o.AssignedSubjectCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Select(t=>t.SubjectId).Distinct().Count()))
.ForMember(o => o.WaitDealAllTaskCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Where(t=>t.ReadingTaskState!=ReadingTaskState.HaveSigned && t.TaskState==TaskState.Effect).Count())) .ForMember(o => o.WaitDealTrialTaskCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Where(t=>t.ReadingTaskState!=ReadingTaskState.HaveSigned && t.TaskState==TaskState.Effect).Count()))
.ForMember(o => o.WaitDealTrialTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect).Count())); .ForMember(o => o.WaitDealAllTaskCount, t => t.MapFrom(u => u.DoctorUser.VisitTaskList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect).Count()));
@ -244,8 +244,17 @@ namespace IRaCIS.Core.Application.Service
CreateMap<VisitTask, InfluenceTaskInfo>() CreateMap<VisitTask, InfluenceTaskInfo>()
//.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser)) //.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)); .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
.ForMember(o => o.OptType, t => t.Ignore());
CreateMap<TaskInfluence, InfluenceTaskInfo>().IncludeMembers(c => c.InfluenceTask)
.ForMember(o => o.OptType, t => t.MapFrom(u => u.OptType))
.ForMember(o => o.Id, t => t.MapFrom(u => u.InfluenceTask.Id));
} }
} }

View File

@ -49,6 +49,14 @@ namespace IRaCIS.Core.Application.Contracts
public bool IsHaveSiteSurveyRecord { get; set; } public bool IsHaveSiteSurveyRecord { get; set; }
} }
public class TrialSiteSimpleSelect
{
public string TrialSiteCode { get; set; } = string.Empty;
}
public class LoginReturnDTO public class LoginReturnDTO
{ {
public TrialSurveyInitInfo TrialInfo { get; set; } = new TrialSurveyInitInfo(); public TrialSurveyInitInfo TrialInfo { get; set; } = new TrialSurveyInitInfo();

View File

@ -328,6 +328,20 @@ namespace IRaCIS.Core.Application.Services
} }
public async Task<IEnumerable<string>> GetTrialSiteCodeSelect(Guid trialId,bool isIncludeVirtualSite)
{
//CRC只看到他负责的
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id))
.Select(t=> t.TrialSiteCode).ToListAsync();
var virtualList = await _repository.Where<VisitTask>(t => t.IsSelfAnalysis==true).Select(t => t.BlindTrialSiteCode).Distinct().ToListAsync();
return isIncludeVirtualSite? list.Concat(virtualList): list;
}
/// <summary>删除 项目 下某一site </summary> /// <summary>删除 项目 下某一site </summary>
[HttpDelete("{id:guid}/{trialId:guid}")] [HttpDelete("{id:guid}/{trialId:guid}")]
[TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrialSite)] [TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrialSite)]

View File

@ -19,7 +19,7 @@ namespace IRaCIS.Application.Services
//_cache = cache; //_cache = cache;
} }
public async Task<string> Get() public async Task<string> Get()
{ {
//var subject1 = Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391693"); //var subject1 = Guid.Parse("431D0C58-ABC5-4166-B9BC-08DA0E391693");
@ -45,7 +45,11 @@ namespace IRaCIS.Application.Services
// Console.WriteLine(await BNRFactory.Default.Create($"[CN:{item}][redis:city/0000000]")); // Console.WriteLine(await BNRFactory.Default.Create($"[CN:{item}][redis:city/0000000]"));
//} //}
var needAddVisitList = await _repository.Where<VisitTask>(t => t.TrialId == Guid.Empty).DistinctBy(t => t.VisitTaskNum).ToListAsync(); //var needAddVisitList = await _repository.Where<VisitTask>(t => t.TrialId == Guid.Empty).DistinctBy(t => t.VisitTaskNum).ToListAsync();
await _repository.BatchUpdateAsync<TaskInfluence>(t => t.InfluenceTask.TaskState == Core.Domain.Share.TaskState.HaveReturned, u => new TaskInfluence() { OptType = ReReadingOrBackOptType.Return });
await _repository.BatchUpdateAsync<TaskInfluence>(t => t.InfluenceTask.TaskState == Core.Domain.Share.TaskState.Adbandon, u => new TaskInfluence() { OptType = ReReadingOrBackOptType.Abandon });
return _userInfo.LocalIp; return _userInfo.LocalIp;
} }

View File

@ -9,30 +9,50 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models namespace IRaCIS.Core.Domain.Models
{ {
///<summary> ///<summary>
///TaskInfluence ///TaskInfluence
///</summary> ///</summary>
[Table("TaskInfluence")] [Table("TaskInfluence")]
public class TaskInfluence : Entity, IAuditAdd public class TaskInfluence : Entity, IAuditAdd
{ {
public Guid CreateUserId { get; set; }
public DateTime CreateTime { get; set; } public Guid CreateUserId { get; set; }
public Guid OriginalTaskId { get; set; }
public VisitTask OriginalTask { get; set; }
public VisitTask InfluenceTask { get; set; }
public Guid InfluenceTaskId { get; set; } public DateTime CreateTime { get; set; }
}
}
public Guid OriginalTaskId { get; set; }
public VisitTask OriginalTask { get; set; }
public VisitTask InfluenceTask { get; set; }
public Guid InfluenceTaskId { get; set; }
//对影响任务进行的操作
public ReReadingOrBackOptType OptType { get; set; }
}
public enum ReReadingOrBackOptType
{
//取消分配
CancelAssign = 0,
//失效
Abandon = 1,
//重阅重置
Return = 2,
}
}

View File

@ -16,6 +16,7 @@ namespace IRaCIS.Core.Domain.Models
public List<TrialExperienceCriteria> TrialExperienceCriteriaList { get; set; } public List<TrialExperienceCriteria> TrialExperienceCriteriaList { get; set; }
// UserDoctor表关联 一个医生 可被多个用户管理 // UserDoctor表关联 一个医生 可被多个用户管理
public List<UserDoctor> UserList { get; set; } public List<UserDoctor> UserList { get; set; }

View File

@ -19,6 +19,8 @@ namespace IRaCIS.Core.Domain.Models
public List<UserRole> UserRoleList { get; set; } = new List<UserRole>(); public List<UserRole> UserRoleList { get; set; } = new List<UserRole>();
public List<TrialUser> UserTrials { get; set; } = new List<TrialUser>(); public List<TrialUser> UserTrials { get; set; } = new List<TrialUser>();
public List<VisitTask> VisitTaskList { get; set; }
[StringLength(255)] [StringLength(255)]
public string UserName { get; set; } = String.Empty; public string UserName { get; set; } = String.Empty;

View File

@ -71,6 +71,8 @@ namespace IRaCIS.Core.Domain.Models
public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; } public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; }
} }

View File

@ -90,8 +90,9 @@ namespace IRaCIS.Core.Infra.EFCore
modelBuilder.Entity<User>().HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId);
modelBuilder.Entity<Enroll>().HasMany(t => t.DoctorTrialVisitTaskList).WithOne(t => t.Enroll).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId }); modelBuilder.Entity<VisitTask>().HasOne(t => t.Enroll).WithMany(t => t.DoctorTrialVisitTaskList).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
//modelBuilder.Entity<TaskAllocationRule>().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskAllocationRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId }); //modelBuilder.Entity<TaskAllocationRule>().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskAllocationRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });