/// <summary>
        /// Validates this Reviewed Immunisations
        /// </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 (AdministeredImmunisation != null)
            {
                for (var x = 0; x < AdministeredImmunisation.Count; x++)
                {
                    AdministeredImmunisation[x].Validate
                    (
                        vb.Path + string.Format("AdministeredImmunisation[{0}]", x), vb.Messages
                    );
                }
            }

            if (ExclusionStatement != null)
            {
                ExclusionStatement.Validate(vb.Path + "GeneralStatement", vb.Messages);
            }

            // Recommendations exclusion statement choice
            var medicationsChoice = new Dictionary <string, object>()
            {
                { "AdministeredImmunisations", AdministeredImmunisation },
                { "ExclusionStatement", ExclusionStatement }
            };

            vb.ChoiceCheck(medicationsChoice);
        }
        /// <summary>
        /// Validates this Current Medications object for a Discharge Summary
        /// </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 (TherapeuticGoods != null)
            {
                TherapeuticGoods.ForEach(therapeuticGood => therapeuticGood.Validate(vb.Path + "TherapeuticGoods", vb.Messages));
            }

            // Exclusion statement choice
            var choiceCheck = new Dictionary <string, object>()
            {
                { "TherapeuticGoods", TherapeuticGoods },
                { "GeneralStatement", ExclusionStatement }
            };

            vb.ChoiceCheck(choiceCheck);

            if (ExclusionStatement != null)
            {
                ExclusionStatement.Validate(vb.Path + "GeneralStatement", vb.Messages);
            }
        }
コード例 #3
0
        /// <summary>
        /// Validates this Discharge Summary problem/diagnosis This Visit
        /// </summary>
        /// <param name="path">The path to this object as a string</param>
        /// <param name="messages">the validation messages to date, these may be added to within this method</param>
        public void Validate(string path, List <ValidationMessage> messages)
        {
            var vb = new ValidationBuilder(path, messages);

            if (ProblemDiagnosis != null)
            {
                ProblemDiagnosis.ForEach(problemDiagnosis => problemDiagnosis.Validate(vb.Path + "ProblemDiagnosis", vb.Messages));
            }

            // Problem diagnosis exclusion statement choice
            var problemDiagnosisChoice = new Dictionary <string, object>()
            {
                { "ProblemDiagnosis", ProblemDiagnosis },
                { "GeneralStatement", ExclusionStatement }
            };

            vb.ChoiceCheck(problemDiagnosisChoice);

            if (ExclusionStatement != null)
            {
                ExclusionStatement.Validate(vb.Path + "GeneralStatement", vb.Messages);
            }
        }
コード例 #4
0
        /// <summary>
        /// Validates this AdverseReactions
        /// </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 (Reactions != null)
            {
                Reactions.ForEach(adverseReactions => adverseReactions.Validate(vb.Path + "Reactions", vb.Messages));
            }

            // Exclusion statement choice
            var choiceCheck = new Dictionary <string, object>()
            {
                { "Reactions", Reactions },
                { "GeneralStatement", ExclusionStatement }
            };

            vb.ChoiceCheck(choiceCheck);

            if (ExclusionStatement != null)
            {
                ExclusionStatement.Validate(vb.Path + "GeneralStatement", vb.Messages);
            }
        }
        /// <summary>
        /// Validate the SCS Content for the Australian Childhood Immunisation Register History Entries
        /// </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 (ExclusionStatement == null && AustralianChildhoodImmunisationRegisterEntries == null)
            {
                vb.AddValidationMessage(vb.Path + "ExclusionStatement or AustralianChildhoodImmunisationRegister", null, "Please specify an ExclusionStatement or a AustralianChildhoodImmunisationRegisterEntry.");
            }

            if (ExclusionStatement != null && AustralianChildhoodImmunisationRegisterEntries != null)
            {
                vb.AddValidationMessage(vb.Path + "ExclusionStatement and AustralianChildhoodImmunisationRegisterEntry", null, "Both the ExclusionStatement and the AustralianChildhoodImmunisationRegisterEntry have been specified; only one instance of these is allowed.");
            }

            if (ExclusionStatement != null)
            {
                ExclusionStatement.Validate("ExclusionStatement", messages);
            }

            if (AustralianChildhoodImmunisationRegisterEntries != null)
            {
                AustralianChildhoodImmunisationRegisterEntries.Validate(vb.Path + "AustralianChildhoodImmunisationRegisterEntries", vb.Messages);
            }
        }
        /// <summary>
        /// Validate the SCS Content for Pharmaceutical Benefits History
        /// </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 (ExclusionStatement != null)
            {
                ExclusionStatement.Validate("ExclusionStatement", vb.Messages);
            }

            if (PharmaceuticalBenefitItems != null)
            {
                PharmaceuticalBenefitItems.Validate("PharmaceuticalBenefitItems", vb.Messages);
            }

            if (ExclusionStatement == null && PharmaceuticalBenefitItems == null)
            {
                vb.AddValidationMessage(vb.Path + "ExclusionStatement or PharmaceuticalBenefitItems", null, "Please specify an ExclusionStatement or a PharmaceuticalBenefitItems item");
            }

            if (ExclusionStatement != null && PharmaceuticalBenefitItems != null)
            {
                vb.AddValidationMessage(vb.Path + "ExclusionStatement and PharmaceuticalBenefitItems", null, "Both the ExclusionStatement and the PharmaceuticalBenefitItems items have been specified; only one instance of these is allowed.");
            }
        }
        /// <summary>
        /// Validate the SCS Content for Medicare DVA Funded Services History
        /// </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 (ExclusionStatement != null)
            {
                ExclusionStatement.Validate("ExclusionStatement", vb.Messages);
            }

            if (MedicarDVAFundedServices != null)
            {
                MedicarDVAFundedServices.Validate(vb.Path + "MedicarDVAFundedService[{0}]", vb.Messages);
            }

            if (ExclusionStatement == null && MedicarDVAFundedServices == null)
            {
                vb.AddValidationMessage(vb.Path + "ExclusionStatement or MedicarDVAFundedServices", null, "Please specify an ExclusionStatement or a MedicarDVAFundedServices.");
            }

            if (ExclusionStatement != null && MedicarDVAFundedServices != null)
            {
                vb.AddValidationMessage(vb.Path + "ExclusionStatement and MedicarDVAFundedServices", null, "Both the ExclusionStatement and the MedicarDVAFundedServices have been specified; only one instance of these is allowed.");
            }
        }