Beispiel #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ClinicalImpression;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (Assessor != null)
                {
                    dest.Assessor = (Hl7.Fhir.Model.ResourceReference)Assessor.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.ClinicalImpression.ClinicalImpressionStatus>)StatusElement.DeepCopy();
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (Previous != null)
                {
                    dest.Previous = (Hl7.Fhir.Model.ResourceReference)Previous.DeepCopy();
                }
                if (Problem != null)
                {
                    dest.Problem = new List <Hl7.Fhir.Model.ResourceReference>(Problem.DeepCopy());
                }
                if (Trigger != null)
                {
                    dest.Trigger = (Hl7.Fhir.Model.Element)Trigger.DeepCopy();
                }
                if (Investigations != null)
                {
                    dest.Investigations = new List <Hl7.Fhir.Model.ClinicalImpression.InvestigationsComponent>(Investigations.DeepCopy());
                }
                if (ProtocolElement != null)
                {
                    dest.ProtocolElement = (Hl7.Fhir.Model.FhirUri)ProtocolElement.DeepCopy();
                }
                if (SummaryElement != null)
                {
                    dest.SummaryElement = (Hl7.Fhir.Model.FhirString)SummaryElement.DeepCopy();
                }
                if (Finding != null)
                {
                    dest.Finding = new List <Hl7.Fhir.Model.ClinicalImpression.FindingComponent>(Finding.DeepCopy());
                }
                if (Resolved != null)
                {
                    dest.Resolved = new List <Hl7.Fhir.Model.CodeableConcept>(Resolved.DeepCopy());
                }
                if (RuledOut != null)
                {
                    dest.RuledOut = new List <Hl7.Fhir.Model.ClinicalImpression.RuledOutComponent>(RuledOut.DeepCopy());
                }
                if (PrognosisElement != null)
                {
                    dest.PrognosisElement = (Hl7.Fhir.Model.FhirString)PrognosisElement.DeepCopy();
                }
                if (Plan != null)
                {
                    dest.Plan = new List <Hl7.Fhir.Model.ResourceReference>(Plan.DeepCopy());
                }
                if (Action != null)
                {
                    dest.Action = new List <Hl7.Fhir.Model.ResourceReference>(Action.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 ClinicalImpression;

            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.ClinicalImpression.ClinicalImpressionStatus>)StatusElement.DeepCopy();
            }
            if (Code != null)
            {
                dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Context != null)
            {
                dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy();
            }
            if (Effective != null)
            {
                dest.Effective = (Hl7.Fhir.Model.DataType)Effective.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (Assessor != null)
            {
                dest.Assessor = (Hl7.Fhir.Model.ResourceReference)Assessor.DeepCopy();
            }
            if (Previous != null)
            {
                dest.Previous = (Hl7.Fhir.Model.ResourceReference)Previous.DeepCopy();
            }
            if (Problem != null)
            {
                dest.Problem = new List <Hl7.Fhir.Model.ResourceReference>(Problem.DeepCopy());
            }
            if (Investigation != null)
            {
                dest.Investigation = new List <Hl7.Fhir.Model.ClinicalImpression.InvestigationComponent>(Investigation.DeepCopy());
            }
            if (ProtocolElement != null)
            {
                dest.ProtocolElement = new List <Hl7.Fhir.Model.FhirUri>(ProtocolElement.DeepCopy());
            }
            if (SummaryElement != null)
            {
                dest.SummaryElement = (Hl7.Fhir.Model.FhirString)SummaryElement.DeepCopy();
            }
            if (Finding != null)
            {
                dest.Finding = new List <Hl7.Fhir.Model.ClinicalImpression.FindingComponent>(Finding.DeepCopy());
            }
            if (PrognosisCodeableConcept != null)
            {
                dest.PrognosisCodeableConcept = new List <Hl7.Fhir.Model.CodeableConcept>(PrognosisCodeableConcept.DeepCopy());
            }
            if (PrognosisReference != null)
            {
                dest.PrognosisReference = new List <Hl7.Fhir.Model.ResourceReference>(PrognosisReference.DeepCopy());
            }
            if (Action != null)
            {
                dest.Action = new List <Hl7.Fhir.Model.ResourceReference>(Action.DeepCopy());
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            return(dest);
        }