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

            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.ObservationStatus>)StatusElement.DeepCopy();
            }
            if (Code != null)
            {
                dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
            }
            if (SeverityElement != null)
            {
                dest.SeverityElement = (Code <Hl7.Fhir.Model.DetectedIssue.DetectedIssueSeverity>)SeverityElement.DeepCopy();
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (Identified != null)
            {
                dest.Identified = (Hl7.Fhir.Model.DataType)Identified.DeepCopy();
            }
            if (Author != null)
            {
                dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy();
            }
            if (Implicated != null)
            {
                dest.Implicated = new List <Hl7.Fhir.Model.ResourceReference>(Implicated.DeepCopy());
            }
            if (Evidence != null)
            {
                dest.Evidence = new List <Hl7.Fhir.Model.DetectedIssue.EvidenceComponent>(Evidence.DeepCopy());
            }
            if (DetailElement != null)
            {
                dest.DetailElement = (Hl7.Fhir.Model.FhirString)DetailElement.DeepCopy();
            }
            if (ReferenceElement != null)
            {
                dest.ReferenceElement = (Hl7.Fhir.Model.FhirUri)ReferenceElement.DeepCopy();
            }
            if (Mitigation != null)
            {
                dest.Mitigation = new List <Hl7.Fhir.Model.DetectedIssue.MitigationComponent>(Mitigation.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Contraindication;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (Category != null)
                {
                    dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy();
                }
                if (SeverityElement != null)
                {
                    dest.SeverityElement = (Hl7.Fhir.Model.Code)SeverityElement.DeepCopy();
                }
                if (Implicated != null)
                {
                    dest.Implicated = new List <Hl7.Fhir.Model.ResourceReference>(Implicated.DeepCopy());
                }
                if (DetailElement != null)
                {
                    dest.DetailElement = (Hl7.Fhir.Model.FhirString)DetailElement.DeepCopy();
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (Author != null)
                {
                    dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy();
                }
                if (Identifier != null)
                {
                    dest.Identifier = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy();
                }
                if (ReferenceElement != null)
                {
                    dest.ReferenceElement = (Hl7.Fhir.Model.FhirUri)ReferenceElement.DeepCopy();
                }
                if (Mitigation != null)
                {
                    dest.Mitigation = new List <Hl7.Fhir.Model.Contraindication.ContraindicationMitigationComponent>(Mitigation.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 3
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (Code != null)
                {
                    result.AddRange(Code.Validate());
                }
                if (DetailElement != null)
                {
                    result.AddRange(DetailElement.Validate());
                }

                return(result);
            }
Ejemplo n.º 4
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ConditionLocationComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Code != null)
                    {
                        dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                    }
                    if (DetailElement != null)
                    {
                        dest.DetailElement = (Hl7.Fhir.Model.FhirString)DetailElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }