using AutoMapper;
using IRaCIS.Core.Application.Service.Third_partyProject.DTO;

namespace IRaCIS.Core.Application.Service
{
    public class UltrasonicDicomConfig : Profile
    {
        public UltrasonicDicomConfig()
        {

            CreateMap<VisitTask, VisitTaskDTO_UltrasonicDicom>()
                .ForMember(o => o.SubjectVisitId, t => t.MapFrom(u => u.SourceSubjectVisitId))
                 .ForMember(o => o.TrialSiteId, t => t.MapFrom(u => u.Subject.TrialSiteId))
                 .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
                 .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.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
                 .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
                  .ForMember(o => o.StudyInstanceUidList, t => t.MapFrom(u => u.SourceSubjectVisit.StudyList.Select(t => t.StudyInstanceUid)))


                 ;
        }
    }

}
