lib/hqmf-parser/2.0/population_criteria.rb in cqm-parsers-2.0.1 vs lib/hqmf-parser/2.0/population_criteria.rb in cqm-parsers-3.0.0.0
- old
+ new
@@ -72,10 +72,10 @@
# Measure Observations criteria rely on computed expressions. If it doesn't have one,
# then it is likely formatted improperly.
fail 'Measure Observations criteria is missing computed expression(s) ' if exp.nil?
parts = exp.to_s.split('-')
dc = parse_parts_to_dc(parts)
- @doc.add_data_criteria(dc)
+ @doc.add_data_criteria(dc) unless dc.nil?
# Update reference_ids with any newly referenced data criteria
dc.children_criteria.each { |cc| @doc.add_reference_id(cc) } unless dc&.children_criteria.nil?
dc
end