Sha256: 58fb710742dc35923dad691bdde202da8a66274aef3e7c838c5442c5021dba44

Contents?: true

Size: 1.18 KB

Versions: 15

Compression:

Stored size: 1.18 KB

Contents

module HealthDataStandards
  module Import
    module CDA
      class ProcedureImporter < SectionImporter

        #scoped to not look in the plan of care section so planned procedures do not end up mixed with
        #past procedures
        def initialize(entry_finder=EntryFinder.new("//cda:section[cda:templateId/@root!='2.16.840.1.113883.3.88.11.83.124']//cda:procedure"))
          super(entry_finder)
          @entry_class = Procedure
          @value_xpath = nil
        end
        
        def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
          procedure = super
          extract_performer(entry_element, procedure)
          extract_site(entry_element, procedure)
          extract_negation(entry_element, procedure)
          procedure
        end

        private

        def extract_performer(parent_element, procedure)
          performer_element = parent_element.at_xpath("./cda:performer")
          procedure.performer = import_actor(performer_element) if performer_element
        end

        def extract_site(parent_element, procedure)
          procedure.site = extract_code(parent_element, "./cda:targetSiteCode")
        end

      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
health-data-standards-3.2.12 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.3.0 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.11 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.10 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.8 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.7 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.6 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.5 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.4 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.3 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.2 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.1 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.2.0 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.1.1 lib/health-data-standards/import/cda/procedure_importer.rb
health-data-standards-3.1.0 lib/health-data-standards/import/cda/procedure_importer.rb