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

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

            base.CopyTo(dest);
            if (Height != null)
            {
                dest.Height = (Hl7.Fhir.Model.Quantity)Height.DeepCopy();
            }
            if (Width != null)
            {
                dest.Width = (Hl7.Fhir.Model.Quantity)Width.DeepCopy();
            }
            if (Depth != null)
            {
                dest.Depth = (Hl7.Fhir.Model.Quantity)Depth.DeepCopy();
            }
            if (Weight != null)
            {
                dest.Weight = (Hl7.Fhir.Model.Quantity)Weight.DeepCopy();
            }
            if (NominalVolume != null)
            {
                dest.NominalVolume = (Hl7.Fhir.Model.Quantity)NominalVolume.DeepCopy();
            }
            if (ExternalDiameter != null)
            {
                dest.ExternalDiameter = (Hl7.Fhir.Model.Quantity)ExternalDiameter.DeepCopy();
            }
            if (ShapeElement != null)
            {
                dest.ShapeElement = (Hl7.Fhir.Model.FhirString)ShapeElement.DeepCopy();
            }
            if (ColorElement != null)
            {
                dest.ColorElement = new List <Hl7.Fhir.Model.FhirString>(ColorElement.DeepCopy());
            }
            if (ImprintElement != null)
            {
                dest.ImprintElement = new List <Hl7.Fhir.Model.FhirString>(ImprintElement.DeepCopy());
            }
            if (Image != null)
            {
                dest.Image = new List <Hl7.Fhir.Model.Attachment>(Image.DeepCopy());
            }
            if (Scoring != null)
            {
                dest.Scoring = (Hl7.Fhir.Model.CodeableConcept)Scoring.DeepCopy();
            }
            return(dest);
        }
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as DispenseComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Product != null)
                    {
                        dest.Product = (Hl7.Fhir.Model.Coding)Product.DeepCopy();
                    }
                    if (EyeElement != null)
                    {
                        dest.EyeElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionEyes>)EyeElement.DeepCopy();
                    }
                    if (SphereElement != null)
                    {
                        dest.SphereElement = (Hl7.Fhir.Model.FhirDecimal)SphereElement.DeepCopy();
                    }
                    if (CylinderElement != null)
                    {
                        dest.CylinderElement = (Hl7.Fhir.Model.FhirDecimal)CylinderElement.DeepCopy();
                    }
                    if (AxisElement != null)
                    {
                        dest.AxisElement = (Hl7.Fhir.Model.Integer)AxisElement.DeepCopy();
                    }
                    if (PrismElement != null)
                    {
                        dest.PrismElement = (Hl7.Fhir.Model.FhirDecimal)PrismElement.DeepCopy();
                    }
                    if (BaseElement != null)
                    {
                        dest.BaseElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionBase>)BaseElement.DeepCopy();
                    }
                    if (AddElement != null)
                    {
                        dest.AddElement = (Hl7.Fhir.Model.FhirDecimal)AddElement.DeepCopy();
                    }
                    if (PowerElement != null)
                    {
                        dest.PowerElement = (Hl7.Fhir.Model.FhirDecimal)PowerElement.DeepCopy();
                    }
                    if (BackCurveElement != null)
                    {
                        dest.BackCurveElement = (Hl7.Fhir.Model.FhirDecimal)BackCurveElement.DeepCopy();
                    }
                    if (DiameterElement != null)
                    {
                        dest.DiameterElement = (Hl7.Fhir.Model.FhirDecimal)DiameterElement.DeepCopy();
                    }
                    if (Duration != null)
                    {
                        dest.Duration = (Hl7.Fhir.Model.SimpleQuantity)Duration.DeepCopy();
                    }
                    if (ColorElement != null)
                    {
                        dest.ColorElement = (Hl7.Fhir.Model.FhirString)ColorElement.DeepCopy();
                    }
                    if (BrandElement != null)
                    {
                        dest.BrandElement = (Hl7.Fhir.Model.FhirString)BrandElement.DeepCopy();
                    }
                    if (NotesElement != null)
                    {
                        dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as DeviceMetric;

            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 (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Unit != null)
            {
                dest.Unit = (Hl7.Fhir.Model.CodeableConcept)Unit.DeepCopy();
            }
            if (Source != null)
            {
                dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy();
            }
            if (Parent != null)
            {
                dest.Parent = (Hl7.Fhir.Model.ResourceReference)Parent.DeepCopy();
            }
            if (OperationalStatusElement != null)
            {
                dest.OperationalStatusElement = (Code <Hl7.Fhir.Model.DeviceMetric.DeviceMetricOperationalStatus>)OperationalStatusElement.DeepCopy();
            }
            if (ColorElement != null)
            {
                dest.ColorElement = (Code <Hl7.Fhir.Model.DeviceMetric.DeviceMetricColor>)ColorElement.DeepCopy();
            }
            if (CategoryElement != null)
            {
                dest.CategoryElement = (Code <Hl7.Fhir.Model.DeviceMetric.DeviceMetricCategory>)CategoryElement.DeepCopy();
            }
            if (MeasurementPeriod != null)
            {
                dest.MeasurementPeriod = (Hl7.Fhir.Model.Timing)MeasurementPeriod.DeepCopy();
            }
            if (Calibration != null)
            {
                dest.Calibration = new List <Hl7.Fhir.Model.DeviceMetric.CalibrationComponent>(Calibration.DeepCopy());
            }
            return(dest);
        }