Sha256: 6b5079475ba8d7f74b3ea164dbfaa3ccbaf67e66231325c72c25d99aaccf707f

Contents?: true

Size: 1.13 KB

Versions: 31

Compression:

Stored size: 1.13 KB

Contents

module HealthDataStandards
  module Import
    module C32
      class ImmunizationImporter < CDA::SectionImporter

        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

        def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
          immunization = super
          extract_negation(entry_element, immunization)
          extract_performer(entry_element, immunization)
          immunization
        end
    
        private
    
        def extract_performer(parent_element, immunization)
          performer_element = parent_element.at_xpath("./cda:performer")
          immunization.performer = import_actor(performer_element) if performer_element
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
health-data-standards-3.6.1 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.5.3 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.5.2 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.5.1 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.5.0 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.4.6 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.4.5 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.4.4 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.4.3 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.4.2 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.4.1 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.4.0 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.2.12 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.3.0 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.2.11 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.2.10 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.2.8 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.2.7 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.2.6 lib/health-data-standards/import/c32/immunization_importer.rb
health-data-standards-3.2.5 lib/health-data-standards/import/c32/immunization_importer.rb