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 RecommendationComponent; if (dest != null) { 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 (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); } 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 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); }