public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as PaymentNotice; 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.FinancialResourceStatusCodes>)StatusElement.DeepCopy(); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Response != null) { dest.Response = (Hl7.Fhir.Model.ResourceReference)Response.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Provider != null) { dest.Provider = (Hl7.Fhir.Model.ResourceReference)Provider.DeepCopy(); } if (Payment != null) { dest.Payment = (Hl7.Fhir.Model.ResourceReference)Payment.DeepCopy(); } if (PaymentDateElement != null) { dest.PaymentDateElement = (Hl7.Fhir.Model.Date)PaymentDateElement.DeepCopy(); } if (Payee != null) { dest.Payee = (Hl7.Fhir.Model.ResourceReference)Payee.DeepCopy(); } if (Recipient != null) { dest.Recipient = (Hl7.Fhir.Model.ResourceReference)Recipient.DeepCopy(); } if (Amount != null) { dest.Amount = (Hl7.Fhir.Model.Money)Amount.DeepCopy(); } if (PaymentStatus != null) { dest.PaymentStatus = (Hl7.Fhir.Model.CodeableConcept)PaymentStatus.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DocumentManifest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (MasterIdentifier != null) { dest.MasterIdentifier = (Hl7.Fhir.Model.Identifier)MasterIdentifier.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DocumentReferenceStatus>)StatusElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Author != null) { dest.Author = new List <Hl7.Fhir.Model.ResourceReference>(Author.DeepCopy()); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (SourceElement != null) { dest.SourceElement = (Hl7.Fhir.Model.FhirUri)SourceElement.DeepCopy(); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (Content != null) { dest.Content = new List <Hl7.Fhir.Model.ResourceReference>(Content.DeepCopy()); } if (Related != null) { dest.Related = new List <Hl7.Fhir.Model.DocumentManifest.RelatedComponent>(Related.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Basic; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Author != null) { dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.Date)CreatedElement.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 EligibilityResponse; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (OutcomeElement != null) { dest.OutcomeElement = (Code <Hl7.Fhir.Model.RemittanceOutcome>)OutcomeElement.DeepCopy(); } if (DispositionElement != null) { dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy(); } if (Ruleset != null) { dest.Ruleset = (Hl7.Fhir.Model.Coding)Ruleset.DeepCopy(); } if (OriginalRuleset != null) { dest.OriginalRuleset = (Hl7.Fhir.Model.Coding)OriginalRuleset.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (RequestProvider != null) { dest.RequestProvider = (Hl7.Fhir.Model.ResourceReference)RequestProvider.DeepCopy(); } if (RequestOrganization != null) { dest.RequestOrganization = (Hl7.Fhir.Model.ResourceReference)RequestOrganization.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 PaymentNotice; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Ruleset != null) { dest.Ruleset = (Hl7.Fhir.Model.Coding)Ruleset.DeepCopy(); } if (OriginalRuleset != null) { dest.OriginalRuleset = (Hl7.Fhir.Model.Coding)OriginalRuleset.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Target != null) { dest.Target = (Hl7.Fhir.Model.ResourceReference)Target.DeepCopy(); } if (Provider != null) { dest.Provider = (Hl7.Fhir.Model.ResourceReference)Provider.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Response != null) { dest.Response = (Hl7.Fhir.Model.ResourceReference)Response.DeepCopy(); } if (PaymentStatus != null) { dest.PaymentStatus = (Hl7.Fhir.Model.Coding)PaymentStatus.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 EnrollmentRequest; 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 (Ruleset != null) { dest.Ruleset = (Hl7.Fhir.Model.Coding)Ruleset.DeepCopy(); } if (OriginalRuleset != null) { dest.OriginalRuleset = (Hl7.Fhir.Model.Coding)OriginalRuleset.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Target != null) { dest.Target = (Hl7.Fhir.Model.ResourceReference)Target.DeepCopy(); } if (Provider != null) { dest.Provider = (Hl7.Fhir.Model.ResourceReference)Provider.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Coverage != null) { dest.Coverage = (Hl7.Fhir.Model.ResourceReference)Coverage.DeepCopy(); } if (Relationship != null) { dest.Relationship = (Hl7.Fhir.Model.Coding)Relationship.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as EnrollmentResponse; 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.FinancialResourceStatusCodes>)StatusElement.DeepCopy(); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Outcome != null) { dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy(); } if (DispositionElement != null) { dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (RequestProvider != null) { dest.RequestProvider = (Hl7.Fhir.Model.ResourceReference)RequestProvider.DeepCopy(); } if (RequestOrganization != null) { dest.RequestOrganization = (Hl7.Fhir.Model.ResourceReference)RequestOrganization.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as EnrollmentRequest; 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.FinancialResourceStatusCodes>)StatusElement.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Insurer != null) { dest.Insurer = (Hl7.Fhir.Model.ResourceReference)Insurer.DeepCopy(); } if (Provider != null) { dest.Provider = (Hl7.Fhir.Model.ResourceReference)Provider.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Coverage != null) { dest.Coverage = (Hl7.Fhir.Model.ResourceReference)Coverage.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ProcessRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (ActionElement != null) { dest.ActionElement = (Code <Hl7.Fhir.Model.ProcessRequest.ActionList>)ActionElement.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Ruleset != null) { dest.Ruleset = (Hl7.Fhir.Model.Coding)Ruleset.DeepCopy(); } if (OriginalRuleset != null) { dest.OriginalRuleset = (Hl7.Fhir.Model.Coding)OriginalRuleset.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Target != null) { dest.Target = (Hl7.Fhir.Model.ResourceReference)Target.DeepCopy(); } if (Provider != null) { dest.Provider = (Hl7.Fhir.Model.ResourceReference)Provider.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Response != null) { dest.Response = (Hl7.Fhir.Model.ResourceReference)Response.DeepCopy(); } if (NullifyElement != null) { dest.NullifyElement = (Hl7.Fhir.Model.FhirBoolean)NullifyElement.DeepCopy(); } if (ReferenceElement != null) { dest.ReferenceElement = (Hl7.Fhir.Model.FhirString)ReferenceElement.DeepCopy(); } if (Item != null) { dest.Item = new List <Hl7.Fhir.Model.ProcessRequest.ItemsComponent>(Item.DeepCopy()); } if (IncludeElement != null) { dest.IncludeElement = new List <Hl7.Fhir.Model.FhirString>(IncludeElement.DeepCopy()); } if (ExcludeElement != null) { dest.ExcludeElement = new List <Hl7.Fhir.Model.FhirString>(ExcludeElement.DeepCopy()); } if (Period != null) { dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as PaymentReconciliation; 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.FinancialResourceStatusCodes>)StatusElement.DeepCopy(); } if (Period != null) { dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Outcome != null) { dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy(); } if (DispositionElement != null) { dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy(); } if (RequestProvider != null) { dest.RequestProvider = (Hl7.Fhir.Model.ResourceReference)RequestProvider.DeepCopy(); } if (RequestOrganization != null) { dest.RequestOrganization = (Hl7.Fhir.Model.ResourceReference)RequestOrganization.DeepCopy(); } if (Detail != null) { dest.Detail = new List <Hl7.Fhir.Model.PaymentReconciliation.DetailsComponent>(Detail.DeepCopy()); } if (Form != null) { dest.Form = (Hl7.Fhir.Model.CodeableConcept)Form.DeepCopy(); } if (Total != null) { dest.Total = (Hl7.Fhir.Model.Money)Total.DeepCopy(); } if (ProcessNote != null) { dest.ProcessNote = new List <Hl7.Fhir.Model.PaymentReconciliation.NotesComponent>(ProcessNote.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ProcessResponse; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Outcome != null) { dest.Outcome = (Hl7.Fhir.Model.Coding)Outcome.DeepCopy(); } if (DispositionElement != null) { dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy(); } if (Ruleset != null) { dest.Ruleset = (Hl7.Fhir.Model.Coding)Ruleset.DeepCopy(); } if (OriginalRuleset != null) { dest.OriginalRuleset = (Hl7.Fhir.Model.Coding)OriginalRuleset.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (RequestProvider != null) { dest.RequestProvider = (Hl7.Fhir.Model.ResourceReference)RequestProvider.DeepCopy(); } if (RequestOrganization != null) { dest.RequestOrganization = (Hl7.Fhir.Model.ResourceReference)RequestOrganization.DeepCopy(); } if (Form != null) { dest.Form = (Hl7.Fhir.Model.Coding)Form.DeepCopy(); } if (Notes != null) { dest.Notes = new List <Hl7.Fhir.Model.ProcessResponse.NotesComponent>(Notes.DeepCopy()); } if (Error != null) { dest.Error = new List <Hl7.Fhir.Model.Coding>(Error.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 EligibilityRequest; 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.FinancialResourceStatusCodes>)StatusElement.DeepCopy(); } if (Priority != null) { dest.Priority = (Hl7.Fhir.Model.CodeableConcept)Priority.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Serviced != null) { dest.Serviced = (Hl7.Fhir.Model.Element)Serviced.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (Enterer != null) { dest.Enterer = (Hl7.Fhir.Model.ResourceReference)Enterer.DeepCopy(); } if (Provider != null) { dest.Provider = (Hl7.Fhir.Model.ResourceReference)Provider.DeepCopy(); } if (Organization != null) { dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy(); } if (Insurer != null) { dest.Insurer = (Hl7.Fhir.Model.ResourceReference)Insurer.DeepCopy(); } if (Facility != null) { dest.Facility = (Hl7.Fhir.Model.ResourceReference)Facility.DeepCopy(); } if (Coverage != null) { dest.Coverage = (Hl7.Fhir.Model.ResourceReference)Coverage.DeepCopy(); } if (BusinessArrangementElement != null) { dest.BusinessArrangementElement = (Hl7.Fhir.Model.FhirString)BusinessArrangementElement.DeepCopy(); } if (BenefitCategory != null) { dest.BenefitCategory = (Hl7.Fhir.Model.CodeableConcept)BenefitCategory.DeepCopy(); } if (BenefitSubCategory != null) { dest.BenefitSubCategory = (Hl7.Fhir.Model.CodeableConcept)BenefitSubCategory.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DocumentReference; if (dest != null) { base.CopyTo(dest); if (MasterIdentifier != null) { dest.MasterIdentifier = (Hl7.Fhir.Model.Identifier)MasterIdentifier.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Class != null) { dest.Class = (Hl7.Fhir.Model.CodeableConcept)Class.DeepCopy(); } if (Author != null) { dest.Author = new List <Hl7.Fhir.Model.ResourceReference>(Author.DeepCopy()); } if (Custodian != null) { dest.Custodian = (Hl7.Fhir.Model.ResourceReference)Custodian.DeepCopy(); } if (Authenticator != null) { dest.Authenticator = (Hl7.Fhir.Model.ResourceReference)Authenticator.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (IndexedElement != null) { dest.IndexedElement = (Hl7.Fhir.Model.Instant)IndexedElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DocumentReferenceStatus>)StatusElement.DeepCopy(); } if (DocStatus != null) { dest.DocStatus = (Hl7.Fhir.Model.CodeableConcept)DocStatus.DeepCopy(); } if (RelatesTo != null) { dest.RelatesTo = new List <Hl7.Fhir.Model.DocumentReference.RelatesToComponent>(RelatesTo.DeepCopy()); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (SecurityLabel != null) { dest.SecurityLabel = new List <Hl7.Fhir.Model.CodeableConcept>(SecurityLabel.DeepCopy()); } if (Content != null) { dest.Content = new List <Hl7.Fhir.Model.DocumentReference.ContentComponent>(Content.DeepCopy()); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.DocumentReference.ContextComponent)Context.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 DocumentReference; if (dest != null) { base.CopyTo(dest); if (MasterIdentifier != null) { dest.MasterIdentifier = (Hl7.Fhir.Model.Identifier)MasterIdentifier.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Class != null) { dest.Class = (Hl7.Fhir.Model.CodeableConcept)Class.DeepCopy(); } if (Author != null) { dest.Author = new List <Hl7.Fhir.Model.ResourceReference>(Author.DeepCopy()); } if (Custodian != null) { dest.Custodian = (Hl7.Fhir.Model.ResourceReference)Custodian.DeepCopy(); } if (PolicyManagerElement != null) { dest.PolicyManagerElement = (Hl7.Fhir.Model.FhirUri)PolicyManagerElement.DeepCopy(); } if (Authenticator != null) { dest.Authenticator = (Hl7.Fhir.Model.ResourceReference)Authenticator.DeepCopy(); } if (CreatedElement != null) { dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy(); } if (IndexedElement != null) { dest.IndexedElement = (Hl7.Fhir.Model.Instant)IndexedElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DocumentReference.DocumentReferenceStatus>)StatusElement.DeepCopy(); } if (DocStatus != null) { dest.DocStatus = (Hl7.Fhir.Model.CodeableConcept)DocStatus.DeepCopy(); } if (RelatesTo != null) { dest.RelatesTo = new List <Hl7.Fhir.Model.DocumentReference.DocumentReferenceRelatesToComponent>(RelatesTo.DeepCopy()); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (Confidentiality != null) { dest.Confidentiality = new List <Hl7.Fhir.Model.CodeableConcept>(Confidentiality.DeepCopy()); } if (PrimaryLanguageElement != null) { dest.PrimaryLanguageElement = (Hl7.Fhir.Model.Code)PrimaryLanguageElement.DeepCopy(); } if (MimeTypeElement != null) { dest.MimeTypeElement = (Hl7.Fhir.Model.Code)MimeTypeElement.DeepCopy(); } if (FormatElement != null) { dest.FormatElement = new List <Hl7.Fhir.Model.FhirUri>(FormatElement.DeepCopy()); } if (SizeElement != null) { dest.SizeElement = (Hl7.Fhir.Model.Integer)SizeElement.DeepCopy(); } if (HashElement != null) { dest.HashElement = (Hl7.Fhir.Model.FhirString)HashElement.DeepCopy(); } if (LocationElement != null) { dest.LocationElement = (Hl7.Fhir.Model.FhirUri)LocationElement.DeepCopy(); } if (Service != null) { dest.Service = (Hl7.Fhir.Model.DocumentReference.DocumentReferenceServiceComponent)Service.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.DocumentReference.DocumentReferenceContextComponent)Context.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }