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);
        }
Esempio n. 2
0
        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);
        }