Uat_Study
he 2023-05-05 15:22:31 +08:00
commit e21e1488e7
6 changed files with 22 additions and 20 deletions

View File

@ -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;

View File

@ -92,7 +92,7 @@ namespace IRaCIS.Application.Services
.WhereIf(!string.IsNullOrWhiteSpace(selectionQuery.Name), t => t.ChineseName.Contains(selectionQuery.Name) || (t.LastName + t.FirstName).Contains(selectionQuery.Name))
.WhereIf(evaluationCriteriaCount > 0, t => t.TrialExperienceCriteriaList.Count(t => selectionQuery.EvaluationCriteriaIdList.Contains(t.EvaluationCriteriaId)) == evaluationCriteriaCount)
//用户类型 看到简历的范围这里需要确认
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id))
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id))
.WhereIf(count > 0, t => t.DoctorDicRelationList.Count(u => guidList.Contains(u.DictionaryId)) == count)
.WhereIf(selectionQuery.EnrollStatus != null && selectionQuery.EnrollStatus == (int)ReviewerEnrollStatus.Yes, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.DoctorReading))

View File

@ -94,7 +94,7 @@ namespace IRaCIS.Application.Services
await _doctorRepository.AddAsync(doctor);
//_doctorRepository.Add(doctor);
await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
//await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
//_userDoctorRepository.Add(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
var success = await _repository.SaveChangesAsync();

View File

@ -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,

View File

@ -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);

View File

@ -18,9 +18,9 @@ namespace IRaCIS.Core.Domain.Models
public List<TrialExperienceCriteria> TrialExperienceCriteriaList { get; set; }
// UserDoctor表关联 一个医生 可被多个用户管理
[JsonIgnore]
public List<UserDoctor> UserList { get; set; }
//// UserDoctor表关联 一个医生 可被多个用户管理
//[JsonIgnore]
//public List<UserDoctor> UserList { get; set; }
[JsonIgnore]
public List<Enroll> EnrollList { get; set; }