public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as AllergyIntolerance; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Criticality_Element != null) { dest.Criticality_Element = (Code <Hl7.Fhir.Model.AllergyIntolerance.Criticality>)Criticality_Element.DeepCopy(); } if (SensitivityType_Element != null) { dest.SensitivityType_Element = (Code <Hl7.Fhir.Model.AllergyIntolerance.SensitivityType>)SensitivityType_Element.DeepCopy(); } if (RecordedDateElement != null) { dest.RecordedDateElement = (Hl7.Fhir.Model.FhirDateTime)RecordedDateElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.AllergyIntolerance.SensitivityStatus>)StatusElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Recorder != null) { dest.Recorder = (Hl7.Fhir.Model.ResourceReference)Recorder.DeepCopy(); } if (Substance != null) { dest.Substance = (Hl7.Fhir.Model.ResourceReference)Substance.DeepCopy(); } if (Reaction != null) { dest.Reaction = new List <Hl7.Fhir.Model.ResourceReference>(Reaction.DeepCopy()); } if (SensitivityTest != null) { dest.SensitivityTest = new List <Hl7.Fhir.Model.ResourceReference>(SensitivityTest.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 AdverseEvent; 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 = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy(); } if (CategoryElement != null) { dest.CategoryElement = (Code <Hl7.Fhir.Model.AdverseEvent.AdverseEventCategory>)CategoryElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (Reaction != null) { dest.Reaction = new List <Hl7.Fhir.Model.ResourceReference>(Reaction.DeepCopy()); } if (Location != null) { dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy(); } if (Seriousness != null) { dest.Seriousness = (Hl7.Fhir.Model.CodeableConcept)Seriousness.DeepCopy(); } if (Outcome != null) { dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy(); } if (Recorder != null) { dest.Recorder = (Hl7.Fhir.Model.ResourceReference)Recorder.DeepCopy(); } if (EventParticipant != null) { dest.EventParticipant = (Hl7.Fhir.Model.ResourceReference)EventParticipant.DeepCopy(); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (SuspectEntity != null) { dest.SuspectEntity = new List <Hl7.Fhir.Model.AdverseEvent.SuspectEntityComponent>(SuspectEntity.DeepCopy()); } if (SubjectMedicalHistory != null) { dest.SubjectMedicalHistory = new List <Hl7.Fhir.Model.ResourceReference>(SubjectMedicalHistory.DeepCopy()); } if (ReferenceDocument != null) { dest.ReferenceDocument = new List <Hl7.Fhir.Model.ResourceReference>(ReferenceDocument.DeepCopy()); } if (Study != null) { dest.Study = new List <Hl7.Fhir.Model.ResourceReference>(Study.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Immunization; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationAdministrationStatus>)StatusElement.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (VaccineCode != null) { dest.VaccineCode = (Hl7.Fhir.Model.CodeableConcept)VaccineCode.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (WasNotGivenElement != null) { dest.WasNotGivenElement = (Hl7.Fhir.Model.FhirBoolean)WasNotGivenElement.DeepCopy(); } if (ReportedElement != null) { dest.ReportedElement = (Hl7.Fhir.Model.FhirBoolean)ReportedElement.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Manufacturer != null) { dest.Manufacturer = (Hl7.Fhir.Model.ResourceReference)Manufacturer.DeepCopy(); } if (Location != null) { dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy(); } if (LotNumberElement != null) { dest.LotNumberElement = (Hl7.Fhir.Model.FhirString)LotNumberElement.DeepCopy(); } if (ExpirationDateElement != null) { dest.ExpirationDateElement = (Hl7.Fhir.Model.Date)ExpirationDateElement.DeepCopy(); } if (Site != null) { dest.Site = (Hl7.Fhir.Model.CodeableConcept)Site.DeepCopy(); } if (Route != null) { dest.Route = (Hl7.Fhir.Model.CodeableConcept)Route.DeepCopy(); } if (DoseQuantity != null) { dest.DoseQuantity = (Hl7.Fhir.Model.SimpleQuantity)DoseQuantity.DeepCopy(); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (Explanation != null) { dest.Explanation = (Hl7.Fhir.Model.Immunization.ExplanationComponent)Explanation.DeepCopy(); } if (Reaction != null) { dest.Reaction = new List <Hl7.Fhir.Model.Immunization.ReactionComponent>(Reaction.DeepCopy()); } if (VaccinationProtocol != null) { dest.VaccinationProtocol = new List <Hl7.Fhir.Model.Immunization.VaccinationProtocolComponent>(VaccinationProtocol.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 Immunization; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (VaccineType != null) { dest.VaccineType = (Hl7.Fhir.Model.CodeableConcept)VaccineType.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (RefusedIndicatorElement != null) { dest.RefusedIndicatorElement = (Hl7.Fhir.Model.FhirBoolean)RefusedIndicatorElement.DeepCopy(); } if (ReportedElement != null) { dest.ReportedElement = (Hl7.Fhir.Model.FhirBoolean)ReportedElement.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (Manufacturer != null) { dest.Manufacturer = (Hl7.Fhir.Model.ResourceReference)Manufacturer.DeepCopy(); } if (Location != null) { dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy(); } if (LotNumberElement != null) { dest.LotNumberElement = (Hl7.Fhir.Model.FhirString)LotNumberElement.DeepCopy(); } if (ExpirationDateElement != null) { dest.ExpirationDateElement = (Hl7.Fhir.Model.Date)ExpirationDateElement.DeepCopy(); } if (Site != null) { dest.Site = (Hl7.Fhir.Model.CodeableConcept)Site.DeepCopy(); } if (Route != null) { dest.Route = (Hl7.Fhir.Model.CodeableConcept)Route.DeepCopy(); } if (DoseQuantity != null) { dest.DoseQuantity = (Hl7.Fhir.Model.Quantity)DoseQuantity.DeepCopy(); } if (Explanation != null) { dest.Explanation = (Hl7.Fhir.Model.Immunization.ImmunizationExplanationComponent)Explanation.DeepCopy(); } if (Reaction != null) { dest.Reaction = new List <Hl7.Fhir.Model.Immunization.ImmunizationReactionComponent>(Reaction.DeepCopy()); } if (VaccinationProtocol != null) { dest.VaccinationProtocol = new List <Hl7.Fhir.Model.Immunization.ImmunizationVaccinationProtocolComponent>(VaccinationProtocol.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }