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

            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 (Disease != null)
            {
                dest.Disease = (Hl7.Fhir.Model.CodeableConcept)Disease.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 (TherapeuticIndication != null)
            {
                dest.TherapeuticIndication = new List <Hl7.Fhir.Model.ResourceReference>(TherapeuticIndication.DeepCopy());
            }
            if (OtherTherapy != null)
            {
                dest.OtherTherapy = new List <Hl7.Fhir.Model.MedicinalProductContraindication.OtherTherapyComponent>(OtherTherapy.DeepCopy());
            }
            if (Population != null)
            {
                dest.Population = new List <Hl7.Fhir.Model.Population>(Population.DeepCopy());
            }
            return(dest);
        }