Пример #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Coverage;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (Issuer != null)
            {
                dest.Issuer = (Hl7.Fhir.Model.ResourceReference)Issuer.DeepCopy();
            }
            if (Bin != null)
            {
                dest.Bin = (Hl7.Fhir.Model.Identifier)Bin.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.Coding)Type.DeepCopy();
            }
            if (SubscriberId != null)
            {
                dest.SubscriberId = (Hl7.Fhir.Model.Identifier)SubscriberId.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (GroupElement != null)
            {
                dest.GroupElement = (Hl7.Fhir.Model.FhirString)GroupElement.DeepCopy();
            }
            if (PlanElement != null)
            {
                dest.PlanElement = (Hl7.Fhir.Model.FhirString)PlanElement.DeepCopy();
            }
            if (SubPlanElement != null)
            {
                dest.SubPlanElement = (Hl7.Fhir.Model.FhirString)SubPlanElement.DeepCopy();
            }
            if (DependentElement != null)
            {
                dest.DependentElement = (Hl7.Fhir.Model.PositiveInt)DependentElement.DeepCopy();
            }
            if (SequenceElement != null)
            {
                dest.SequenceElement = (Hl7.Fhir.Model.PositiveInt)SequenceElement.DeepCopy();
            }
            if (Subscriber != null)
            {
                dest.Subscriber = (Hl7.Fhir.Model.ResourceReference)Subscriber.DeepCopy();
            }
            if (Network != null)
            {
                dest.Network = (Hl7.Fhir.Model.Identifier)Network.DeepCopy();
            }
            if (Contract != null)
            {
                dest.Contract = new List <Hl7.Fhir.Model.ResourceReference>(Contract.DeepCopy());
            }
            return(dest);
        }
Пример #2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Invoice;

            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.Invoice.InvoiceStatus>)StatusElement.DeepCopy();
            }
            if (CancelledReasonElement != null)
            {
                dest.CancelledReasonElement = (Hl7.Fhir.Model.FhirString)CancelledReasonElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Recipient != null)
            {
                dest.Recipient = (Hl7.Fhir.Model.ResourceReference)Recipient.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (Participant != null)
            {
                dest.Participant = new List <Hl7.Fhir.Model.Invoice.ParticipantComponent>(Participant.DeepCopy());
            }
            if (Issuer != null)
            {
                dest.Issuer = (Hl7.Fhir.Model.ResourceReference)Issuer.DeepCopy();
            }
            if (Account != null)
            {
                dest.Account = (Hl7.Fhir.Model.ResourceReference)Account.DeepCopy();
            }
            if (LineItem != null)
            {
                dest.LineItem = new List <Hl7.Fhir.Model.Invoice.LineItemComponent>(LineItem.DeepCopy());
            }
            if (TotalPriceComponent != null)
            {
                dest.TotalPriceComponent = new List <Hl7.Fhir.Model.Invoice.PriceComponentComponent>(TotalPriceComponent.DeepCopy());
            }
            if (TotalNet != null)
            {
                dest.TotalNet = (Hl7.Fhir.Model.Money)TotalNet.DeepCopy();
            }
            if (TotalGross != null)
            {
                dest.TotalGross = (Hl7.Fhir.Model.Money)TotalGross.DeepCopy();
            }
            if (PaymentTerms != null)
            {
                dest.PaymentTerms = (Hl7.Fhir.Model.Markdown)PaymentTerms.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            return(dest);
        }