Beispiel #1
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);
            }
        /// <summary>
        /// Validate the SCS Content for the Vaccine Cancellation Entry Component
        /// </summary>
        /// <param name="path">The path to this object as a string</param>
        /// <param name="messages">the validation messages, these may be added to within this method</param>
        public void Validate(string path, List <ValidationMessage> messages)
        {
            var vb = new ValidationBuilder(path, messages);


            if (vb.ArgumentRequiredCheck("VaccineType", VaccineType))
            {
                VaccineType.Validate("VaccineType", messages);
            }

            if (MedicareAntigenCode != null)
            {
                for (var x = 0; x < MedicareAntigenCode.Count; x++)
                {
                    MedicareAntigenCode[x].Validate(vb.Path + string.Format("MedicareAntigenCode[{0}]", x), vb.Messages);
                }
            }
        }
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (DateElement != null)
            {
                result.AddRange(DateElement.Validate());
            }
            if (VaccineType != null)
            {
                result.AddRange(VaccineType.Validate());
            }
            if (Subject != null)
            {
                result.AddRange(Subject.Validate());
            }
            if (RefusedIndicatorElement != null)
            {
                result.AddRange(RefusedIndicatorElement.Validate());
            }
            if (ReportedElement != null)
            {
                result.AddRange(ReportedElement.Validate());
            }
            if (Performer != null)
            {
                result.AddRange(Performer.Validate());
            }
            if (Requester != null)
            {
                result.AddRange(Requester.Validate());
            }
            if (Manufacturer != null)
            {
                result.AddRange(Manufacturer.Validate());
            }
            if (Location != null)
            {
                result.AddRange(Location.Validate());
            }
            if (LotNumberElement != null)
            {
                result.AddRange(LotNumberElement.Validate());
            }
            if (ExpirationDateElement != null)
            {
                result.AddRange(ExpirationDateElement.Validate());
            }
            if (Site != null)
            {
                result.AddRange(Site.Validate());
            }
            if (Route != null)
            {
                result.AddRange(Route.Validate());
            }
            if (DoseQuantity != null)
            {
                result.AddRange(DoseQuantity.Validate());
            }
            if (Explanation != null)
            {
                result.AddRange(Explanation.Validate());
            }
            if (Reaction != null)
            {
                Reaction.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (VaccinationProtocol != null)
            {
                result.AddRange(VaccinationProtocol.Validate());
            }

            return(result);
        }