コード例 #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ResearchStudy;

            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 (TitleElement != null)
            {
                dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
            }
            if (Protocol != null)
            {
                dest.Protocol = new List <Hl7.Fhir.Model.ResourceReference>(Protocol.DeepCopy());
            }
            if (PartOf != null)
            {
                dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.ResearchStudy.ResearchStudyStatus>)StatusElement.DeepCopy();
            }
            if (Category != null)
            {
                dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy());
            }
            if (Focus != null)
            {
                dest.Focus = new List <Hl7.Fhir.Model.CodeableConcept>(Focus.DeepCopy());
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactDetail>(Contact.DeepCopy());
            }
            if (RelatedArtifact != null)
            {
                dest.RelatedArtifact = new List <Hl7.Fhir.Model.RelatedArtifact>(RelatedArtifact.DeepCopy());
            }
            if (Keyword != null)
            {
                dest.Keyword = new List <Hl7.Fhir.Model.CodeableConcept>(Keyword.DeepCopy());
            }
            if (Jurisdiction != null)
            {
                dest.Jurisdiction = new List <Hl7.Fhir.Model.CodeableConcept>(Jurisdiction.DeepCopy());
            }
            if (Description != null)
            {
                dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy();
            }
            if (Enrollment != null)
            {
                dest.Enrollment = new List <Hl7.Fhir.Model.ResourceReference>(Enrollment.DeepCopy());
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Sponsor != null)
            {
                dest.Sponsor = (Hl7.Fhir.Model.ResourceReference)Sponsor.DeepCopy();
            }
            if (PrincipalInvestigator != null)
            {
                dest.PrincipalInvestigator = (Hl7.Fhir.Model.ResourceReference)PrincipalInvestigator.DeepCopy();
            }
            if (Site != null)
            {
                dest.Site = new List <Hl7.Fhir.Model.ResourceReference>(Site.DeepCopy());
            }
            if (ReasonStopped != null)
            {
                dest.ReasonStopped = (Hl7.Fhir.Model.CodeableConcept)ReasonStopped.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (Arm != null)
            {
                dest.Arm = new List <Hl7.Fhir.Model.ResearchStudy.ArmComponent>(Arm.DeepCopy());
            }
            return(dest);
        }
コード例 #2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as RecommendationComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (DateElement != null)
                    {
                        dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                    }
                    if (VaccineCode != null)
                    {
                        dest.VaccineCode = (Hl7.Fhir.Model.CodeableConcept)VaccineCode.DeepCopy();
                    }
                    if (DoseNumberElement != null)
                    {
                        dest.DoseNumberElement = (Hl7.Fhir.Model.PositiveInt)DoseNumberElement.DeepCopy();
                    }
                    if (ForecastStatus != null)
                    {
                        dest.ForecastStatus = (Hl7.Fhir.Model.CodeableConcept)ForecastStatus.DeepCopy();
                    }
                    if (DateCriterion != null)
                    {
                        dest.DateCriterion = new List <Hl7.Fhir.Model.ImmunizationRecommendation.DateCriterionComponent>(DateCriterion.DeepCopy());
                    }
                    if (Protocol != null)
                    {
                        dest.Protocol = (Hl7.Fhir.Model.ImmunizationRecommendation.ProtocolComponent)Protocol.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);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }