Ejemplo n.º 1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Parameters;

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

            base.CopyTo(dest);
            if (Parameter != null)
            {
                dest.Parameter = new List <Hl7.Fhir.Model.Parameters.ParameterComponent>(Parameter.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Substance;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Category != null)
                {
                    dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy());
                }
                if (Code != null)
                {
                    dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (Instance != null)
                {
                    dest.Instance = new List <Hl7.Fhir.Model.Substance.InstanceComponent>(Instance.DeepCopy());
                }
                if (Ingredient != null)
                {
                    dest.Ingredient = new List <Hl7.Fhir.Model.Substance.IngredientComponent>(Ingredient.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 EpisodeOfCare;

            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 (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.EpisodeOfCare.EpisodeOfCareStatus>)StatusElement.DeepCopy();
            }
            if (StatusHistory != null)
            {
                dest.StatusHistory = new List <Hl7.Fhir.Model.EpisodeOfCare.StatusHistoryComponent>(StatusHistory.DeepCopy());
            }
            if (Type != null)
            {
                dest.Type = new List <Hl7.Fhir.Model.CodeableConcept>(Type.DeepCopy());
            }
            if (Condition != null)
            {
                dest.Condition = new List <Hl7.Fhir.Model.ResourceReference>(Condition.DeepCopy());
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (ManagingOrganization != null)
            {
                dest.ManagingOrganization = (Hl7.Fhir.Model.ResourceReference)ManagingOrganization.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (ReferralRequest != null)
            {
                dest.ReferralRequest = new List <Hl7.Fhir.Model.ResourceReference>(ReferralRequest.DeepCopy());
            }
            if (CareManager != null)
            {
                dest.CareManager = (Hl7.Fhir.Model.ResourceReference)CareManager.DeepCopy();
            }
            if (CareTeam != null)
            {
                dest.CareTeam = new List <Hl7.Fhir.Model.EpisodeOfCare.CareTeamComponent>(CareTeam.DeepCopy());
            }
            return(dest);
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as OperationOutcome;

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

            base.CopyTo(dest);
            if (Issue != null)
            {
                dest.Issue = new List <Hl7.Fhir.Model.OperationOutcome.IssueComponent>(Issue.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 5
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as QuestionComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (LinkIdElement != null)
                    {
                        dest.LinkIdElement = (Hl7.Fhir.Model.FhirString)LinkIdElement.DeepCopy();
                    }
                    if (Concept != null)
                    {
                        dest.Concept = new List <Hl7.Fhir.Model.Coding>(Concept.DeepCopy());
                    }
                    if (TextElement != null)
                    {
                        dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
                    }
                    if (TypeElement != null)
                    {
                        dest.TypeElement = (Code <Hl7.Fhir.Model.Questionnaire.AnswerFormat>)TypeElement.DeepCopy();
                    }
                    if (RequiredElement != null)
                    {
                        dest.RequiredElement = (Hl7.Fhir.Model.FhirBoolean)RequiredElement.DeepCopy();
                    }
                    if (RepeatsElement != null)
                    {
                        dest.RepeatsElement = (Hl7.Fhir.Model.FhirBoolean)RepeatsElement.DeepCopy();
                    }
                    if (Options != null)
                    {
                        dest.Options = (Hl7.Fhir.Model.ResourceReference)Options.DeepCopy();
                    }
                    if (Option != null)
                    {
                        dest.Option = new List <Hl7.Fhir.Model.Coding>(Option.DeepCopy());
                    }
                    if (Group != null)
                    {
                        dest.Group = new List <Hl7.Fhir.Model.Questionnaire.GroupComponent>(Group.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Ejemplo n.º 6
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as SeriesComponent;

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

                base.CopyTo(dest);
                if (UidElement != null)
                {
                    dest.UidElement = (Hl7.Fhir.Model.Oid)UidElement.DeepCopy();
                }
                if (Endpoint != null)
                {
                    dest.Endpoint = new List <Hl7.Fhir.Model.ResourceReference>(Endpoint.DeepCopy());
                }
                if (Instance != null)
                {
                    dest.Instance = new List <Hl7.Fhir.Model.ImagingManifest.InstanceComponent>(Instance.DeepCopy());
                }
                return(dest);
            }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as MedicationStatement;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (InformationSource != null)
                {
                    dest.InformationSource = (Hl7.Fhir.Model.ResourceReference)InformationSource.DeepCopy();
                }
                if (DateAssertedElement != null)
                {
                    dest.DateAssertedElement = (Hl7.Fhir.Model.FhirDateTime)DateAssertedElement.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationStatement.MedicationStatementStatus>)StatusElement.DeepCopy();
                }
                if (WasNotTakenElement != null)
                {
                    dest.WasNotTakenElement = (Hl7.Fhir.Model.FhirBoolean)WasNotTakenElement.DeepCopy();
                }
                if (ReasonNotTaken != null)
                {
                    dest.ReasonNotTaken = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonNotTaken.DeepCopy());
                }
                if (ReasonForUse != null)
                {
                    dest.ReasonForUse = (Hl7.Fhir.Model.Element)ReasonForUse.DeepCopy();
                }
                if (Effective != null)
                {
                    dest.Effective = (Hl7.Fhir.Model.Element)Effective.DeepCopy();
                }
                if (NoteElement != null)
                {
                    dest.NoteElement = (Hl7.Fhir.Model.FhirString)NoteElement.DeepCopy();
                }
                if (SupportingInformation != null)
                {
                    dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy());
                }
                if (Medication != null)
                {
                    dest.Medication = (Hl7.Fhir.Model.Element)Medication.DeepCopy();
                }
                if (Dosage != null)
                {
                    dest.Dosage = new List <Hl7.Fhir.Model.MedicationStatement.DosageComponent>(Dosage.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 FamilyMemberHistory;

            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 (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.FamilyMemberHistory.FamilyHistoryStatus>)StatusElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (Relationship != null)
            {
                dest.Relationship = (Hl7.Fhir.Model.CodeableConcept)Relationship.DeepCopy();
            }
            if (GenderElement != null)
            {
                dest.GenderElement = (Code <Hl7.Fhir.Model.AdministrativeGender>)GenderElement.DeepCopy();
            }
            if (Born != null)
            {
                dest.Born = (Hl7.Fhir.Model.DataType)Born.DeepCopy();
            }
            if (Age != null)
            {
                dest.Age = (Hl7.Fhir.Model.DataType)Age.DeepCopy();
            }
            if (Deceased != null)
            {
                dest.Deceased = (Hl7.Fhir.Model.DataType)Deceased.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = (Hl7.Fhir.Model.Annotation)Note.DeepCopy();
            }
            if (Condition != null)
            {
                dest.Condition = new List <Hl7.Fhir.Model.FamilyMemberHistory.ConditionComponent>(Condition.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 9
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ChargeItem;

            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 (DefinitionElement != null)
            {
                dest.DefinitionElement = new List <Hl7.Fhir.Model.FhirUri>(DefinitionElement.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.ChargeItem.ChargeItemStatus>)StatusElement.DeepCopy();
            }
            if (PartOf != null)
            {
                dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy());
            }
            if (Code != null)
            {
                dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Context != null)
            {
                dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy();
            }
            if (Occurrence != null)
            {
                dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy();
            }
            if (Participant != null)
            {
                dest.Participant = new List <Hl7.Fhir.Model.ChargeItem.ParticipantComponent>(Participant.DeepCopy());
            }
            if (PerformingOrganization != null)
            {
                dest.PerformingOrganization = (Hl7.Fhir.Model.ResourceReference)PerformingOrganization.DeepCopy();
            }
            if (RequestingOrganization != null)
            {
                dest.RequestingOrganization = (Hl7.Fhir.Model.ResourceReference)RequestingOrganization.DeepCopy();
            }
            if (Quantity != null)
            {
                dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy();
            }
            if (Bodysite != null)
            {
                dest.Bodysite = new List <Hl7.Fhir.Model.CodeableConcept>(Bodysite.DeepCopy());
            }
            if (FactorOverrideElement != null)
            {
                dest.FactorOverrideElement = (Hl7.Fhir.Model.FhirDecimal)FactorOverrideElement.DeepCopy();
            }
            if (PriceOverride != null)
            {
                dest.PriceOverride = (Hl7.Fhir.Model.Money)PriceOverride.DeepCopy();
            }
            if (OverrideReasonElement != null)
            {
                dest.OverrideReasonElement = (Hl7.Fhir.Model.FhirString)OverrideReasonElement.DeepCopy();
            }
            if (Enterer != null)
            {
                dest.Enterer = (Hl7.Fhir.Model.ResourceReference)Enterer.DeepCopy();
            }
            if (EnteredDateElement != null)
            {
                dest.EnteredDateElement = (Hl7.Fhir.Model.FhirDateTime)EnteredDateElement.DeepCopy();
            }
            if (Reason != null)
            {
                dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy());
            }
            if (Service != null)
            {
                dest.Service = new List <Hl7.Fhir.Model.ResourceReference>(Service.DeepCopy());
            }
            if (Account != null)
            {
                dest.Account = new List <Hl7.Fhir.Model.ResourceReference>(Account.DeepCopy());
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (SupportingInformation != null)
            {
                dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 10
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Appointment;

            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 (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.Appointment.AppointmentStatus>)StatusElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Reason != null)
            {
                dest.Reason = (Hl7.Fhir.Model.CodeableConcept)Reason.DeepCopy();
            }
            if (PriorityElement != null)
            {
                dest.PriorityElement = (Hl7.Fhir.Model.UnsignedInt)PriorityElement.DeepCopy();
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (StartElement != null)
            {
                dest.StartElement = (Hl7.Fhir.Model.Instant)StartElement.DeepCopy();
            }
            if (EndElement != null)
            {
                dest.EndElement = (Hl7.Fhir.Model.Instant)EndElement.DeepCopy();
            }
            if (MinutesDurationElement != null)
            {
                dest.MinutesDurationElement = (Hl7.Fhir.Model.PositiveInt)MinutesDurationElement.DeepCopy();
            }
            if (Slot != null)
            {
                dest.Slot = new List <Hl7.Fhir.Model.ResourceReference>(Slot.DeepCopy());
            }
            if (CommentElement != null)
            {
                dest.CommentElement = (Hl7.Fhir.Model.FhirString)CommentElement.DeepCopy();
            }
            if (Participant != null)
            {
                dest.Participant = new List <Hl7.Fhir.Model.Appointment.ParticipantComponent>(Participant.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 11
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Organization;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (ActiveElement != null)
                {
                    dest.ActiveElement = (Hl7.Fhir.Model.FhirBoolean)ActiveElement.DeepCopy();
                }
                if (Type != null)
                {
                    dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
                }
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (Telecom != null)
                {
                    dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
                }
                if (Address != null)
                {
                    dest.Address = new List <Hl7.Fhir.Model.Address>(Address.DeepCopy());
                }
                if (PartOf != null)
                {
                    dest.PartOf = (Hl7.Fhir.Model.ResourceReference)PartOf.DeepCopy();
                }
                if (Contact != null)
                {
                    dest.Contact = new List <Hl7.Fhir.Model.Organization.ContactComponent>(Contact.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 12
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as RelatedPerson;

            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 (ActiveElement != null)
            {
                dest.ActiveElement = (Hl7.Fhir.Model.FhirBoolean)ActiveElement.DeepCopy();
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (Relationship != null)
            {
                dest.Relationship = new List <Hl7.Fhir.Model.CodeableConcept>(Relationship.DeepCopy());
            }
            if (Name != null)
            {
                dest.Name = new List <Hl7.Fhir.Model.HumanName>(Name.DeepCopy());
            }
            if (Telecom != null)
            {
                dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
            }
            if (GenderElement != null)
            {
                dest.GenderElement = (Code <Hl7.Fhir.Model.AdministrativeGender>)GenderElement.DeepCopy();
            }
            if (BirthDateElement != null)
            {
                dest.BirthDateElement = (Hl7.Fhir.Model.Date)BirthDateElement.DeepCopy();
            }
            if (Address != null)
            {
                dest.Address = new List <Hl7.Fhir.Model.Address>(Address.DeepCopy());
            }
            if (Photo != null)
            {
                dest.Photo = new List <Hl7.Fhir.Model.Attachment>(Photo.DeepCopy());
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Communication != null)
            {
                dest.Communication = new List <Hl7.Fhir.Model.RelatedPerson.CommunicationComponent>(Communication.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 13
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as MedicinalProductPackaged;

            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 (Subject != null)
            {
                dest.Subject = new List <Hl7.Fhir.Model.ResourceReference>(Subject.DeepCopy());
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (LegalStatusOfSupply != null)
            {
                dest.LegalStatusOfSupply = (Hl7.Fhir.Model.CodeableConcept)LegalStatusOfSupply.DeepCopy();
            }
            if (MarketingStatus != null)
            {
                dest.MarketingStatus = new List <Hl7.Fhir.Model.MarketingStatus>(MarketingStatus.DeepCopy());
            }
            if (MarketingAuthorization != null)
            {
                dest.MarketingAuthorization = (Hl7.Fhir.Model.ResourceReference)MarketingAuthorization.DeepCopy();
            }
            if (Manufacturer != null)
            {
                dest.Manufacturer = new List <Hl7.Fhir.Model.ResourceReference>(Manufacturer.DeepCopy());
            }
            if (BatchIdentifier != null)
            {
                dest.BatchIdentifier = new List <Hl7.Fhir.Model.MedicinalProductPackaged.BatchIdentifierComponent>(BatchIdentifier.DeepCopy());
            }
            if (PackageItem != null)
            {
                dest.PackageItem = new List <Hl7.Fhir.Model.MedicinalProductPackaged.PackageItemComponent>(PackageItem.DeepCopy());
            }
            return(dest);
        }
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as AnswerComponent;

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

                base.CopyTo(dest);
                if (Value != null)
                {
                    dest.Value = (Hl7.Fhir.Model.DataType)Value.DeepCopy();
                }
                if (Group != null)
                {
                    dest.Group = new List <Hl7.Fhir.Model.Questionnaire.GroupComponent>(Group.DeepCopy());
                }
                return(dest);
            }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as FamilyMemberHistory;

            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 (InstantiatesCanonicalElement != null)
            {
                dest.InstantiatesCanonicalElement = new List <Hl7.Fhir.Model.Canonical>(InstantiatesCanonicalElement.DeepCopy());
            }
            if (InstantiatesUriElement != null)
            {
                dest.InstantiatesUriElement = new List <Hl7.Fhir.Model.FhirUri>(InstantiatesUriElement.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.FamilyMemberHistory.FamilyHistoryStatus>)StatusElement.DeepCopy();
            }
            if (DataAbsentReason != null)
            {
                dest.DataAbsentReason = (Hl7.Fhir.Model.CodeableConcept)DataAbsentReason.DeepCopy();
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (Relationship != null)
            {
                dest.Relationship = (Hl7.Fhir.Model.CodeableConcept)Relationship.DeepCopy();
            }
            if (Sex != null)
            {
                dest.Sex = (Hl7.Fhir.Model.CodeableConcept)Sex.DeepCopy();
            }
            if (Born != null)
            {
                dest.Born = (Hl7.Fhir.Model.DataType)Born.DeepCopy();
            }
            if (Age != null)
            {
                dest.Age = (Hl7.Fhir.Model.DataType)Age.DeepCopy();
            }
            if (EstimatedAgeElement != null)
            {
                dest.EstimatedAgeElement = (Hl7.Fhir.Model.FhirBoolean)EstimatedAgeElement.DeepCopy();
            }
            if (Deceased != null)
            {
                dest.Deceased = (Hl7.Fhir.Model.DataType)Deceased.DeepCopy();
            }
            if (ReasonCode != null)
            {
                dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy());
            }
            if (ReasonReference != null)
            {
                dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy());
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (Condition != null)
            {
                dest.Condition = new List <Hl7.Fhir.Model.FamilyMemberHistory.ConditionComponent>(Condition.DeepCopy());
            }
            return(dest);
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ManufacturedItemDefinition;

            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 (ManufacturedDoseForm != null)
            {
                dest.ManufacturedDoseForm = (Hl7.Fhir.Model.CodeableConcept)ManufacturedDoseForm.DeepCopy();
            }
            if (UnitOfPresentation != null)
            {
                dest.UnitOfPresentation = (Hl7.Fhir.Model.CodeableConcept)UnitOfPresentation.DeepCopy();
            }
            if (Manufacturer != null)
            {
                dest.Manufacturer = new List <Hl7.Fhir.Model.ResourceReference>(Manufacturer.DeepCopy());
            }
            if (Ingredient != null)
            {
                dest.Ingredient = new List <Hl7.Fhir.Model.ResourceReference>(Ingredient.DeepCopy());
            }
            if (Property != null)
            {
                dest.Property = new List <Hl7.Fhir.Model.ManufacturedItemDefinition.PropertyComponent>(Property.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 17
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ProductShelfLife;

            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 (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Quantity)Period.DeepCopy();
            }
            if (SpecialPrecautionsForStorage != null)
            {
                dest.SpecialPrecautionsForStorage = new List <Hl7.Fhir.Model.CodeableConcept>(SpecialPrecautionsForStorage.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 18
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Library;

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

            base.CopyTo(dest);
            if (UrlElement != null)
            {
                dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (VersionElement != null)
            {
                dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (TitleElement != null)
            {
                dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.PublicationStatus>)StatusElement.DeepCopy();
            }
            if (ExperimentalElement != null)
            {
                dest.ExperimentalElement = (Hl7.Fhir.Model.FhirBoolean)ExperimentalElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (PublisherElement != null)
            {
                dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
            }
            if (Description != null)
            {
                dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy();
            }
            if (Purpose != null)
            {
                dest.Purpose = (Hl7.Fhir.Model.Markdown)Purpose.DeepCopy();
            }
            if (UsageElement != null)
            {
                dest.UsageElement = (Hl7.Fhir.Model.FhirString)UsageElement.DeepCopy();
            }
            if (ApprovalDateElement != null)
            {
                dest.ApprovalDateElement = (Hl7.Fhir.Model.Date)ApprovalDateElement.DeepCopy();
            }
            if (LastReviewDateElement != null)
            {
                dest.LastReviewDateElement = (Hl7.Fhir.Model.Date)LastReviewDateElement.DeepCopy();
            }
            if (EffectivePeriod != null)
            {
                dest.EffectivePeriod = (Hl7.Fhir.Model.Period)EffectivePeriod.DeepCopy();
            }
            if (UseContext != null)
            {
                dest.UseContext = new List <Hl7.Fhir.Model.UsageContext>(UseContext.DeepCopy());
            }
            if (Jurisdiction != null)
            {
                dest.Jurisdiction = new List <Hl7.Fhir.Model.CodeableConcept>(Jurisdiction.DeepCopy());
            }
            if (Topic != null)
            {
                dest.Topic = new List <Hl7.Fhir.Model.CodeableConcept>(Topic.DeepCopy());
            }
            if (Contributor != null)
            {
                dest.Contributor = new List <Hl7.Fhir.Model.Contributor>(Contributor.DeepCopy());
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactDetail>(Contact.DeepCopy());
            }
            if (Copyright != null)
            {
                dest.Copyright = (Hl7.Fhir.Model.Markdown)Copyright.DeepCopy();
            }
            if (RelatedArtifact != null)
            {
                dest.RelatedArtifact = new List <Hl7.Fhir.Model.RelatedArtifact>(RelatedArtifact.DeepCopy());
            }
            if (Parameter != null)
            {
                dest.Parameter = new List <Hl7.Fhir.Model.ParameterDefinition>(Parameter.DeepCopy());
            }
            if (DataRequirement != null)
            {
                dest.DataRequirement = new List <Hl7.Fhir.Model.DataRequirement>(DataRequirement.DeepCopy());
            }
            if (Content != null)
            {
                dest.Content = new List <Hl7.Fhir.Model.Attachment>(Content.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 19
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as PackageComponent;

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

                base.CopyTo(dest);
                if (Container != null)
                {
                    dest.Container = (Hl7.Fhir.Model.CodeableConcept)Container.DeepCopy();
                }
                if (Content != null)
                {
                    dest.Content = new List <Hl7.Fhir.Model.Medication.ContentComponent>(Content.DeepCopy());
                }
                return(dest);
            }
Ejemplo n.º 20
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as DeviceMetric;

            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 (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Unit != null)
            {
                dest.Unit = (Hl7.Fhir.Model.CodeableConcept)Unit.DeepCopy();
            }
            if (Source != null)
            {
                dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy();
            }
            if (Parent != null)
            {
                dest.Parent = (Hl7.Fhir.Model.ResourceReference)Parent.DeepCopy();
            }
            if (OperationalStatusElement != null)
            {
                dest.OperationalStatusElement = (Code <Hl7.Fhir.Model.DeviceMetric.DeviceMetricOperationalStatus>)OperationalStatusElement.DeepCopy();
            }
            if (ColorElement != null)
            {
                dest.ColorElement = (Code <Hl7.Fhir.Model.DeviceMetric.DeviceMetricColor>)ColorElement.DeepCopy();
            }
            if (CategoryElement != null)
            {
                dest.CategoryElement = (Code <Hl7.Fhir.Model.DeviceMetric.DeviceMetricCategory>)CategoryElement.DeepCopy();
            }
            if (MeasurementPeriod != null)
            {
                dest.MeasurementPeriod = (Hl7.Fhir.Model.Timing)MeasurementPeriod.DeepCopy();
            }
            if (Calibration != null)
            {
                dest.Calibration = new List <Hl7.Fhir.Model.DeviceMetric.CalibrationComponent>(Calibration.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 21
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as DiagnosticOrder;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Subject != null)
                {
                    dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
                }
                if (Orderer != null)
                {
                    dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy();
                }
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Encounter != null)
                {
                    dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
                }
                if (Reason != null)
                {
                    dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy());
                }
                if (SupportingInformation != null)
                {
                    dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy());
                }
                if (Specimen != null)
                {
                    dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy());
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderStatus>)StatusElement.DeepCopy();
                }
                if (PriorityElement != null)
                {
                    dest.PriorityElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderPriority>)PriorityElement.DeepCopy();
                }
                if (Event != null)
                {
                    dest.Event = new List <Hl7.Fhir.Model.DiagnosticOrder.EventComponent>(Event.DeepCopy());
                }
                if (Item != null)
                {
                    dest.Item = new List <Hl7.Fhir.Model.DiagnosticOrder.ItemComponent>(Item.DeepCopy());
                }
                if (Note != null)
                {
                    dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 22
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ImagingManifest;

            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 (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (AuthoringTimeElement != null)
            {
                dest.AuthoringTimeElement = (Hl7.Fhir.Model.FhirDateTime)AuthoringTimeElement.DeepCopy();
            }
            if (Author != null)
            {
                dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy();
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (Study != null)
            {
                dest.Study = new List <Hl7.Fhir.Model.ImagingManifest.StudyComponent>(Study.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 23
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ItemComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Code != null)
                    {
                        dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                    }
                    if (Specimen != null)
                    {
                        dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy());
                    }
                    if (BodySite != null)
                    {
                        dest.BodySite = (Hl7.Fhir.Model.CodeableConcept)BodySite.DeepCopy();
                    }
                    if (StatusElement != null)
                    {
                        dest.StatusElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderStatus>)StatusElement.DeepCopy();
                    }
                    if (Event != null)
                    {
                        dest.Event = new List <Hl7.Fhir.Model.DiagnosticOrder.EventComponent>(Event.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Ejemplo n.º 24
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Specimen;

            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 (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.Specimen.SpecimenStatus>)StatusElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Parent != null)
            {
                dest.Parent = new List <Hl7.Fhir.Model.ResourceReference>(Parent.DeepCopy());
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (AccessionIdentifier != null)
            {
                dest.AccessionIdentifier = (Hl7.Fhir.Model.Identifier)AccessionIdentifier.DeepCopy();
            }
            if (ReceivedTimeElement != null)
            {
                dest.ReceivedTimeElement = (Hl7.Fhir.Model.FhirDateTime)ReceivedTimeElement.DeepCopy();
            }
            if (Collection != null)
            {
                dest.Collection = (Hl7.Fhir.Model.Specimen.CollectionComponent)Collection.DeepCopy();
            }
            if (Treatment != null)
            {
                dest.Treatment = new List <Hl7.Fhir.Model.Specimen.TreatmentComponent>(Treatment.DeepCopy());
            }
            if (Container != null)
            {
                dest.Container = new List <Hl7.Fhir.Model.Specimen.ContainerComponent>(Container.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 25
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Coverage;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Issuer != null)
                {
                    dest.Issuer = (Hl7.Fhir.Model.ResourceReference)Issuer.DeepCopy();
                }
                if (Bin != null)
                {
                    dest.Bin = (Hl7.Fhir.Model.Identifier)Bin.DeepCopy();
                }
                if (Period != null)
                {
                    dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
                }
                if (Type != null)
                {
                    dest.Type = (Hl7.Fhir.Model.Coding)Type.DeepCopy();
                }
                if (SubscriberId != null)
                {
                    dest.SubscriberId = (Hl7.Fhir.Model.Identifier)SubscriberId.DeepCopy();
                }
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (GroupElement != null)
                {
                    dest.GroupElement = (Hl7.Fhir.Model.FhirString)GroupElement.DeepCopy();
                }
                if (PlanElement != null)
                {
                    dest.PlanElement = (Hl7.Fhir.Model.FhirString)PlanElement.DeepCopy();
                }
                if (SubPlanElement != null)
                {
                    dest.SubPlanElement = (Hl7.Fhir.Model.FhirString)SubPlanElement.DeepCopy();
                }
                if (DependentElement != null)
                {
                    dest.DependentElement = (Hl7.Fhir.Model.PositiveInt)DependentElement.DeepCopy();
                }
                if (SequenceElement != null)
                {
                    dest.SequenceElement = (Hl7.Fhir.Model.PositiveInt)SequenceElement.DeepCopy();
                }
                if (Subscriber != null)
                {
                    dest.Subscriber = (Hl7.Fhir.Model.ResourceReference)Subscriber.DeepCopy();
                }
                if (Network != null)
                {
                    dest.Network = (Hl7.Fhir.Model.Identifier)Network.DeepCopy();
                }
                if (Contract != null)
                {
                    dest.Contract = new List <Hl7.Fhir.Model.ResourceReference>(Contract.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 26
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ParameterComponent;

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

                base.CopyTo(dest);
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (Value != null)
                {
                    dest.Value = (Hl7.Fhir.Model.DataType)Value.DeepCopy();
                }
                if (Resource != null)
                {
                    dest.Resource = (Hl7.Fhir.Model.Resource)Resource.DeepCopy();
                }
                if (Part != null)
                {
                    dest.Part = new List <Hl7.Fhir.Model.Parameters.ParameterComponent>(Part.DeepCopy());
                }
                return(dest);
            }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ImmunizationRecommendation;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (Recommendation != null)
                {
                    dest.Recommendation = new List <Hl7.Fhir.Model.ImmunizationRecommendation.RecommendationComponent>(Recommendation.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 28
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as PaymentReconciliation;

            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 (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.FinancialResourceStatusCodes>)StatusElement.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (CreatedElement != null)
            {
                dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy();
            }
            if (PaymentIssuer != null)
            {
                dest.PaymentIssuer = (Hl7.Fhir.Model.ResourceReference)PaymentIssuer.DeepCopy();
            }
            if (Request != null)
            {
                dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy();
            }
            if (Requestor != null)
            {
                dest.Requestor = (Hl7.Fhir.Model.ResourceReference)Requestor.DeepCopy();
            }
            if (OutcomeElement != null)
            {
                dest.OutcomeElement = (Code <Hl7.Fhir.Model.ClaimProcessingCodes>)OutcomeElement.DeepCopy();
            }
            if (DispositionElement != null)
            {
                dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy();
            }
            if (PaymentDateElement != null)
            {
                dest.PaymentDateElement = (Hl7.Fhir.Model.Date)PaymentDateElement.DeepCopy();
            }
            if (PaymentAmount != null)
            {
                dest.PaymentAmount = (Hl7.Fhir.Model.Money)PaymentAmount.DeepCopy();
            }
            if (PaymentIdentifier != null)
            {
                dest.PaymentIdentifier = (Hl7.Fhir.Model.Identifier)PaymentIdentifier.DeepCopy();
            }
            if (Detail != null)
            {
                dest.Detail = new List <Hl7.Fhir.Model.PaymentReconciliation.DetailsComponent>(Detail.DeepCopy());
            }
            if (FormCode != null)
            {
                dest.FormCode = (Hl7.Fhir.Model.CodeableConcept)FormCode.DeepCopy();
            }
            if (ProcessNote != null)
            {
                dest.ProcessNote = new List <Hl7.Fhir.Model.PaymentReconciliation.NotesComponent>(ProcessNote.DeepCopy());
            }
            return(dest);
        }
            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");
                }
            }
Ejemplo n.º 30
0
        public void TestListDeepCopy()
        {
            var x = new List<Patient>();
            x.Add(new Patient());
            x.Add(new Patient());

            var y = new List<Patient>(x.DeepCopy());
            Assert.IsTrue(x[0] is Patient);
            Assert.AreNotEqual(x[0], y[0]);
            Assert.AreNotEqual(x[1], y[1]);
        }
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as QuestionComponent;

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

                base.CopyTo(dest);
                if (LinkIdElement != null)
                {
                    dest.LinkIdElement = (Hl7.Fhir.Model.FhirString)LinkIdElement.DeepCopy();
                }
                if (TextElement != null)
                {
                    dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
                }
                if (Answer != null)
                {
                    dest.Answer = new List <Hl7.Fhir.Model.QuestionnaireResponse.AnswerComponent>(Answer.DeepCopy());
                }
                return(dest);
            }