Exemple #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Contact;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (SystemElement != null)
                {
                    dest.SystemElement = (Code <Hl7.Fhir.Model.Contact.ContactSystem>)SystemElement.DeepCopy();
                }
                if (ValueElement != null)
                {
                    dest.ValueElement = (Hl7.Fhir.Model.FhirString)ValueElement.DeepCopy();
                }
                if (UseElement != null)
                {
                    dest.UseElement = (Code <Hl7.Fhir.Model.Contact.ContactUse>)UseElement.DeepCopy();
                }
                if (Period != null)
                {
                    dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Exemple #2
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (UseElement != null)
            {
                result.AddRange(UseElement.Validate());
            }
            if (LabelElement != null)
            {
                result.AddRange(LabelElement.Validate());
            }
            if (SystemElement != null)
            {
                result.AddRange(SystemElement.Validate());
            }
            if (KeyElement != null)
            {
                result.AddRange(KeyElement.Validate());
            }
            if (Period != null)
            {
                result.AddRange(Period.Validate());
            }
            if (Assigner != null)
            {
                result.AddRange(Assigner.Validate());
            }

            return(result);
        }
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (SystemElement != null)
            {
                result.AddRange(SystemElement.Validate());
            }
            if (ValueElement != null)
            {
                result.AddRange(ValueElement.Validate());
            }
            if (UseElement != null)
            {
                result.AddRange(UseElement.Validate());
            }
            if (Period != null)
            {
                result.AddRange(Period.Validate());
            }

            return(result);
        }
Exemple #4
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Address;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (UseElement != null)
                {
                    dest.UseElement = (Code <Hl7.Fhir.Model.Address.AddressUse>)UseElement.DeepCopy();
                }
                if (TypeElement != null)
                {
                    dest.TypeElement = (Code <Hl7.Fhir.Model.Address.AddressType>)TypeElement.DeepCopy();
                }
                if (TextElement != null)
                {
                    dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
                }
                if (LineElement != null)
                {
                    dest.LineElement = new List <Hl7.Fhir.Model.FhirString>(LineElement.DeepCopy());
                }
                if (CityElement != null)
                {
                    dest.CityElement = (Hl7.Fhir.Model.FhirString)CityElement.DeepCopy();
                }
                if (DistrictElement != null)
                {
                    dest.DistrictElement = (Hl7.Fhir.Model.FhirString)DistrictElement.DeepCopy();
                }
                if (StateElement != null)
                {
                    dest.StateElement = (Hl7.Fhir.Model.FhirString)StateElement.DeepCopy();
                }
                if (PostalCodeElement != null)
                {
                    dest.PostalCodeElement = (Hl7.Fhir.Model.FhirString)PostalCodeElement.DeepCopy();
                }
                if (CountryElement != null)
                {
                    dest.CountryElement = (Hl7.Fhir.Model.FhirString)CountryElement.DeepCopy();
                }
                if (Period != null)
                {
                    dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Exemple #5
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as HumanName;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (UseElement != null)
                {
                    dest.UseElement = (Code <Hl7.Fhir.Model.HumanName.NameUse>)UseElement.DeepCopy();
                }
                if (TextElement != null)
                {
                    dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
                }
                if (FamilyElement != null)
                {
                    dest.FamilyElement = new List <Hl7.Fhir.Model.FhirString>(FamilyElement.DeepCopy());
                }
                if (GivenElement != null)
                {
                    dest.GivenElement = new List <Hl7.Fhir.Model.FhirString>(GivenElement.DeepCopy());
                }
                if (PrefixElement != null)
                {
                    dest.PrefixElement = new List <Hl7.Fhir.Model.FhirString>(PrefixElement.DeepCopy());
                }
                if (SuffixElement != null)
                {
                    dest.SuffixElement = new List <Hl7.Fhir.Model.FhirString>(SuffixElement.DeepCopy());
                }
                if (Period != null)
                {
                    dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Exemple #6
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (UseElement != null)
            {
                result.AddRange(UseElement.Validate());
            }
            if (TextElement != null)
            {
                result.AddRange(TextElement.Validate());
            }
            if (LineElement != null)
            {
                LineElement.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (CityElement != null)
            {
                result.AddRange(CityElement.Validate());
            }
            if (StateElement != null)
            {
                result.AddRange(StateElement.Validate());
            }
            if (ZipElement != null)
            {
                result.AddRange(ZipElement.Validate());
            }
            if (CountryElement != null)
            {
                result.AddRange(CountryElement.Validate());
            }
            if (Period != null)
            {
                result.AddRange(Period.Validate());
            }

            return(result);
        }
Exemple #7
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ParameterDefinition;

            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.Code)NameElement.DeepCopy();
            }
            if (UseElement != null)
            {
                dest.UseElement = (Code <Hl7.Fhir.Model.OperationParameterUse>)UseElement.DeepCopy();
            }
            if (MinElement != null)
            {
                dest.MinElement = (Hl7.Fhir.Model.Integer)MinElement.DeepCopy();
            }
            if (MaxElement != null)
            {
                dest.MaxElement = (Hl7.Fhir.Model.FhirString)MaxElement.DeepCopy();
            }
            if (DocumentationElement != null)
            {
                dest.DocumentationElement = (Hl7.Fhir.Model.FhirString)DocumentationElement.DeepCopy();
            }
            if (TypeElement != null)
            {
                dest.TypeElement = (Code <Hl7.Fhir.Model.FHIRAllTypes>)TypeElement.DeepCopy();
            }
            if (ProfileElement != null)
            {
                dest.ProfileElement = (Hl7.Fhir.Model.Canonical)ProfileElement.DeepCopy();
            }
            return(dest);
        }
Exemple #8
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (UseElement != null)
            {
                result.AddRange(UseElement.Validate());
            }
            if (TextElement != null)
            {
                result.AddRange(TextElement.Validate());
            }
            if (FamilyElement != null)
            {
                FamilyElement.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (GivenElement != null)
            {
                GivenElement.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (PrefixElement != null)
            {
                PrefixElement.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (SuffixElement != null)
            {
                SuffixElement.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Period != null)
            {
                result.AddRange(Period.Validate());
            }

            return(result);
        }
Exemple #9
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Identifier;

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

            base.CopyTo(dest);
            if (UseElement != null)
            {
                dest.UseElement = (Code <Hl7.Fhir.Model.Identifier.IdentifierUse>)UseElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (SystemElement != null)
            {
                dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
            }
            if (ValueElement != null)
            {
                dest.ValueElement = (Hl7.Fhir.Model.FhirString)ValueElement.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Assigner != null)
            {
                dest.Assigner = (Hl7.Fhir.Model.ResourceReference)Assigner.DeepCopy();
            }
            return(dest);
        }