diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs index 672413414..5b628e42f 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IVUSCalculateService.cs @@ -449,8 +449,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate VisitTaskId = inDto.VisitTaskId }); targetSegmentAnswer = string.Join(",", targetSegmentData - .Where(x =>x.BodyPartForEdit.IsNotNullOrEmpty()) - .Select(x => x.BodyPartForEdit)); + .Where(x => x.BodyPartForEdit.IsNotNullOrEmpty()) + .SelectMany(x => x.BodyPartForEdit.Split('|')) + .Where(s => !string.IsNullOrWhiteSpace(s)) + .Distinct()); + + + + } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs index e5bdc061b..78264856c 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/OCTCalculateService.cs @@ -306,8 +306,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate VisitTaskId = inDto.VisitTaskId }); targetSegmentAnswer = string.Join(",", targetSegmentData - .Where(x => x.BodyPartForEdit.IsNotNullOrEmpty()) - .Select(x => x.BodyPartForEdit)); + .Where(x => x.BodyPartForEdit.IsNotNullOrEmpty()) + .SelectMany(x => x.BodyPartForEdit.Split('|')) + .Where(s => !string.IsNullOrWhiteSpace(s)) + .Distinct()); }