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

            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 (ServiceCategory != null)
            {
                dest.ServiceCategory = (Hl7.Fhir.Model.CodeableConcept)ServiceCategory.DeepCopy();
            }
            if (ServiceType != null)
            {
                dest.ServiceType = new List <Hl7.Fhir.Model.CodeableConcept>(ServiceType.DeepCopy());
            }
            if (Specialty != null)
            {
                dest.Specialty = new List <Hl7.Fhir.Model.CodeableConcept>(Specialty.DeepCopy());
            }
            if (AppointmentType != null)
            {
                dest.AppointmentType = (Hl7.Fhir.Model.CodeableConcept)AppointmentType.DeepCopy();
            }
            if (Schedule != null)
            {
                dest.Schedule = (Hl7.Fhir.Model.ResourceReference)Schedule.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.Slot.SlotStatus>)StatusElement.DeepCopy();
            }
            if (StartElement != null)
            {
                dest.StartElement = (Hl7.Fhir.Model.Instant)StartElement.DeepCopy();
            }
            if (EndElement != null)
            {
                dest.EndElement = (Hl7.Fhir.Model.Instant)EndElement.DeepCopy();
            }
            if (OverbookedElement != null)
            {
                dest.OverbookedElement = (Hl7.Fhir.Model.FhirBoolean)OverbookedElement.DeepCopy();
            }
            if (CommentElement != null)
            {
                dest.CommentElement = (Hl7.Fhir.Model.FhirString)CommentElement.DeepCopy();
            }
            return(dest);
        }
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as MedicationDispenseDosageInstructionComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (AdditionalInstructions != null)
                    {
                        dest.AdditionalInstructions = (Hl7.Fhir.Model.CodeableConcept)AdditionalInstructions.DeepCopy();
                    }
                    if (Schedule != null)
                    {
                        dest.Schedule = (Hl7.Fhir.Model.Element)Schedule.DeepCopy();
                    }
                    if (AsNeeded != null)
                    {
                        dest.AsNeeded = (Hl7.Fhir.Model.Element)AsNeeded.DeepCopy();
                    }
                    if (Site != null)
                    {
                        dest.Site = (Hl7.Fhir.Model.CodeableConcept)Site.DeepCopy();
                    }
                    if (Route != null)
                    {
                        dest.Route = (Hl7.Fhir.Model.CodeableConcept)Route.DeepCopy();
                    }
                    if (Method != null)
                    {
                        dest.Method = (Hl7.Fhir.Model.CodeableConcept)Method.DeepCopy();
                    }
                    if (Dose != null)
                    {
                        dest.Dose = (Hl7.Fhir.Model.Element)Dose.DeepCopy();
                    }
                    if (Rate != null)
                    {
                        dest.Rate = (Hl7.Fhir.Model.Ratio)Rate.DeepCopy();
                    }
                    if (MaxDosePerPeriod != null)
                    {
                        dest.MaxDosePerPeriod = (Hl7.Fhir.Model.Ratio)MaxDosePerPeriod.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 MedicationStatementDosageComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (TextElement != null)
                    {
                        dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
                    }
                    if (Schedule != null)
                    {
                        dest.Schedule = (Hl7.Fhir.Model.Timing)Schedule.DeepCopy();
                    }
                    if (AsNeeded != null)
                    {
                        dest.AsNeeded = (Hl7.Fhir.Model.Element)AsNeeded.DeepCopy();
                    }
                    if (Site != null)
                    {
                        dest.Site = (Hl7.Fhir.Model.CodeableConcept)Site.DeepCopy();
                    }
                    if (Route != null)
                    {
                        dest.Route = (Hl7.Fhir.Model.CodeableConcept)Route.DeepCopy();
                    }
                    if (Method != null)
                    {
                        dest.Method = (Hl7.Fhir.Model.CodeableConcept)Method.DeepCopy();
                    }
                    if (Quantity != null)
                    {
                        dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy();
                    }
                    if (Rate != null)
                    {
                        dest.Rate = (Hl7.Fhir.Model.Ratio)Rate.DeepCopy();
                    }
                    if (MaxDosePerPeriod != null)
                    {
                        dest.MaxDosePerPeriod = (Hl7.Fhir.Model.Ratio)MaxDosePerPeriod.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Exemplo n.º 4
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Slot;

            if (dest != null)
            {
                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 (Schedule != null)
                {
                    dest.Schedule = (Hl7.Fhir.Model.ResourceReference)Schedule.DeepCopy();
                }
                if (FreeBusyTypeElement != null)
                {
                    dest.FreeBusyTypeElement = (Code <Hl7.Fhir.Model.Slot.SlotStatus>)FreeBusyTypeElement.DeepCopy();
                }
                if (StartElement != null)
                {
                    dest.StartElement = (Hl7.Fhir.Model.Instant)StartElement.DeepCopy();
                }
                if (EndElement != null)
                {
                    dest.EndElement = (Hl7.Fhir.Model.Instant)EndElement.DeepCopy();
                }
                if (OverbookedElement != null)
                {
                    dest.OverbookedElement = (Hl7.Fhir.Model.FhirBoolean)OverbookedElement.DeepCopy();
                }
                if (CommentElement != null)
                {
                    dest.CommentElement = (Hl7.Fhir.Model.FhirString)CommentElement.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }