public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicationOrderDosageInstructionComponent; if (dest != null) { base.CopyTo(dest); if (TextElement != null) { dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy(); } if (AdditionalInstructions != null) { dest.AdditionalInstructions = (Hl7.Fhir.Model.CodeableConcept)AdditionalInstructions.DeepCopy(); } if (Timing != null) { dest.Timing = (Hl7.Fhir.Model.Timing)Timing.DeepCopy(); } if (AsNeeded != null) { dest.AsNeeded = (Hl7.Fhir.Model.Element)AsNeeded.DeepCopy(); } if (Site != null) { dest.Site = (Hl7.Fhir.Model.Element)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.Element)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 DoseAndRateComponent; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Dose != null) { dest.Dose = (Hl7.Fhir.Model.DataType)Dose.DeepCopy(); } if (Rate != null) { dest.Rate = (Hl7.Fhir.Model.DataType)Rate.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Dosage; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (SequenceElement != null) { dest.SequenceElement = (Hl7.Fhir.Model.Integer)SequenceElement.DeepCopy(); } if (TextElement != null) { dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy(); } if (AdditionalInstruction != null) { dest.AdditionalInstruction = new List <Hl7.Fhir.Model.CodeableConcept>(AdditionalInstruction.DeepCopy()); } if (PatientInstructionElement != null) { dest.PatientInstructionElement = (Hl7.Fhir.Model.FhirString)PatientInstructionElement.DeepCopy(); } if (Timing != null) { dest.Timing = (Hl7.Fhir.Model.Timing)Timing.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 (MaxDosePerPeriod != null) { dest.MaxDosePerPeriod = (Hl7.Fhir.Model.Ratio)MaxDosePerPeriod.DeepCopy(); } if (MaxDosePerAdministration != null) { dest.MaxDosePerAdministration = (Hl7.Fhir.Model.Quantity)MaxDosePerAdministration.DeepCopy(); } if (MaxDosePerLifetime != null) { dest.MaxDosePerLifetime = (Hl7.Fhir.Model.Quantity)MaxDosePerLifetime.DeepCopy(); } if (Rate != null) { dest.Rate = (Hl7.Fhir.Model.Element)Rate.DeepCopy(); } return(dest); }