Sha256: 2c3cad77970e321ac6682676258a1c59f934da3d48198e3a23c62cf82639ec3f

Contents?: true

Size: 961 Bytes

Versions: 13

Compression:

Stored size: 961 Bytes

Contents

module HealthDataStandards
  module Import
    module Cat1
      class ProcedurePerformedImporter < CDA::SectionImporter
        def initialize(entry_finder=CDA::EntryFinder.new("//cda:procedure[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.64']"))
          super(entry_finder)
          @entry_class = Procedure
          @ordinality_xpath = "./cda:priorityCode"
        end
        
        def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
          procedure = super
          extract_ordinality(entry_element, procedure)
          procedure
        end

        private

        def extract_ordinality(parent_element, procedure)
          ordinality_element = parent_element.at_xpath(@ordinality_xpath)
          if ordinality_element
            procedure.ordinality = {CodeSystemHelper.code_system_for(ordinality_element['codeSystem']) => [ordinality_element['code']]}
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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