质控跳过在一个任务
parent
6bb3be17ee
commit
633a0bb777
|
|
@ -113,6 +113,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid SubjectId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public bool IsSkipCurrentVisit { get; set; }
|
||||
}
|
||||
|
||||
public class GetNextIQCQualityOutDto
|
||||
|
|
|
|||
|
|
@ -1348,9 +1348,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.Where(t => t.Subject.Status != SubjectStatus.EndOfVisit)
|
||||
.WhereIf(isDistinguishType, t => isSecondReview == true ? t.SecondReviewState == SecondReviewState.WaitAudit : t.SecondReviewState == SecondReviewState.None)
|
||||
.WhereIf(isDistinguishType, t => ishaveQCChallenge == true ? t.QCChallengeList.Any() : !t.QCChallengeList.Any())
|
||||
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
|
||||
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, SubjectVisitId = t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
|
||||
.OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync();
|
||||
|
||||
//跳过当前访视
|
||||
if (inDto.IsSkipCurrentVisit)
|
||||
{
|
||||
currentActionList = currentActionList.Where(t => t.SubjectVisitId != inDto.SubjectVisitId).ToList();
|
||||
}
|
||||
|
||||
if (currentActionList.Count() > 0)
|
||||
{
|
||||
|
|
@ -1358,7 +1363,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
IsReceived = true,
|
||||
SubjectId = currentActionList[0].SubjectId,
|
||||
VisitId = currentActionList[0].Id,
|
||||
VisitId = currentActionList[0].SubjectVisitId,
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -1392,19 +1397,16 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.CurrentActionUserId == null)
|
||||
//.WhereIf(isSecondReview, t => t.PreliminaryAuditUserId != null)
|
||||
//.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
|
||||
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
|
||||
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, SubjectVisitId = t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
|
||||
.OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync();
|
||||
|
||||
//var subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x => x.VisitNum).FirstOrDefault();
|
||||
|
||||
//if (subjectVisit != null)
|
||||
//{
|
||||
// return new GetNextIQCQualityOutDto()
|
||||
// {
|
||||
// SubjectId = subjectVisit.SubjectId,
|
||||
// VisitId = subjectVisit.Id
|
||||
// };
|
||||
//}
|
||||
|
||||
//跳过当前访视
|
||||
if (inDto.IsSkipCurrentVisit)
|
||||
{
|
||||
visitList = visitList.Where(t => t.SubjectVisitId != inDto.SubjectVisitId).ToList();
|
||||
}
|
||||
|
||||
var subjectVisit = visitList.FirstOrDefault();
|
||||
if (subjectVisit != null)
|
||||
|
|
@ -1412,7 +1414,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
return new GetNextIQCQualityOutDto()
|
||||
{
|
||||
SubjectId = subjectVisit.SubjectId,
|
||||
VisitId = subjectVisit.Id
|
||||
VisitId = subjectVisit.SubjectVisitId
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -1438,19 +1440,16 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
|
||||
//.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId)
|
||||
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
|
||||
.Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, SubjectVisitId = t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState })
|
||||
.OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync();
|
||||
|
||||
//subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x => x.VisitNum).FirstOrDefault();
|
||||
|
||||
//if (subjectVisit != null)
|
||||
//{
|
||||
// return new GetNextIQCQualityOutDto()
|
||||
// {
|
||||
// SubjectId = subjectVisit.SubjectId,
|
||||
// VisitId = subjectVisit.Id
|
||||
// };
|
||||
//}
|
||||
|
||||
//跳过当前访视
|
||||
if (inDto.IsSkipCurrentVisit)
|
||||
{
|
||||
visitList = visitList.Where(t => t.SubjectVisitId != inDto.SubjectVisitId).ToList();
|
||||
}
|
||||
|
||||
subjectVisit = visitList.FirstOrDefault();
|
||||
if (subjectVisit != null)
|
||||
|
|
@ -1458,7 +1457,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
return new GetNextIQCQualityOutDto()
|
||||
{
|
||||
SubjectId = subjectVisit.SubjectId,
|
||||
VisitId = subjectVisit.Id
|
||||
VisitId = subjectVisit.SubjectVisitId
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -1975,7 +1974,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
SubjectVisitId = dbSubjectVisit.Id,
|
||||
ModuleName = $"G-{dbSubjectVisit.VisitName}",
|
||||
ModuleType = ModuleTypeEnum.Global,
|
||||
ReadModuleAddTypeEnum= dbSubjectVisit.PDState == PDStateEnum.PDProgress? ReadModuleAddType.PDConfirmation : ReadModuleAddType.FinalVisit,
|
||||
ReadModuleAddTypeEnum = dbSubjectVisit.PDState == PDStateEnum.PDProgress ? ReadModuleAddType.PDConfirmation : ReadModuleAddType.FinalVisit,
|
||||
IsUrgent = dbSubjectVisit.IsUrgent,
|
||||
TrialId = dbSubjectVisit.TrialId,
|
||||
SubjectId = dbSubjectVisit.SubjectId
|
||||
|
|
@ -1984,7 +1983,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.Id == trialReadingCriterionId && x.IsOncologyReading))
|
||||
{
|
||||
await _readModuleRepository.AddAsync(new ReadModule()
|
||||
await _readModuleRepository.AddAsync(new ReadModule()
|
||||
{
|
||||
TrialReadingCriterionId = trialReadingCriterionId,
|
||||
ReadingSetType = ReadingSetType.TumorReading,
|
||||
|
|
|
|||
Loading…
Reference in New Issue