public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as RecommendationComponent;

                if (dest == null)
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }

                base.CopyTo(dest);
                if (VaccineCode != null)
                {
                    dest.VaccineCode = new List <Hl7.Fhir.Model.CodeableConcept>(VaccineCode.DeepCopy());
                }
                if (TargetDisease != null)
                {
                    dest.TargetDisease = (Hl7.Fhir.Model.CodeableConcept)TargetDisease.DeepCopy();
                }
                if (ContraindicatedVaccineCode != null)
                {
                    dest.ContraindicatedVaccineCode = new List <Hl7.Fhir.Model.CodeableConcept>(ContraindicatedVaccineCode.DeepCopy());
                }
                if (ForecastStatus != null)
                {
                    dest.ForecastStatus = (Hl7.Fhir.Model.CodeableConcept)ForecastStatus.DeepCopy();
                }
                if (ForecastReason != null)
                {
                    dest.ForecastReason = new List <Hl7.Fhir.Model.CodeableConcept>(ForecastReason.DeepCopy());
                }
                if (DateCriterion != null)
                {
                    dest.DateCriterion = new List <Hl7.Fhir.Model.ImmunizationRecommendation.DateCriterionComponent>(DateCriterion.DeepCopy());
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (SeriesElement != null)
                {
                    dest.SeriesElement = (Hl7.Fhir.Model.FhirString)SeriesElement.DeepCopy();
                }
                if (DoseNumber != null)
                {
                    dest.DoseNumber = (Hl7.Fhir.Model.Element)DoseNumber.DeepCopy();
                }
                if (SeriesDoses != null)
                {
                    dest.SeriesDoses = (Hl7.Fhir.Model.Element)SeriesDoses.DeepCopy();
                }
                if (SupportingImmunization != null)
                {
                    dest.SupportingImmunization = new List <Hl7.Fhir.Model.ResourceReference>(SupportingImmunization.DeepCopy());
                }
                if (SupportingPatientInformation != null)
                {
                    dest.SupportingPatientInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingPatientInformation.DeepCopy());
                }
                return(dest);
            }
Пример #2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ImmunizationEvaluation;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.ImmunizationEvaluation.ImmunizationEvaluationStatusCodes>)StatusElement.DeepCopy();
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (Authority != null)
            {
                dest.Authority = (Hl7.Fhir.Model.ResourceReference)Authority.DeepCopy();
            }
            if (TargetDisease != null)
            {
                dest.TargetDisease = (Hl7.Fhir.Model.CodeableConcept)TargetDisease.DeepCopy();
            }
            if (ImmunizationEvent != null)
            {
                dest.ImmunizationEvent = (Hl7.Fhir.Model.ResourceReference)ImmunizationEvent.DeepCopy();
            }
            if (DoseStatus != null)
            {
                dest.DoseStatus = (Hl7.Fhir.Model.CodeableConcept)DoseStatus.DeepCopy();
            }
            if (DoseStatusReason != null)
            {
                dest.DoseStatusReason = new List <Hl7.Fhir.Model.CodeableConcept>(DoseStatusReason.DeepCopy());
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (SeriesElement != null)
            {
                dest.SeriesElement = (Hl7.Fhir.Model.FhirString)SeriesElement.DeepCopy();
            }
            if (DoseNumber != null)
            {
                dest.DoseNumber = (Hl7.Fhir.Model.DataType)DoseNumber.DeepCopy();
            }
            if (SeriesDoses != null)
            {
                dest.SeriesDoses = (Hl7.Fhir.Model.DataType)SeriesDoses.DeepCopy();
            }
            return(dest);
        }