From 52a589404d85ed54933f02159e83ceb874b13b9c Mon Sep 17 00:00:00 2001 From: dczulada Date: Mon, 11 Sep 2023 09:47:14 -0400 Subject: [PATCH] Workaround to support Checklist tests that have a presentOnAdmissionIndicator valueset (#1835) --- lib/validators/checklist_criteria_validator.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/validators/checklist_criteria_validator.rb b/lib/validators/checklist_criteria_validator.rb index d634a7ca3..02b5f595f 100644 --- a/lib/validators/checklist_criteria_validator.rb +++ b/lib/validators/checklist_criteria_validator.rb @@ -141,7 +141,11 @@ def verify_component_attribute(attribute, checked_criteria) def verify_dx_component_attribute(attribute, checked_criteria) # A component has nested attributes, check those - attribute_has_data(attribute.code, checked_criteria) + # Check the dx code first + return true if attribute_has_data(attribute.code, checked_criteria) + + # Check the dx presentOnAdmissionIndicator + attribute_has_data(attribute.presentOnAdmissionIndicator, checked_criteria) end def verify_id_attribute(attribute)