Class: HealthDataStandards::Import::CDA::ResultImporter

Inherits:
SectionImporter show all
Defined in:
lib/health-data-standards/import/cda/result_importer.rb

Instance Attribute Summary

Attributes inherited from SectionImporter

#check_for_usable, #code_xpath, #status_xpath

Instance Method Summary collapse

Methods inherited from SectionImporter

#create_entries

Methods included from LocatableImportUtils

#import_address, #import_telecom

Constructor Details

#initialize(entry_finder = EntryFinder.new("//cda:observation[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.15.1'] | //cda:observation[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.15']")) ⇒ ResultImporter

Returns a new instance of ResultImporter.



5
6
7
8
# File 'lib/health-data-standards/import/cda/result_importer.rb', line 5

def initialize(entry_finder=EntryFinder.new("//cda:observation[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.15.1'] | //cda:observation[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.15']"))
  super(entry_finder)
  @entry_class = LabResult
end

Instance Method Details

#create_entry(entry_element, nrh = NarrativeReferenceHandler.new) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/health-data-standards/import/cda/result_importer.rb', line 10

def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
  result = super
  extract_interpretation(entry_element, result)
  extract_reference_range(entry_element, result)
  extract_negation(entry_element, result)
  extract_reason_description(entry_element, result, nrh)
  result
end