Ejemplo n.º 1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as GuidanceResponse;

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

            base.CopyTo(dest);
            if (RequestIdElement != null)
            {
                dest.RequestIdElement = (Hl7.Fhir.Model.Id)RequestIdElement.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy();
            }
            if (Module != null)
            {
                dest.Module = (Hl7.Fhir.Model.ResourceReference)Module.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.GuidanceResponse.GuidanceResponseStatus>)StatusElement.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Context != null)
            {
                dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy();
            }
            if (OccurrenceDateTimeElement != null)
            {
                dest.OccurrenceDateTimeElement = (Hl7.Fhir.Model.FhirDateTime)OccurrenceDateTimeElement.DeepCopy();
            }
            if (Performer != null)
            {
                dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy();
            }
            if (Reason != null)
            {
                dest.Reason = (Hl7.Fhir.Model.DataType)Reason.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (EvaluationMessage != null)
            {
                dest.EvaluationMessage = new List <Hl7.Fhir.Model.ResourceReference>(EvaluationMessage.DeepCopy());
            }
            if (OutputParameters != null)
            {
                dest.OutputParameters = (Hl7.Fhir.Model.ResourceReference)OutputParameters.DeepCopy();
            }
            if (Result != null)
            {
                dest.Result = (Hl7.Fhir.Model.ResourceReference)Result.DeepCopy();
            }
            if (DataRequirement != null)
            {
                dest.DataRequirement = new List <Hl7.Fhir.Model.DataRequirement>(DataRequirement.DeepCopy());
            }
            return(dest);
        }