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