Esempio n. 1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as DiagnosticOrder;

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

            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.DiagnosticOrderPriority>)PriorityElement.DeepCopy();
            }
            if (Event != null)
            {
                dest.Event = new List <Hl7.Fhir.Model.DiagnosticOrder.EventComponent>(Event.DeepCopy());
            }
            if (Item != null)
            {
                dest.Item = new List <Hl7.Fhir.Model.DiagnosticOrder.ItemComponent>(Item.DeepCopy());
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            return(dest);
        }
Esempio n. 2
0
        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 (ClinicalNotesElement != null)
                {
                    dest.ClinicalNotesElement = (Hl7.Fhir.Model.FhirString)ClinicalNotesElement.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());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Esempio n. 3
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ProcedureRequest;

            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 (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.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 (Reason != null)
            {
                dest.Reason = (Hl7.Fhir.Model.Element)Reason.DeepCopy();
            }
            if (Scheduled != null)
            {
                dest.Scheduled = (Hl7.Fhir.Model.Element)Scheduled.DeepCopy();
            }
            if (Encounter != null)
            {
                dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
            }
            if (Performer != null)
            {
                dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestStatus>)StatusElement.DeepCopy();
            }
            if (Notes != null)
            {
                dest.Notes = new List <Hl7.Fhir.Model.Annotation>(Notes.DeepCopy());
            }
            if (AsNeeded != null)
            {
                dest.AsNeeded = (Hl7.Fhir.Model.Element)AsNeeded.DeepCopy();
            }
            if (OrderedOnElement != null)
            {
                dest.OrderedOnElement = (Hl7.Fhir.Model.FhirDateTime)OrderedOnElement.DeepCopy();
            }
            if (Orderer != null)
            {
                dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy();
            }
            if (PriorityElement != null)
            {
                dest.PriorityElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestPriority>)PriorityElement.DeepCopy();
            }
            return(dest);
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ProcedureRequest;

            if (dest != null)
            {
                base.CopyTo(dest);
                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 (BodySite != null)
                {
                    dest.BodySite = new List <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestBodySiteComponent>(BodySite.DeepCopy());
                }
                if (Indication != null)
                {
                    dest.Indication = new List <Hl7.Fhir.Model.CodeableConcept>(Indication.DeepCopy());
                }
                if (Timing != null)
                {
                    dest.Timing = (Hl7.Fhir.Model.Element)Timing.DeepCopy();
                }
                if (Encounter != null)
                {
                    dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
                }
                if (Performer != null)
                {
                    dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestStatus>)StatusElement.DeepCopy();
                }
                if (NotesElement != null)
                {
                    dest.NotesElement = new List <Hl7.Fhir.Model.FhirString>(NotesElement.DeepCopy());
                }
                if (AsNeeded != null)
                {
                    dest.AsNeeded = (Hl7.Fhir.Model.Element)AsNeeded.DeepCopy();
                }
                if (OrderedOnElement != null)
                {
                    dest.OrderedOnElement = (Hl7.Fhir.Model.FhirDateTime)OrderedOnElement.DeepCopy();
                }
                if (Orderer != null)
                {
                    dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy();
                }
                if (PriorityElement != null)
                {
                    dest.PriorityElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestPriority>)PriorityElement.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }