修改导表
parent
75f806ce80
commit
e3519d47a6
|
@ -831,6 +831,12 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
|
||||
}
|
||||
|
||||
if(criterion.CriterionType == CriterionType.PCWG3)
|
||||
{
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation });
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
|
||||
}
|
||||
|
||||
var result = _repository.Where<CommonDocument>(t => list.Select(c => c.Code).Contains(t.Code)).Select(c => new ExportDocumentDes() { Code = c.Code, FileName = c.Name }).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
|
@ -862,7 +868,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//每次查询必须是单标准的
|
||||
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName }).FirstOrDefaultAsync();
|
||||
|
||||
if (criterion.CriterionType != CriterionType.RECIST1Pointt1)
|
||||
if (criterion.CriterionType != CriterionType.RECIST1Pointt1 || criterion.CriterionType != CriterionType.PCWG3)
|
||||
{
|
||||
throw new Exception("当前标准导出还未支持");
|
||||
}
|
||||
|
@ -892,7 +898,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
|
||||
exportInfo.CriterionName = criterion.CriterionName;
|
||||
|
||||
exportInfo.List = list;
|
||||
|
||||
|
@ -1028,11 +1034,41 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
return clone;
|
||||
});
|
||||
}).ToList();
|
||||
|
||||
exportInfo.List = exportList;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
||||
|
||||
|
||||
}
|
||||
else if (criterion.CriterionType == CriterionType.PCWG3)
|
||||
{
|
||||
var list = await query.ProjectTo<PCWG3DetailedOfEvaluatedLesionExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType, isEn_Us = _userInfo.IsEn_Us }).ToListAsync();
|
||||
|
||||
|
||||
var exportList = list.SelectMany(c =>
|
||||
{
|
||||
|
||||
return c.LesionList.Select(u =>
|
||||
{
|
||||
var clone = c.Clone();
|
||||
clone.LessionCode = u.LessionCode;
|
||||
clone.LessionType = u.LessionType;
|
||||
|
||||
|
||||
clone.LessionLocation = u.LessionLocation;
|
||||
clone.BodyPartDescription = u.BodyPartDescription;
|
||||
|
||||
clone.LessionState = u.LessionState;
|
||||
|
||||
return clone;
|
||||
});
|
||||
}).ToList();
|
||||
|
||||
exportInfo.List = exportList;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PCWG3DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
|
|
@ -383,7 +383,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public List<MouduleProgress> ModuleList { get; set; }
|
||||
|
||||
|
||||
public List<MouduleProgress> TotalList => VisitList .OrderByDescending(t=>t.Inplan).Union(ModuleList.OrderBy(t=>t.ReadingSetType).ThenBy(t=>t.VisitTaskNum)).ToList();
|
||||
public List<MouduleProgress> TotalList => VisitList.OrderByDescending(t => t.Inplan).Union(ModuleList.OrderBy(t => t.ReadingSetType).ThenBy(t => t.VisitTaskNum)).ToList();
|
||||
|
||||
|
||||
public class MouduleProgress
|
||||
|
@ -408,7 +408,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
//阅片期会有
|
||||
public ReadingSetType? ReadingSetType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -686,7 +686,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string AgainEvaluateResult { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
public class GroupAnalysisExport: AnalysisExortCommon
|
||||
public class GroupAnalysisExport : AnalysisExortCommon
|
||||
{
|
||||
|
||||
[DictionaryTranslateAttribute("ArmEnum")]
|
||||
|
@ -708,7 +708,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
public class SelftAnalysisExport: AnalysisExortCommon
|
||||
public class SelftAnalysisExport : AnalysisExortCommon
|
||||
{
|
||||
//自身一致性分析任务特有
|
||||
|
||||
|
@ -771,8 +771,56 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
public class PCWG3LessionInfo
|
||||
{
|
||||
//病灶编号
|
||||
public string LessionCode { get; set; }
|
||||
|
||||
|
||||
[DictionaryTranslateAttribute("LesionType")]
|
||||
//病灶类型
|
||||
public string LessionType { get; set; }
|
||||
|
||||
//所在部位
|
||||
public string LessionLocation { get; set; }
|
||||
|
||||
|
||||
//部位描述
|
||||
public string BodyPartDescription { get; set; }
|
||||
|
||||
|
||||
[DictionaryTranslateAttribute("TargetState")]
|
||||
//病灶状态
|
||||
public string LessionState { get; set; }
|
||||
}
|
||||
|
||||
public class PCWG3DetailedOfEvaluatedLesionExport : OverallTumorEvaluationExport
|
||||
{
|
||||
|
||||
[JsonIgnore]
|
||||
public List<PCWG3LessionInfo> LesionList = new List<PCWG3LessionInfo>();
|
||||
|
||||
//病灶编号
|
||||
public string LessionCode { get; set; }
|
||||
|
||||
|
||||
[DictionaryTranslateAttribute("LesionType")]
|
||||
//病灶类型
|
||||
public string LessionType { get; set; }
|
||||
|
||||
//所在部位
|
||||
public string LessionLocation { get; set; }
|
||||
|
||||
|
||||
//部位描述
|
||||
public string BodyPartDescription { get; set; }
|
||||
|
||||
|
||||
[DictionaryTranslateAttribute("EvaluationOfState")]
|
||||
//病灶状态
|
||||
public string LessionState { get; set; }
|
||||
}
|
||||
|
||||
|
||||
//RECIST1.1评估病灶明细表
|
||||
|
||||
|
|
|
@ -219,6 +219,27 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(o => o.LessionState, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State).FirstOrDefault().Answer));
|
||||
|
||||
|
||||
CreateMap<VisitTask, PCWG3DetailedOfEvaluatedLesionExport>().IncludeBase<VisitTask, OverallTumorEvaluationExport>()
|
||||
.ForMember(o => o.LesionList, t => t.MapFrom(u => u.LesionList));
|
||||
|
||||
|
||||
CreateMap<ReadingTableAnswerRowInfo, PCWG3LessionInfo>()
|
||||
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.RowMark))
|
||||
.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
||||
|
||||
//位置可能是自己填写的
|
||||
.ForMember(o => o.LessionLocation, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault().Answer)
|
||||
t.MapFrom(u => u.OrganInfo.IsCanEditPosition ?
|
||||
u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault().Answer : isEn_Us ? u.OrganInfo.TULATEN : u.OrganInfo.TULAT)
|
||||
)
|
||||
|
||||
.ForMember(o => o.BodyPartDescription, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Part).FirstOrDefault().Answer)
|
||||
t.MapFrom(u => isEn_Us ? u.OrganInfo.PartEN : u.OrganInfo.Part)
|
||||
)
|
||||
.ForMember(o => o.LessionState, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State).FirstOrDefault().Answer));
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
@ -175,6 +175,8 @@ public static class StaticData
|
|||
|
||||
public const string RECIST1Point1DetailedOfEvaluatedLesion_Export = "RECIST1Point1DetailedOfEvaluatedLesion_Export";
|
||||
|
||||
public const string PCWG3Point1DetailedOfEvaluatedLesion_Export = "PCWG3Point1DetailedOfEvaluatedLesion_Export";
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue