lib/qrda-import/patient_importer.rb in cqm-parsers-0.2.3 vs lib/qrda-import/patient_importer.rb in cqm-parsers-0.2.4
- old
+ new
@@ -90,10 +90,10 @@
def normalize_references(patient, entry_id_map)
patient.dataElements.each do |data_element|
next unless data_element.respond_to?(:relatedTo) && data_element.relatedTo
relations_to_add = []
data_element.relatedTo.each do |related_to|
- relations_to_add << entry_id_map[related_to.value]
+ relations_to_add << entry_id_map["#{related_to.value}_#{related_to.namingSystem}"]
end
data_element.relatedTo.destroy
relations_to_add.each do |relation_to_add|
data_element.relatedTo << relation_to_add
end