Class: HealthDataStandards::Import::C32::ImmunizationImporter

Inherits:
HealthDataStandards::Import::CDA::SectionImporter show all
Defined in:
lib/health-data-standards/import/c32/immunization_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

#initialize(entry_finder = CDA::EntryFinder.new("//cda:section[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.117']/cda:entry/cda:substanceAdministration")) ⇒ ImmunizationImporter

Returns a new instance of ImmunizationImporter.



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

def initialize(entry_finder=CDA::EntryFinder.new("//cda:section[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.117']/cda:entry/cda:substanceAdministration"))
  super(entry_finder)
  @code_xpath = "./cda:consumable/cda:manufacturedProduct/cda:manufacturedMaterial/cda:code"
  @description_xpath = "./cda:consumable/cda:manufacturedProduct/cda:manufacturedMaterial/cda:code/cda:originalText/cda:reference[@value]"
  @entry_class = Immunization
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/immunization_importer.rb', line 13

def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
  immunization = super
  extract_reason_or_negation(entry_element, immunization)
  extract_performer(entry_element, immunization)
  immunization
end