Exemple #1
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (FrequencyElement != null)
                {
                    result.AddRange(FrequencyElement.Validate());
                }
                if (WhenElement != null)
                {
                    result.AddRange(WhenElement.Validate());
                }
                if (DurationElement != null)
                {
                    result.AddRange(DurationElement.Validate());
                }
                if (UnitsElement != null)
                {
                    result.AddRange(UnitsElement.Validate());
                }
                if (CountElement != null)
                {
                    result.AddRange(CountElement.Validate());
                }
                if (EndElement != null)
                {
                    result.AddRange(EndElement.Validate());
                }

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

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

            base.CopyTo(dest);
            if (TypeElement != null)
            {
                dest.TypeElement = (Code <Hl7.Fhir.Model.Media.DigitalMediaType>)TypeElement.DeepCopy();
            }
            if (Subtype != null)
            {
                dest.Subtype = (Hl7.Fhir.Model.CodeableConcept)Subtype.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Operator != null)
            {
                dest.Operator = (Hl7.Fhir.Model.ResourceReference)Operator.DeepCopy();
            }
            if (View != null)
            {
                dest.View = (Hl7.Fhir.Model.CodeableConcept)View.DeepCopy();
            }
            if (DeviceNameElement != null)
            {
                dest.DeviceNameElement = (Hl7.Fhir.Model.FhirString)DeviceNameElement.DeepCopy();
            }
            if (HeightElement != null)
            {
                dest.HeightElement = (Hl7.Fhir.Model.PositiveInt)HeightElement.DeepCopy();
            }
            if (WidthElement != null)
            {
                dest.WidthElement = (Hl7.Fhir.Model.PositiveInt)WidthElement.DeepCopy();
            }
            if (FramesElement != null)
            {
                dest.FramesElement = (Hl7.Fhir.Model.PositiveInt)FramesElement.DeepCopy();
            }
            if (DurationElement != null)
            {
                dest.DurationElement = (Hl7.Fhir.Model.UnsignedInt)DurationElement.DeepCopy();
            }
            if (Content != null)
            {
                dest.Content = (Hl7.Fhir.Model.Attachment)Content.DeepCopy();
            }
            return(dest);
        }
Exemple #3
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as TimingRepeatComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Bounds != null)
                    {
                        dest.Bounds = (Hl7.Fhir.Model.Element)Bounds.DeepCopy();
                    }
                    if (CountElement != null)
                    {
                        dest.CountElement = (Hl7.Fhir.Model.Integer)CountElement.DeepCopy();
                    }
                    if (DurationElement != null)
                    {
                        dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
                    }
                    if (DurationMaxElement != null)
                    {
                        dest.DurationMaxElement = (Hl7.Fhir.Model.FhirDecimal)DurationMaxElement.DeepCopy();
                    }
                    if (DurationUnitsElement != null)
                    {
                        dest.DurationUnitsElement = (Code <Hl7.Fhir.Model.Timing.UnitsOfTime>)DurationUnitsElement.DeepCopy();
                    }
                    if (FrequencyElement != null)
                    {
                        dest.FrequencyElement = (Hl7.Fhir.Model.Integer)FrequencyElement.DeepCopy();
                    }
                    if (FrequencyMaxElement != null)
                    {
                        dest.FrequencyMaxElement = (Hl7.Fhir.Model.Integer)FrequencyMaxElement.DeepCopy();
                    }
                    if (PeriodElement != null)
                    {
                        dest.PeriodElement = (Hl7.Fhir.Model.FhirDecimal)PeriodElement.DeepCopy();
                    }
                    if (PeriodMaxElement != null)
                    {
                        dest.PeriodMaxElement = (Hl7.Fhir.Model.FhirDecimal)PeriodMaxElement.DeepCopy();
                    }
                    if (PeriodUnitsElement != null)
                    {
                        dest.PeriodUnitsElement = (Code <Hl7.Fhir.Model.Timing.UnitsOfTime>)PeriodUnitsElement.DeepCopy();
                    }
                    if (WhenElement != null)
                    {
                        dest.WhenElement = (Code <Hl7.Fhir.Model.Timing.EventTiming>)WhenElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Exemple #4
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ScheduleRepeatComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (FrequencyElement != null)
                    {
                        dest.FrequencyElement = (Hl7.Fhir.Model.Integer)FrequencyElement.DeepCopy();
                    }
                    if (WhenElement != null)
                    {
                        dest.WhenElement = (Code <Hl7.Fhir.Model.Schedule.EventTiming>)WhenElement.DeepCopy();
                    }
                    if (DurationElement != null)
                    {
                        dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
                    }
                    if (UnitsElement != null)
                    {
                        dest.UnitsElement = (Code <Hl7.Fhir.Model.Schedule.UnitsOfTime>)UnitsElement.DeepCopy();
                    }
                    if (CountElement != null)
                    {
                        dest.CountElement = (Hl7.Fhir.Model.Integer)CountElement.DeepCopy();
                    }
                    if (EndElement != null)
                    {
                        dest.EndElement = (Hl7.Fhir.Model.FhirDateTime)EndElement.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 Media;

            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 (BasedOn != null)
            {
                dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy());
            }
            if (PartOf != null)
            {
                dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)StatusElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Modality != null)
            {
                dest.Modality = (Hl7.Fhir.Model.CodeableConcept)Modality.DeepCopy();
            }
            if (View != null)
            {
                dest.View = (Hl7.Fhir.Model.CodeableConcept)View.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Encounter != null)
            {
                dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
            }
            if (Created != null)
            {
                dest.Created = (Hl7.Fhir.Model.DataType)Created.DeepCopy();
            }
            if (IssuedElement != null)
            {
                dest.IssuedElement = (Hl7.Fhir.Model.Instant)IssuedElement.DeepCopy();
            }
            if (Operator != null)
            {
                dest.Operator = (Hl7.Fhir.Model.ResourceReference)Operator.DeepCopy();
            }
            if (ReasonCode != null)
            {
                dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy());
            }
            if (BodySite != null)
            {
                dest.BodySite = (Hl7.Fhir.Model.CodeableConcept)BodySite.DeepCopy();
            }
            if (DeviceNameElement != null)
            {
                dest.DeviceNameElement = (Hl7.Fhir.Model.FhirString)DeviceNameElement.DeepCopy();
            }
            if (Device != null)
            {
                dest.Device = (Hl7.Fhir.Model.ResourceReference)Device.DeepCopy();
            }
            if (HeightElement != null)
            {
                dest.HeightElement = (Hl7.Fhir.Model.PositiveInt)HeightElement.DeepCopy();
            }
            if (WidthElement != null)
            {
                dest.WidthElement = (Hl7.Fhir.Model.PositiveInt)WidthElement.DeepCopy();
            }
            if (FramesElement != null)
            {
                dest.FramesElement = (Hl7.Fhir.Model.PositiveInt)FramesElement.DeepCopy();
            }
            if (DurationElement != null)
            {
                dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
            }
            if (Content != null)
            {
                dest.Content = (Hl7.Fhir.Model.Attachment)Content.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            return(dest);
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Attachment;

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

            base.CopyTo(dest);
            if (ContentTypeElement != null)
            {
                dest.ContentTypeElement = (Hl7.Fhir.Model.Code)ContentTypeElement.DeepCopy();
            }
            if (LanguageElement != null)
            {
                dest.LanguageElement = (Hl7.Fhir.Model.Code)LanguageElement.DeepCopy();
            }
            if (DataElement != null)
            {
                dest.DataElement = (Hl7.Fhir.Model.Base64Binary)DataElement.DeepCopy();
            }
            if (UrlElement != null)
            {
                dest.UrlElement = (Hl7.Fhir.Model.FhirUrl)UrlElement.DeepCopy();
            }
            if (SizeElement != null)
            {
                dest.SizeElement = (Hl7.Fhir.Model.Integer64)SizeElement.DeepCopy();
            }
            if (HashElement != null)
            {
                dest.HashElement = (Hl7.Fhir.Model.Base64Binary)HashElement.DeepCopy();
            }
            if (TitleElement != null)
            {
                dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
            }
            if (CreationElement != null)
            {
                dest.CreationElement = (Hl7.Fhir.Model.FhirDateTime)CreationElement.DeepCopy();
            }
            if (HeightElement != null)
            {
                dest.HeightElement = (Hl7.Fhir.Model.PositiveInt)HeightElement.DeepCopy();
            }
            if (WidthElement != null)
            {
                dest.WidthElement = (Hl7.Fhir.Model.PositiveInt)WidthElement.DeepCopy();
            }
            if (FramesElement != null)
            {
                dest.FramesElement = (Hl7.Fhir.Model.PositiveInt)FramesElement.DeepCopy();
            }
            if (DurationElement != null)
            {
                dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
            }
            if (PagesElement != null)
            {
                dest.PagesElement = (Hl7.Fhir.Model.PositiveInt)PagesElement.DeepCopy();
            }
            return(dest);
        }