lib/hqmf-parser/2.0/document.rb in cqm-parsers-0.2.1 vs lib/hqmf-parser/2.0/document.rb in cqm-parsers-0.2.2
- old
+ new
@@ -190,10 +190,10 @@
value_obj = nil
value_obj = handle_attribute_value(attribute, value) if attribute.at_xpath('./cda:value', NAMESPACES)
# Handle the cms_id - changed to eCQM in MAT 5.4 (QDM 5.3)
- @cms_id = "CMS#{value}v#{@hqmf_version_number.to_i}" if (name.include? 'eMeasure Identifier') || (name.include? 'eCQM Identifier')
+ @cms_id = "CMS#{value}v#{@hqmf_version_number.to_i}" if (!name.nil?) && ((name.include? 'eMeasure Identifier') || (name.include? 'eCQM Identifier'))
HQMF::Attribute.new(id, code, value, nil, name, id_obj, code_obj, value_obj)
end
# Extracts the code used by a particular attribute