修改导表填充测试
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
31f56a39a5
commit
fb478aa5f2
|
@ -263,9 +263,9 @@ public static class ExcelExportHelper
|
||||||
public List<string> CDISCList { get; set; } = new List<string>();
|
public List<string> CDISCList { get; set; } = new List<string>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 动态的列名
|
/// 动态的列名 如果Id 重复,那么就按照名称填充,否则就按照Id 填充列数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> ColumnNameList { get; set; } = new List<string>();
|
public List<ColumItem> ColumnIdNameList { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 动态翻译的字典名
|
/// 动态翻译的字典名
|
||||||
|
@ -292,7 +292,18 @@ public static class ExcelExportHelper
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DynamicItemTitleName { get; set; }
|
public string DynamicItemTitleName { get; set; }
|
||||||
|
|
||||||
|
public string DynamicItemTitleId { get; set; }
|
||||||
|
|
||||||
public List<int> RemoveColunmIndexList { get; set; } = new List<int>();
|
public List<int> RemoveColunmIndexList { get; set; } = new List<int>();
|
||||||
|
|
||||||
|
public class ColumItem
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> ColumnIdList => ColumnIdNameList == null ? new List<string>() : ColumnIdNameList.Select(t => t.Id.ToString()).ToList();
|
||||||
|
public List<string> ColumnNameList => ColumnIdNameList == null ? new List<string>() : ColumnIdNameList.Select(t => t.Name).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -467,8 +478,11 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
if (dynamicColumnConfig != null)
|
if (dynamicColumnConfig != null)
|
||||||
{
|
{
|
||||||
|
var isCdics = dynamicColumnConfig.CDISCList.Count > 0;
|
||||||
|
|
||||||
var sheet = workbook.GetSheetAt(0);
|
var sheet = workbook.GetSheetAt(0);
|
||||||
|
|
||||||
|
var cdicsRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex - 1);
|
||||||
var titelRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex);
|
var titelRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex);
|
||||||
var templateRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex + 1);
|
var templateRow = sheet.GetRow(dynamicColumnConfig.AutoColumnTitleRowIndex + 1);
|
||||||
|
|
||||||
|
@ -479,7 +493,7 @@ public static class ExcelExportHelper
|
||||||
var beforeDynamicRemoveCount = dynamicColumnConfig.RemoveColunmIndexList.Where(t => t < dynamicColumnConfig.AutoColumnStartIndex).Count();
|
var beforeDynamicRemoveCount = dynamicColumnConfig.RemoveColunmIndexList.Where(t => t < dynamicColumnConfig.AutoColumnStartIndex).Count();
|
||||||
|
|
||||||
//动态添加列的数量
|
//动态添加列的数量
|
||||||
var needAddCount = dynamicColumnConfig.ColumnNameList.Count;
|
var needAddCount = dynamicColumnConfig.ColumnIdNameList.Count;
|
||||||
|
|
||||||
//原始表 最终索引
|
//原始表 最终索引
|
||||||
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
|
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
|
||||||
|
@ -521,8 +535,14 @@ public static class ExcelExportHelper
|
||||||
//创建新的列
|
//创建新的列
|
||||||
for (int i = originTotalEndIndex; i < originTotalEndIndex + needAddCount; i++)
|
for (int i = originTotalEndIndex; i < originTotalEndIndex + needAddCount; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
titelRow.CreateCell(i + 1);
|
titelRow.CreateCell(i + 1);
|
||||||
templateRow.CreateCell(i + 1);
|
templateRow.CreateCell(i + 1);
|
||||||
|
|
||||||
|
if (isCdics)
|
||||||
|
{
|
||||||
|
cdicsRow.CreateCell(i + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//移动Title 和下面的模板标识
|
//移动Title 和下面的模板标识
|
||||||
|
|
||||||
|
@ -542,10 +562,17 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
for (int i = dynamicColunmStartIndex; i < dynamicColunmStartIndex + needAddCount; i++)
|
for (int i = dynamicColunmStartIndex; i < dynamicColunmStartIndex + needAddCount; i++)
|
||||||
{
|
{
|
||||||
var name = dynamicColumnConfig.ColumnNameList[i - dynamicColunmStartIndex];
|
var name = dynamicColumnConfig.ColumnIdNameList[i - dynamicColunmStartIndex].Name;
|
||||||
|
|
||||||
titelRow.GetCell(i).SetCellValue(name);
|
titelRow.GetCell(i).SetCellValue(name);
|
||||||
templateRow.GetCell(i).SetCellValue("");
|
templateRow.GetCell(i).SetCellValue("");
|
||||||
|
|
||||||
|
if (isCdics)
|
||||||
|
{
|
||||||
|
var cdicsCode = dynamicColumnConfig.CDISCList[i - dynamicColunmStartIndex];
|
||||||
|
|
||||||
|
cdicsRow.GetCell(i).SetCellValue(cdicsCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -577,6 +604,9 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
if (dynamicColumnConfig != null)
|
if (dynamicColumnConfig != null)
|
||||||
{
|
{
|
||||||
|
//Excel 列是按照名称填充 还是Id 填充
|
||||||
|
var isExcelAddDataWithName = dynamicColumnConfig.ColumnIdNameList.Select(t => t.Id).Distinct().Count() == 1;
|
||||||
|
|
||||||
var dynamicTranslateDataList = await _dictionaryService.GetBasicDataSelect(dynamicColumnConfig.TranslateDicNameList.ToArray());
|
var dynamicTranslateDataList = await _dictionaryService.GetBasicDataSelect(dynamicColumnConfig.TranslateDicNameList.ToArray());
|
||||||
|
|
||||||
// 使用NPOI 进行二次处理
|
// 使用NPOI 进行二次处理
|
||||||
|
@ -607,7 +637,17 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
|
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
|
||||||
var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
var writeIndex = 0;
|
||||||
|
|
||||||
|
if (isExcelAddDataWithName)
|
||||||
|
{
|
||||||
|
writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeIndex = dynamicColumnConfig.ColumnIdList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleId].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (itemDicName.IsNotNullOrEmpty())
|
if (itemDicName.IsNotNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
@ -642,7 +682,18 @@ public static class ExcelExportHelper
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 暂时废弃--合并到上面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
/// <param name="data"></param>
|
||||||
|
/// <param name="_commonDocumentRepository"></param>
|
||||||
|
/// <param name="_hostEnvironment"></param>
|
||||||
|
/// <param name="_dictionaryService"></param>
|
||||||
|
/// <param name="translateType"></param>
|
||||||
|
/// <param name="criterionType"></param>
|
||||||
|
/// <param name="dynamicColumnConfig"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static async Task<(MemoryStream, string)> CDISC_DataExport_Async(string code, ExcelExportInfo data, IRepository<CommonDocument> _commonDocumentRepository, IWebHostEnvironment _hostEnvironment, IDictionaryService? _dictionaryService = null, Type? translateType = null, CriterionType? criterionType = null, DynamicColumnConfig? dynamicColumnConfig = null)
|
public static async Task<(MemoryStream, string)> CDISC_DataExport_Async(string code, ExcelExportInfo data, IRepository<CommonDocument> _commonDocumentRepository, IWebHostEnvironment _hostEnvironment, IDictionaryService? _dictionaryService = null, Type? translateType = null, CriterionType? criterionType = null, DynamicColumnConfig? dynamicColumnConfig = null)
|
||||||
{
|
{
|
||||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
@ -779,7 +830,7 @@ public static class ExcelExportHelper
|
||||||
var beforeDynamicRemoveCount = dynamicColumnConfig.RemoveColunmIndexList.Where(t => t < dynamicColumnConfig.AutoColumnStartIndex).Count();
|
var beforeDynamicRemoveCount = dynamicColumnConfig.RemoveColunmIndexList.Where(t => t < dynamicColumnConfig.AutoColumnStartIndex).Count();
|
||||||
|
|
||||||
//动态添加列的数量
|
//动态添加列的数量
|
||||||
var needAddCount = dynamicColumnConfig.ColumnNameList.Count;
|
var needAddCount = dynamicColumnConfig.ColumnIdNameList.Count;
|
||||||
|
|
||||||
//原始表 最终索引
|
//原始表 最终索引
|
||||||
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
|
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
|
||||||
|
@ -843,7 +894,7 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
for (int i = dynamicColunmStartIndex; i < dynamicColunmStartIndex + needAddCount; i++)
|
for (int i = dynamicColunmStartIndex; i < dynamicColunmStartIndex + needAddCount; i++)
|
||||||
{
|
{
|
||||||
var name = dynamicColumnConfig.ColumnNameList[i - dynamicColunmStartIndex];
|
var name = dynamicColumnConfig.ColumnIdNameList[i - dynamicColunmStartIndex].Name;
|
||||||
|
|
||||||
var cdicsCode = dynamicColumnConfig.CDISCList[i - dynamicColunmStartIndex];
|
var cdicsCode = dynamicColumnConfig.CDISCList[i - dynamicColunmStartIndex];
|
||||||
|
|
||||||
|
@ -881,6 +932,8 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
if (dynamicColumnConfig != null)
|
if (dynamicColumnConfig != null)
|
||||||
{
|
{
|
||||||
|
var isExcelAddDataWithName = dynamicColumnConfig.ColumnIdNameList.Select(t => t.Id).Count() == 1;
|
||||||
|
|
||||||
var dynamicTranslateDataList = await _dictionaryService.GetBasicDataSelect(dynamicColumnConfig.TranslateDicNameList.ToArray());
|
var dynamicTranslateDataList = await _dictionaryService.GetBasicDataSelect(dynamicColumnConfig.TranslateDicNameList.ToArray());
|
||||||
|
|
||||||
// 使用NPOI 进行二次处理
|
// 使用NPOI 进行二次处理
|
||||||
|
@ -911,7 +964,15 @@ public static class ExcelExportHelper
|
||||||
|
|
||||||
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
|
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
|
||||||
var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
var writeIndex = 0;
|
||||||
|
if (isExcelAddDataWithName)
|
||||||
|
{
|
||||||
|
writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeIndex = dynamicColumnConfig.ColumnIdList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleId].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
}
|
||||||
|
|
||||||
if (itemDicName.IsNotNullOrEmpty())
|
if (itemDicName.IsNotNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,9 +72,9 @@
|
||||||
模板列最后的索引
|
模板列最后的索引
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.ColumnNameList">
|
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.ColumnIdNameList">
|
||||||
<summary>
|
<summary>
|
||||||
动态的列名
|
动态的列名 如果Id 重复,那么就按照名称填充,否则就按照Id 填充列数据
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.TranslateDicNameList">
|
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.TranslateDicNameList">
|
||||||
|
|
|
@ -2077,7 +2077,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
DynamicItemTitleName = "QuestionName",
|
DynamicItemTitleName = "QuestionName",
|
||||||
DynamicListName = "QuestionAnswerList",
|
DynamicListName = "QuestionAnswerList",
|
||||||
RemoveColunmIndexList = new List<int>() { },
|
RemoveColunmIndexList = new List<int>() { },
|
||||||
ColumnNameList = columNameList ?? new List<string>(),
|
ColumnIdNameList = columNameList.Select(t => new DynamicColumnConfig.ColumItem() { Id = Guid.Empty, Name = t }).ToList(),
|
||||||
TranslateDicNameList = translateDicNameList ?? new List<string>()
|
TranslateDicNameList = translateDicNameList ?? new List<string>()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2347,11 +2347,27 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
GroupName = _userInfo.IsEn_Us ? t.GroupInfo.GroupEnName : t.GroupInfo.GroupName
|
GroupName = _userInfo.IsEn_Us ? t.GroupInfo.GroupEnName : t.GroupInfo.GroupName
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
//外层问题有重复,针对重复的加上组名
|
||||||
|
foreach (var item in trialConfigQuestionList.GroupBy(t => t.QuestionName).Where(g => g.Count() > 1))
|
||||||
|
{
|
||||||
|
var qName = item.Key;
|
||||||
|
|
||||||
|
foreach (var configQuestion in trialConfigQuestionList)
|
||||||
|
{
|
||||||
|
if (configQuestion.QuestionName == qName)
|
||||||
|
{
|
||||||
|
configQuestion.QuestionName = $"{configQuestion.GroupName}_{configQuestion.QuestionName}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (inQuery.ReadingExportType != ExportResult.CDISC)
|
if (inQuery.ReadingExportType != ExportResult.CDISC)
|
||||||
{
|
{
|
||||||
//最终EXCEL 列
|
//最终EXCEL 列
|
||||||
var configCoumNameList = new List<string>();
|
var configCoumNameList = new List<DynamicColumnConfig.ColumItem>();
|
||||||
|
|
||||||
//最终翻译字典
|
//最终翻译字典
|
||||||
var translateDicNameList = new List<string>();
|
var translateDicNameList = new List<string>();
|
||||||
|
@ -2370,7 +2386,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
#region 外层问题 可能存在合并
|
#region 外层问题 可能存在合并
|
||||||
|
|
||||||
var fistLeveLNameList = new List<string>();
|
var fistLeveLNameList = new List<DynamicColumnConfig.ColumItem>();
|
||||||
|
|
||||||
//肿瘤评估,非CDISC 导出
|
//肿瘤评估,非CDISC 导出
|
||||||
if (criterion.CriterionGroup == CriterionGroup.Tumor)
|
if (criterion.CriterionGroup == CriterionGroup.Tumor)
|
||||||
|
@ -2378,8 +2394,11 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB || criterion.CriterionType == CriterionType.IRECIST1Point1)
|
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB || criterion.CriterionType == CriterionType.IRECIST1Point1)
|
||||||
{
|
{
|
||||||
|
|
||||||
fistLeveLNameList = trialConfigQuestionList.Select(t =>
|
fistLeveLNameList = trialConfigQuestionList.Select(t => new DynamicColumnConfig.ColumItem()
|
||||||
(t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.Tumor) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName).Distinct().ToList();
|
{
|
||||||
|
Id = Guid.Empty,
|
||||||
|
Name = (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.Tumor) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2387,13 +2406,22 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
}
|
}
|
||||||
else if (criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET)
|
else if (criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET)
|
||||||
{
|
{
|
||||||
fistLeveLNameList = trialConfigQuestionList.Select(t =>
|
|
||||||
(t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.ImgOncology) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName).Distinct().ToList();
|
fistLeveLNameList = trialConfigQuestionList.Select(t => new DynamicColumnConfig.ColumItem()
|
||||||
|
{
|
||||||
|
Id = Guid.Empty,
|
||||||
|
Name = (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.ImgOncology) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (criterion.CriterionType == CriterionType.PCWG3)
|
else if (criterion.CriterionType == CriterionType.PCWG3)
|
||||||
{
|
{
|
||||||
fistLeveLNameList = trialConfigQuestionList.Select(t => t.QuestionName).ToList();
|
fistLeveLNameList = trialConfigQuestionList.Select(t => new DynamicColumnConfig.ColumItem()
|
||||||
|
{
|
||||||
|
Id = Guid.Empty,
|
||||||
|
Name = t.QuestionName
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var exTralDicNameList = new List<string>() { "LesionType" };
|
var exTralDicNameList = new List<string>() { "LesionType" };
|
||||||
|
@ -2403,7 +2431,11 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
else
|
else
|
||||||
//非肿瘤评估,非CDISC 导出
|
//非肿瘤评估,非CDISC 导出
|
||||||
{
|
{
|
||||||
fistLeveLNameList = trialConfigQuestionList.Select(t => t.QuestionName).ToList();
|
fistLeveLNameList = trialConfigQuestionList.Select(t => new DynamicColumnConfig.ColumItem()
|
||||||
|
{
|
||||||
|
Id = t.QuestionId,
|
||||||
|
Name = t.QuestionName
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
translateDicNameList = trialConfigQuestionList.Union(trialConfigTableQuestionList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList();
|
translateDicNameList = trialConfigQuestionList.Union(trialConfigTableQuestionList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList();
|
||||||
|
|
||||||
|
@ -2416,7 +2448,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
//肿瘤 表格问题直接去重、同时添加一些列 外层问题合并一些列
|
//肿瘤 表格问题直接去重、同时添加一些列 外层问题合并一些列
|
||||||
if (criterion.CriterionGroup == CriterionGroup.Tumor)
|
if (criterion.CriterionGroup == CriterionGroup.Tumor)
|
||||||
{
|
{
|
||||||
var extralNameList = new List<string>() { };
|
var extralNameList = new List<DynamicColumnConfig.ColumItem>();
|
||||||
|
|
||||||
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB
|
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB
|
||||||
|| criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET)
|
|| criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET)
|
||||||
|
@ -2424,8 +2456,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
//if(inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions)
|
//if(inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions)
|
||||||
{
|
{
|
||||||
extralNameList.Add(_userInfo.IsEn_Us ? "Lesion ID" : "病灶编号");
|
extralNameList.Add(new DynamicColumnConfig.ColumItem() { Id = Guid.Empty, Name = _userInfo.IsEn_Us ? "Lesion ID" : "病灶编号" });
|
||||||
extralNameList.Add(_userInfo.IsEn_Us ? "Lesion Type" : "病灶类型");
|
extralNameList.Add(new DynamicColumnConfig.ColumItem() { Id = Guid.Empty, Name = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型" });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2433,13 +2465,13 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
{
|
{
|
||||||
//if (inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions)
|
//if (inQuery.ReadingExportType == ExportResult.DetailedTableOfLesions)
|
||||||
{
|
{
|
||||||
extralNameList.Add(_userInfo.IsEn_Us ? "Lesion Type" : "病灶类型");
|
extralNameList.Add(new DynamicColumnConfig.ColumItem() { Id = Guid.Empty, Name = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型" });
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//肿瘤评估标准目前是去重
|
//肿瘤评估标准目前是去重 按照问题名称填充 不是Id
|
||||||
var tableQuestionNameList = trialConfigTableQuestionList.Select(t => t.QuestionName).Distinct().ToList();
|
var tableQuestionNameList = trialConfigTableQuestionList.Select(t => t.QuestionName).Distinct().Select(t => new DynamicColumnConfig.ColumItem() { Id = Guid.Empty, Name = t }).Distinct().ToList();
|
||||||
|
|
||||||
//有表格问题 那么就是三部分,否则就是外层问题
|
//有表格问题 那么就是三部分,否则就是外层问题
|
||||||
configCoumNameList = tableQuestionNameList.Count == 0 ? fistLeveLNameList : fistLeveLNameList.Union(extralNameList).Union(tableQuestionNameList).ToList();
|
configCoumNameList = tableQuestionNameList.Count == 0 ? fistLeveLNameList : fistLeveLNameList.Union(extralNameList).Union(tableQuestionNameList).ToList();
|
||||||
|
@ -2565,9 +2597,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
//多表格问题
|
//多表格问题
|
||||||
if (isMutiTable)
|
if (isMutiTable)
|
||||||
{
|
{
|
||||||
var extralNameList = new List<string>() { _userInfo.IsEn_Us ? "Table Name" : "表格名称" };
|
//多表格,增加的一列,就用Guid.Empty 标识
|
||||||
|
var extralNameList = new List<DynamicColumnConfig.ColumItem>() { new DynamicColumnConfig.ColumItem() { Id = Guid.Empty, Name = _userInfo.IsEn_Us ? "Table Name" : "表格名称" } };
|
||||||
|
|
||||||
var tableQuestionNameList = trialConfigTableQuestionList.Select(t => t.TableName + "_" + t.QuestionName).ToList();
|
var tableQuestionNameList = trialConfigTableQuestionList.Select(t => new DynamicColumnConfig.ColumItem() { Id = t.QuestionId, Name = t.TableName + "_" + t.QuestionName }).ToList();
|
||||||
|
|
||||||
configCoumNameList = fistLeveLNameList.Union(extralNameList).Union(tableQuestionNameList).ToList();
|
configCoumNameList = fistLeveLNameList.Union(extralNameList).Union(tableQuestionNameList).ToList();
|
||||||
}
|
}
|
||||||
|
@ -2575,7 +2608,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
{
|
{
|
||||||
//单表格问题(直接用表格问题名称) 或者没有表格问题
|
//单表格问题(直接用表格问题名称) 或者没有表格问题
|
||||||
|
|
||||||
var tableNameList = trialConfigTableQuestionList.Select(t => t.QuestionName).Distinct().ToList();
|
var tableNameList = trialConfigTableQuestionList.Select(t => new DynamicColumnConfig.ColumItem() { Id = t.QuestionId, Name = t.QuestionName }).ToList();
|
||||||
|
|
||||||
configCoumNameList = fistLeveLNameList.Union(tableNameList).ToList();
|
configCoumNameList = fistLeveLNameList.Union(tableNameList).ToList();
|
||||||
}
|
}
|
||||||
|
@ -2583,7 +2616,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 扩展病灶
|
#region 扩展表格问题
|
||||||
|
|
||||||
|
|
||||||
//最终的病灶列表 要把裁判的也要加进去,需要处理裁判标记
|
//最终的病灶列表 要把裁判的也要加进去,需要处理裁判标记
|
||||||
|
@ -2605,7 +2638,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
{
|
{
|
||||||
var addLessionInfoList = new List<CommonQuesionInfo>();
|
var addLessionInfoList = new List<CommonQuesionInfo>();
|
||||||
|
|
||||||
addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Table Name" : "表格名称", QuestionValue = firstLessionAnser.TableName });
|
addLessionInfoList.Add(new CommonQuesionInfo() { QuestionId = Guid.Empty, QuestionName = _userInfo.IsEn_Us ? "Table Name" : "表格名称", QuestionValue = firstLessionAnser.TableName });
|
||||||
|
|
||||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.TableName + "_" + t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode });
|
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.TableName + "_" + t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode });
|
||||||
|
|
||||||
|
@ -2653,9 +2686,11 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
DynamicItemDicName = "TranslateDicName",
|
DynamicItemDicName = "TranslateDicName",
|
||||||
DynamicItemValueName = "QuestionValue",
|
DynamicItemValueName = "QuestionValue",
|
||||||
DynamicItemTitleName = "QuestionName",
|
DynamicItemTitleName = "QuestionName",
|
||||||
|
DynamicItemTitleId = "QuestionId",
|
||||||
DynamicListName = "QuestionAnswerList",
|
DynamicListName = "QuestionAnswerList",
|
||||||
RemoveColunmIndexList = removeColumnIndexList,
|
RemoveColunmIndexList = removeColumnIndexList,
|
||||||
ColumnNameList = configCoumNameList,
|
ColumnIdNameList = configCoumNameList,
|
||||||
|
CDISCList=new List<string>(),
|
||||||
TranslateDicNameList = translateDicNameList
|
TranslateDicNameList = translateDicNameList
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2665,11 +2700,11 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//CDISC 导出 只到外层问题级别
|
//CDISC 导出 只到外层问题级别 使用Id 填充Excel
|
||||||
|
|
||||||
var totalConfigCoumNameList = trialConfigQuestionList.ToList();
|
var totalConfigCoumNameList = trialConfigQuestionList.ToList();
|
||||||
|
|
||||||
var configCoumNameList = totalConfigCoumNameList.Select(t => t.QuestionName).ToList();
|
var configCoumNameList = totalConfigCoumNameList.Select(t => new DynamicColumnConfig.ColumItem() { Id = t.QuestionId, Name = t.QuestionName }).ToList();
|
||||||
|
|
||||||
var translateDicList = totalConfigCoumNameList.Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList();
|
var translateDicList = totalConfigCoumNameList.Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList();
|
||||||
|
|
||||||
|
@ -2684,9 +2719,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
DynamicItemDicName = "TranslateDicName",
|
DynamicItemDicName = "TranslateDicName",
|
||||||
DynamicItemValueName = "QuestionValue",
|
DynamicItemValueName = "QuestionValue",
|
||||||
DynamicItemTitleName = "QuestionName",
|
DynamicItemTitleName = "QuestionName",
|
||||||
|
DynamicItemTitleId = "QuestionId",
|
||||||
DynamicListName = "QuestionAnswerList",
|
DynamicListName = "QuestionAnswerList",
|
||||||
RemoveColunmIndexList = removeColumnIndexList,
|
RemoveColunmIndexList = removeColumnIndexList,
|
||||||
ColumnNameList = configCoumNameList,
|
ColumnIdNameList = configCoumNameList,
|
||||||
CDISCList = cdiscCodeList,
|
CDISCList = cdiscCodeList,
|
||||||
TranslateDicNameList = translateDicList
|
TranslateDicNameList = translateDicList
|
||||||
};
|
};
|
||||||
|
@ -2738,7 +2774,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
if (inQuery.ReadingExportType == ExportResult.CDISC)
|
if (inQuery.ReadingExportType == ExportResult.CDISC)
|
||||||
{
|
{
|
||||||
(memoryStream, fileName) = await ExcelExportHelper.CDISC_DataExport_Async(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
(memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue