优化逻辑
continuous-integration/drone/push Build is passing

This commit is contained in:
hang
2025-01-21 22:54:23 +08:00
parent fb478aa5f2
commit 7885cd151a
2 changed files with 47 additions and 37 deletions
@@ -2347,21 +2347,21 @@ namespace IRaCIS.Core.Application.Service.Common
GroupName = _userInfo.IsEn_Us ? t.GroupInfo.GroupEnName : t.GroupInfo.GroupName
}).ToList();
//外层问题有重复,针对重复的加上组名
foreach (var item in trialConfigQuestionList.GroupBy(t => t.QuestionName).Where(g => g.Count() > 1))
{
var qName = item.Key;
#region
foreach (var configQuestion in trialConfigQuestionList)
{
if (configQuestion.QuestionName == qName)
{
configQuestion.QuestionName = $"{configQuestion.GroupName}_{configQuestion.QuestionName}";
}
}
}
//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}";
// }
// }
//}
#endregion
if (inQuery.ReadingExportType != ExportResult.CDISC)
@@ -2384,13 +2384,15 @@ namespace IRaCIS.Core.Application.Service.Common
TranslateDicName = t.DictionaryCode
}).ToList();
#region
var fistLeveLNameList = new List<DynamicColumnConfig.ColumItem>();
//肿瘤评估,非CDISC 导出
if (criterion.CriterionGroup == CriterionGroup.Tumor)
{
#region
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB || criterion.CriterionType == CriterionType.IRECIST1Point1)
{
@@ -2424,30 +2426,13 @@ namespace IRaCIS.Core.Application.Service.Common
}
#endregion
var exTralDicNameList = new List<string>() { "LesionType" };
translateDicNameList = trialConfigQuestionList.Union(trialConfigTableQuestionList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Union(exTralDicNameList).Distinct().ToList();
}
else
//非肿瘤评估,非CDISC 导出
{
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();
}
#endregion
#region
//肿瘤 表格问题直接去重、同时添加一些列 外层问题合并一些列
if (criterion.CriterionGroup == CriterionGroup.Tumor)
{
#region
var extralNameList = new List<DynamicColumnConfig.ColumItem>();
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB
@@ -2587,10 +2572,21 @@ namespace IRaCIS.Core.Application.Service.Common
#endregion
#endregion
}
//非肿瘤的 问题名称是 表格名称_表格子问题名
else
//非肿瘤评估,非CDISC 导出
{
//外层问题处理
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();
#region _表格子问题名
var isMutiTable = trialConfigTableQuestionList.Select(t => t.TableName).Distinct().Count() > 1;
@@ -2673,10 +2669,10 @@ namespace IRaCIS.Core.Application.Service.Common
#endregion
#endregion
}
#endregion
dynamicColumnConfig = new DynamicColumnConfig()
{
@@ -2690,7 +2686,7 @@ namespace IRaCIS.Core.Application.Service.Common
DynamicListName = "QuestionAnswerList",
RemoveColunmIndexList = removeColumnIndexList,
ColumnIdNameList = configCoumNameList,
CDISCList=new List<string>(),
CDISCList = new List<string>(),
TranslateDicNameList = translateDicNameList
};