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

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

                base.CopyTo(dest);
                if (Domain != null)
                {
                    dest.Domain = (Hl7.Fhir.Model.CodeableConcept)Domain.DeepCopy();
                }
                if (Classification != null)
                {
                    dest.Classification = (Hl7.Fhir.Model.CodeableConcept)Classification.DeepCopy();
                }
                if (Subtype != null)
                {
                    dest.Subtype = new List <Hl7.Fhir.Model.CodeableConcept>(Subtype.DeepCopy());
                }
                if (Source != null)
                {
                    dest.Source = new List <Hl7.Fhir.Model.ResourceReference>(Source.DeepCopy());
                }
                return(dest);
            }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as MedicinalProductUndesirableEffect;

            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 (SymptomConditionEffect != null)
            {
                dest.SymptomConditionEffect = (Hl7.Fhir.Model.CodeableConcept)SymptomConditionEffect.DeepCopy();
            }
            if (Classification != null)
            {
                dest.Classification = (Hl7.Fhir.Model.CodeableConcept)Classification.DeepCopy();
            }
            if (FrequencyOfOccurrence != null)
            {
                dest.FrequencyOfOccurrence = (Hl7.Fhir.Model.CodeableConcept)FrequencyOfOccurrence.DeepCopy();
            }
            if (Population != null)
            {
                dest.Population = new List <Hl7.Fhir.Model.Population>(Population.DeepCopy());
            }
            return(dest);
        }
Beispiel #3
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as CatalogEntry;

            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 (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (OrderableElement != null)
            {
                dest.OrderableElement = (Hl7.Fhir.Model.FhirBoolean)OrderableElement.DeepCopy();
            }
            if (ReferencedItem != null)
            {
                dest.ReferencedItem = (Hl7.Fhir.Model.ResourceReference)ReferencedItem.DeepCopy();
            }
            if (AdditionalIdentifier != null)
            {
                dest.AdditionalIdentifier = new List <Hl7.Fhir.Model.Identifier>(AdditionalIdentifier.DeepCopy());
            }
            if (Classification != null)
            {
                dest.Classification = new List <Hl7.Fhir.Model.CodeableConcept>(Classification.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.PublicationStatus>)StatusElement.DeepCopy();
            }
            if (ValidityPeriod != null)
            {
                dest.ValidityPeriod = (Hl7.Fhir.Model.Period)ValidityPeriod.DeepCopy();
            }
            if (ValidToElement != null)
            {
                dest.ValidToElement = (Hl7.Fhir.Model.FhirDateTime)ValidToElement.DeepCopy();
            }
            if (LastUpdatedElement != null)
            {
                dest.LastUpdatedElement = (Hl7.Fhir.Model.FhirDateTime)LastUpdatedElement.DeepCopy();
            }
            if (AdditionalCharacteristic != null)
            {
                dest.AdditionalCharacteristic = new List <Hl7.Fhir.Model.CodeableConcept>(AdditionalCharacteristic.DeepCopy());
            }
            if (AdditionalClassification != null)
            {
                dest.AdditionalClassification = new List <Hl7.Fhir.Model.CodeableConcept>(AdditionalClassification.DeepCopy());
            }
            if (RelatedEntry != null)
            {
                dest.RelatedEntry = new List <Hl7.Fhir.Model.CatalogEntry.RelatedEntryComponent>(RelatedEntry.DeepCopy());
            }
            return(dest);
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as SubstanceReferenceInformation;

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

            base.CopyTo(dest);
            if (CommentElement != null)
            {
                dest.CommentElement = (Hl7.Fhir.Model.FhirString)CommentElement.DeepCopy();
            }
            if (Gene != null)
            {
                dest.Gene = new List <Hl7.Fhir.Model.SubstanceReferenceInformation.GeneComponent>(Gene.DeepCopy());
            }
            if (GeneElement != null)
            {
                dest.GeneElement = new List <Hl7.Fhir.Model.SubstanceReferenceInformation.GeneElementComponent>(GeneElement.DeepCopy());
            }
            if (Classification != null)
            {
                dest.Classification = new List <Hl7.Fhir.Model.SubstanceReferenceInformation.ClassificationComponent>(Classification.DeepCopy());
            }
            if (Target != null)
            {
                dest.Target = new List <Hl7.Fhir.Model.SubstanceReferenceInformation.TargetComponent>(Target.DeepCopy());
            }
            return(dest);
        }