예제 #1
0
 private bool MappingProperties(GpraDrugAlcoholUseDto gpraDrugAlcoholUseDto, GpraDrugAlcoholUse gpraDrugAlcoholUse)
 {
     AggregateRoot.ReviseGpraDrugAlcoholUse(
         new GpraDrugAlcoholUseSection(
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(
                 gpraDrugAlcoholUseDto.AlcoholIntoxicationFivePlusDrinksDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(
                 gpraDrugAlcoholUseDto.AlcoholIntoxicationFourOrFewerDrinksDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.AnyAlcoholDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.BarbituratesDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.BarbituratesGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.BenzondiazepinesDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.BenzondiazepinesGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.CocaineCrackDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.CocaineCrackGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.CodeineDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.CodeineGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.DarvonDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.DarvonGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.DermerolDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.DermerolGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.DiluadidDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.DiluadidGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.HallucinogensDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.HallucinogensGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.HeroinDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.HeroinGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.IllegalDrugsDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.InhalantsDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.InhalantsGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.InjectedDrugsIndicator, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraFrequencyOfUseOfUsedItems> (
                 gpraDrugAlcoholUseDto.InjectionGpraFrequencyOfUseOfUsedItems, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.KetamineDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.KetamineGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.MarijuanaHashishDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.MarijuanaHashishGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.MethamphetamineDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.MethamphetamineGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.MorphineDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.MorphineGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.NonPrescriptionGhbDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.NonPrescriptionGhbGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.NonPrescriptionMethadoneDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.NonPrescriptionMethodoneGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.OtherIllegalDrugsDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.OtherIllegalDrugsGpraDrugRoute, _mappingHelper),
             gpraDrugAlcoholUseDto.OtherIllegalDrugsSpecificationNote,
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.OxycontinOxycodoneDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.OxycontinOxycodoneGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.PercocetDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.PercocetGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.SameDayAlcoholDrugsDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.TranquilizersDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (
                 gpraDrugAlcoholUseDto.TranquilizersGpraDrugRoute, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType(gpraDrugAlcoholUseDto.TylenolDayCount, _mappingHelper),
             GpraNonResponseTypeMapper.MapToGpraNonResponseType <GpraDrugRoute> (gpraDrugAlcoholUseDto.TylenolGpraDrugRoute, _mappingHelper)
             ));
     gpraDrugAlcoholUseDto.Key = AggregateRoot.GpraDrugAlcoholUse.Key;
     return(true);
 }
예제 #2
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="gpraDrugAlcoholUseDto">The gpra drug alcohol use dto.</param>
        /// <param name="gpraDrugAlcoholUse">The gpra drug alcohol use.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(GpraDrugAlcoholUseDto gpraDrugAlcoholUseDto, GpraDrugAlcoholUse gpraDrugAlcoholUse)
        {
            var propertyMappingResult = MappingProperties(gpraDrugAlcoholUseDto, gpraDrugAlcoholUse);

            _mappingResult &= propertyMappingResult;

            return(_mappingResult);
        }