定时任务
parent
3ddbd59995
commit
38fc05e0d9
|
@ -26,11 +26,14 @@ namespace IRaCIS.Core.API
|
||||||
);
|
);
|
||||||
q.AddTrigger(t => t
|
q.AddTrigger(t => t
|
||||||
.WithIdentity("TrialStatusTrigger")
|
.WithIdentity("TrialStatusTrigger")
|
||||||
.ForJob(jobKey)
|
.ForJob(jobKey)
|
||||||
|
|
||||||
.WithCronSchedule("0 0 * * * ?")
|
.WithCronSchedule("0 0 * * * ?")
|
||||||
.WithDescription("My regular trial work trigger")
|
.WithDescription("My regular trial work trigger")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ASP.NET Core hosting
|
// ASP.NET Core hosting
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using EasyCaching.Core;
|
||||||
|
using IRaCIS.Core.Domain;
|
||||||
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Quartz;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
|
||||||
|
namespace IRaCIS.Application.Services.BackGroundJob
|
||||||
|
{
|
||||||
|
|
||||||
|
public class CancelTaskQuartZJob : IJob
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
|
private readonly ILogger<CancelTaskQuartZJob> _logger;
|
||||||
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
|
||||||
|
public CancelTaskQuartZJob(IRepository<Subject> subjectRepository, IEasyCachingProvider provider, ILogger<CancelTaskQuartZJob> logger, IRepository<VisitTask> visitTaskRepository)
|
||||||
|
{
|
||||||
|
_subjectRepository = subjectRepository;
|
||||||
|
_logger = logger;
|
||||||
|
_visitTaskRepository = visitTaskRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task Execute(IJobExecutionContext context)
|
||||||
|
|
||||||
|
{
|
||||||
|
_logger.LogInformation($"开始执行QuartZ定时取消任务作业");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JobDataMap dataMap = context.JobDetail.JobDataMap;
|
||||||
|
|
||||||
|
bool isInOrder = (bool)dataMap.Get("IsInOrder");
|
||||||
|
|
||||||
|
if (isInOrder)
|
||||||
|
{
|
||||||
|
Guid id = (Guid)dataMap.Get("SubjectId");
|
||||||
|
|
||||||
|
await _subjectRepository.UpdatePartialFromQueryAsync(t => t.Id ==id, u => new Subject() { ClaimUserId = null }, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Guid id = (Guid)dataMap.Get("VisitTaskId");
|
||||||
|
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == id, u => new VisitTask() { ClaimUserId = null }, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
_logger.LogError($"QuartZ定时取消任务异常" + e.Message);
|
||||||
|
}
|
||||||
|
_logger.LogInformation("QuartZ定时取消任务作业结束");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -259,6 +259,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public Guid? ClaimUserId { get;set; }
|
||||||
|
|
||||||
|
|
||||||
public bool IsUrgent => UnReadTaskList.Any(t => t.IsUrgent);
|
public bool IsUrgent => UnReadTaskList.Any(t => t.IsUrgent);
|
||||||
|
|
||||||
public int UnReadTaskCount { get; set; }
|
public int UnReadTaskCount { get; set; }
|
||||||
|
@ -417,15 +420,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int FinishTaskCount { get; set; }
|
public int FinishTaskCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 未完成裁判任务数量
|
///// 未完成裁判任务数量
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public int UnReadJudgeTaskCount { get; set; }
|
//public int UnReadJudgeTaskCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 完成裁判任务数量
|
///// 完成裁判任务数量
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public int FinishJudgeTaskCount { get; set; }
|
//public int FinishJudgeTaskCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 建议完成时间
|
/// 建议完成时间
|
||||||
|
@ -798,6 +801,17 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
CancelAssign = 4,
|
CancelAssign = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ClaimSubjectDto
|
||||||
|
{
|
||||||
|
public bool IsInOrder { get; set; }
|
||||||
|
|
||||||
|
public Guid? VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public Guid SubejctId { get; set; }
|
||||||
|
|
||||||
|
public bool IsClaim { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ using System.Linq;
|
||||||
using DocumentFormat.OpenXml.Bibliography;
|
using DocumentFormat.OpenXml.Bibliography;
|
||||||
using Org.BouncyCastle.Crypto;
|
using Org.BouncyCastle.Crypto;
|
||||||
using IRaCIS.Core.Domain.Share.Reading;
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
using Quartz;
|
||||||
|
using IRaCIS.Application.Services.BackGroundJob;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.Allocation
|
namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
|
@ -749,7 +751,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
||||||
.WhereIf(queryVisitTask.PIAuditState != null, t => t.PIAuditState == queryVisitTask.PIAuditState)
|
.WhereIf(queryVisitTask.PIAuditState != null, t => t.PIAuditState == queryVisitTask.PIAuditState)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.CompleteClinicalDataEnum == CompleteClinicalDataEnum.Complete, t => t.IsClinicalDataSign && t.IsNeedClinicalDataSign == true)
|
.WhereIf(queryVisitTask.CompleteClinicalDataEnum == CompleteClinicalDataEnum.Complete, t => t.IsClinicalDataSign && t.IsNeedClinicalDataSign == true)
|
||||||
.WhereIf(queryVisitTask.CompleteClinicalDataEnum == CompleteClinicalDataEnum.NotComplete, t => t.IsClinicalDataSign == false && t.IsNeedClinicalDataSign == true)
|
.WhereIf(queryVisitTask.CompleteClinicalDataEnum == CompleteClinicalDataEnum.NotComplete, t => t.IsClinicalDataSign == false && t.IsNeedClinicalDataSign == true)
|
||||||
.WhereIf(queryVisitTask.CompleteClinicalDataEnum == CompleteClinicalDataEnum.NA, t => t.IsNeedClinicalDataSign == false)
|
.WhereIf(queryVisitTask.CompleteClinicalDataEnum == CompleteClinicalDataEnum.NA, t => t.IsNeedClinicalDataSign == false)
|
||||||
|
@ -914,10 +916,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
var trialReadingCriterionId = iRUnReadSubjectQuery.TrialReadingCriterionId;
|
var trialReadingCriterionId = iRUnReadSubjectQuery.TrialReadingCriterionId;
|
||||||
|
|
||||||
var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == iRUnReadSubjectQuery.TrialReadingCriterionId).FirstNotNullAsync();
|
var critrion = await _trialReadingCriterionRepository.Where(x => x.Id == iRUnReadSubjectQuery.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
var readingTool = criterionConfig.ReadingTool;
|
var readingTool = critrion.ReadingTool;
|
||||||
var isReadingTaskViewInOrder = criterionConfig.IsReadingTaskViewInOrder;
|
var isReadingTaskViewInOrder = critrion.IsReadingTaskViewInOrder;
|
||||||
|
|
||||||
#region 按照Subject 维度
|
#region 按照Subject 维度
|
||||||
if (isReadingTaskViewInOrder)
|
if (isReadingTaskViewInOrder)
|
||||||
|
@ -961,87 +963,61 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
RandomReadInfo = new IRUnReadOutDto(),
|
RandomReadInfo = new IRUnReadOutDto(),
|
||||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
||||||
ReadingTool = readingTool,
|
ReadingTool = readingTool,
|
||||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
IseCRFShowInDicomReading = critrion.IseCRFShowInDicomReading,
|
||||||
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
IsReadingShowSubjectInfo = critrion.IsReadingShowSubjectInfo,
|
||||||
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
IsReadingShowPreviousResults = critrion.IsReadingShowPreviousResults,
|
||||||
DigitPlaces = criterionConfig.DigitPlaces,
|
DigitPlaces = critrion.DigitPlaces,
|
||||||
CriterionType = criterionConfig.CriterionType,
|
CriterionType = critrion.CriterionType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
|
|
||||||
// .Where(x=>x.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == x.SouceReadModuleId || c.ReadingId == x.SourceSubjectVisitId)))
|
var readingDivisionEnum = critrion.ReadingDivisionEnum;
|
||||||
.Where(x => !x.Subject.IsDeleted).Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign);
|
|
||||||
|
var piReadingScopenEnum = critrion.PIReadingScopenEnum;
|
||||||
|
|
||||||
|
var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId /*&& x.DoctorUserId == _userInfo.Id*/ && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
|
||||||
|
|
||||||
|
.Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign)
|
||||||
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR, t => t.Subject.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||||
|
// 仅仅SR阅片 PI 没有任务列表
|
||||||
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.OnlySR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI, t => t.TrialId == Guid.Empty)
|
||||||
|
|
||||||
|
|
||||||
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline,
|
||||||
|
t => t.SourceSubjectVisit.IsBaseLine == true)
|
||||||
|
|
||||||
|
//PI 阅片所有
|
||||||
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI && piReadingScopenEnum == PIReadingScopenEnum.AllBaselineandVisit,
|
||||||
|
t => true)
|
||||||
|
|
||||||
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI && piReadingScopenEnum == PIReadingScopenEnum.AllVisit,
|
||||||
|
t => t.SourceSubjectVisit.IsBaseLine == false)
|
||||||
|
|
||||||
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline,
|
||||||
|
t => t.SourceSubjectVisit.IsBaseLine == false)
|
||||||
|
|
||||||
|
//SR 不阅片
|
||||||
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaselineandVisit,
|
||||||
|
t => t.TrialId == Guid.Empty)
|
||||||
|
|
||||||
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllVisit,
|
||||||
|
t => t.SourceSubjectVisit.IsBaseLine == true);
|
||||||
|
|
||||||
IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto()
|
IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto()
|
||||||
{
|
{
|
||||||
FinishJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
|
||||||
FinishTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
FinishTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
||||||
SuggesteFinishedTime = await taskQuery.Where(x => x.ReadingTaskState != ReadingTaskState.HaveSigned).MaxAsync(x => x.SuggesteFinishedTime),
|
SuggesteFinishedTime = await taskQuery.Where(x => x.ReadingTaskState != ReadingTaskState.HaveSigned).MaxAsync(x => x.SuggesteFinishedTime),
|
||||||
UnReadJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
|
||||||
|
|
||||||
UnReadTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
UnReadTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var visitGroupQuery = taskQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
|
||||||
{
|
|
||||||
SubjectId = x.Key.SubjectId,
|
|
||||||
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
|
|
||||||
|
|
||||||
SuggesteFinishedTime = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Min(x => x.SuggesteFinishedTime),
|
|
||||||
|
|
||||||
//未读任务量
|
|
||||||
UnReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Count(),
|
|
||||||
|
|
||||||
//未读 里可读任务量
|
|
||||||
UnReadCanReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned && y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)
|
|
||||||
//不能对包含聚合或子查询的表达式执行聚合函数
|
|
||||||
//&& !x.Any(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.IsNeedClinicalDataSign == true && t.IsClinicalDataSign == false && t.VisitTaskNum<y.VisitTaskNum )
|
|
||||||
).Count(),
|
|
||||||
|
|
||||||
|
|
||||||
//已读任务量
|
|
||||||
HaveReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
|
||||||
|
|
||||||
ExistReadingApply = x.Any(y => (y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed && y.TrialReadingCriterionId == trialReadingCriterionId) || y.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed),
|
|
||||||
|
|
||||||
//查出所有未读的 未读的可读的 在这个列表基础上 过滤下 y.IsFrontTaskNeedSignButNotSign==false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true) 这样容易排错 确认这三个字段是否维护有误
|
|
||||||
UnReadTaskList = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).OrderBy(x => x.VisitTaskNum)
|
|
||||||
.Select(u => new IRUnreadTaskView()
|
|
||||||
{
|
|
||||||
Id = u.Id,
|
|
||||||
IsUrgent = u.IsUrgent,
|
|
||||||
VisitNum = u.VisitTaskNum,
|
|
||||||
TaskBlindName = u.TaskBlindName,
|
|
||||||
VisistId = u.SourceSubjectVisitId,
|
|
||||||
SuggesteFinishedTime = u.SuggesteFinishedTime,
|
|
||||||
ReadingCategory = u.ReadingCategory,
|
|
||||||
IsAnalysisCreate = u.IsAnalysisCreate,
|
|
||||||
ArmEnum = u.ArmEnum,
|
|
||||||
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
|
||||||
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
|
||||||
IsClinicalDataSign = u.IsClinicalDataSign,
|
|
||||||
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
|
||||||
})
|
|
||||||
.ToList(),
|
|
||||||
}).Where(x => x.UnReadCanReadTaskCount > 0);
|
|
||||||
|
|
||||||
|
|
||||||
var totalCount = await visitGroupQuery.CountAsync();
|
|
||||||
var currentPageData = await visitTaskQuery.ToListAsync();
|
|
||||||
|
|
||||||
var result = new PageOutput<IRUnReadSubjectView>()
|
var result = new PageOutput<IRUnReadSubjectView>()
|
||||||
{
|
{
|
||||||
PageSize = iRUnReadSubjectQuery.PageSize,
|
PageSize = iRUnReadSubjectQuery.PageSize,
|
||||||
PageIndex = iRUnReadSubjectQuery.PageIndex,
|
PageIndex = iRUnReadSubjectQuery.PageIndex,
|
||||||
TotalCount = totalCount,
|
|
||||||
CurrentPageData = currentPageData,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (result, new
|
return (result, new
|
||||||
|
@ -1049,11 +1025,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
||||||
RandomReadInfo = iRUnReadOut,
|
RandomReadInfo = iRUnReadOut,
|
||||||
ReadingTool = readingTool,
|
ReadingTool = readingTool,
|
||||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
IseCRFShowInDicomReading = critrion.IseCRFShowInDicomReading,
|
||||||
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
IsReadingShowSubjectInfo = critrion.IsReadingShowSubjectInfo,
|
||||||
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
IsReadingShowPreviousResults = critrion.IsReadingShowPreviousResults,
|
||||||
DigitPlaces = criterionConfig.DigitPlaces,
|
DigitPlaces = critrion.DigitPlaces,
|
||||||
CriterionType = criterionConfig.CriterionType,
|
CriterionType = critrion.CriterionType,
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1081,20 +1057,20 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
var readingDivisionEnum = critrion.ReadingDivisionEnum;
|
var readingDivisionEnum = critrion.ReadingDivisionEnum;
|
||||||
|
|
||||||
var piReadingScopenEnum= critrion.PIReadingScopenEnum;
|
var piReadingScopenEnum = critrion.PIReadingScopenEnum;
|
||||||
|
|
||||||
var visitQuery = _visitTaskRepository
|
var visitQuery = _visitTaskRepository
|
||||||
.Where(x => x.TrialId == inDto.TrialId && x.TaskState == TaskState.Effect)
|
.Where(x => x.TrialId == inDto.TrialId && x.TaskState == TaskState.Effect)
|
||||||
|
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR, t => t.Subject.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR, t => t.Subject.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||||
// 仅仅SR阅片 PI 没有任务列表
|
// 仅仅SR阅片 PI 没有任务列表
|
||||||
.WhereIf( readingDivisionEnum== ReadingDivisionEnum.OnlySR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI , t=>t.TrialId==Guid.Empty)
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.OnlySR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI, t => t.TrialId == Guid.Empty)
|
||||||
|
|
||||||
|
|
||||||
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI && piReadingScopenEnum== PIReadingScopenEnum.AllBaseline,
|
|
||||||
t => t.SourceSubjectVisit.IsBaseLine ==true)
|
|
||||||
|
|
||||||
//PI 阅片所有
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline,
|
||||||
|
t => t.SourceSubjectVisit.IsBaseLine == true)
|
||||||
|
|
||||||
|
//PI 阅片所有
|
||||||
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI && piReadingScopenEnum == PIReadingScopenEnum.AllBaselineandVisit,
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI && piReadingScopenEnum == PIReadingScopenEnum.AllBaselineandVisit,
|
||||||
t => true)
|
t => true)
|
||||||
|
|
||||||
|
@ -1104,27 +1080,28 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline,
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline,
|
||||||
t => t.SourceSubjectVisit.IsBaseLine == false)
|
t => t.SourceSubjectVisit.IsBaseLine == false)
|
||||||
|
|
||||||
//SR 不阅片
|
//SR 不阅片
|
||||||
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaselineandVisit,
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaselineandVisit,
|
||||||
t => t.TrialId == Guid.Empty)
|
t => t.TrialId == Guid.Empty)
|
||||||
|
|
||||||
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllVisit,
|
.WhereIf(readingDivisionEnum == ReadingDivisionEnum.PIandSR && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllVisit,
|
||||||
t => t.SourceSubjectVisit.IsBaseLine == true)
|
t => t.SourceSubjectVisit.IsBaseLine == true)
|
||||||
|
|
||||||
//前序 不存在 未生成任务的访视
|
//前序 不存在 未生成任务的访视
|
||||||
.WhereIf(critrion.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) )
|
.WhereIf(critrion.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum))
|
||||||
|
|
||||||
// 前序 不存在 未一致性核查未通过的
|
// 前序 不存在 未一致性核查未通过的
|
||||||
.Where( t=>! t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||||
.WhereIf(!string.IsNullOrEmpty(inDto.SubjectCode), t => (t.Subject.Code.Contains(inDto.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inDto.SubjectCode) && t.IsAnalysisCreate));
|
.WhereIf(!string.IsNullOrEmpty(inDto.SubjectCode), t => (t.Subject.Code.Contains(inDto.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inDto.SubjectCode) && t.IsAnalysisCreate));
|
||||||
|
|
||||||
|
|
||||||
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode, x.Subject.ClaimUserId });
|
||||||
|
|
||||||
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
||||||
{
|
{
|
||||||
SubjectId = x.Key.SubjectId,
|
SubjectId = x.Key.SubjectId,
|
||||||
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
|
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
|
||||||
|
ClaimUserId = x.Key.ClaimUserId,
|
||||||
|
|
||||||
SuggesteFinishedTime = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Min(x => x.SuggesteFinishedTime),
|
SuggesteFinishedTime = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Min(x => x.SuggesteFinishedTime),
|
||||||
|
|
||||||
|
@ -1438,7 +1415,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
//添加申请记录
|
//添加申请记录
|
||||||
var visitTaskReReading = await _visitTaskReReadingRepository.AddAsync(new VisitTaskReReading()
|
var visitTaskReReading = await _visitTaskReReadingRepository.AddAsync(new VisitTaskReReading()
|
||||||
{
|
{
|
||||||
TrialId=applyReReadingCommand.TrialId,
|
TrialId = applyReReadingCommand.TrialId,
|
||||||
RootReReadingTaskId = rootReReadingTaskId == Guid.Empty ? task.Id : rootReReadingTaskId,
|
RootReReadingTaskId = rootReReadingTaskId == Guid.Empty ? task.Id : rootReReadingTaskId,
|
||||||
OriginalReReadingTaskId = task.Id,
|
OriginalReReadingTaskId = task.Id,
|
||||||
RequestReReadingTime = DateTime.Now,
|
RequestReReadingTime = DateTime.Now,
|
||||||
|
@ -1572,7 +1549,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
//1.1 有附加评估,会影响其他标准的任务
|
//1.1 有附加评估,会影响其他标准的任务
|
||||||
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
|
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
|
||||||
{
|
{
|
||||||
// PM申请 SPM / CPM审批
|
// PM申请 SPM / CPM审批
|
||||||
if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM))
|
if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM))
|
||||||
{
|
{
|
||||||
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||||
|
@ -2278,7 +2255,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated;
|
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated;
|
||||||
|
|
||||||
|
|
||||||
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
|
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
|
||||||
{
|
{
|
||||||
//影像退回,必定影响两个标准的任务
|
//影像退回,必定影响两个标准的任务
|
||||||
|
@ -2635,10 +2612,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
|
|
||||||
// 1.1 基线任务影响BM任务
|
// 1.1 基线任务影响BM任务
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t=>t.Id==filterObj.SourceSubjectVisitId && t.IsBaseLine==true))
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t => t.Id == filterObj.SourceSubjectVisitId && t.IsBaseLine == true))
|
||||||
{
|
{
|
||||||
|
|
||||||
isIR1Point1AdditionalAssessmentBaseline=true;
|
isIR1Point1AdditionalAssessmentBaseline = true;
|
||||||
//filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
//filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||||
|
|
||||||
|
|
||||||
|
@ -2654,7 +2631,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2677,10 +2654,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||||
{
|
{
|
||||||
|
|
||||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||||
|
|
||||||
//有序
|
//有序
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (filterObj.ReadingCategory)
|
switch (filterObj.ReadingCategory)
|
||||||
|
@ -2704,7 +2681,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
)) || t.Id == filterObj.Id)
|
)) || t.Id == filterObj.Id)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
// IR 申请1.1 基线重阅,影响附加评估所有的任务
|
// IR 申请1.1 基线重阅,影响附加评估所有的任务
|
||||||
else if (isIR1Point1AdditionalAssessmentBaseline)
|
else if (isIR1Point1AdditionalAssessmentBaseline)
|
||||||
{
|
{
|
||||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
||||||
|
@ -2713,7 +2690,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
// 裁判 肿瘤学是另外的医生做
|
// 裁判 肿瘤学是另外的医生做
|
||||||
|| t.ReadingCategory == ReadingCategory.Judge
|
|| t.ReadingCategory == ReadingCategory.Judge
|
||||||
|| t.ReadingCategory == ReadingCategory.Oncology
|
|| t.ReadingCategory == ReadingCategory.Oncology
|
||||||
)&& t.TrialReadingCriterionId==filterObj.TrialReadingCriterionId )||( t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB))
|
) && t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId) || (t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3060,229 +3037,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region 暂时废弃
|
|
||||||
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 自动一次性分配所有未分配的 Subject 给医生 暂时废弃
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="autoSubjectAssignCommand"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpPost]
|
|
||||||
//[UnitOfWork]
|
|
||||||
//[Obsolete]
|
|
||||||
//public async Task<IResponseOutput> AutoSubjectAssignDoctor(AutoSubjectAssignCommand autoSubjectAssignCommand)
|
|
||||||
//{
|
|
||||||
// //自动分配的话,需要把手动分配的给删掉
|
|
||||||
|
|
||||||
|
|
||||||
// var trialId = autoSubjectAssignCommand.TrialId;
|
|
||||||
// var isJudge = autoSubjectAssignCommand.IsJudgeDoctor;
|
|
||||||
|
|
||||||
|
|
||||||
// //获取项目配置 判断应该分配几个医生
|
|
||||||
// var trialConfig = (await _trialRepository.Where(t => t.Id == trialId).Select(t => new { TrialId = t.Id/*, t.ReadingType*/, t.IsFollowVisitAutoAssign, t.IsFollowGlobalVisitAutoAssign, t.FollowGlobalVisitAutoAssignDefaultState, t.TaskAllocateObjEnum }).FirstOrDefaultAsync()).IfNullThrowException();
|
|
||||||
|
|
||||||
|
|
||||||
// //获取 已产生任务的Subject 目前分配情况
|
|
||||||
// var subjectList = _subjectRepository.Where(t => t.TrialId == trialId)
|
|
||||||
// .WhereIf(isJudge == false, t => t.SubjectVisitTaskList.Where(t => t.ArmEnum != Arm.JudgeArm).Any())
|
|
||||||
// .WhereIf(isJudge, t => t.SubjectVisitTaskList.Where(t => t.ArmEnum == Arm.JudgeArm).Any())
|
|
||||||
// ////过滤掉 那些回退的subject
|
|
||||||
// //.Where(t => !t.SubjectVisitList.Any(t => t.IsPMBackOrReReading))
|
|
||||||
// .Select(t => new
|
|
||||||
// {
|
|
||||||
// SubjectId = t.Id,
|
|
||||||
|
|
||||||
// //给Subject分配医生的时候, 未确认绑定关系的
|
|
||||||
// DoctorUserList = t.SubjectDoctorList.Where(t => isJudge ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.OrignalSubjectUserId == null).Select(t => new { t.DoctorUserId, t.ArmEnum }),
|
|
||||||
// //IsApplyed = t.SubjectDoctorList.Where(t => isJudge ? t.ArmEnum == Arm.JudgeArm : t.ArmEnum != Arm.JudgeArm).Where(t => t.OrignalSubjectUserId == null).SelectMany(t => t.SubjectArmVisitTaskList).Any(c => c.DoctorUserId != null)
|
|
||||||
// IsApplyed = false
|
|
||||||
// }).ToList();
|
|
||||||
|
|
||||||
// //已产生任务的Subject数量(裁判情况下,就是产生裁判任务Subject 的数量)
|
|
||||||
// var subjectCount = subjectList.Count;
|
|
||||||
|
|
||||||
// //获取医生列表(裁判是裁判的医生列表)
|
|
||||||
// var waitAllocationDoctorList = _taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable)
|
|
||||||
// .Where(t => t.IsJudgeDoctor == isJudge)
|
|
||||||
// .Select(t => new AutoAssignResultDTO() { DoctorUserId = t.DoctorUserId, PlanReadingRatio = t.PlanReadingRatio, SubjectCount = subjectCount })
|
|
||||||
// .ToList();
|
|
||||||
|
|
||||||
// if (waitAllocationDoctorList.Count == 0)
|
|
||||||
// {
|
|
||||||
// throw new BusinessValidationFailedException("启用的医生数量为0");
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// //已分配的 医生的情况
|
|
||||||
// var haveAssignedSubjectDoctorList = subjectList.Clone().SelectMany(t => t.DoctorUserList.Select(c => new { t.SubjectId, c.DoctorUserId, c.ArmEnum })).ToList();
|
|
||||||
|
|
||||||
// //将目前已分配的情况 换到医生的维度
|
|
||||||
// foreach (var waitAllocationDoctor in waitAllocationDoctorList)
|
|
||||||
// {
|
|
||||||
// waitAllocationDoctor.SubjectArmList = haveAssignedSubjectDoctorList.Where(t => t.DoctorUserId == waitAllocationDoctor.DoctorUserId)
|
|
||||||
// .Select(g => new SubjectArm()
|
|
||||||
// {
|
|
||||||
// SubjectId = g.SubjectId,
|
|
||||||
// ArmEnum = g.ArmEnum
|
|
||||||
// }).ToList();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// #region 完全按照Subject 遍历去分
|
|
||||||
|
|
||||||
|
|
||||||
// //仅仅分配未应用的 而且 没有分配医生的
|
|
||||||
// foreach (var subject in subjectList.Where(t => t.IsApplyed == false && !t.DoctorUserList.Any()))
|
|
||||||
// {
|
|
||||||
// //该Subject 已经分配的医生数量
|
|
||||||
// var hasAssignDoctorCount = subject.DoctorUserList.Count();
|
|
||||||
|
|
||||||
// if (isJudge)
|
|
||||||
// {
|
|
||||||
// if (hasAssignDoctorCount > 1)
|
|
||||||
// {
|
|
||||||
// throw new BusinessValidationFailedException("当前有Subject裁判绑定医生数量大于1");
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// var allocateDoctor = waitAllocationDoctorList.OrderByDescending(t => t.Weight).ThenByDescending(t => t.PlanReadingRatio).FirstOrDefault();
|
|
||||||
|
|
||||||
// //将分配结果记录
|
|
||||||
// waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctor.DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
|
||||||
// {
|
|
||||||
// SubjectId = subject.SubjectId,
|
|
||||||
// ArmEnum = Arm.JudgeArm
|
|
||||||
// });
|
|
||||||
|
|
||||||
// await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctor.DoctorUserId, ArmEnum = Arm.JudgeArm, AssignTime = DateTime.Now });
|
|
||||||
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
|
|
||||||
// //分配两个医生
|
|
||||||
// if (trialConfig.ReadingType == ReadingMethod.Double)
|
|
||||||
// {
|
|
||||||
|
|
||||||
|
|
||||||
// if (hasAssignDoctorCount > 2)
|
|
||||||
// {
|
|
||||||
// throw new BusinessValidationFailedException("双重阅片当前有Subject绑定医生数量大于2");
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// var allocateDoctorList = waitAllocationDoctorList.OrderByDescending(t => t.Weight).ThenByDescending(t => t.PlanReadingRatio).Take(2).ToList();
|
|
||||||
|
|
||||||
|
|
||||||
// #region 看阅片人之前在Subject哪个组做的多
|
|
||||||
|
|
||||||
// var preferredDoctor1Arm = waitAllocationDoctorList.Where(t => t.DoctorUserId == allocateDoctorList[0].DoctorUserId)
|
|
||||||
// .SelectMany(t => t.SubjectArmList).GroupBy(t => t.ArmEnum)
|
|
||||||
// .Select(g => new { ArmEnum = g.Key, SubjectCount = g.Count() })
|
|
||||||
// .OrderByDescending(t => t.SubjectCount).FirstOrDefault()?.ArmEnum;
|
|
||||||
|
|
||||||
// var preferredDoctor2Arm = waitAllocationDoctorList.Where(t => t.DoctorUserId == allocateDoctorList[1].DoctorUserId)
|
|
||||||
// .SelectMany(t => t.SubjectArmList).GroupBy(t => t.ArmEnum)
|
|
||||||
// .Select(g => new { ArmEnum = g.Key, SubjectCount = g.Count() })
|
|
||||||
// .OrderByDescending(t => t.SubjectCount).FirstOrDefault()?.ArmEnum;
|
|
||||||
|
|
||||||
// //存放医生分配的Arm
|
|
||||||
// var doctor1Arm = Arm.DoubleReadingArm1;
|
|
||||||
// var doctor2Arm = Arm.DoubleReadingArm2;
|
|
||||||
|
|
||||||
// if (preferredDoctor1Arm == null && preferredDoctor2Arm == null ||
|
|
||||||
// preferredDoctor1Arm == null && preferredDoctor2Arm == Arm.DoubleReadingArm2 ||
|
|
||||||
// preferredDoctor1Arm == Arm.DoubleReadingArm1 && preferredDoctor2Arm == null ||
|
|
||||||
// preferredDoctor1Arm == Arm.DoubleReadingArm1 && preferredDoctor2Arm == Arm.DoubleReadingArm2
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// doctor1Arm = Arm.DoubleReadingArm1;
|
|
||||||
// doctor2Arm = Arm.DoubleReadingArm2;
|
|
||||||
// }
|
|
||||||
// else if (preferredDoctor1Arm == null && preferredDoctor2Arm == Arm.DoubleReadingArm1 ||
|
|
||||||
// preferredDoctor1Arm == Arm.DoubleReadingArm2 && preferredDoctor2Arm == Arm.DoubleReadingArm1 ||
|
|
||||||
// preferredDoctor1Arm == Arm.DoubleReadingArm2 && preferredDoctor2Arm == null)
|
|
||||||
// {
|
|
||||||
// doctor1Arm = Arm.DoubleReadingArm2;
|
|
||||||
// doctor2Arm = Arm.DoubleReadingArm1;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// else if (preferredDoctor1Arm == Arm.DoubleReadingArm1 && preferredDoctor2Arm == Arm.DoubleReadingArm1)
|
|
||||||
// {
|
|
||||||
// doctor1Arm = Arm.DoubleReadingArm1;
|
|
||||||
// doctor2Arm = Arm.DoubleReadingArm2;
|
|
||||||
// }
|
|
||||||
// else if (preferredDoctor1Arm == Arm.DoubleReadingArm2 && preferredDoctor2Arm == Arm.DoubleReadingArm2)
|
|
||||||
// {
|
|
||||||
// doctor1Arm = Arm.DoubleReadingArm2;
|
|
||||||
// doctor2Arm = Arm.DoubleReadingArm1;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// #endregion
|
|
||||||
|
|
||||||
|
|
||||||
// await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctorList[0].DoctorUserId, ArmEnum = doctor1Arm, AssignTime = DateTime.Now });
|
|
||||||
|
|
||||||
|
|
||||||
// //将分配结果记录
|
|
||||||
// waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctorList[0].DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
|
||||||
// {
|
|
||||||
// SubjectId = subject.SubjectId,
|
|
||||||
// ArmEnum = doctor1Arm
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
// await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctorList[1].DoctorUserId, ArmEnum = doctor2Arm, AssignTime = DateTime.Now });
|
|
||||||
|
|
||||||
// //将分配结果记录
|
|
||||||
// waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctorList[1].DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
|
||||||
// {
|
|
||||||
// SubjectId = subject.SubjectId,
|
|
||||||
// ArmEnum = doctor2Arm
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// else if (trialConfig.ReadingType == ReadingMethod.Single)
|
|
||||||
// {
|
|
||||||
// if (hasAssignDoctorCount > 1)
|
|
||||||
// {
|
|
||||||
// throw new BusinessValidationFailedException("单重阅片当前有Subject绑定医生数量大于1");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// var allocateDoctor = waitAllocationDoctorList.OrderByDescending(t => t.Weight).ThenByDescending(t => t.PlanReadingRatio).FirstOrDefault();
|
|
||||||
|
|
||||||
// //将分配结果记录
|
|
||||||
// waitAllocationDoctorList.FirstOrDefault(t => t.DoctorUserId == allocateDoctor.DoctorUserId).SubjectArmList.Add(new SubjectArm()
|
|
||||||
// {
|
|
||||||
// SubjectId = subject.SubjectId,
|
|
||||||
// ArmEnum = Arm.SingleReadingArm
|
|
||||||
// });
|
|
||||||
|
|
||||||
// await _subjectUserRepository.AddAsync(new SubjectUser() { TrialId = trialId, SubjectId = subject.SubjectId, DoctorUserId = allocateDoctor.DoctorUserId, ArmEnum = Arm.SingleReadingArm, AssignTime = DateTime.Now });
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// #endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// await _subjectUserRepository.SaveChangesAsync();
|
|
||||||
// return ResponseOutput.Ok();
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ using Newtonsoft.Json.Linq;
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using DocumentFormat.OpenXml.Drawing;
|
using DocumentFormat.OpenXml.Drawing;
|
||||||
|
using Quartz;
|
||||||
|
using IRaCIS.Application.Services.BackGroundJob;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -57,7 +59,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystem;
|
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystem;
|
||||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileSystem;
|
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileSystem;
|
||||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||||
|
private readonly IScheduler _scheduler;
|
||||||
private readonly IMemoryCache _cache;
|
private readonly IMemoryCache _cache;
|
||||||
private readonly ITrialEmailNoticeConfigService _trialEmailNoticeConfigService;
|
private readonly ITrialEmailNoticeConfigService _trialEmailNoticeConfigService;
|
||||||
|
|
||||||
|
@ -97,9 +99,11 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||||
ITrialEmailNoticeConfigService trialEmailNoticeConfigService,
|
ITrialEmailNoticeConfigService trialEmailNoticeConfigService,
|
||||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileSystem,
|
IRepository<NoneDicomStudyFile> noneDicomStudyFileSystem,
|
||||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||||
|
IScheduler scheduler
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
_scheduler = scheduler;
|
||||||
base._mapper = mapper;
|
base._mapper = mapper;
|
||||||
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
||||||
this._visitTaskRepository = visitTaskRepository;
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
|
@ -159,9 +163,9 @@ namespace IRaCIS.Application.Services
|
||||||
return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId
|
return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId
|
||||||
&& x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.Id && y.ConfirmTime != null)
|
&& x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.Id && y.ConfirmTime != null)
|
||||||
&& x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
&& x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||||
.WhereIf(userType== UserTypeEnum.IndependentReviewer, t => t.FileType.Code == "2" || t.FileType.Code == "6")
|
.WhereIf(userType == UserTypeEnum.IndependentReviewer, t => t.FileType.Code == "2" || t.FileType.Code == "6")
|
||||||
.WhereIf(userType == UserTypeEnum.IQC, t => t.FileType.Code == "4" || t.FileType.Code == "5")
|
.WhereIf(userType == UserTypeEnum.IQC, t => t.FileType.Code == "4" || t.FileType.Code == "5")
|
||||||
.WhereIf(!canViewUserType.Contains(userType),t=>false)
|
.WhereIf(!canViewUserType.Contains(userType), t => false)
|
||||||
.IgnoreQueryFilters()
|
.IgnoreQueryFilters()
|
||||||
.Select(x => new GetManualListOutDto()
|
.Select(x => new GetManualListOutDto()
|
||||||
{
|
{
|
||||||
|
@ -490,8 +494,8 @@ namespace IRaCIS.Application.Services
|
||||||
VisitTaskNum = x.VisitTaskNum,
|
VisitTaskNum = x.VisitTaskNum,
|
||||||
IsBaseLineTask = x.SourceSubjectVisitId == baselineVisitId,
|
IsBaseLineTask = x.SourceSubjectVisitId == baselineVisitId,
|
||||||
IsCurrentTask = x.Id == inDto.VisitTaskId,
|
IsCurrentTask = x.Id == inDto.VisitTaskId,
|
||||||
IsConvertedTask=x.IsConvertedTask,
|
IsConvertedTask = x.IsConvertedTask,
|
||||||
IsFirstChangeTask=x.BeforeConvertedTaskId!=null,
|
IsFirstChangeTask = x.BeforeConvertedTaskId != null,
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
@ -627,9 +631,9 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(x => x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
if (await _visitTaskRepository.AnyAsync(x => x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||||
&&x.IsAnalysisCreate&&taskInfo.IsAnalysisCreate
|
&& x.IsAnalysisCreate && taskInfo.IsAnalysisCreate
|
||||||
&&x.SubjectId== taskInfo.SubjectId&&x.TaskState==TaskState.Effect&&
|
&& x.SubjectId == taskInfo.SubjectId && x.TaskState == TaskState.Effect &&
|
||||||
((x.ReReadingApplyState==ReReadingApplyState.DocotorHaveApplyed && x.DoctorUserId == taskInfo.DoctorUserId)|| x.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)
|
((x.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed && x.DoctorUserId == taskInfo.DoctorUserId) || x.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)
|
||||||
|
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
|
@ -708,7 +712,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
questions.ForEach(x =>
|
questions.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.IsFirstChangeTask =true;
|
x.IsFirstChangeTask = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -786,7 +790,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||||
|
|
||||||
if (taskInfo.IsConvertedTask &&taskInfo.BeforeConvertedTaskId!=null)
|
if (taskInfo.IsConvertedTask && taskInfo.BeforeConvertedTaskId != null)
|
||||||
{
|
{
|
||||||
result.ForEach(x =>
|
result.ForEach(x =>
|
||||||
{
|
{
|
||||||
|
@ -960,7 +964,7 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (inDto.TaskId != null )
|
if (inDto.TaskId != null)
|
||||||
{
|
{
|
||||||
if (taskInfo.IsConvertedTask)
|
if (taskInfo.IsConvertedTask)
|
||||||
{
|
{
|
||||||
|
@ -968,9 +972,9 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow).OrderBy(x => x.ShowOrder).ToList();
|
qusetionList = qusetionList.Where(x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow).OrderBy(x => x.ShowOrder).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList();
|
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList();
|
||||||
|
@ -1031,18 +1035,18 @@ namespace IRaCIS.Application.Services
|
||||||
&& x.VisitTaskNum < taskInfo.VisitTaskNum
|
&& x.VisitTaskNum < taskInfo.VisitTaskNum
|
||||||
&& x.ArmEnum == taskInfo.ArmEnum
|
&& x.ArmEnum == taskInfo.ArmEnum
|
||||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||||
&& x.ReadingCategory == ReadingCategory.Visit)||x.Id==taskInfo.BeforeConvertedTaskId
|
&& x.ReadingCategory == ReadingCategory.Visit) || x.Id == taskInfo.BeforeConvertedTaskId
|
||||||
).OrderByDescending(x=>x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
|
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
if (!criterionInfo.IsReadingTaskViewInOrder)
|
if (!criterionInfo.IsReadingTaskViewInOrder)
|
||||||
{
|
{
|
||||||
// 无序的话 不要查
|
// 无序的话 不要查
|
||||||
laskTaskId = Guid.NewGuid();
|
laskTaskId = Guid.NewGuid();
|
||||||
}
|
}
|
||||||
|
|
||||||
lastTaskTableAnswer= await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == laskTaskId).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
|
lastTaskTableAnswer = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == laskTaskId).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
if (taskInfo.BeforeConvertedTaskId!=null )
|
if (taskInfo.BeforeConvertedTaskId != null)
|
||||||
{
|
{
|
||||||
isFirstChangeTask = true;
|
isFirstChangeTask = true;
|
||||||
|
|
||||||
|
@ -1104,7 +1108,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="item"></param>
|
/// <param name="item"></param>
|
||||||
/// <param name="questionlists"></param>
|
/// <param name="questionlists"></param>
|
||||||
/// <param name="tableQuestionLists"></param>
|
/// <param name="tableQuestionLists"></param>
|
||||||
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer,bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer,Guid? TaskId)
|
private async void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos, List<OrganInfo> organInfos, List<ReadingTableQuestionAnswer> baseLineTableAnswer, bool isFirstChangeTask, List<ReadingTableQuestionAnswer> lastTaskTableAnswer, Guid? TaskId)
|
||||||
{
|
{
|
||||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList();
|
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (x.GroupId == item.Id && x.ParentId == null)).ToList();
|
||||||
item.TableQuestions = new TrialReadTableQuestion();
|
item.TableQuestions = new TrialReadTableQuestion();
|
||||||
|
@ -1230,7 +1234,7 @@ namespace IRaCIS.Application.Services
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
answers.Add("LesionType", rowInfo.LesionType.GetEnumNullInt());
|
answers.Add("LesionType", rowInfo.LesionType.GetEnumNullInt());
|
||||||
answers.Add("BlindName", rowInfo.BlindName);
|
answers.Add("BlindName", rowInfo.BlindName);
|
||||||
answers.Add("IsFirstChangeTask", isFirstChangeTask.ToString());
|
answers.Add("IsFirstChangeTask", isFirstChangeTask.ToString());
|
||||||
answers.Add("FromMark", rowInfo.FromMark);
|
answers.Add("FromMark", rowInfo.FromMark);
|
||||||
|
@ -1238,20 +1242,20 @@ namespace IRaCIS.Application.Services
|
||||||
answers.Add("MeasureData", rowInfo == null ? string.Empty : rowInfo.MeasureData);
|
answers.Add("MeasureData", rowInfo == null ? string.Empty : rowInfo.MeasureData);
|
||||||
answers.Add("RowIndex", x.ToString());
|
answers.Add("RowIndex", x.ToString());
|
||||||
answers.Add("RowId", rowInfo.Id.ToString());
|
answers.Add("RowId", rowInfo.Id.ToString());
|
||||||
answers.Add("MarkTool", rowInfo.MarkTool);
|
answers.Add("MarkTool", rowInfo.MarkTool);
|
||||||
answers.Add("StudyId", rowInfo.StudyId.ToString());
|
answers.Add("StudyId", rowInfo.StudyId.ToString());
|
||||||
answers.Add("OrganInfoId", rowInfo.OrganInfoId.ToString());
|
answers.Add("OrganInfoId", rowInfo.OrganInfoId.ToString());
|
||||||
answers.Add("IsFristAdd", (rowInfo.FristAddTaskId== TaskId).ToString());
|
answers.Add("IsFristAdd", (rowInfo.FristAddTaskId == TaskId).ToString());
|
||||||
answers.Add("IsCanEditPosition", rowInfo.IsCanEditPosition.ToString());
|
answers.Add("IsCanEditPosition", rowInfo.IsCanEditPosition.ToString());
|
||||||
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
|
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
|
||||||
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
|
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
|
||||||
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
|
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
|
||||||
answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
|
answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
|
||||||
answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString());
|
answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString());
|
||||||
answers.Add("LastTaskState", lastTaskTableAnswer.Where(n=>n.QuestionId== item.Id&&n.ReadingTableQuestionTrial.QuestionMark==QuestionMark.State&&n.RowIndex==x).Select(n=>n.Answer).FirstOrDefault()??string.Empty);
|
answers.Add("LastTaskState", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
|
||||||
answers.Add("LastTaskMajorAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
|
answers.Add("LastTaskMajorAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
|
||||||
answers.Add("LastTaskShortAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
|
answers.Add("LastTaskShortAxis", lastTaskTableAnswer.Where(n => n.QuestionId == item.Id && n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis && n.RowIndex == x).Select(n => n.Answer).FirstOrDefault() ?? string.Empty);
|
||||||
if (rowInfo.LesionType == LesionType.BaselineLesions)
|
if (rowInfo.LesionType == LesionType.BaselineLesions)
|
||||||
{
|
{
|
||||||
answers.Add("BaseLineLesionNumber", baseLineTableAnswer.Where(n => n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && n.RowIndex == rowInfo.RowIndex).Select(x => x.Answer).FirstIsNullReturnEmpty());
|
answers.Add("BaseLineLesionNumber", baseLineTableAnswer.Where(n => n.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && n.RowIndex == rowInfo.RowIndex).Select(x => x.Answer).FirstIsNullReturnEmpty());
|
||||||
}
|
}
|
||||||
|
@ -1436,10 +1440,11 @@ namespace IRaCIS.Application.Services
|
||||||
if (tumorAnswer != null)
|
if (tumorAnswer != null)
|
||||||
{
|
{
|
||||||
var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync();
|
var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync();
|
||||||
var reportVerify = await _readingCalculateService.GetReportVerify(new GetReportVerifyInDto() {
|
var reportVerify = await _readingCalculateService.GetReportVerify(new GetReportVerifyInDto()
|
||||||
BeforeConvertedTaskId= taskInfo.BeforeConvertedTaskId,
|
{
|
||||||
IsConvertTask= isConvertedTask,
|
BeforeConvertedTaskId = taskInfo.BeforeConvertedTaskId,
|
||||||
VisitTaskId=inDto.VisitTaskId
|
IsConvertTask = isConvertedTask,
|
||||||
|
VisitTaskId = inDto.VisitTaskId
|
||||||
});
|
});
|
||||||
|
|
||||||
if (tumorAnswer.Answer == reportVerify.TumorEvaluate)
|
if (tumorAnswer.Answer == reportVerify.TumorEvaluate)
|
||||||
|
@ -1619,7 +1624,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自动计算
|
// 自动计算
|
||||||
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||||
{
|
{
|
||||||
|
@ -1997,7 +2002,7 @@ namespace IRaCIS.Application.Services
|
||||||
StudyId = rowInfo.StudyId,
|
StudyId = rowInfo.StudyId,
|
||||||
IsCanEditPosition = rowInfo.IsCanEditPosition,
|
IsCanEditPosition = rowInfo.IsCanEditPosition,
|
||||||
ReportMark = rowInfo.ReportMark
|
ReportMark = rowInfo.ReportMark
|
||||||
}) ;
|
});
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in inDto.AnswerList)
|
foreach (var item in inDto.AnswerList)
|
||||||
|
@ -2159,13 +2164,13 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 验证访视提交
|
/// 验证访视提交
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
public async Task<IResponseOutput> VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||||
{
|
{
|
||||||
|
@ -2174,9 +2179,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
// 转化后的任务不应该有新病灶
|
// 转化后的任务不应该有新病灶
|
||||||
|
|
||||||
var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x=>x.IsConvertedTask).FirstNotNullAsync();
|
var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.IsConvertedTask).FirstNotNullAsync();
|
||||||
|
|
||||||
if (isConvertedTask&&(await _readingTableAnswerRowInfoRepository.AnyAsync(x => x.ReadingQuestionTrial.LesionType == LesionType.NewLesions && x.VisitTaskId == inDto.VisitTaskId)))
|
if (isConvertedTask && (await _readingTableAnswerRowInfoRepository.AnyAsync(x => x.ReadingQuestionTrial.LesionType == LesionType.NewLesions && x.VisitTaskId == inDto.VisitTaskId)))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NotNewFocus"]);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_NotNewFocus"]);
|
||||||
}
|
}
|
||||||
|
@ -2266,6 +2271,7 @@ namespace IRaCIS.Application.Services
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_IDMust"]);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_IDMust"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//看已阅的任务
|
||||||
if (inDto.VisitTaskId != null)
|
if (inDto.VisitTaskId != null)
|
||||||
{
|
{
|
||||||
task = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => new GetReadingTaskDto()
|
task = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => new GetReadingTaskDto()
|
||||||
|
@ -2327,25 +2333,37 @@ namespace IRaCIS.Application.Services
|
||||||
}).FirstOrDefault();
|
}).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
|
if (task != null)
|
||||||
|
{
|
||||||
|
// 有序 自动领取该Subject
|
||||||
|
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, SubejctId = task.SubjectId, IsInOrder = true }, _scheduler);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
task = await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id
|
//无序取数据
|
||||||
|
task = await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned /*&& x.DoctorUserId == _userInfo.Id*/
|
||||||
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
||||||
&& x.TaskState == TaskState.Effect).Select(x => new GetReadingTaskDto()
|
&& x.TaskState == TaskState.Effect)
|
||||||
{
|
.Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign)
|
||||||
VisitTaskId = x.Id,
|
.Select(x => new GetReadingTaskDto()
|
||||||
ArmEnum = x.ArmEnum,
|
{
|
||||||
TaskBlindName = x.TaskBlindName,
|
VisitTaskId = x.Id,
|
||||||
ReadingCategory = x.ReadingCategory,
|
ArmEnum = x.ArmEnum,
|
||||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
TaskBlindName = x.TaskBlindName,
|
||||||
VisitNum = x.VisitTaskNum,
|
ReadingCategory = x.ReadingCategory,
|
||||||
SubjectId = x.SubjectId,
|
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
||||||
SubjectCode = x.Subject.Code,
|
VisitNum = x.VisitTaskNum,
|
||||||
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
SubjectId = x.SubjectId,
|
||||||
}).FirstOrDefaultAsync();
|
SubjectCode = x.Subject.Code,
|
||||||
|
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
||||||
|
}).OrderByDescending(t => t.TaskBlindName).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (task != null)
|
||||||
|
{
|
||||||
|
// 有序 自动领取该Subject
|
||||||
|
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, VisitTaskId = task.VisitTaskId, IsInOrder = false }, _scheduler);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task == null)
|
if (task == null)
|
||||||
|
@ -2420,7 +2438,7 @@ namespace IRaCIS.Application.Services
|
||||||
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
||||||
task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count() > 0;
|
task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count() > 0;
|
||||||
task.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
task.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2474,6 +2492,70 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task ClaimOrCancelSubjectAsync(ClaimSubjectDto claimSubjectDto, IScheduler _scheduler)
|
||||||
|
{
|
||||||
|
if (claimSubjectDto.IsInOrder)
|
||||||
|
{
|
||||||
|
if (claimSubjectDto.IsClaim)
|
||||||
|
{
|
||||||
|
await _subjectRepository.UpdatePartialFromQueryAsync(t => t.Id == claimSubjectDto.SubejctId, u => new Subject() { ClaimUserId = _userInfo.Id }, true);
|
||||||
|
|
||||||
|
//定时任务24h取消
|
||||||
|
|
||||||
|
// 创建一个任务
|
||||||
|
IJobDetail job = JobBuilder.Create<CancelTaskQuartZJob>()
|
||||||
|
.WithIdentity($"CancelTaskQuartZJob_{_userInfo.Id}", "group")
|
||||||
|
.UsingJobData("SubjectId", claimSubjectDto.SubejctId) // 传递GUID参数给任务
|
||||||
|
.UsingJobData("IsInOrder", claimSubjectDto.IsInOrder)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
// 创建一个触发器,设置任务执行时间为24小时后
|
||||||
|
ITrigger trigger = TriggerBuilder.Create()
|
||||||
|
.WithIdentity("CancelTaskQuartZJob", "group1")
|
||||||
|
.StartAt(DateTimeOffset.UtcNow.AddHours(24))
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
// 将任务和触发器关联起来,将任务安排到调度器中
|
||||||
|
await _scheduler.ScheduleJob(job, trigger);
|
||||||
|
|
||||||
|
//BackgroundJob.Schedule<IObtainTaskAutoCancelJob>(t => t.CancelQCObtaion(subjectVisitId, DateTime.Now), TimeSpan.FromHours(1));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _subjectRepository.UpdatePartialFromQueryAsync(t => t.Id == claimSubjectDto.SubejctId, u => new Subject() { ClaimUserId = null }, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (claimSubjectDto.IsClaim)
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == claimSubjectDto.VisitTaskId, u => new VisitTask() { ClaimUserId = _userInfo.Id }, true);
|
||||||
|
|
||||||
|
IJobDetail job = JobBuilder.Create<CancelTaskQuartZJob>()
|
||||||
|
.WithIdentity($"CancelTaskQuartZJob_{_userInfo.Id}", "group")
|
||||||
|
.UsingJobData("VisitTaskId",(Guid) claimSubjectDto.VisitTaskId) // 传递GUID参数给任务
|
||||||
|
.UsingJobData("IsInOrder", claimSubjectDto.IsInOrder).Build();
|
||||||
|
|
||||||
|
// 创建一个触发器,设置任务执行时间为24小时后
|
||||||
|
ITrigger trigger = TriggerBuilder.Create()
|
||||||
|
.WithIdentity($"CancelTaskQuartZJob_{_userInfo.Id}", "group")
|
||||||
|
.StartAt(DateTimeOffset.UtcNow.AddHours(24))
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
// 将任务和触发器关联起来,将任务安排到调度器中
|
||||||
|
await _scheduler.ScheduleJob(job, trigger);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2494,9 +2576,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
bool isConverted = false;
|
bool isConverted = false;
|
||||||
|
|
||||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x=>x.TrialReadingCriterion).FirstNotNullAsync();
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
|
|
||||||
var isConvertedTask=await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(x=>x.IsConvertedTask).FirstNotNullAsync();
|
var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(x => x.IsConvertedTask).FirstNotNullAsync();
|
||||||
switch (taskinfo.TrialReadingCriterion.CriterionType)
|
switch (taskinfo.TrialReadingCriterion.CriterionType)
|
||||||
{
|
{
|
||||||
case CriterionType.IRECIST1Point1:
|
case CriterionType.IRECIST1Point1:
|
||||||
|
@ -2505,7 +2587,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (!isConvertedTask &&
|
if (!isConvertedTask &&
|
||||||
(await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.VisitTaskId == visitTaskId
|
(await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.VisitTaskId == visitTaskId
|
||||||
&& x.ReadingQuestionTrial.QuestionType == QuestionType.Tumor && x.Answer==(((int)OverallAssessment.PD)).ToString()))
|
&& x.ReadingQuestionTrial.QuestionType == QuestionType.Tumor && x.Answer == (((int)OverallAssessment.PD)).ToString()))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2539,7 +2621,7 @@ namespace IRaCIS.Application.Services
|
||||||
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(visitTaskId);
|
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(visitTaskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2583,7 +2665,7 @@ namespace IRaCIS.Application.Services
|
||||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||||
x.ReadingCategory == taskInfo.ReadingCategory &&
|
x.ReadingCategory == taskInfo.ReadingCategory &&
|
||||||
x.Id != taskInfo.Id
|
x.Id != taskInfo.Id
|
||||||
).OrderBy(x=>x.VisitTaskNum).ThenBy(x=>x.TaskState).Select(x => x.Id).ToListAsync();
|
).OrderBy(x => x.VisitTaskNum).ThenBy(x => x.TaskState).Select(x => x.Id).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
reportRelatedTaskIdList = await _visitTaskRepository.Where(x =>
|
reportRelatedTaskIdList = await _visitTaskRepository.Where(x =>
|
||||||
|
@ -2594,7 +2676,7 @@ namespace IRaCIS.Application.Services
|
||||||
x.DoctorUserId == taskInfo.DoctorUserId &&
|
x.DoctorUserId == taskInfo.DoctorUserId &&
|
||||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||||
(x.TaskState == TaskState.Effect||x.TaskState==TaskState.Freeze) &&
|
(x.TaskState == TaskState.Effect || x.TaskState == TaskState.Freeze) &&
|
||||||
x.IsSelfAnalysis == taskInfo.IsSelfAnalysis &&
|
x.IsSelfAnalysis == taskInfo.IsSelfAnalysis &&
|
||||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||||
x.ReadingCategory == taskInfo.ReadingCategory &&
|
x.ReadingCategory == taskInfo.ReadingCategory &&
|
||||||
|
|
|
@ -736,14 +736,14 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
var trialSiteSurvey = (await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).FirstOrDefaultAsync()).IfNullThrowException();
|
var trialSiteSurvey = (await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
var siteUserList = await _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurvey.SiteId == trialSiteSurvey.SiteId).Select(t => new { t.TrialSiteSurveyId, t.IsGenerateAccount, t.UserTypeId, t.UserTypeRole.UserTypeEnum, t.TrialRoleName.Code }).ToListAsync();
|
var siteUserList = await _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurvey.SiteId == trialSiteSurvey.SiteId).Select(t => new { t.TrialSiteSurveyId, t.IsGenerateAccount, t.IsGenerateSuccess, t.UserTypeId, t.UserTypeRole.UserTypeEnum, t.TrialRoleName.Code }).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.Undefined)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.Undefined)
|
||||||
{
|
{
|
||||||
//是第一次
|
//是第一次
|
||||||
if(!siteUserList.Any(t=>t.IsGenerateAccount))
|
if(!siteUserList.Any(t=>t.IsGenerateSuccess))
|
||||||
{
|
{
|
||||||
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
|
|
||||||
//是第一次
|
//是第一次
|
||||||
if (!siteUserList.Any(t => t.IsGenerateAccount))
|
if (!siteUserList.Any(t => t.IsGenerateSuccess))
|
||||||
{
|
{
|
||||||
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
||||||
|
|
||||||
|
|
|
@ -426,6 +426,8 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Guid? ClaimUserId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -123,6 +123,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Guid? ClaimUserId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//是否分配了读片医生
|
//是否分配了读片医生
|
||||||
//public bool IsAssignDoctorUser{get;set;}
|
//public bool IsAssignDoctorUser{get;set;}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue