public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Condition; 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 (ClinicalStatus != null) { dest.ClinicalStatus = (Hl7.Fhir.Model.CodeableConcept)ClinicalStatus.DeepCopy(); } if (VerificationStatus != null) { dest.VerificationStatus = (Hl7.Fhir.Model.CodeableConcept)VerificationStatus.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Severity != null) { dest.Severity = (Hl7.Fhir.Model.CodeableConcept)Severity.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Onset != null) { dest.Onset = (Hl7.Fhir.Model.DataType)Onset.DeepCopy(); } if (Abatement != null) { dest.Abatement = (Hl7.Fhir.Model.DataType)Abatement.DeepCopy(); } if (RecordedDateElement != null) { dest.RecordedDateElement = (Hl7.Fhir.Model.FhirDateTime)RecordedDateElement.DeepCopy(); } if (Recorder != null) { dest.Recorder = (Hl7.Fhir.Model.ResourceReference)Recorder.DeepCopy(); } if (Asserter != null) { dest.Asserter = (Hl7.Fhir.Model.ResourceReference)Asserter.DeepCopy(); } if (Stage != null) { dest.Stage = new List <Hl7.Fhir.Model.Condition.StageComponent>(Stage.DeepCopy()); } if (Evidence != null) { dest.Evidence = new List <Hl7.Fhir.Model.Condition.EvidenceComponent>(Evidence.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Condition; 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 (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Asserter != null) { dest.Asserter = (Hl7.Fhir.Model.ResourceReference)Asserter.DeepCopy(); } if (DateRecordedElement != null) { dest.DateRecordedElement = (Hl7.Fhir.Model.Date)DateRecordedElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (ClinicalStatusElement != null) { dest.ClinicalStatusElement = (Hl7.Fhir.Model.Code)ClinicalStatusElement.DeepCopy(); } if (VerificationStatusElement != null) { dest.VerificationStatusElement = (Code <Hl7.Fhir.Model.Condition.ConditionVerificationStatus>)VerificationStatusElement.DeepCopy(); } if (Severity != null) { dest.Severity = (Hl7.Fhir.Model.CodeableConcept)Severity.DeepCopy(); } if (Onset != null) { dest.Onset = (Hl7.Fhir.Model.Element)Onset.DeepCopy(); } if (Abatement != null) { dest.Abatement = (Hl7.Fhir.Model.Element)Abatement.DeepCopy(); } if (Stage != null) { dest.Stage = (Hl7.Fhir.Model.Condition.StageComponent)Stage.DeepCopy(); } if (Evidence != null) { dest.Evidence = new List <Hl7.Fhir.Model.Condition.EvidenceComponent>(Evidence.DeepCopy()); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.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 DetectedIssue; 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 (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ObservationStatus>)StatusElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (SeverityElement != null) { dest.SeverityElement = (Code <Hl7.Fhir.Model.DetectedIssue.DetectedIssueSeverity>)SeverityElement.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Identified != null) { dest.Identified = (Hl7.Fhir.Model.DataType)Identified.DeepCopy(); } if (Author != null) { dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy(); } if (Implicated != null) { dest.Implicated = new List <Hl7.Fhir.Model.ResourceReference>(Implicated.DeepCopy()); } if (Evidence != null) { dest.Evidence = new List <Hl7.Fhir.Model.DetectedIssue.EvidenceComponent>(Evidence.DeepCopy()); } if (DetailElement != null) { dest.DetailElement = (Hl7.Fhir.Model.FhirString)DetailElement.DeepCopy(); } if (ReferenceElement != null) { dest.ReferenceElement = (Hl7.Fhir.Model.FhirUri)ReferenceElement.DeepCopy(); } if (Mitigation != null) { dest.Mitigation = new List <Hl7.Fhir.Model.DetectedIssue.MitigationComponent>(Mitigation.DeepCopy()); } return(dest); }