diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs index 488782087..f8178014f 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/PatientViewModel.cs @@ -346,6 +346,8 @@ namespace IRaCIS.Application.Contracts public DateTime UpdateTime { get; set; } = DateTime.Now; public Guid CreateUserId { get; set; } public DateTime CreateTime { get; set; } = DateTime.Now; + + public int? SCPStudyCount { get; set; } } public class UpdateSubjectVisitStudyBindingCommand diff --git a/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs b/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs index 7f225ac77..aaff7cdf3 100644 --- a/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Visit/_MapConfig.cs @@ -112,7 +112,8 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.CalledAEList, u => u.MapFrom(s => s.SCPStudyList.Select(t => t.CalledAE).Distinct())) .ForMember(d => d.CallingAEList, u => u.MapFrom(s => s.SCPStudyList.Select(t => t.CallingAE).Distinct())) - .ForMember(d => d.PatientId, u => u.MapFrom(s => s.Id)); + .ForMember(d => d.PatientId, u => u.MapFrom(s => s.Id)) + .ForMember(d => d.SCPStudyCount, u => u.MapFrom(s => s.SCPStudyList.Count())); CreateMap().IncludeMembers(t => t.SCPStudy) .ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName));