Sha256: 8a6edc8720468b93c9614dc24c1a9c73fd5bd8ba7fd71034c9a3e77fe1a7a267

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

module QRDA
  module Cat1
    class MedicationOrderImporter < MedicationImporter
      def initialize(entry_finder = QRDA::Cat1::EntryFinder.new("./cda:entry/cda:substanceAdministration[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.47']"))
        super(entry_finder)
        @reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.88']/cda:value"
        @entry_class = QDM::MedicationOrder
      end

      def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
        medication_order = super
        medication_order.reason = extract_reason(entry_element)
        medication_order
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cqm-parsers-0.2.4 lib/qrda-import/data-element-importers/medication_order_importer.rb