Merge branch 'Uat_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Uat_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
c49a74d742
|
@ -67,7 +67,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var resultlist = await visitQuery.WhereIf(finalVisitNum != null && finalVisitNum != 0, x => x.VisitNum <= finalVisitNum)
|
var resultlist = await visitQuery.WhereIf(finalVisitNum != null && finalVisitNum != 0, x => x.VisitNum <= finalVisitNum)
|
||||||
.Where(x => x.VisitNum > mixReadVisitNum|| x.VisitNum==thisVisitNum)
|
.Where(x => x.VisitNum > mixReadVisitNum|| x.VisitNum==thisVisitNum)
|
||||||
.Where(x => !x.IsBaseLine) // 排除基线
|
//.Where(x => !x.IsBaseLine) // 排除基线
|
||||||
.WhereIf(inDto.ReadingSetType == ReadingSetType.TumorReading, x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.TrialReadingCriterionId == inDto.TrialReadingCriterionId && y.ReadingSetType == ReadingSetType.ImageReading).Count() > 0)
|
.WhereIf(inDto.ReadingSetType == ReadingSetType.TumorReading, x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.TrialReadingCriterionId == inDto.TrialReadingCriterionId && y.ReadingSetType == ReadingSetType.ImageReading).Count() > 0)
|
||||||
.WhereIf(inDto.ReadingSetType == ReadingSetType.ImageReading, x => readModulequery.Where(y => y.Id != inDto.Id && y.SubjectVisitId == x.Id && y.TrialReadingCriterionId == inDto.TrialReadingCriterionId && y.ReadingSetType == ReadingSetType.ImageReading).Count() == 0)
|
.WhereIf(inDto.ReadingSetType == ReadingSetType.ImageReading, x => readModulequery.Where(y => y.Id != inDto.Id && y.SubjectVisitId == x.Id && y.TrialReadingCriterionId == inDto.TrialReadingCriterionId && y.ReadingSetType == ReadingSetType.ImageReading).Count() == 0)
|
||||||
.Select(x => new GetSubjectReadVisitsOutDto()
|
.Select(x => new GetSubjectReadVisitsOutDto()
|
||||||
|
@ -97,6 +97,29 @@ namespace IRaCIS.Core.Application.Service
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadModule_CRCConfirmCanNtoEdit"]);
|
throw new BusinessValidationFailedException(_localizer["ReadModule_CRCConfirmCanNtoEdit"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModule.TrialReadingCriterionId).Select(x => new
|
||||||
|
{
|
||||||
|
x.ReadingType,
|
||||||
|
x.IsArbitrationReading,
|
||||||
|
x.IsReadingPeriod,
|
||||||
|
x.ArbitrationRule,
|
||||||
|
x.IsGlobalReading,
|
||||||
|
x.IsOncologyReading,
|
||||||
|
}).FirstNotNullAsync();
|
||||||
|
|
||||||
|
// 如果生成了 访视级别的阅片期裁判 不让修改
|
||||||
|
if (criterionInfo.IsArbitrationReading && criterionInfo.IsReadingPeriod && !criterionInfo.IsGlobalReading && criterionInfo.ArbitrationRule == ArbitrationRule.Reading)
|
||||||
|
{
|
||||||
|
if (await _visitTaskRepository.AnyAsync(x => x.SourceSubjectVisitId == readModule.SubjectVisitId && x.ReadingCategory == ReadingCategory.Judge))
|
||||||
|
{
|
||||||
|
//---当前阅片已生成裁判任务,操作失败。
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadModule_JudgeTaskGenerated"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadModule()
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadModule()
|
||||||
{
|
{
|
||||||
SubjectVisitId = inDto.SubjectVisitIdId,
|
SubjectVisitId = inDto.SubjectVisitIdId,
|
||||||
|
@ -1078,6 +1101,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var readModule = await _readModuleRepository.Where(x => x.Id == readModuleId).FirstNotNullAsync();
|
var readModule = await _readModuleRepository.Where(x => x.Id == readModuleId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModule.TrialReadingCriterionId).Select(x => new
|
||||||
|
{
|
||||||
|
x.ReadingType,
|
||||||
|
x.IsArbitrationReading,
|
||||||
|
x.IsReadingPeriod,
|
||||||
|
x.ArbitrationRule,
|
||||||
|
x.IsGlobalReading,
|
||||||
|
x.IsOncologyReading,
|
||||||
|
}).FirstNotNullAsync();
|
||||||
|
|
||||||
if (await _readingClinicalDataRepository.Where(t => t.ReadingId == readModuleId).AnyAsync(t => t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned))
|
if (await _readingClinicalDataRepository.Where(t => t.ReadingId == readModuleId).AnyAsync(t => t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned))
|
||||||
{
|
{
|
||||||
|
@ -1106,6 +1138,17 @@ namespace IRaCIS.Core.Application.Service
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadModule_TaskGenerated"]);
|
throw new BusinessValidationFailedException(_localizer["ReadModule_TaskGenerated"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果生成了 访视级别的阅片期裁判 不让删除
|
||||||
|
if (criterionInfo.IsArbitrationReading && criterionInfo.IsReadingPeriod && !criterionInfo.IsGlobalReading && criterionInfo.ArbitrationRule == ArbitrationRule.Reading)
|
||||||
|
{
|
||||||
|
if (await _visitTaskRepository.AnyAsync(x => x.SourceSubjectVisitId == readModule.SubjectVisitId && x.ReadingCategory == ReadingCategory.Judge))
|
||||||
|
{
|
||||||
|
//---当前阅片已生成裁判任务,操作失败。
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadModule_JudgeTaskGenerated"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => readModuleId == x.SouceReadModuleId, x => new VisitTask()
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => readModuleId == x.SouceReadModuleId, x => new VisitTask()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue