From 0f55406cef97dc296ed7d57c93afaeb0cedacead Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 23 Feb 2023 15:21:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Attribute/DictionaryTranslateAttribute.cs | 13 +++++++++++++ .../Service/Common/DTO/FrontAuditConfigViewModel.cs | 2 +- .../Service/QC/DTO/QCListViewModel.cs | 6 ++++-- IRaCIS.Core.Application/Service/QC/_MapConfig.cs | 5 +++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/Attribute/DictionaryTranslateAttribute.cs b/IRaCIS.Core.Application/Helper/Attribute/DictionaryTranslateAttribute.cs index 27403ecea..459557f18 100644 --- a/IRaCIS.Core.Application/Helper/Attribute/DictionaryTranslateAttribute.cs +++ b/IRaCIS.Core.Application/Helper/Attribute/DictionaryTranslateAttribute.cs @@ -51,5 +51,18 @@ namespace IRaCIS.Core.Application.Helper DependPropertyValueStr = dependPropertyValueStr; } + + public DictionaryTranslateAttribute(string dicParentCode, CriterionType criterionType, string dependPropertyName, string dependPropertyValueStr) + { + DicParentCode = dicParentCode; + + DependPropertyName = dependPropertyName; + + CriterionType = criterionType; + + DependPropertyValueStr = dependPropertyValueStr; + + } + } } diff --git a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs index 2a9ce44dd..d34d74da1 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs @@ -170,7 +170,7 @@ namespace IRaCIS.Core.Application.ViewModel public bool? IsShowByTrialConfig { get; set; } - public string ByTrialConfig { get; set; } = string.Empty; + public string TrialConfigRelyFieldName { get; set; } = string.Empty; /// diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 8b62a57f4..5628b98cc 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -795,15 +795,17 @@ namespace IRaCIS.Core.Application.Contracts public decimal VisitTaskNum { get; set; } + public bool? IsBaseline { get; set; } + [DictionaryTranslateAttribute("ArmEnum")] public Arm ArmEnum { get; set; } public string UserName { get; set; } - //public CriterionType CriterionType { get; set; } + [DictionaryTranslateAttribute("ExistDisease", CriterionType.RECIST1Pointt1, nameof(OverallTumorEvaluationExport.IsBaseline), "true")] + [DictionaryTranslateAttribute("OverallAssessment", CriterionType.RECIST1Pointt1, nameof(OverallTumorEvaluationExport.IsBaseline), "false")] - [DictionaryTranslateAttribute("OverallAssessment", CriterionType.RECIST1Pointt1)] [DictionaryTranslateAttribute("VisitTumorEvaluation", CriterionType.PCWG3)] //整体肿瘤评估结果 需要翻译 public string OverallTumorEvaluationResult { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 01c259078..618ddda12 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -167,10 +167,11 @@ namespace IRaCIS.Core.Application.Service CriterionType? criterionType = null; CreateMap() // .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) - //.ForMember(o => o.CriterionType, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionType)) + .ForMember(o => o.IsBaseline, t => t.MapFrom(u => u.SourceSubjectVisit.IsBaseLine)) .ForMember(o => o.OverallTumorEvaluationResult, t => t.MapFrom(u => - criterionType == CriterionType.RECIST1Pointt1 ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).FirstOrDefault().Answer + criterionType == CriterionType.RECIST1Pointt1 ?( u.SourceSubjectVisit.IsBaseLine==true ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault().Answer: + u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).FirstOrDefault().Answer) : criterionType == CriterionType.PCWG3 ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstOrDefault().Answer : String.Empty ))