public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as AllergyIntoleranceEventComponent; if (dest != null) { base.CopyTo(dest); if (Substance != null) { dest.Substance = (Hl7.Fhir.Model.CodeableConcept)Substance.DeepCopy(); } if (CertaintyElement != null) { dest.CertaintyElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.AllergyIntoleranceCertainty>)CertaintyElement.DeepCopy(); } if (Manifestation != null) { dest.Manifestation = new List <Hl7.Fhir.Model.CodeableConcept>(Manifestation.DeepCopy()); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (OnsetElement != null) { dest.OnsetElement = (Hl7.Fhir.Model.FhirDateTime)OnsetElement.DeepCopy(); } if (Duration != null) { dest.Duration = (Hl7.Fhir.Model.Duration)Duration.DeepCopy(); } if (SeverityElement != null) { dest.SeverityElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.AllergyIntoleranceSeverity>)SeverityElement.DeepCopy(); } if (ExposureRoute != null) { dest.ExposureRoute = (Hl7.Fhir.Model.CodeableConcept)ExposureRoute.DeepCopy(); } if (CommentElement != null) { dest.CommentElement = (Hl7.Fhir.Model.FhirString)CommentElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicinalProductIndication; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Subject != null) { dest.Subject = new List <Hl7.Fhir.Model.ResourceReference>(Subject.DeepCopy()); } if (DiseaseSymptomProcedure != null) { dest.DiseaseSymptomProcedure = (Hl7.Fhir.Model.CodeableConcept)DiseaseSymptomProcedure.DeepCopy(); } if (DiseaseStatus != null) { dest.DiseaseStatus = (Hl7.Fhir.Model.CodeableConcept)DiseaseStatus.DeepCopy(); } if (Comorbidity != null) { dest.Comorbidity = new List <Hl7.Fhir.Model.CodeableConcept>(Comorbidity.DeepCopy()); } if (IntendedEffect != null) { dest.IntendedEffect = (Hl7.Fhir.Model.CodeableConcept)IntendedEffect.DeepCopy(); } if (Duration != null) { dest.Duration = (Hl7.Fhir.Model.Quantity)Duration.DeepCopy(); } if (OtherTherapy != null) { dest.OtherTherapy = new List <Hl7.Fhir.Model.MedicinalProductIndication.OtherTherapyComponent>(OtherTherapy.DeepCopy()); } if (UndesirableEffect != null) { dest.UndesirableEffect = new List <Hl7.Fhir.Model.ResourceReference>(UndesirableEffect.DeepCopy()); } if (Population != null) { dest.Population = new List <Hl7.Fhir.Model.Population>(Population.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DispenseComponent; if (dest != null) { base.CopyTo(dest); if (Product != null) { dest.Product = (Hl7.Fhir.Model.Coding)Product.DeepCopy(); } if (EyeElement != null) { dest.EyeElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionEyes>)EyeElement.DeepCopy(); } if (SphereElement != null) { dest.SphereElement = (Hl7.Fhir.Model.FhirDecimal)SphereElement.DeepCopy(); } if (CylinderElement != null) { dest.CylinderElement = (Hl7.Fhir.Model.FhirDecimal)CylinderElement.DeepCopy(); } if (AxisElement != null) { dest.AxisElement = (Hl7.Fhir.Model.Integer)AxisElement.DeepCopy(); } if (PrismElement != null) { dest.PrismElement = (Hl7.Fhir.Model.FhirDecimal)PrismElement.DeepCopy(); } if (BaseElement != null) { dest.BaseElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionBase>)BaseElement.DeepCopy(); } if (AddElement != null) { dest.AddElement = (Hl7.Fhir.Model.FhirDecimal)AddElement.DeepCopy(); } if (PowerElement != null) { dest.PowerElement = (Hl7.Fhir.Model.FhirDecimal)PowerElement.DeepCopy(); } if (BackCurveElement != null) { dest.BackCurveElement = (Hl7.Fhir.Model.FhirDecimal)BackCurveElement.DeepCopy(); } if (DiameterElement != null) { dest.DiameterElement = (Hl7.Fhir.Model.FhirDecimal)DiameterElement.DeepCopy(); } if (Duration != null) { dest.Duration = (Hl7.Fhir.Model.SimpleQuantity)Duration.DeepCopy(); } if (ColorElement != null) { dest.ColorElement = (Hl7.Fhir.Model.FhirString)ColorElement.DeepCopy(); } if (BrandElement != null) { dest.BrandElement = (Hl7.Fhir.Model.FhirString)BrandElement.DeepCopy(); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }