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

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Criticality_Element != null)
                {
                    dest.Criticality_Element = (Code <Hl7.Fhir.Model.AllergyIntolerance.Criticality>)Criticality_Element.DeepCopy();
                }
                if (SensitivityType_Element != null)
                {
                    dest.SensitivityType_Element = (Code <Hl7.Fhir.Model.AllergyIntolerance.SensitivityType>)SensitivityType_Element.DeepCopy();
                }
                if (RecordedDateElement != null)
                {
                    dest.RecordedDateElement = (Hl7.Fhir.Model.FhirDateTime)RecordedDateElement.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.SensitivityStatus>)StatusElement.DeepCopy();
                }
                if (Subject != null)
                {
                    dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
                }
                if (Recorder != null)
                {
                    dest.Recorder = (Hl7.Fhir.Model.ResourceReference)Recorder.DeepCopy();
                }
                if (Substance != null)
                {
                    dest.Substance = (Hl7.Fhir.Model.ResourceReference)Substance.DeepCopy();
                }
                if (Reaction != null)
                {
                    dest.Reaction = new List <Hl7.Fhir.Model.ResourceReference>(Reaction.DeepCopy());
                }
                if (SensitivityTest != null)
                {
                    dest.SensitivityTest = new List <Hl7.Fhir.Model.ResourceReference>(SensitivityTest.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Example #2
0
            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");
                }
            }
Example #3
0
      public override IDeepCopyable CopyTo(IDeepCopyable other)
      {
        var dest = other as ReferenceStrengthComponent;

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

        base.CopyTo(dest);
        if(Substance != null) dest.Substance = (Hl7.Fhir.Model.DataType)Substance.DeepCopy();
        if(Strength != null) dest.Strength = (Hl7.Fhir.Model.Ratio)Strength.DeepCopy();
        if(StrengthHighLimit != null) dest.StrengthHighLimit = (Hl7.Fhir.Model.Ratio)StrengthHighLimit.DeepCopy();
        if(MeasurementPointElement != null) dest.MeasurementPointElement = (Hl7.Fhir.Model.FhirString)MeasurementPointElement.DeepCopy();
        if(Country != null) dest.Country = new List<Hl7.Fhir.Model.CodeableConcept>(Country.DeepCopy());
        return dest;
      }
      public override IDeepCopyable CopyTo(IDeepCopyable other)
      {
        var dest = other as ReactionComponent;

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

        base.CopyTo(dest);
        if(Substance != null) dest.Substance = (Hl7.Fhir.Model.CodeableConcept)Substance.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(SeverityElement != null) dest.SeverityElement = (Code<Hl7.Fhir.Model.AllergyIntolerance.AllergyIntoleranceSeverity>)SeverityElement.DeepCopy();
        if(ExposureRoute != null) dest.ExposureRoute = (Hl7.Fhir.Model.CodeableConcept)ExposureRoute.DeepCopy();
        if(Note != null) dest.Note = new List<Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
        return dest;
      }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as AllergyIntolerance;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (OnsetElement != null)
                {
                    dest.OnsetElement = (Hl7.Fhir.Model.FhirDateTime)OnsetElement.DeepCopy();
                }
                if (RecordedDateElement != null)
                {
                    dest.RecordedDateElement = (Hl7.Fhir.Model.FhirDateTime)RecordedDateElement.DeepCopy();
                }
                if (Recorder != null)
                {
                    dest.Recorder = (Hl7.Fhir.Model.ResourceReference)Recorder.DeepCopy();
                }
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (Reporter != null)
                {
                    dest.Reporter = (Hl7.Fhir.Model.ResourceReference)Reporter.DeepCopy();
                }
                if (Substance != null)
                {
                    dest.Substance = (Hl7.Fhir.Model.CodeableConcept)Substance.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.AllergyIntoleranceStatus>)StatusElement.DeepCopy();
                }
                if (CriticalityElement != null)
                {
                    dest.CriticalityElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.AllergyIntoleranceCriticality>)CriticalityElement.DeepCopy();
                }
                if (TypeElement != null)
                {
                    dest.TypeElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.AllergyIntoleranceType>)TypeElement.DeepCopy();
                }
                if (CategoryElement != null)
                {
                    dest.CategoryElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.AllergyIntoleranceCategory>)CategoryElement.DeepCopy();
                }
                if (LastOccurenceElement != null)
                {
                    dest.LastOccurenceElement = (Hl7.Fhir.Model.FhirDateTime)LastOccurenceElement.DeepCopy();
                }
                if (Note != null)
                {
                    dest.Note = (Hl7.Fhir.Model.Annotation)Note.DeepCopy();
                }
                if (Reaction != null)
                {
                    dest.Reaction = new List <Hl7.Fhir.Model.AllergyIntolerance.ReactionComponent>(Reaction.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Example #6
0
    public override IDeepCopyable CopyTo(IDeepCopyable other)
    {
      var dest = other as Ingredient;

      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 = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy();
      if(Role != null) dest.Role = (Hl7.Fhir.Model.CodeableConcept)Role.DeepCopy();
      if(Function != null) dest.Function = new List<Hl7.Fhir.Model.CodeableConcept>(Function.DeepCopy());
      if(Description != null) dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy();
      if(AllergenicIndicatorElement != null) dest.AllergenicIndicatorElement = (Hl7.Fhir.Model.FhirBoolean)AllergenicIndicatorElement.DeepCopy();
      if(Manufacturer != null) dest.Manufacturer = new List<Hl7.Fhir.Model.ResourceReference>(Manufacturer.DeepCopy());
      if(Substance != null) dest.Substance = (Hl7.Fhir.Model.Ingredient.SubstanceComponent)Substance.DeepCopy();
      if(SpecifiedSubstance != null) dest.SpecifiedSubstance = new List<Hl7.Fhir.Model.Ingredient.SpecifiedSubstanceComponent>(SpecifiedSubstance.DeepCopy());
      return dest;
    }