diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index bac7d39c6..92c61d06c 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -2124,6 +2124,57 @@ namespace IRaCIS.Core.Application.Service.Common //处理裁判标记 list = DealJudgeMark(criterion.ArbitrationRule, list); + + #region 系统标准处理整体肿瘤评估合并 + + //针对1.1 整体肿瘤评估 有的两列要合并一列 + if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB || criterion.CriterionType == CriterionType.IRECIST1Point1) + { + foreach (var item in list) + { + var removeList = item.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.Tumor).ToList(); + + if (item.IsBaseline == true) + { + item.OverallTumorEvaluationResult = removeList.Where(t => t.QuestionType == QuestionType.ExistDisease).FirstOrDefault()?.QuestionValue; + } + else + { + item.OverallTumorEvaluationResult = removeList.Where(t => t.QuestionType != QuestionType.ExistDisease).FirstOrDefault()?.QuestionValue; + } + + item.QuestionAnswerList = item.QuestionAnswerList.Where(t => !(t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.Tumor)).ToList(); + } + } + else if (criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) + { + + foreach (var item in list) + { + var removeList = item.QuestionAnswerList.Where(t => t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.ImgOncology).ToList(); + + if (item.IsBaseline == true) + { + item.OverallTumorEvaluationResult = removeList.Where(t => t.QuestionType == QuestionType.ExistDisease).FirstOrDefault()?.QuestionValue; + } + else + { + item.OverallTumorEvaluationResult = removeList.Where(t => t.QuestionType != QuestionType.ExistDisease).FirstOrDefault()?.QuestionValue; + } + + item.QuestionAnswerList = item.QuestionAnswerList.Where(t => !(t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.ImgOncology)).ToList(); + } + } + else if (criterion.CriterionType == CriterionType.PCWG3) + { + + } + + #endregion + + + + exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId); exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId); @@ -2140,6 +2191,11 @@ namespace IRaCIS.Core.Application.Service.Common TranslateDicNameList = list.FirstOrDefault()?.QuestionAnswerList.Select(t => t.TranslateDicName).ToList() ?? new List() }; + + + + + var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig); diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index d02b358e3..4d129aa2c 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -1061,6 +1061,8 @@ namespace IRaCIS.Core.Application.Contracts public class CommonQuesionInfo { + + public QuestionType? QuestionType { get; set; } public string QuestionName { get; set; } public string QuestionValue { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 4c516cec8..83b36aaa7 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -6,6 +6,7 @@ using IRaCIS.Core.Application.Contracts.DTO; using IRaCIS.Core.Application.MassTransit.Command; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Share; +using System.Linq; namespace IRaCIS.Core.Application.Service { @@ -19,7 +20,7 @@ namespace IRaCIS.Core.Application.Service var isEn_Us = false; - CreateMap(); + CreateMap(); CreateMap(); CreateMap(); CreateMap() @@ -199,7 +200,7 @@ namespace IRaCIS.Core.Application.Service Guid trialReadingCriterionId = Guid.Empty; ArbitrationRule? arbitrationRule = null; CriterionType? criterionType = null; - ReadingExportType? readingExportType=null; + ReadingExportType? readingExportType = null; CreateMap() // .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) @@ -226,7 +227,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)); - + CreateMap() .ForMember(o => o.IsBaseline, t => t.MapFrom(u => u.SourceSubjectVisit.IsBaseLine)) @@ -241,10 +242,14 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) .ForMember(o => o.QuestionAnswerList, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList - .Where(c => readingExportType == ReadingExportType.ReadingDetailResult ? c.ReadingQuestionTrial.IsJudgeQuestion : c.ReadingQuestionTrial.IsJudgeQuestion) + .Where(c => readingExportType == ReadingExportType.ReadingResult ? + c.ReadingQuestionTrial.ExportResultStr.Contains( ((int)ExportResult.TableOfAssessmentResults).ToString()) : + (readingExportType == ReadingExportType.ReadingDetailResult ? c.ReadingQuestionTrial.ExportResultStr.Contains(((int)ExportResult.DetailedTableOfAssessmentResults).ToString()) : + c.ReadingQuestionTrial.ExportResultStr.Contains(((int)ExportResult.DetailedTableOfAdjudicationResults).ToString()))) .OrderBy(k => k.ReadingQuestionTrial.ShowOrder) .Select(c => new CommonQuesionInfo() { + QuestionType = c.ReadingQuestionTrial.QuestionType, QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName, QuestionValue = c.Answer, TranslateDicName = c.ReadingQuestionTrial.DictionaryCode diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 6afaaeb0e..cdaf1ce05 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -378,7 +378,7 @@ namespace IRaCIS.Core.Domain.Share /// 无 /// None = 0, - + } /// @@ -391,6 +391,31 @@ namespace IRaCIS.Core.Domain.Share /// None = 0, + /// + /// + /// 阅片结果表 + /// + TableOfAssessmentResults = 1, + + /// + /// 阅片结果明细表 + /// + DetailedTableOfAssessmentResults = 2, + + /// + /// 裁判阅片明细表 + /// + DetailedTableOfAdjudicationResults = 3, + + /// + /// 自身一致性分析结果表 + /// + DetailedTableOfIntraReaderAnalysisResults = 4, + + /// + /// 组间一致性分析结果表 + /// + DetailedTableOfInterReaderAnalysisResults = 5, }