Example #1
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (Code != null)
                {
                    result.AddRange(Code.Validate());
                }
                if (Specimen != null)
                {
                    Specimen.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (BodySite != null)
                {
                    result.AddRange(BodySite.Validate());
                }
                if (StatusElement != null)
                {
                    result.AddRange(StatusElement.Validate());
                }
                if (Event != null)
                {
                    Event.ForEach(elem => result.AddRange(elem.Validate()));
                }

                return(result);
            }
Example #2
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Subject != null)
            {
                result.AddRange(Subject.Validate());
            }
            if (Orderer != null)
            {
                result.AddRange(Orderer.Validate());
            }
            if (Identifier != null)
            {
                Identifier.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Encounter != null)
            {
                result.AddRange(Encounter.Validate());
            }
            if (ClinicalNotesElement != null)
            {
                result.AddRange(ClinicalNotesElement.Validate());
            }
            if (Specimen != null)
            {
                Specimen.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (StatusElement != null)
            {
                result.AddRange(StatusElement.Validate());
            }
            if (PriorityElement != null)
            {
                result.AddRange(PriorityElement.Validate());
            }
            if (Event != null)
            {
                Event.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Item != null)
            {
                Item.ForEach(elem => result.AddRange(elem.Validate()));
            }

            return(result);
        }