lib/hqmf-parser/2.0/precondition.rb in health-data-standards-3.4.6 vs lib/hqmf-parser/2.0/precondition.rb in health-data-standards-3.5.0
- old
+ new
@@ -11,10 +11,13 @@
@entry = entry
@preconditions = @entry.xpath('./*/cda:precondition', HQMF2::Document::NAMESPACES).collect do |precondition|
Precondition.new(precondition, @doc)
end
reference_def = @entry.at_xpath('./*/cda:id', HQMF2::Document::NAMESPACES)
+ if !reference_def
+ reference_def = @entry.at_xpath('./cda:join/cda:templateId/cda:item', HQMF2::Document::NAMESPACES)
+ end
if reference_def
@reference = Reference.new(reference_def)
end
end
@@ -39,6 +42,6 @@
mr = reference ? reference.to_model : nil
HQMF::Precondition.new(nil, pcs, mr, conjunction_code, false)
end
end
-end
\ No newline at end of file
+end