Class: HealthDataStandards::Import::C32::ConditionImporter

Inherits:
HealthDataStandards::Import::CDA::ConditionImporter show all
Defined in:
lib/health-data-standards/import/c32/condition_importer.rb

Instance Attribute Summary

Attributes inherited from HealthDataStandards::Import::CDA::SectionImporter

#check_for_usable, #code_xpath, #status_xpath

Instance Method Summary collapse

Methods inherited from HealthDataStandards::Import::CDA::SectionImporter

#create_entries

Methods included from HealthDataStandards::Import::CDA::LocatableImportUtils

#import_address, #import_telecom

Constructor Details

#initializeConditionImporter

Returns a new instance of ConditionImporter.



6
7
8
9
10
11
# File 'lib/health-data-standards/import/c32/condition_importer.rb', line 6

def initialize
  super
  @death_xpath = "./cda:entryRelationship[@typeCode='CAUS']/cda:observation"
  @cod_xpath = "#{@death_xpath}/cda:code[@code='419620001']"
  @time_of_death_xpath = "#{@death_xpath}/cda:effectiveTime/@value"
end

Instance Method Details

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



13
14
15
16
17
18
# File 'lib/health-data-standards/import/c32/condition_importer.rb', line 13

def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
  condition = super
  extract_cause_of_death(entry_element, condition)
  extract_type(entry_element, condition)
  condition
end