public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicationStatement; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (InformationSource != null) { dest.InformationSource = (Hl7.Fhir.Model.ResourceReference)InformationSource.DeepCopy(); } if (DateAssertedElement != null) { dest.DateAssertedElement = (Hl7.Fhir.Model.FhirDateTime)DateAssertedElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationStatement.MedicationStatementStatus>)StatusElement.DeepCopy(); } if (WasNotTakenElement != null) { dest.WasNotTakenElement = (Hl7.Fhir.Model.FhirBoolean)WasNotTakenElement.DeepCopy(); } if (ReasonNotTaken != null) { dest.ReasonNotTaken = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonNotTaken.DeepCopy()); } if (ReasonForUse != null) { dest.ReasonForUse = (Hl7.Fhir.Model.Element)ReasonForUse.DeepCopy(); } if (Effective != null) { dest.Effective = (Hl7.Fhir.Model.Element)Effective.DeepCopy(); } if (NoteElement != null) { dest.NoteElement = (Hl7.Fhir.Model.FhirString)NoteElement.DeepCopy(); } if (SupportingInformation != null) { dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy()); } if (Medication != null) { dest.Medication = (Hl7.Fhir.Model.Element)Medication.DeepCopy(); } if (Dosage != null) { dest.Dosage = new List <Hl7.Fhir.Model.MedicationStatement.DosageComponent>(Dosage.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 ReferralRequest; if (dest != null) { base.CopyTo(dest); if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ReferralRequest.ReferralStatus>)StatusElement.DeepCopy(); } 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 (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Specialty != null) { dest.Specialty = (Hl7.Fhir.Model.CodeableConcept)Specialty.DeepCopy(); } if (Priority != null) { dest.Priority = (Hl7.Fhir.Model.CodeableConcept)Priority.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (DateSentElement != null) { dest.DateSentElement = (Hl7.Fhir.Model.FhirDateTime)DateSentElement.DeepCopy(); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.CodeableConcept)Reason.DeepCopy(); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (ServiceRequested != null) { dest.ServiceRequested = new List <Hl7.Fhir.Model.CodeableConcept>(ServiceRequested.DeepCopy()); } if (SupportingInformation != null) { dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy()); } if (FulfillmentTime != null) { dest.FulfillmentTime = (Hl7.Fhir.Model.Period)FulfillmentTime.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 DiagnosticOrder; if (dest != null) { base.CopyTo(dest); if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Orderer != null) { dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy()); } if (SupportingInformation != null) { dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy()); } if (Specimen != null) { dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderStatus>)StatusElement.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderPriority>)PriorityElement.DeepCopy(); } if (Event != null) { dest.Event = new List <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderEventComponent>(Event.DeepCopy()); } if (Item != null) { dest.Item = new List <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderItemComponent>(Item.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }