修改
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-11-18 15:48:36 +08:00
parent 8b5800b32e
commit 7873523c1b
3 changed files with 69 additions and 13 deletions

View File

@ -449,12 +449,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public List<string> VisitTaskNameList { get; set; }
public List<ChartData> ChartDataList { get; set; }
public List<ReportChartData> ChartDataList { get; set; }
}
public class ChartData
public class ReportChartData
{
public string Name { get; set; }
public List<string> Value { get; set; }
@ -471,6 +471,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid? TableQuestionId { get; set; }
public decimal? RowIndex { get; set; }
public ReportChartType? ReportChartTypeEnum { get; set; }
}
public class SetReadKeyFileInDto
{

View File

@ -4,6 +4,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
@ -257,21 +258,62 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
GetReportsChartDataOutDto result = new GetReportsChartDataOutDto()
{
VisitTaskNameList = data.VisitTaskList.Select(x => x.BlindName).ToList(),
ChartDataList=new List<ChartData>() { },
ChartDataList=new List<ReportChartData>() { },
};
result.VisitTaskNameList = data.VisitTaskList.Select(x => x.BlindName).ToList();
if (inDto.ReportChartTypeEnum != null)
{
switch (inDto.ReportChartTypeEnum)
{
case ReportChartType.Target:
{
// 这是病灶
var target = data.TaskQuestions.SelectMany(x => x.Childrens)
.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x=>x.Childrens)
.ToList();
foreach (var item in target)
{
ReportChartData chartData = new ReportChartData()
{
Name = item.QuestionName,
Value= new List<string>(),
};
if (inDto.QuestionId != null)
for (var i = 0; i < result.VisitTaskNameList.Count; i++)
{
// 淋巴结的短径
if (item.Childrens.Any(x => x.QuestionMark == QuestionMark.IsLymph && x.Answer[i].Answer.EqEnum(ReadingYesOrNo.Yes)))
{
chartData.Value.Add(item.Childrens.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Answer[i].Answer).FirstOrDefault());
}
else
{
chartData.Value.Add(item.Childrens.Where(x => x.QuestionMark == QuestionMark.MajorAxis).Select(x => x.Answer[i].Answer).FirstOrDefault());
}
}
result.ChartDataList.Add(chartData);
}
}
break;
default:
break;
}
}
else if (inDto.QuestionId != null)
{
var question = data.TaskQuestions.SelectMany(x => x.Childrens)
.Where(x => x.QuestionId == inDto.QuestionId.Value).FirstOrDefault();
if (question != null)
{
ChartData chartData = new ChartData()
ReportChartData chartData = new ReportChartData()
{
Name = question.QuestionName,
Value = new List<string>(),
@ -290,15 +332,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
// 问题 靶病灶
.SelectMany(x => x.Childrens)
// 病灶
.SelectMany(x => x.Childrens).Where(x=> x.RowIndex == inDto.RowIndex)
.SelectMany(x => x.Childrens).Where(x => x.RowIndex == inDto.RowIndex)
// 表格问题
.SelectMany(x => x.Childrens).Where(x => x.TableQuestionId == inDto.TableQuestionId)
.FirstOrDefault();
if (lesion != null)
{
ChartData chartData = new ChartData()
ReportChartData chartData = new ReportChartData()
{
Name = lesion.QuestionName,
Value = new List<string>(),
@ -309,7 +351,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}
result.ChartDataList.Add(chartData);
}
}

View File

@ -2472,11 +2472,23 @@ public enum SUVChangeVSBaseline
}
/// <summary>
/// 阅片图表类型
/// </summary>
public enum ReportChartType
{
/// <summary>
/// 靶病灶
/// </summary>
Target = 0,
/// <summary>
/// 问题类型 这里序号关系着计算顺序 请勿修改
/// </summary>
public enum QuestionType
}
/// <summary>
/// 问题类型 这里序号关系着计算顺序 请勿修改
/// </summary>
public enum QuestionType
{
/// <summary>
/// 靶病灶径线之和SOD