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

                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.InvoicePriceComponentType>)TypeElement.DeepCopy();
                }
                if (Code != null)
                {
                    dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                }
                if (FactorElement != null)
                {
                    dest.FactorElement = (Hl7.Fhir.Model.FhirDecimal)FactorElement.DeepCopy();
                }
                if (Amount != null)
                {
                    dest.Amount = (Hl7.Fhir.Model.Money)Amount.DeepCopy();
                }
                return(dest);
            }
Ejemplo n.º 2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as SampledData;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Origin != null)
                {
                    dest.Origin = (Hl7.Fhir.Model.SimpleQuantity)Origin.DeepCopy();
                }
                if (PeriodElement != null)
                {
                    dest.PeriodElement = (Hl7.Fhir.Model.FhirDecimal)PeriodElement.DeepCopy();
                }
                if (FactorElement != null)
                {
                    dest.FactorElement = (Hl7.Fhir.Model.FhirDecimal)FactorElement.DeepCopy();
                }
                if (LowerLimitElement != null)
                {
                    dest.LowerLimitElement = (Hl7.Fhir.Model.FhirDecimal)LowerLimitElement.DeepCopy();
                }
                if (UpperLimitElement != null)
                {
                    dest.UpperLimitElement = (Hl7.Fhir.Model.FhirDecimal)UpperLimitElement.DeepCopy();
                }
                if (DimensionsElement != null)
                {
                    dest.DimensionsElement = (Hl7.Fhir.Model.PositiveInt)DimensionsElement.DeepCopy();
                }
                if (DataElement != null)
                {
                    dest.DataElement = (Hl7.Fhir.Model.FhirString)DataElement.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 3
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Origin != null)
            {
                result.AddRange(Origin.Validate());
            }
            if (PeriodElement != null)
            {
                result.AddRange(PeriodElement.Validate());
            }
            if (FactorElement != null)
            {
                result.AddRange(FactorElement.Validate());
            }
            if (LowerLimitElement != null)
            {
                result.AddRange(LowerLimitElement.Validate());
            }
            if (UpperLimitElement != null)
            {
                result.AddRange(UpperLimitElement.Validate());
            }
            if (DimensionsElement != null)
            {
                result.AddRange(DimensionsElement.Validate());
            }
            if (DataElement != null)
            {
                result.AddRange(DataElement.Validate());
            }

            return(result);
        }