public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as RecommendationComponent;

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

                base.CopyTo(dest);
                if (VaccineCode != null)
                {
                    dest.VaccineCode = new List <Hl7.Fhir.Model.CodeableConcept>(VaccineCode.DeepCopy());
                }
                if (TargetDisease != null)
                {
                    dest.TargetDisease = new List <Hl7.Fhir.Model.CodeableConcept>(TargetDisease.DeepCopy());
                }
                if (ContraindicatedVaccineCode != null)
                {
                    dest.ContraindicatedVaccineCode = new List <Hl7.Fhir.Model.CodeableConcept>(ContraindicatedVaccineCode.DeepCopy());
                }
                if (ForecastStatus != null)
                {
                    dest.ForecastStatus = (Hl7.Fhir.Model.CodeableConcept)ForecastStatus.DeepCopy();
                }
                if (ForecastReason != null)
                {
                    dest.ForecastReason = new List <Hl7.Fhir.Model.CodeableConcept>(ForecastReason.DeepCopy());
                }
                if (DateCriterion != null)
                {
                    dest.DateCriterion = new List <Hl7.Fhir.Model.ImmunizationRecommendation.DateCriterionComponent>(DateCriterion.DeepCopy());
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (SeriesElement != null)
                {
                    dest.SeriesElement = (Hl7.Fhir.Model.FhirString)SeriesElement.DeepCopy();
                }
                if (DoseNumberElement != null)
                {
                    dest.DoseNumberElement = (Hl7.Fhir.Model.FhirString)DoseNumberElement.DeepCopy();
                }
                if (SeriesDosesElement != null)
                {
                    dest.SeriesDosesElement = (Hl7.Fhir.Model.FhirString)SeriesDosesElement.DeepCopy();
                }
                if (SupportingImmunization != null)
                {
                    dest.SupportingImmunization = new List <Hl7.Fhir.Model.ResourceReference>(SupportingImmunization.DeepCopy());
                }
                if (SupportingPatientInformation != null)
                {
                    dest.SupportingPatientInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingPatientInformation.DeepCopy());
                }
                return(dest);
            }
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as RecommendationComponent;

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

                base.CopyTo(dest);
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (VaccineCode != null)
                {
                    dest.VaccineCode = (Hl7.Fhir.Model.CodeableConcept)VaccineCode.DeepCopy();
                }
                if (TargetDisease != null)
                {
                    dest.TargetDisease = (Hl7.Fhir.Model.CodeableConcept)TargetDisease.DeepCopy();
                }
                if (DoseNumberElement != null)
                {
                    dest.DoseNumberElement = (Hl7.Fhir.Model.PositiveInt)DoseNumberElement.DeepCopy();
                }
                if (ForecastStatus != null)
                {
                    dest.ForecastStatus = (Hl7.Fhir.Model.CodeableConcept)ForecastStatus.DeepCopy();
                }
                if (DateCriterion != null)
                {
                    dest.DateCriterion = new List <Hl7.Fhir.Model.ImmunizationRecommendation.DateCriterionComponent>(DateCriterion.DeepCopy());
                }
                if (Protocol != null)
                {
                    dest.Protocol = (Hl7.Fhir.Model.ImmunizationRecommendation.ProtocolComponent)Protocol.DeepCopy();
                }
                if (SupportingImmunization != null)
                {
                    dest.SupportingImmunization = new List <Hl7.Fhir.Model.ResourceReference>(SupportingImmunization.DeepCopy());
                }
                if (SupportingPatientInformation != null)
                {
                    dest.SupportingPatientInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingPatientInformation.DeepCopy());
                }
                return(dest);
            }
Esempio n. 3
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (RecommendationDateElement != null)
                {
                    result.AddRange(RecommendationDateElement.Validate());
                }
                if (VaccineType != null)
                {
                    result.AddRange(VaccineType.Validate());
                }
                if (DoseNumberElement != null)
                {
                    result.AddRange(DoseNumberElement.Validate());
                }
                if (ForecastStatusElement != null)
                {
                    result.AddRange(ForecastStatusElement.Validate());
                }
                if (DateCriterion != null)
                {
                    DateCriterion.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (Protocol != null)
                {
                    result.AddRange(Protocol.Validate());
                }
                if (SupportingImmunization != null)
                {
                    SupportingImmunization.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (SupportingAdverseEventReport != null)
                {
                    SupportingAdverseEventReport.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (SupportingPatientObservation != null)
                {
                    SupportingPatientObservation.ForEach(elem => result.AddRange(elem.Validate()));
                }

                return(result);
            }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ImmunizationEvaluation;

            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.ImmunizationEvaluation.ImmunizationEvaluationStatusCodes>)StatusElement.DeepCopy();
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (Authority != null)
            {
                dest.Authority = (Hl7.Fhir.Model.ResourceReference)Authority.DeepCopy();
            }
            if (TargetDisease != null)
            {
                dest.TargetDisease = (Hl7.Fhir.Model.CodeableConcept)TargetDisease.DeepCopy();
            }
            if (ImmunizationEvent != null)
            {
                dest.ImmunizationEvent = (Hl7.Fhir.Model.ResourceReference)ImmunizationEvent.DeepCopy();
            }
            if (DoseStatus != null)
            {
                dest.DoseStatus = (Hl7.Fhir.Model.CodeableConcept)DoseStatus.DeepCopy();
            }
            if (DoseStatusReason != null)
            {
                dest.DoseStatusReason = new List <Hl7.Fhir.Model.CodeableConcept>(DoseStatusReason.DeepCopy());
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (SeriesElement != null)
            {
                dest.SeriesElement = (Hl7.Fhir.Model.FhirString)SeriesElement.DeepCopy();
            }
            if (DoseNumberElement != null)
            {
                dest.DoseNumberElement = (Hl7.Fhir.Model.FhirString)DoseNumberElement.DeepCopy();
            }
            if (SeriesDosesElement != null)
            {
                dest.SeriesDosesElement = (Hl7.Fhir.Model.FhirString)SeriesDosesElement.DeepCopy();
            }
            return(dest);
        }