Exemple #1
0
        /// <summary>
        /// Creates the keyed dto.
        /// </summary>
        /// <param name="key">The key of the object.</param>
        /// <returns>A <see cref="Rem.Ria.PatientModule.Web.TedsInterview.TedsDischargeInterviewDto"/></returns>
        public TedsDischargeInterviewDto CreateKeyedDto(long key)
        {
            var tedsDischargeInterview = _tedsDischargeInterviewRepository.GetByKey(key);

            var tedsDischargeInterviewDto = Mapper.Map <TedsDischargeInterview, TedsDischargeInterviewDto> (tedsDischargeInterview)
                                            ?? new TedsDischargeInterviewDto();

            return(TedsAnswerPopulator.PopupateTedsAnswers(tedsDischargeInterviewDto));
        }
Exemple #2
0
        /// <summary>
        /// Creates the keyed dto.
        /// </summary>
        /// <param name="key">The key of the object.</param>
        /// <returns>A <see cref="TedsAdmissionInterviewDto"/></returns>
        public TedsAdmissionInterviewDto CreateKeyedDto(long key)
        {
            var tedsAdmissionInterview = _tedsAdmissionInterviewRepository.GetByKey(key);

            var dto = Mapper.Map <TedsAdmissionInterview, TedsAdmissionInterviewDto>(tedsAdmissionInterview) ?? new TedsAdmissionInterviewDto();

            TedsAnswerPopulator.PopupateTedsAnswers(dto);

            return(dto);
        }