diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs index d78f35dd3..20a4eebcf 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs @@ -45,7 +45,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate switch (readingImportType) { - case ReadingImportType.IVUS_MatchingSegment: + case ReadingImportType.ROI: await UploadIVUSTemplate(); break; } @@ -846,7 +846,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync(); - var question = await _readingQuestionTrialRepository.Where(x => x.LesionType == LesionType.PAV && x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).FirstNotNullAsync(); + var question = await _readingQuestionTrialRepository.Where(x => x.LesionType == LesionType.ROI && x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).FirstNotNullAsync(); var tableQuestions = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == question.Id) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index 39b91e9cf..a941958f4 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -40,7 +40,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate switch (readingImportType) { - case ReadingImportType.OCT_FCT: + case ReadingImportType.ROI: await UploadOCTFCTTemplate(); break; @@ -1263,7 +1263,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate public async Task GetAvgFCT(ReadingCalculateDto inDto) { return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.ROI).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList) - .Where(x => x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Answer.IsNullOrEmptyReturn0()).Average(); + .Where(x => x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Answer.IsNullOrEmptyReturn0()).DefaultIfEmpty(0).Average(); } /// @@ -1274,7 +1274,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate public async Task GetAvgLipidAngle(ReadingCalculateDto inDto) { return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.ROI).SelectMany(x => x.TableRowInfoList).SelectMany(x => x.TableQuestionList) - .Where(x => x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Answer.IsNullOrEmptyReturn0()).Average(); + .Where(x => x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Answer.IsNullOrEmptyReturn0()).DefaultIfEmpty(0).Average(); } @@ -1299,7 +1299,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync(); - var question = await _readingQuestionTrialRepository.Where(x => x.LesionType == LesionType.PatchDataStatistics && x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).FirstNotNullAsync(); + var question = await _readingQuestionTrialRepository.Where(x => x.LesionType == LesionType.ROI && x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).FirstNotNullAsync(); var tableQuestions = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId== question.Id) diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 4e16ae054..0991304b7 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -54,6 +54,11 @@ namespace IRaCIS.Core.Domain.Share /// OCT_LipidAngle = 2, + /// + /// ROI + /// + ROI = 3, + }