肿瘤学阅片修改
parent
c1121a2d3f
commit
0e4ae72016
|
@ -434,7 +434,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var oncologModule = await _readModuleRepository
|
var oncologModule = await _readModuleRepository
|
||||||
.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId &&x.TrialReadingCriterionId==taskInfo.TrialReadingCriterionId&& x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId &&x.TrialReadingCriterionId==taskInfo.TrialReadingCriterionId&& x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||||
if (taskInfo.TrialReadingCriterion.IsGlobalReading&&oncologModule != null)
|
if (!taskInfo.TrialReadingCriterion.IsGlobalReading&&oncologModule != null)
|
||||||
{
|
{
|
||||||
await AddOncologyTask(oncologModule.Id);
|
await AddOncologyTask(oncologModule.Id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<GetOncologyReadingInfoOutDto> GetOncologyReadingInfo(GetOncologyReadingInfoInDto inDto)
|
public async Task<GetOncologyReadingInfoOutDto> GetOncologyReadingInfo(GetOncologyReadingInfoInDto inDto)
|
||||||
{
|
{
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
|
|
||||||
if (taskInfo.ReadingCategory != ReadingCategory.Oncology)
|
if (taskInfo.ReadingCategory != ReadingCategory.Oncology)
|
||||||
{
|
{
|
||||||
|
@ -89,11 +89,13 @@ namespace IRaCIS.Application.Services
|
||||||
x.TaskState == TaskState.Effect &&
|
x.TaskState == TaskState.Effect &&
|
||||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||||
taskNums.Contains(x.VisitTaskNum) &&
|
taskNums.Contains(x.VisitTaskNum) &&
|
||||||
x.ReadingCategory == ReadingCategory.Global &&
|
|
||||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||||
x.IsSelfAnalysis == taskInfo.IsSelfAnalysis &&
|
x.IsSelfAnalysis == taskInfo.IsSelfAnalysis &&
|
||||||
x.VisitTaskNum < taskInfo.VisitTaskNum
|
x.VisitTaskNum < taskInfo.VisitTaskNum
|
||||||
).OrderByDescending(x=>x.VisitTaskNum).ThenBy(x => x.ArmEnum)
|
)
|
||||||
|
.WhereIf(taskInfo.TrialReadingCriterion.IsGlobalReading, x=>x.ReadingCategory == ReadingCategory.Global)
|
||||||
|
.WhereIf(!taskInfo.TrialReadingCriterion.IsGlobalReading, x => x.ReadingCategory == ReadingCategory.Visit)
|
||||||
|
.OrderByDescending(x=>x.VisitTaskNum).ThenBy(x => x.ArmEnum)
|
||||||
.FirstNotNullAsync();
|
.FirstNotNullAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,10 +374,12 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 如果当前是肿瘤学
|
// 如果当前是肿瘤学
|
||||||
if (readModuleInfo != null)
|
if (readModuleInfo != null)
|
||||||
{
|
{
|
||||||
// 先找到对应的全局阅片模块Id
|
// 先找到对应的全局阅片模块Id
|
||||||
|
var isGlobalReading = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.IsGlobalReading).FirstOrDefaultAsync();
|
||||||
|
|
||||||
var globalOrVisitTaskId = default(Guid);
|
var globalOrVisitTaskId = default(Guid);
|
||||||
var globalreadModule = await _readModuleRepository.Where(x => x.SubjectVisitId == readModuleInfo.SubjectVisitId &&
|
var globalreadModule = await _readModuleRepository.Where(x => x.SubjectVisitId == readModuleInfo.SubjectVisitId &&
|
||||||
|
@ -383,7 +387,7 @@ namespace IRaCIS.Application.Services
|
||||||
x.ModuleType == ModuleTypeEnum.Global).Include(x=>x.SubjectVisit).FirstOrDefaultAsync();
|
x.ModuleType == ModuleTypeEnum.Global).Include(x=>x.SubjectVisit).FirstOrDefaultAsync();
|
||||||
// 获取系统配置
|
// 获取系统配置
|
||||||
var readingType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
var readingType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
||||||
if (globalreadModule != null)
|
if (globalreadModule != null&& isGlobalReading)
|
||||||
{
|
{
|
||||||
// 找到一个全局阅片任务是否有裁判任务
|
// 找到一个全局阅片任务是否有裁判任务
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue