Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
41486798d2
|
|
@ -223,14 +223,32 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
List<Guid> readModuleIds = await _readModuleRepository.Where(x => x.ReadingPeriodSetId == indto.Id).Select(x => x.Id).ToListAsync();
|
List<Guid> readModuleIds = await _readModuleRepository.Where(x => x.ReadingPeriodSetId == indto.Id).Select(x => x.Id).ToListAsync();
|
||||||
|
|
||||||
|
List<Guid> visitIds=await _readingPeriodPlanRepository.Where(x => x.ReadingPeriodSetId == indto.Id).Select(x => x.SubjectVisitId).ToListAsync();
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && readModuleIds.Contains(x.SouceReadModuleId ?? default(Guid))
|
if (await _visitTaskRepository.AnyAsync(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && readModuleIds.Contains(x.SouceReadModuleId ?? default(Guid))
|
||||||
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
|
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
|
||||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect))
|
//&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||||
|
&& x.TaskState == TaskState.Effect))
|
||||||
{
|
{
|
||||||
//---当前标准阅片已生成任务并且阅片完成,撤销失败。
|
//---当前标准阅片已生成任务并且阅片完成,撤销失败。
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingPeriodSet_TaskCompletedCannotRevoke"]);
|
throw new BusinessValidationFailedException(_localizer["ReadingPeriodSet_TaskCompletedCannotRevoke"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readingPeriodSet.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
//产生了 阅片期裁判任务 并且完成了
|
||||||
|
if ( criterionInfo.IsArbitrationReading&& criterionInfo.ArbitrationRule== ArbitrationRule.Reading &&
|
||||||
|
await _visitTaskRepository.AnyAsync(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && visitIds.Contains(x.SourceSubjectVisitId ?? default(Guid))
|
||||||
|
&& x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId
|
||||||
|
&& x.ReadingCategory== ReadingCategory.Judge &&
|
||||||
|
// x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||||
|
x.TaskState == TaskState.Effect) )
|
||||||
|
{
|
||||||
|
//---当前标准阅片已生成任务并且阅片完成,撤销失败。
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingPeriodSet_TaskCompletedCannotRevoke"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && readModuleIds.Contains(x.SouceReadModuleId ?? default(Guid)), x => new VisitTask()
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.TrialReadingCriterionId == readingPeriodSet.TrialReadingCriterionId && readModuleIds.Contains(x.SouceReadModuleId ?? default(Guid)), x => new VisitTask()
|
||||||
{
|
{
|
||||||
|
|
@ -625,7 +643,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
VisitInfoList = plans.Select(x => new AddReadModuleVisitInfo()
|
VisitInfoList = plans.Select(x => new AddReadModuleVisitInfo()
|
||||||
{
|
{
|
||||||
SubjectId = subejctVisits.Where(y=>y.Id==x.SubjectVisitId).Select(x=>x.SubjectId).FirstOrDefault(),
|
SubjectId = subejctVisits.Where(y=>y.Id==x.SubjectVisitId).Select(x=>x.SubjectId).FirstOrDefault(),
|
||||||
SubjectVisitId = x.Id,
|
SubjectVisitId = x.SubjectVisitId,
|
||||||
ReadingPeriodPlanId= x.Id,
|
ReadingPeriodPlanId= x.Id,
|
||||||
IsUrgent = subejctVisits.Where(y => y.Id == x.SubjectVisitId).Select(x => x.IsUrgent).FirstOrDefault(),
|
IsUrgent = subejctVisits.Where(y => y.Id == x.SubjectVisitId).Select(x => x.IsUrgent).FirstOrDefault(),
|
||||||
|
|
||||||
|
|
@ -696,7 +714,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
SiteIds = inDto.SiteIds,
|
SiteIds = inDto.SiteIds,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (await _readingPeriodSetRepository.AnyAsync(x => x.Id != inDto.TrialReadingCriterionId && x.IsTakeEffect != ReadingPeriodStatus.Revocation
|
if (await _readingPeriodSetRepository.AnyAsync(x => x.Id != inDto.ReadingPeriodSetId && x.IsTakeEffect != ReadingPeriodStatus.Revocation
|
||||||
&& x.TrialId == inDto.TrialId && x.ReadingPeriodName == inDto.ReadingPeriodName && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
&& x.TrialId == inDto.TrialId && x.ReadingPeriodName == inDto.ReadingPeriodName && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -733,7 +751,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
var isTakeEffect = await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Select(x => x.IsTakeEffect).FirstOrDefaultAsync();
|
var isTakeEffect = await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Select(x => x.IsTakeEffect).FirstOrDefaultAsync();
|
||||||
var readModulequery = _readModuleRepository.AsQueryable();
|
var readModulequery = _readModuleRepository.Where(x=>x.TrialReadingCriterionId== inDto.TrialReadingCriterionId).AsQueryable();
|
||||||
|
|
||||||
// 当前项目 最晚拍片日期不为null 中心筛选
|
// 当前项目 最晚拍片日期不为null 中心筛选
|
||||||
var visitQuery = _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.LatestScanDate != null && !x.IsLostVisit)
|
var visitQuery = _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.LatestScanDate != null && !x.IsLostVisit)
|
||||||
|
|
@ -750,7 +768,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
visitQuery = visitQuery
|
visitQuery = visitQuery
|
||||||
|
|
||||||
.Where(x => !existsBubjectVisitsQuery.Contains(x.Id))
|
.Where(x => !existsBubjectVisitsQuery.Contains(x.Id)|| isChooseVisitIds.Contains(x.Id))
|
||||||
.WhereIf(inDto.ExpirationDate != null, x => x.LatestScanDate < inDto.ExpirationDate.Value.AddDays(1))
|
.WhereIf(inDto.ExpirationDate != null, x => x.LatestScanDate < inDto.ExpirationDate.Value.AddDays(1))
|
||||||
.WhereIf(inDto.ExpirationVisitNum != null, x => x.VisitNum == inDto.ExpirationVisitNum)
|
.WhereIf(inDto.ExpirationVisitNum != null, x => x.VisitNum == inDto.ExpirationVisitNum)
|
||||||
.WhereIf(inDto.ReadingSetType == ReadingSetType.TumorReading, x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.ReadingSetType == ReadingSetType.ImageReading).Count() > 0)
|
.WhereIf(inDto.ReadingSetType == ReadingSetType.TumorReading, x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.ReadingSetType == ReadingSetType.ImageReading).Count() > 0)
|
||||||
|
|
@ -764,6 +782,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//.Where(x => isChooseVisitIds.Contains(x.Id));
|
//.Where(x => isChooseVisitIds.Contains(x.Id));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var subjectIdlist = await visitQuery.OrderBy(x => x.SubjectId).Select(x => x.SubjectId).Distinct().Skip((inDto.PageIndex - 1) * inDto.PageSize).Take(inDto.PageSize).ToListAsync();
|
var subjectIdlist = await visitQuery.OrderBy(x => x.SubjectId).Select(x => x.SubjectId).Distinct().Skip((inDto.PageIndex - 1) * inDto.PageSize).Take(inDto.PageSize).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -754,6 +754,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
tableRowAnswers.ForEach(x =>
|
tableRowAnswers.ForEach(x =>
|
||||||
{
|
{
|
||||||
|
var rowinfo= tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).FirstOrDefault();
|
||||||
x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault();
|
x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault();
|
||||||
x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault();
|
x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,12 @@ public class ReadingQuestionCriterionTrial : BaseAddAuditEntity
|
||||||
|
|
||||||
[Comment("是否签名")]
|
[Comment("是否签名")]
|
||||||
public bool IsSigned { get; set; } = false;
|
public bool IsSigned { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 裁判
|
||||||
|
/// </summary>
|
||||||
[Comment("仲裁阅片")]
|
[Comment("仲裁阅片")]
|
||||||
|
|
||||||
public bool IsArbitrationReading { get; set; } = true;
|
public bool IsArbitrationReading { get; set; } = true;
|
||||||
[Comment("肿瘤学阅片 原字段 IsClinicalReading")]
|
[Comment("肿瘤学阅片 原字段 IsClinicalReading")]
|
||||||
public bool IsOncologyReading { get; set; }
|
public bool IsOncologyReading { get; set; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue