IR 申请重阅,仅仅生效的访视任务,PM同意的时候,才生成任务
parent
3b37cec42d
commit
f9277de9ef
|
@ -1854,6 +1854,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
foreach (var influenceTask in influenceTaskList)
|
||||
{
|
||||
var beforeTaskState = influenceTask.TaskState;
|
||||
|
||||
//已签名的任务 设置转变后的标志
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
|
@ -1879,7 +1881,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
}
|
||||
|
||||
|
||||
var beforeTaskState = influenceTask.TaskState;
|
||||
|
||||
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
|
@ -1895,7 +1897,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
}
|
||||
|
||||
// 影响的任务 仅仅访视类别的才生成 或者就是IR 申请的任务
|
||||
if (influenceTask.ReadingCategory == ReadingCategory.Visit || influenceTask.Id == origenalTask.Id)
|
||||
if ((beforeTaskState==TaskState.Effect && influenceTask.ReadingCategory == ReadingCategory.Visit) || influenceTask.Id == origenalTask.Id)
|
||||
{
|
||||
|
||||
|
||||
|
@ -1907,7 +1909,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
}
|
||||
|
||||
|
||||
//当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成
|
||||
// i1.1标准 当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成
|
||||
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId))
|
||||
{
|
||||
continue;
|
||||
|
|
|
@ -393,9 +393,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
ProtocolName = dataset.GetSingleValueOrDefault(DicomTag.ProtocolName, string.Empty),
|
||||
ImagerPixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
|
||||
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionTime, string.Empty),
|
||||
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
|
||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
||||
|
||||
SiteId = dicomStudy.SiteId,
|
||||
TrialId = dicomStudy.TrialId,
|
||||
|
|
|
@ -872,16 +872,16 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//判断TrialUser中是否存在 不存在就插入
|
||||
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true))
|
||||
{
|
||||
|
||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
||||
|
||||
await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId });
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true });
|
||||
|
||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
||||
}
|
||||
if (!await _repository.AnyAsync<TrialSiteUser>(t => t.TrialId == trialId && t.UserId == userId && t.SiteId==siteId, true))
|
||||
{
|
||||
await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId });
|
||||
}
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true });
|
||||
|
||||
await _mailVerificationService.SiteSurveyUserJoinEmail(trialId, userId, joinCommand.BaseUrl, joinCommand.RouteUrl);
|
||||
|
||||
|
|
Loading…
Reference in New Issue