修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8b5800b32e
commit
7873523c1b
|
|
@ -449,12 +449,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
public List<string> VisitTaskNameList { get; set; }
|
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 string Name { get; set; }
|
||||||
public List<string> Value { 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 Guid? TableQuestionId { get; set; }
|
||||||
|
|
||||||
public decimal? RowIndex { get; set; }
|
public decimal? RowIndex { get; set; }
|
||||||
|
|
||||||
|
public ReportChartType? ReportChartTypeEnum { get; set; }
|
||||||
}
|
}
|
||||||
public class SetReadKeyFileInDto
|
public class SetReadKeyFileInDto
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
@ -257,21 +258,62 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
GetReportsChartDataOutDto result = new GetReportsChartDataOutDto()
|
GetReportsChartDataOutDto result = new GetReportsChartDataOutDto()
|
||||||
{
|
{
|
||||||
VisitTaskNameList = data.VisitTaskList.Select(x => x.BlindName).ToList(),
|
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();
|
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();
|
||||||
|
|
||||||
|
|
||||||
if (inDto.QuestionId != null)
|
foreach (var item in target)
|
||||||
|
{
|
||||||
|
ReportChartData chartData = new ReportChartData()
|
||||||
|
{
|
||||||
|
Name = item.QuestionName,
|
||||||
|
Value= new List<string>(),
|
||||||
|
};
|
||||||
|
|
||||||
|
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)
|
var question = data.TaskQuestions.SelectMany(x => x.Childrens)
|
||||||
.Where(x => x.QuestionId == inDto.QuestionId.Value).FirstOrDefault();
|
.Where(x => x.QuestionId == inDto.QuestionId.Value).FirstOrDefault();
|
||||||
if (question != null)
|
if (question != null)
|
||||||
{
|
{
|
||||||
ChartData chartData = new ChartData()
|
ReportChartData chartData = new ReportChartData()
|
||||||
{
|
{
|
||||||
Name = question.QuestionName,
|
Name = question.QuestionName,
|
||||||
Value = new List<string>(),
|
Value = new List<string>(),
|
||||||
|
|
@ -298,7 +340,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
if (lesion != null)
|
if (lesion != null)
|
||||||
{
|
{
|
||||||
ChartData chartData = new ChartData()
|
ReportChartData chartData = new ReportChartData()
|
||||||
{
|
{
|
||||||
Name = lesion.QuestionName,
|
Name = lesion.QuestionName,
|
||||||
Value = new List<string>(),
|
Value = new List<string>(),
|
||||||
|
|
|
||||||
|
|
@ -2472,6 +2472,18 @@ public enum SUVChangeVSBaseline
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片图表类型
|
||||||
|
/// </summary>
|
||||||
|
public enum ReportChartType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 靶病灶
|
||||||
|
/// </summary>
|
||||||
|
Target = 0,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 问题类型 这里序号关系着计算顺序 请勿修改
|
/// 问题类型 这里序号关系着计算顺序 请勿修改
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue