Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
6d042459e3
|
|
@ -122,6 +122,12 @@
|
||||||
<Content Update="wwwroot\ReadReoprtTemplate\ReportTemplate_RECIST1.1_CN_V1.docx">
|
<Content Update="wwwroot\ReadReoprtTemplate\ReportTemplate_RECIST1.1_CN_V1.docx">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Update="wwwroot\ReadReoprtTemplate\TumorEvaluation_IRECIST1.1_CN_V1.docx">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\ReadReoprtTemplate\TumorEvaluation_IRECIST1.1_EN_V1.docx">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Update="wwwroot\ReadReoprtTemplate\TumorEvaluation_RECIST1.1_CN_V1.docx">
|
<Content Update="wwwroot\ReadReoprtTemplate\TumorEvaluation_RECIST1.1_CN_V1.docx">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -7087,7 +7087,7 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.VisitList">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.VisitList">
|
||||||
<summary>
|
<summary>
|
||||||
所有访视的靶病灶列表
|
所有访视的靶病灶列表 最多有三个
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.SubjectCode">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.SubjectCode">
|
||||||
|
|
@ -7115,11 +7115,143 @@
|
||||||
靶病灶信息
|
靶病灶信息
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.GetTargetInfoList(System.String)">
|
||||||
|
<summary>
|
||||||
|
病灶名称
|
||||||
|
</summary>
|
||||||
|
<param name="lesionName"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.GetVisitAnswer(System.Int32,System.String,System.Int32,System.String)">
|
||||||
|
<summary>
|
||||||
|
获取访视答案
|
||||||
|
</summary>
|
||||||
|
<param name="visitIndex">访视Index 第几个访视</param>
|
||||||
|
<param name="lesionName">病灶字段名 数组</param>
|
||||||
|
<param name="num">第几个病灶</param>
|
||||||
|
<param name="fieldName">要取的字段名</param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.NoTargetInfoList">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.NoTargetInfoList">
|
||||||
<summary>
|
<summary>
|
||||||
非靶病灶信息
|
非靶病灶信息
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.NewTargetInfoList">
|
||||||
|
<summary>
|
||||||
|
新靶病灶信息
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportTumorEvaluationInfo.NewNoTargetInfoList">
|
||||||
|
<summary>
|
||||||
|
新非靶病灶信息
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.OneHavePreviousNewLesions">
|
||||||
|
<summary>
|
||||||
|
有明确新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.OneHaveTriggeringIRECSITNewLesions">
|
||||||
|
<summary>
|
||||||
|
有触发iRECST后的新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.OneNewTargetResult">
|
||||||
|
<summary>
|
||||||
|
新靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.OneNewNoTargetResult">
|
||||||
|
<summary>
|
||||||
|
新非靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.OneOtherPreviousNewLesionResult">
|
||||||
|
<summary>
|
||||||
|
其他既往新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.OneTriggeringIRECSITResult">
|
||||||
|
<summary>
|
||||||
|
存在触发iRECIST后新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.OneNewLesionEvaluationResult">
|
||||||
|
<summary>
|
||||||
|
新病灶整体评估
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.TwoHavePreviousNewLesions">
|
||||||
|
<summary>
|
||||||
|
有明确新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.TwoHaveTriggeringIRECSITNewLesions">
|
||||||
|
<summary>
|
||||||
|
有触发iRECST后的新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.TwoNewTargetResult">
|
||||||
|
<summary>
|
||||||
|
新靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.TwoNewNoTargetResult">
|
||||||
|
<summary>
|
||||||
|
新非靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.TwoOtherPreviousNewLesionResult">
|
||||||
|
<summary>
|
||||||
|
其他既往新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.TwoTriggeringIRECSITResult">
|
||||||
|
<summary>
|
||||||
|
存在触发iRECIST后新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.TwoNewLesionEvaluationResult">
|
||||||
|
<summary>
|
||||||
|
新病灶整体评估
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.ThreeHavePreviousNewLesions">
|
||||||
|
<summary>
|
||||||
|
有明确新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.ThreeHaveTriggeringIRECSITNewLesions">
|
||||||
|
<summary>
|
||||||
|
有触发iRECST后的新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.ThreeNewTargetResult">
|
||||||
|
<summary>
|
||||||
|
新靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.ThreeNewNoTargetResult">
|
||||||
|
<summary>
|
||||||
|
新非靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.ThreeOtherPreviousNewLesionResult">
|
||||||
|
<summary>
|
||||||
|
其他既往新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.ThreeTriggeringIRECSITResult">
|
||||||
|
<summary>
|
||||||
|
存在触发iRECIST后新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportData.ThreeNewLesionEvaluationResult">
|
||||||
|
<summary>
|
||||||
|
新病灶整体评估
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.VisitName">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.VisitName">
|
||||||
<summary>
|
<summary>
|
||||||
访视名称
|
访视名称
|
||||||
|
|
@ -7150,6 +7282,16 @@
|
||||||
是否有新病灶
|
是否有新病灶
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.HavePreviousNewLesions">
|
||||||
|
<summary>
|
||||||
|
是否有明确既往新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.HaveTriggeringIRECSITNewLesions">
|
||||||
|
<summary>
|
||||||
|
是否有触发iRECIST后新病灶
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.TargetResult">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.TargetResult">
|
||||||
<summary>
|
<summary>
|
||||||
靶病灶结果
|
靶病灶结果
|
||||||
|
|
@ -7160,6 +7302,31 @@
|
||||||
非靶病灶结果
|
非靶病灶结果
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.NewTargetResult">
|
||||||
|
<summary>
|
||||||
|
新靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.NewNoTargetResult">
|
||||||
|
<summary>
|
||||||
|
新非靶病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.OtherPreviousNewLesionResult">
|
||||||
|
<summary>
|
||||||
|
其他既往新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.TriggeringIRECSITResult">
|
||||||
|
<summary>
|
||||||
|
存在触发iRECIST后新病灶结果
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.NewLesionEvaluationResult">
|
||||||
|
<summary>
|
||||||
|
新病灶整体评估
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.OverallResult">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.OverallResult">
|
||||||
<summary>
|
<summary>
|
||||||
总体结果
|
总体结果
|
||||||
|
|
@ -7195,6 +7362,16 @@
|
||||||
非靶病灶信息
|
非靶病灶信息
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.NewVisitTargetInfoList">
|
||||||
|
<summary>
|
||||||
|
新靶病灶信息
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ExportVisitData.NewNoVisitTargetInfoList">
|
||||||
|
<summary>
|
||||||
|
新非靶病灶信息
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.VisitLesionInfo.RowMark">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.VisitLesionInfo.RowMark">
|
||||||
<summary>
|
<summary>
|
||||||
序号
|
序号
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
using System;
|
using DocumentFormat.OpenXml.Wordprocessing;
|
||||||
|
using MassTransit.Caching.Internals;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -17,7 +21,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class ExportTumorEvaluationInfo
|
public class ExportTumorEvaluationInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所有访视的靶病灶列表
|
/// 所有访视的靶病灶列表 最多有三个
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ExportVisitData> VisitList { get; set; }
|
public List<ExportVisitData> VisitList { get; set; }
|
||||||
|
|
||||||
|
|
@ -89,27 +93,81 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
List<TargetInfo> targets=new List<TargetInfo>();
|
return GetTargetInfoList("VisitTargetInfoList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 病灶名称
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="lesionName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<TargetInfo> GetTargetInfoList(string lesionName)
|
||||||
|
{
|
||||||
|
List<TargetInfo> targets = new List<TargetInfo>();
|
||||||
var index = 0;
|
var index = 0;
|
||||||
foreach (var item in VisitList.Last().VisitTargetInfoList)
|
|
||||||
|
PropertyInfo? listProp = VisitList.Last().GetType().GetProperty(lesionName);
|
||||||
|
|
||||||
|
if (listProp != null)
|
||||||
|
{
|
||||||
|
List<VisitLesionInfo>? lesionList = listProp.GetValue(VisitList.Last()) as List<VisitLesionInfo>;
|
||||||
|
|
||||||
|
if (lesionList != null)
|
||||||
|
{
|
||||||
|
foreach (var item in lesionList)
|
||||||
{
|
{
|
||||||
TargetInfo targetInfo = new TargetInfo()
|
TargetInfo targetInfo = new TargetInfo()
|
||||||
{
|
{
|
||||||
Title = item.Title,
|
Title = item.Title,
|
||||||
VisitOneImgNum = item.VisitImgNum,
|
VisitOneImgNum = GetVisitAnswer(0, lesionName, index, "VisitImgNum"),
|
||||||
VisitOneLength = item.VisitLength.ToString(),
|
VisitOneLength = GetVisitAnswer(0, lesionName, index, "VisitLength"),
|
||||||
VisitTwoImgNum = VisitList.Count >= 2 ? VisitTwo.VisitTargetInfoList[index].VisitImgNum : string.Empty,
|
VisitTwoImgNum = GetVisitAnswer(1, lesionName, index, "VisitImgNum"),
|
||||||
VisitTwoLength = VisitList.Count >= 2 ? VisitTwo.VisitTargetInfoList[index].VisitLength.ToString() : string.Empty,
|
VisitTwoLength = GetVisitAnswer(1, lesionName, index, "VisitLength"),
|
||||||
VisitThreeImgNum = VisitList.Count >= 3 ? VisitThree.VisitTargetInfoList[index].VisitImgNum : string.Empty,
|
VisitThreeImgNum = GetVisitAnswer(2, lesionName, index, "VisitImgNum"),
|
||||||
VisitThreeLength = VisitList.Count >= 3 ? VisitThree.VisitTargetInfoList[index].VisitLength.ToString() : string.Empty
|
VisitThreeLength = GetVisitAnswer(2, lesionName, index, "VisitLength"),
|
||||||
};
|
};
|
||||||
targets.Add(targetInfo);
|
targets.Add(targetInfo);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
return targets;
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return targets;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取访视答案
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="visitIndex">访视Index 第几个访视</param>
|
||||||
|
/// <param name="lesionName">病灶字段名 数组</param>
|
||||||
|
/// <param name="num">第几个病灶</param>
|
||||||
|
/// <param name="fieldName">要取的字段名</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private string GetVisitAnswer(int visitIndex, string lesionName , int num, string fieldName)
|
||||||
|
{
|
||||||
|
var result= string.Empty;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PropertyInfo? listProp = VisitList[visitIndex].GetType().GetProperty(lesionName);
|
||||||
|
IList? list = listProp.GetValue(VisitList[visitIndex]) as IList;
|
||||||
|
object? listItem = list[num];
|
||||||
|
FieldInfo field = listItem.GetType().GetField(fieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
|
if (field != null)
|
||||||
|
return field.GetValue(listItem).ToString();
|
||||||
|
PropertyInfo prop = listItem.GetType().GetProperty(fieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
|
if (prop != null)
|
||||||
|
return prop.GetValue(listItem).ToString();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -119,26 +177,30 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
List<TargetInfo> targets = new List<TargetInfo>();
|
return GetTargetInfoList("VisitNoTargetInfoList"); ;
|
||||||
|
|
||||||
var index = 0;
|
|
||||||
foreach (var item in VisitList.Last().VisitNoTargetInfoList)
|
|
||||||
{
|
|
||||||
TargetInfo targetInfo = new TargetInfo()
|
|
||||||
{
|
|
||||||
Title = item.Title,
|
|
||||||
VisitOneImgNum = item.VisitImgNum,
|
|
||||||
VisitOneLength = item.VisitLength!=null? item.VisitLength.Value.ToString():string.Empty,
|
|
||||||
VisitTwoImgNum = VisitList.Count >= 2 ? VisitTwo.VisitNoTargetInfoList[index].VisitImgNum : string.Empty,
|
|
||||||
VisitTwoLength = VisitList.Count >= 2&& VisitTwo.VisitNoTargetInfoList[index].VisitLength!=null ? VisitTwo.VisitNoTargetInfoList[index].VisitLength.Value.ToString() : string.Empty,
|
|
||||||
VisitThreeImgNum = VisitList.Count >= 3 ? VisitThree.VisitNoTargetInfoList[index].VisitImgNum : string.Empty,
|
|
||||||
VisitThreeLength = VisitList.Count >= 3&& VisitThree.VisitNoTargetInfoList[index].VisitLength!=null ? VisitThree.VisitNoTargetInfoList[index].VisitLength.Value.ToString() : string.Empty
|
|
||||||
};
|
|
||||||
targets.Add(targetInfo);
|
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
return targets;
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新靶病灶信息
|
||||||
|
/// </summary>
|
||||||
|
public List<TargetInfo> NewTargetInfoList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return GetTargetInfoList("NewVisitTargetInfoList"); ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新非靶病灶信息
|
||||||
|
/// </summary>
|
||||||
|
public List<TargetInfo> NewNoTargetInfoList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return GetTargetInfoList("NewNoVisitTargetInfoList"); ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -174,10 +236,47 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public string OneHaveNewLesion { get; set; } = string.Empty;
|
public string OneHaveNewLesion { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 有明确新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string OneHavePreviousNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 有触发iRECST后的新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string OneHaveTriggeringIRECSITNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string OneNewTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新非靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string OneNewNoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 其他既往新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string OneOtherPreviousNewLesionResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存在触发iRECIST后新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string OneTriggeringIRECSITResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新病灶整体评估
|
||||||
|
/// </summary>
|
||||||
|
public string OneNewLesionEvaluationResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
public string OneTargetResult { get; set; } = string.Empty;
|
public string OneTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string OneNoTargetResult { get; set; } = string.Empty;
|
public string OneNoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
public string OneOverallResult { get; set; } = string.Empty;
|
public string OneOverallResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string OneDoctorSignTime { get; set; } = string.Empty;
|
public string OneDoctorSignTime { get; set; } = string.Empty;
|
||||||
|
|
@ -195,6 +294,41 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public string TwoHaveNewLesion { get; set; } = string.Empty;
|
public string TwoHaveNewLesion { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 有明确新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string TwoHavePreviousNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 有触发iRECST后的新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string TwoHaveTriggeringIRECSITNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string TwoNewTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新非靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string TwoNewNoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 其他既往新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string TwoOtherPreviousNewLesionResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存在触发iRECIST后新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string TwoTriggeringIRECSITResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新病灶整体评估
|
||||||
|
/// </summary>
|
||||||
|
public string TwoNewLesionEvaluationResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string TwoTargetResult { get; set; } = string.Empty;
|
public string TwoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string TwoNoTargetResult { get; set; } = string.Empty;
|
public string TwoNoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
@ -215,6 +349,41 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public string ThreeHaveNewLesion { get; set; } = string.Empty;
|
public string ThreeHaveNewLesion { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 有明确新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string ThreeHavePreviousNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 有触发iRECST后的新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string ThreeHaveTriggeringIRECSITNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string ThreeNewTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新非靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string ThreeNewNoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 其他既往新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string ThreeOtherPreviousNewLesionResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存在触发iRECIST后新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string ThreeTriggeringIRECSITResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新病灶整体评估
|
||||||
|
/// </summary>
|
||||||
|
public string ThreeNewLesionEvaluationResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string ThreeTargetResult { get; set; } = string.Empty;
|
public string ThreeTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string ThreeNoTargetResult { get; set; } = string.Empty;
|
public string ThreeNoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
@ -258,6 +427,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string HaveNewLesion { get; set; } = string.Empty;
|
public string HaveNewLesion { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有明确既往新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string HavePreviousNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有触发iRECIST后新病灶
|
||||||
|
/// </summary>
|
||||||
|
public string HaveTriggeringIRECSITNewLesions { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 靶病灶结果
|
/// 靶病灶结果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -268,6 +447,32 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string NoTargetResult { get; set; } = string.Empty;
|
public string NoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string NewTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新非靶病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string NewNoTargetResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 其他既往新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string OtherPreviousNewLesionResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存在触发iRECIST后新病灶结果
|
||||||
|
/// </summary>
|
||||||
|
public string TriggeringIRECSITResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新病灶整体评估
|
||||||
|
/// </summary>
|
||||||
|
public string NewLesionEvaluationResult { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 总体结果
|
/// 总体结果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -316,6 +521,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<VisitLesionInfo> VisitNoTargetInfoList { get; set; } = new List<VisitLesionInfo>();
|
public List<VisitLesionInfo> VisitNoTargetInfoList { get; set; } = new List<VisitLesionInfo>();
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新靶病灶信息
|
||||||
|
/// </summary>
|
||||||
|
public List<VisitLesionInfo> NewVisitTargetInfoList { get; set; } = new List<VisitLesionInfo>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新非靶病灶信息
|
||||||
|
/// </summary>
|
||||||
|
public List<VisitLesionInfo> NewNoVisitTargetInfoList { get; set; } = new List<VisitLesionInfo>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class VisitLesionInfo
|
public class VisitLesionInfo
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
[ApiExplorerSettings(GroupName = "Reading")]
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
public class IRECIST1Point1CalculateService(IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository,
|
public class IRECIST1Point1CalculateService(IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository,
|
||||||
IRepository<VisitTask> _visitTaskRepository,
|
IRepository<VisitTask> _visitTaskRepository,
|
||||||
|
IRepository<DicomInstance> _dicomInstanceRepository,
|
||||||
IRepository<HIRHospital> _hIRHospitalRepository,
|
IRepository<HIRHospital> _hIRHospitalRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||||
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
|
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
|
||||||
|
|
@ -65,7 +66,284 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<Stream> DownLoadTumorEvaluationStream(DownLoadReadReportInDto inDto)
|
public async Task<Stream> DownLoadTumorEvaluationStream(DownLoadReadReportInDto inDto)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingCalculate_DownLoadReadReport"]);
|
var downFile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{inDto.DownLoadGuid}");
|
||||||
|
Directory.CreateDirectory(downFile);
|
||||||
|
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId && x.ReadingCategory == ReadingCategory.Visit)
|
||||||
|
.Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
|
var visitInfo = await _subjectVisitRepository.Where(x => x.Id == taskinfo.SourceSubjectVisitId).Include(x => x.StudyList).FirstNotNullAsync();
|
||||||
|
var subjectInfo = await _subjectRepository.Where(x => x.Id == taskinfo.SubjectId).Include(x => x.Trial).Include(x => x.SubjectPatientList).FirstNotNullAsync();
|
||||||
|
var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync();
|
||||||
|
var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync();
|
||||||
|
var trialQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync();
|
||||||
|
var tableQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync();
|
||||||
|
var dicotionCode = trialQuestion.Where(x => x.DictionaryCode != string.Empty).Select(x => x.DictionaryCode).Distinct().ToList();
|
||||||
|
dicotionCode.AddRange(tableQuestion.Where(x => x.DictionaryCode != string.Empty).Select(x => x.DictionaryCode).Distinct());
|
||||||
|
var dictionList = await _dictionaryRepository.Where(x => dicotionCode.Contains(x.Code)).Include(x => x.ChildList).ToListAsync();
|
||||||
|
var unitDictionary = await _dictionaryRepository.Where(x => x.Code == "ValueUnit").Include(x => x.ChildList).ToListAsync();
|
||||||
|
|
||||||
|
var relatedVisitTask = await ServiceProvider.GetService<IReadingImageTaskService>().GetRelatedVisitTask(new GetRelatedVisitTaskInDto()
|
||||||
|
{
|
||||||
|
VisitTaskId = inDto.VisitTaskId
|
||||||
|
});
|
||||||
|
|
||||||
|
var relatedTaskIds = relatedVisitTask.Item1.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
|
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => relatedTaskIds.Contains(x.VisitTaskId)).Include(x => x.ReadingQuestionTrial).ToListAsync();
|
||||||
|
|
||||||
|
var rowinfoList = await _readingTableAnswerRowInfoRepository.Where(x => relatedTaskIds.Contains(x.VisitTaskId)).Include(x => x.VisitTask).Include(x => x.ReadingQuestionTrial).ToListAsync();
|
||||||
|
|
||||||
|
var instanceIdList = rowinfoList.Select(x => x.InstanceId).ToList();
|
||||||
|
var instanceList = await _dicomInstanceRepository.Where(x => instanceIdList.Contains(x.Id)).Include(x => x.DicomSerie.DicomStudy).ToListAsync();
|
||||||
|
|
||||||
|
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => relatedTaskIds.Contains(x.VisitTaskId)).Include(x => x.ReadingQuestionTrial).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
|
||||||
|
var taskinfoList = await _visitTaskRepository.Where(x => relatedTaskIds.Contains(x.Id))
|
||||||
|
.Include(x => x.SourceSubjectVisit).Include(x => x.SourceSubjectVisit.StudyList)
|
||||||
|
.Include(x => x.DoctorUser).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
string getHavePreviousNewLesions(Guid visitId)
|
||||||
|
{
|
||||||
|
var answer = answerList.Where(x => x.ReadingQuestionTrial.QuestionType == QuestionType.OtherNewTargetLesion && x.VisitTaskId == visitId).Select(x => x.Answer).FirstIsNullReturnEmpty();
|
||||||
|
if(answer==string.Empty)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
if (answer == ((int)(OtherPreviousNewLesionAssessment.iUPD)).ToString())
|
||||||
|
{
|
||||||
|
return _localizer["CriterionCalculateExport_Yes"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return _localizer["CriterionCalculateExport_No"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ExportVisitData> exportVisitDatas = taskinfoList
|
||||||
|
.Select(x => new ExportVisitData()
|
||||||
|
{
|
||||||
|
VisitName = x.SourceSubjectVisit.VisitName,
|
||||||
|
VisitNum = x.VisitTaskNum,
|
||||||
|
CheckDate = string.Join(",", x.SourceSubjectVisit.StudyList.Where(x => x.StudyTime != null).Select(x => x.StudyTime.Value.ToString("yyyy-MM-dd"))),
|
||||||
|
CheckInfoList = x.SourceSubjectVisit.StudyList.Select(x => new DicomStudyInfo()
|
||||||
|
{
|
||||||
|
BodyPartExamined = x.BodyPartExamined,
|
||||||
|
Modalities = x.Modalities
|
||||||
|
}).ToList(),
|
||||||
|
HaveNewLesion = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.NewLesions),
|
||||||
|
// 是否有明确既往新病灶 // 结果为IPUD就是有 其他的是无
|
||||||
|
HavePreviousNewLesions = getHavePreviousNewLesions(x.Id),
|
||||||
|
|
||||||
|
// 是否有明确既往新病灶
|
||||||
|
HaveTriggeringIRECSITNewLesions = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.IRECISTNewTargetLesion),
|
||||||
|
|
||||||
|
NewTargetResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.NewTargetLesion),
|
||||||
|
NewNoTargetResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.NewNoTargetLesion),
|
||||||
|
OtherPreviousNewLesionResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.OtherNewTargetLesion),
|
||||||
|
TriggeringIRECSITResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.IRECISTNewTargetLesion),
|
||||||
|
NewLesionEvaluationResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.NewLesionEvaluation),
|
||||||
|
|
||||||
|
TargetResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.TargetLesion),
|
||||||
|
NoTargetResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.NoTargetLesion),
|
||||||
|
OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor),
|
||||||
|
DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName,
|
||||||
|
SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
|
VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id,5),
|
||||||
|
VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id),
|
||||||
|
NewVisitTargetInfoList = getLesionInfo(LesionType.NewTargetLesion, x.Id,5),
|
||||||
|
NewNoVisitTargetInfoList = getLesionInfo(LesionType.NewNonTargetLesion, x.Id),
|
||||||
|
}).OrderBy(x => x.VisitNum).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
#region 两个函数
|
||||||
|
List<VisitLesionInfo> getLesionInfo(LesionType lesionType, Guid Visittaskid, int? minNum = null)
|
||||||
|
{
|
||||||
|
var targetFocus = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.ReadingQuestionTrial.LesionType == lesionType).OrderBy(x => x.RowIndex).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var targetInfo = new List<VisitLesionInfo>();
|
||||||
|
|
||||||
|
int num = 1;
|
||||||
|
foreach (var item in targetFocus)
|
||||||
|
{
|
||||||
|
|
||||||
|
VisitLesionInfo target = new VisitLesionInfo
|
||||||
|
{
|
||||||
|
RowMark = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.RowIndex == item.RowIndex && x.ReadingQuestionTrial.LesionType == lesionType).Select(x => x.RowMark).FirstIsNullReturnEmpty(),
|
||||||
|
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
||||||
|
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex),
|
||||||
|
Number = num,
|
||||||
|
StudyIdStr = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.StudyId).FirstIsNullReturnEmpty(),
|
||||||
|
RowId = item.Id,
|
||||||
|
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
||||||
|
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
||||||
|
VisitLength = getStateInfo(item.VisitTaskId, item.RowIndex, lesionType),
|
||||||
|
};
|
||||||
|
targetInfo.Add(target);
|
||||||
|
num++;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (minNum != null)
|
||||||
|
{
|
||||||
|
for (int i = num; i <= minNum.Value; i++)
|
||||||
|
{
|
||||||
|
VisitLesionInfo target = new VisitLesionInfo
|
||||||
|
{
|
||||||
|
Number = i,
|
||||||
|
};
|
||||||
|
targetInfo.Add(target);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return targetInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
decimal getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType)
|
||||||
|
{
|
||||||
|
// 非淋巴结取长径 淋巴结取长短径
|
||||||
|
var state = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.State, item);
|
||||||
|
var majorAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.MajorAxis, item, false);
|
||||||
|
|
||||||
|
var isLymph = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.IsLymph, item);
|
||||||
|
var shortAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.ShortAxis, item, false);
|
||||||
|
|
||||||
|
var result = string.Empty;
|
||||||
|
|
||||||
|
if (!majorAxis.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = majorAxis;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = shortAxis;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
var researchProgramNo = subjectInfo.Trial.ResearchProgramNo;
|
||||||
|
var subjectName = subjectInfo.ShortName;
|
||||||
|
var subjectCode = string.Join(",", patientIdStrList); //患者编号;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<ExportTumorEvaluationInfo> resultdata = new List<ExportTumorEvaluationInfo>();
|
||||||
|
List<string> times = new List<string>() { "One", "Two", "Three" };
|
||||||
|
List<string> columns = new List<string>() {
|
||||||
|
"VisitName",
|
||||||
|
"CheckDate",
|
||||||
|
"CheckInfoStr",
|
||||||
|
"HaveNewLesion",
|
||||||
|
"TargetResult",
|
||||||
|
"NoTargetResult",
|
||||||
|
"OverallResult",
|
||||||
|
"DoctorSignTime",
|
||||||
|
"HavePreviousNewLesions",
|
||||||
|
"HaveTriggeringIRECSITNewLesions",
|
||||||
|
"NewTargetResult",
|
||||||
|
"NewNoTargetResult",
|
||||||
|
"OtherPreviousNewLesionResult",
|
||||||
|
"TriggeringIRECSITResult",
|
||||||
|
"NewLesionEvaluationResult",
|
||||||
|
};
|
||||||
|
|
||||||
|
var forCount = (int)Math.Ceiling((double)exportVisitDatas.Count() / 3);
|
||||||
|
for (int i = 0; i < forCount; i++)
|
||||||
|
{
|
||||||
|
ExportTumorEvaluationInfo export = new ExportTumorEvaluationInfo
|
||||||
|
{
|
||||||
|
ResearchProgramNo = researchProgramNo,
|
||||||
|
SubjectName = subjectName,
|
||||||
|
SubjectCode = subjectCode,
|
||||||
|
VisitList = exportVisitDatas.Skip(i * 3).Take(3).ToList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
export.Lesion = new ExportData()
|
||||||
|
{
|
||||||
|
OneTargetSum = export.VisitOne.TargetSum.ToString(),
|
||||||
|
TwoTargetSum = export.VisitTwo.VisitTargetInfoList.Count() > 0 ? export.VisitTwo.TargetSum.ToString() : string.Empty,
|
||||||
|
ThreeTargetSum = export.VisitThree.VisitTargetInfoList.Count() > 0 ? export.VisitThree.TargetSum.ToString() : string.Empty,
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
foreach (var time in times)
|
||||||
|
{
|
||||||
|
foreach (var column in columns)
|
||||||
|
{
|
||||||
|
_generalCalculateService.SetPropertyDynamically(export.Lesion, column, export, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i >= forCount - 1)
|
||||||
|
{
|
||||||
|
export.IsLastPage = true;
|
||||||
|
// 之后最后一个任务需要签名
|
||||||
|
var thisVisitListNum = export.VisitList.Count();
|
||||||
|
switch (thisVisitListNum)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
export.Lesion.OneDoctorSign = _localizer["CriterionCalculateExport_Sign"];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
export.Lesion.TwoDoctorSign = _localizer["CriterionCalculateExport_Sign"];
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
export.Lesion.ThreeDoctorSign = _localizer["CriterionCalculateExport_Sign"];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
resultdata.Add(export);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var value = new
|
||||||
|
{
|
||||||
|
VisitTaskList = resultdata,
|
||||||
|
IsLastPage = false,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var templatePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_{(_userInfo.IsEn_Us ? "EN" : "CN")}_V1.docx");
|
||||||
|
var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync();
|
||||||
|
if (isConvertedTask)
|
||||||
|
{
|
||||||
|
templatePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/TumorEvaluation_IRECIST1.1_{(_userInfo.IsEn_Us ? "EN" : "CN")}_V1.docx");
|
||||||
|
|
||||||
|
}
|
||||||
|
var outputFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{inDto.DownLoadGuid}.docx");
|
||||||
|
|
||||||
|
|
||||||
|
MiniWord.SaveAsByTemplate(outputFilePath, templatePath, value);
|
||||||
|
|
||||||
|
|
||||||
|
//// 获取文件夹中的所有文件路径
|
||||||
|
Directory.Delete(downFile, true);
|
||||||
|
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
Stream stream = _generalCalculateService.ReadAndReturnStream(outputFilePath);
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var pdfurl = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"wwwroot/ReadReoprtTemplate/downLoad");
|
||||||
|
FileConvertHelper.ConvertWordToPdf(outputFilePath, pdfurl);
|
||||||
|
Stream stream = _generalCalculateService.ReadAndReturnStream(pdfurl + $"/{inDto.DownLoadGuid}.pdf");
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -117,14 +117,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
int num = 1;
|
int num = 1;
|
||||||
foreach (var item in targetFocus)
|
foreach (var item in targetFocus)
|
||||||
{
|
{
|
||||||
|
// 以最后一个为准
|
||||||
|
var typicalIntrahepaticLesions = tableAnswerList.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.ReadingQuestionTrial.LesionType == lesionType && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.TypicalIntrahepaticLesion && x.RowIndex == item.RowIndex).Select(x => x.Answer).FirstIsNullReturnEmpty();
|
||||||
|
|
||||||
|
var typicalIntrahepaticLesionsText = string.Empty;
|
||||||
|
if (typicalIntrahepaticLesions == ((int)ReadingYesOrNo.Yes).ToString())
|
||||||
|
{
|
||||||
|
typicalIntrahepaticLesionsText = $",{_localizer["CriterionCalculateExport_TIL"]}";
|
||||||
|
}
|
||||||
|
|
||||||
VisitLesionInfo target = new VisitLesionInfo
|
VisitLesionInfo target = new VisitLesionInfo
|
||||||
{
|
{
|
||||||
RowMark = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.RowIndex == item.RowIndex && x.ReadingQuestionTrial.LesionType == lesionType).Select(x => x.RowMark).FirstIsNullReturnEmpty(),
|
RowMark = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.RowIndex == item.RowIndex && x.ReadingQuestionTrial.LesionType == lesionType).Select(x => x.RowMark).FirstIsNullReturnEmpty(),
|
||||||
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
||||||
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex),
|
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex)+ typicalIntrahepaticLesionsText,
|
||||||
Number = num,
|
Number = num,
|
||||||
StudyIdStr = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.StudyId).FirstOrDefault(),
|
StudyIdStr = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.StudyId).FirstIsNullReturnEmpty(),
|
||||||
RowId = item.Id,
|
RowId = item.Id,
|
||||||
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
||||||
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
||||||
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex),
|
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex),
|
||||||
Number = num,
|
Number = num,
|
||||||
StudyIdStr = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.StudyId).FirstOrDefault(),
|
StudyIdStr = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.StudyId).FirstIsNullReturnEmpty(),
|
||||||
RowId = item.Id,
|
RowId = item.Id,
|
||||||
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
||||||
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
||||||
|
|
|
||||||
|
|
@ -112,13 +112,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor),
|
OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor),
|
||||||
DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName,
|
DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName,
|
||||||
SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"),
|
SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id),
|
VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id,5),
|
||||||
VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id),
|
VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id),
|
||||||
}).OrderBy(x => x.VisitNum).ToList();
|
}).OrderBy(x => x.VisitNum).ToList();
|
||||||
|
|
||||||
|
|
||||||
#region 两个函数
|
#region 两个函数
|
||||||
List<VisitLesionInfo> getLesionInfo(LesionType lesionType, Guid Visittaskid)
|
List<VisitLesionInfo> getLesionInfo(LesionType lesionType, Guid Visittaskid,int? minNum=null)
|
||||||
{
|
{
|
||||||
var targetFocus = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.ReadingQuestionTrial.LesionType == lesionType).OrderBy(x => x.RowIndex).ToList();
|
var targetFocus = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.ReadingQuestionTrial.LesionType == lesionType).OrderBy(x => x.RowIndex).ToList();
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
||||||
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex),
|
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex),
|
||||||
Number = num,
|
Number = num,
|
||||||
StudyIdStr = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.StudyId).FirstOrDefault(),
|
StudyIdStr = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.StudyId).FirstIsNullReturnEmpty(),
|
||||||
RowId = item.Id,
|
RowId = item.Id,
|
||||||
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
||||||
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
||||||
|
|
@ -145,9 +145,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
num++;
|
num++;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (lesionType == LesionType.TargetLesion)
|
if (minNum!=null)
|
||||||
{
|
{
|
||||||
for (int i = num; i <= 5; i++)
|
for (int i = num; i <= minNum.Value; i++)
|
||||||
{
|
{
|
||||||
VisitLesionInfo target = new VisitLesionInfo
|
VisitLesionInfo target = new VisitLesionInfo
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue