Sha256: e784bf7d2620d305cea0ddeb30793874f59caafaf4dd206c50b2695094c66271

Contents?: true

Size: 949 Bytes

Versions: 17

Compression:

Stored size: 949 Bytes

Contents

module HealthDataStandards
  module Import
    module CDA
      class MedicalEquipmentImporter < SectionImporter
        def initialize(entry_finder=EntryFinder.new("//cda:section[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.128']/cda:entry/cda:supply"))
          super(entry_finder)
          @code_xpath = "./cda:participant/cda:participantRole/cda:playingDevice/cda:code"
          @entry_class = MedicalEquipment
        end

        def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
          medical_equipment = super
          extract_manufacturer(entry_element, medical_equipment)
          medical_equipment
        end

        def extract_manufacturer(entry_element, entry)
          manufacturer = entry_element.at_xpath("./cda:participant/cda:participantRole/cda:scopingEntity/cda:desc").try(:inner_text)
          entry.manufacturer = manufacturer.strip if manufacturer
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
health-data-standards-3.2.11 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.10 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.8 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.7 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.6 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.5 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.4 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.3 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.2 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.1 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.2.0 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.1.1 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.1.0 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.0.6 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.0.5 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.0.4 lib/health-data-standards/import/cda/medical_equipment_importer.rb
health-data-standards-3.0.3 lib/health-data-standards/import/cda/medical_equipment_importer.rb