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"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as EncounterHospitalizationComponent; if (dest != null) { base.CopyTo(dest); if (PreAdmissionIdentifier != null) { dest.PreAdmissionIdentifier = (Hl7.Fhir.Model.Identifier)PreAdmissionIdentifier.DeepCopy(); } if (Origin != null) { dest.Origin = (Hl7.Fhir.Model.ResourceReference)Origin.DeepCopy(); } if (AdmitSource != null) { dest.AdmitSource = (Hl7.Fhir.Model.CodeableConcept)AdmitSource.DeepCopy(); } if (Period != null) { dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy(); } if (Accomodation != null) { dest.Accomodation = new List <Hl7.Fhir.Model.Encounter.EncounterHospitalizationAccomodationComponent>(Accomodation.DeepCopy()); } if (Diet != null) { dest.Diet = (Hl7.Fhir.Model.CodeableConcept)Diet.DeepCopy(); } if (SpecialCourtesy != null) { dest.SpecialCourtesy = new List <Hl7.Fhir.Model.CodeableConcept>(SpecialCourtesy.DeepCopy()); } if (SpecialArrangement != null) { dest.SpecialArrangement = new List <Hl7.Fhir.Model.CodeableConcept>(SpecialArrangement.DeepCopy()); } if (Destination != null) { dest.Destination = (Hl7.Fhir.Model.ResourceReference)Destination.DeepCopy(); } if (DischargeDisposition != null) { dest.DischargeDisposition = (Hl7.Fhir.Model.CodeableConcept)DischargeDisposition.DeepCopy(); } if (DischargeDiagnosis != null) { dest.DischargeDiagnosis = (Hl7.Fhir.Model.ResourceReference)DischargeDiagnosis.DeepCopy(); } if (ReAdmissionElement != null) { dest.ReAdmissionElement = (Hl7.Fhir.Model.FhirBoolean)ReAdmissionElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }