diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs index e4819690c..a120a38f2 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/ReadingCalculateService.cs @@ -449,6 +449,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var alldata = r1Data.VisitTaskList.Count() > r2Data.VisitTaskList.Count() ? r1Data : r2Data; var visitTaskName = alldata.VisitTaskList.Select(x => x.BlindName).ToList(); var length = alldata.VisitTaskList.Count(); + + // -1转为空 + List negativeToString = new List() + { + QuestionType.DaysBetween, + }; async Task GetData(List arms) { @@ -480,7 +486,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Evaluation = new List>() { } }; - + var visitAnswerType = QuestionType.Tumor; + if (criterion.CriterionType == CriterionType.PCWG3) + { + visitAnswerType = QuestionType.SiteVisitForTumorEvaluation; + } + + result.Evaluation.Add(visitTaskName.Select(x=> new EvaluationValue() { Value=x }).ToList()); @@ -498,7 +510,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var r1data = r1.TaskQuestions .SelectMany(x => x.Childrens) - .Where(x => x.QuestionType == QuestionType.Tumor) + .Where(x => x.QuestionType == visitAnswerType) .SelectMany(x => x.Answer.Select(a => new EvaluationValue { DictionaryCode = x.DictionaryCode, @@ -529,7 +541,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var r2data = r2.TaskQuestions .SelectMany(x => x.Childrens) - .Where(x => x.QuestionType == QuestionType.Tumor) + .Where(x => x.QuestionType == visitAnswerType) .SelectMany(x => x.Answer.Select(a => new EvaluationValue { DictionaryCode = x.DictionaryCode, @@ -568,6 +580,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate Name = item?.QuestionName??string.Empty, Value = itemdata?.Answer?.Select(a => a.Answer).ToList() ?? new List() }; + if (negativeToString.Contains(item.QuestionType)) + { + cd.Value.ForEach(item1 => + { + item1 = item1 == "-1" ? string.Empty : item1; + }); + } chartList.Add(cd); } groups.Add(new ChartItem @@ -627,6 +646,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate result.QuestionCharts.AddRange(r2Groups); } + if (criterion.CriterionType == CriterionType.PCWG3) + { + result.TargetCharts = new List() { }; + } return result; }