示例#1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Location;

            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.Location.LocationStatus>)StatusElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (ModeElement != null)
            {
                dest.ModeElement = (Code <Hl7.Fhir.Model.Location.LocationMode>)ModeElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Telecom != null)
            {
                dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
            }
            if (Address != null)
            {
                dest.Address = (Hl7.Fhir.Model.Address)Address.DeepCopy();
            }
            if (PhysicalType != null)
            {
                dest.PhysicalType = (Hl7.Fhir.Model.CodeableConcept)PhysicalType.DeepCopy();
            }
            if (Position != null)
            {
                dest.Position = (Hl7.Fhir.Model.Location.PositionComponent)Position.DeepCopy();
            }
            if (ManagingOrganization != null)
            {
                dest.ManagingOrganization = (Hl7.Fhir.Model.ResourceReference)ManagingOrganization.DeepCopy();
            }
            if (PartOf != null)
            {
                dest.PartOf = (Hl7.Fhir.Model.ResourceReference)PartOf.DeepCopy();
            }
            return(dest);
        }
示例#2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as List;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Code != null)
                {
                    dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                }
                if (Subject != null)
                {
                    dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
                }
                if (Source != null)
                {
                    dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy();
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (OrderedElement != null)
                {
                    dest.OrderedElement = (Hl7.Fhir.Model.FhirBoolean)OrderedElement.DeepCopy();
                }
                if (ModeElement != null)
                {
                    dest.ModeElement = (Code <Hl7.Fhir.Model.List.ListMode>)ModeElement.DeepCopy();
                }
                if (Entry != null)
                {
                    dest.Entry = new List <Hl7.Fhir.Model.List.ListEntryComponent>(Entry.DeepCopy());
                }
                if (EmptyReason != null)
                {
                    dest.EmptyReason = (Hl7.Fhir.Model.CodeableConcept)EmptyReason.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
示例#3
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as SectionComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (TitleElement != null)
                    {
                        dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
                    }
                    if (Code != null)
                    {
                        dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                    }
                    if (Text != null)
                    {
                        dest.Text = (Hl7.Fhir.Model.Narrative)Text.DeepCopy();
                    }
                    if (ModeElement != null)
                    {
                        dest.ModeElement = (Hl7.Fhir.Model.Code)ModeElement.DeepCopy();
                    }
                    if (OrderedBy != null)
                    {
                        dest.OrderedBy = (Hl7.Fhir.Model.CodeableConcept)OrderedBy.DeepCopy();
                    }
                    if (Entry != null)
                    {
                        dest.Entry = new List <Hl7.Fhir.Model.ResourceReference>(Entry.DeepCopy());
                    }
                    if (EmptyReason != null)
                    {
                        dest.EmptyReason = (Hl7.Fhir.Model.CodeableConcept)EmptyReason.DeepCopy();
                    }
                    if (Section != null)
                    {
                        dest.Section = new List <Hl7.Fhir.Model.Composition.SectionComponent>(Section.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
示例#4
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as List;

            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.List.ListStatus>)StatusElement.DeepCopy();
            }
            if (ModeElement != null)
            {
                dest.ModeElement = (Code <Hl7.Fhir.Model.ListMode>)ModeElement.DeepCopy();
            }
            if (TitleElement != null)
            {
                dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
            }
            if (Code != null)
            {
                dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Encounter != null)
            {
                dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (Source != null)
            {
                dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy();
            }
            if (OrderedBy != null)
            {
                dest.OrderedBy = (Hl7.Fhir.Model.CodeableConcept)OrderedBy.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (Entry != null)
            {
                dest.Entry = new List <Hl7.Fhir.Model.List.EntryComponent>(Entry.DeepCopy());
            }
            if (EmptyReason != null)
            {
                dest.EmptyReason = (Hl7.Fhir.Model.CodeableConcept)EmptyReason.DeepCopy();
            }
            return(dest);
        }
示例#5
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as CompositionAttesterComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (ModeElement != null)
                    {
                        dest.ModeElement = new List <Code <Hl7.Fhir.Model.Composition.CompositionAttestationMode> >(ModeElement.DeepCopy());
                    }
                    if (TimeElement != null)
                    {
                        dest.TimeElement = (Hl7.Fhir.Model.FhirDateTime)TimeElement.DeepCopy();
                    }
                    if (Party != null)
                    {
                        dest.Party = (Hl7.Fhir.Model.ResourceReference)Party.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }