Sha256: 6c7b46ca13b3fb429a8c1cc6ea70c34a1671ec58cad8c7610c5487830b019a44

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

module QRDA
  module Cat1
    class AdverseEventImporter < SectionImporter
      def initialize(entry_finder = QRDA::Cat1::EntryFinder.new("./cda:entry/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.146']"))
        super(entry_finder)
        @code_xpath = './cda:entryRelationship/cda:observation/cda:value'
        @author_datetime_xpath = './cda:author/cda:time'
        @relevant_period_xpath = './cda:effectiveTime'
        @severity_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root = '2.16.840.1.113883.10.20.22.4.8']/cda:value"
        @facility_xpath = "./cda:participant[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.100']"
        @entry_class = QDM::AdverseEvent
      end

      def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
        adverse_event = super
        adverse_event.severity = code_if_present(entry_element.at_xpath(@severity_xpath))
        extract_facility(entry_element, adverse_event)
        adverse_event
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cqm-parsers-0.2.1 lib/qrda-import/data-element-importers/adverse_event_importer.rb
cqm-parsers-0.1.1 lib/qrda-import/data-element-importers/adverse_event_importer.rb
cqm-parsers-0.1.0 lib/qrda-import/data-element-importers/adverse_event_importer.rb