From 32b14b3571908ff6417f30ebe88f256fa677e6f7 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 29 Sep 2022 13:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/DTO/VisitTaskViewModel.cs | 3 +++ .../Service/Allocation/_MapConfig.cs | 10 +++++++--- IRaCIS.Core.Domain/Allocation/VisitTask.cs | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index e8b423a10..cde65e4fb 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -51,6 +51,8 @@ namespace IRaCIS.Core.Application.ViewModel public bool IsPMSetBack { get; set; } + public string TrialReadingCriterionName { get; set; } + } @@ -147,6 +149,7 @@ namespace IRaCIS.Core.Application.ViewModel //产生重阅的根任务Id public Guid RootReReadingTaskId { get; set; } + } diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 5fc47954e..e622aeed9 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -103,6 +103,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() + .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) .ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code)) @@ -185,22 +186,25 @@ namespace IRaCIS.Core.Application.Service CreateMap().IncludeMembers(t => t.VisitTask) + .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.VisitTask.TrialReadingCriterion.CriterionName)) .ForMember(o => o.Id, t => t.MapFrom(u => u.Id)) - .ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.VisitTask.Subject.MedicalNo)) + .ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.VisitTask.Subject.MedicalNo)) .ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.VisitTask.DoctorUser)) .ForMember(o => o.MedicalManagerUser, t => t.MapFrom(u => u.MedicalManagerUser)); CreateMap() + .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code)); CreateMap() + .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code)) .ForMember(o => o.GeneratedMedicalReviewCount, t => t.MapFrom(u => u.TaskMedicalReviewList.Count())) .ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.Subject.MedicalNo)) - .ForMember(o => o.IsGeneratedJudge, t => t.MapFrom(u => u.JudgeVisitTaskId != null)) - .ForMember(o => o.ReadingDurationTimeSpan, t => t.MapFrom(u => u.SignTime - u.FirstReadingTime)) + .ForMember(o => o.IsGeneratedJudge, t => t.MapFrom(u => u.JudgeVisitTaskId != null)) + .ForMember(o => o.ReadingDurationTimeSpan, t => t.MapFrom(u => u.SignTime - u.FirstReadingTime)) ; diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index 6818074ba..c4e103319 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -80,6 +80,9 @@ namespace IRaCIS.Core.Domain.Models public Guid TrialReadingCriterionId { get; set; } + [ForeignKey("TrialReadingCriterionId")] + public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } + [ForeignKey("DoctorUserId")] @@ -114,7 +117,7 @@ namespace IRaCIS.Core.Domain.Models //public TaskAllocationRule DoctorTaskAllocationRule { get; set; } - + [JsonIgnore] public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; }