예제 #1
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as CharacteristicComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Code != null)
                    {
                        dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                    }
                    if (Value != null)
                    {
                        dest.Value = (Hl7.Fhir.Model.Element)Value.DeepCopy();
                    }
                    if (ExcludeElement != null)
                    {
                        dest.ExcludeElement = (Hl7.Fhir.Model.FhirBoolean)ExcludeElement.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");
                }
            }
예제 #2
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (Type != null)
                {
                    result.AddRange(Type.Validate());
                }
                if (Value != null)
                {
                    result.AddRange(Value.Validate());
                }
                if (ExcludeElement != null)
                {
                    result.AddRange(ExcludeElement.Validate());
                }

                return(result);
            }
예제 #3
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ProcessRequest;

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

            base.CopyTo(dest);
            if (ActionElement != null)
            {
                dest.ActionElement = (Code <Hl7.Fhir.Model.ProcessRequest.ActionList>)ActionElement.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (Ruleset != null)
            {
                dest.Ruleset = (Hl7.Fhir.Model.Coding)Ruleset.DeepCopy();
            }
            if (OriginalRuleset != null)
            {
                dest.OriginalRuleset = (Hl7.Fhir.Model.Coding)OriginalRuleset.DeepCopy();
            }
            if (CreatedElement != null)
            {
                dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy();
            }
            if (Target != null)
            {
                dest.Target = (Hl7.Fhir.Model.ResourceReference)Target.DeepCopy();
            }
            if (Provider != null)
            {
                dest.Provider = (Hl7.Fhir.Model.ResourceReference)Provider.DeepCopy();
            }
            if (Organization != null)
            {
                dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy();
            }
            if (Request != null)
            {
                dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy();
            }
            if (Response != null)
            {
                dest.Response = (Hl7.Fhir.Model.ResourceReference)Response.DeepCopy();
            }
            if (NullifyElement != null)
            {
                dest.NullifyElement = (Hl7.Fhir.Model.FhirBoolean)NullifyElement.DeepCopy();
            }
            if (ReferenceElement != null)
            {
                dest.ReferenceElement = (Hl7.Fhir.Model.FhirString)ReferenceElement.DeepCopy();
            }
            if (Item != null)
            {
                dest.Item = new List <Hl7.Fhir.Model.ProcessRequest.ItemsComponent>(Item.DeepCopy());
            }
            if (IncludeElement != null)
            {
                dest.IncludeElement = new List <Hl7.Fhir.Model.FhirString>(IncludeElement.DeepCopy());
            }
            if (ExcludeElement != null)
            {
                dest.ExcludeElement = new List <Hl7.Fhir.Model.FhirString>(ExcludeElement.DeepCopy());
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            return(dest);
        }