Sha256: 246dc8b519c95c703aa16fc414688cea08948b7f03b2b5808dfc4864ec3ff6e7

Contents?: true

Size: 983 Bytes

Versions: 6

Compression:

Stored size: 983 Bytes

Contents

module HealthDataStandards
  module Import
    module Cat1
      class ProcedurePerformedImporter < CDA::ProcedureImporter
        def initialize(entry_finder=CDA::EntryFinder.new("./cda:entry/cda:procedure[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.64']"))
          super(entry_finder)
          @incision_xpath ="./cda:entryRelationship/cda:procedure[./cda:templateId[@root='2.16.840.1.113883.10.20.24.3.89']]/cda:effectiveTime"
        end

        def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
          procedure = super
          extract_incision_date_time(entry_element,procedure)
          procedure
        end

        private

        def extract_incision_date_time(parent_element, procedure)
          incision_time = parent_element.at_xpath(@incision_xpath)
          if incision_time
            procedure.incision_time = HL7Helper.timestamp_to_integer(incision_time['value'])
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
health-data-standards-3.6.1 lib/health-data-standards/import/cat1/procedure_performed_importer.rb
health-data-standards-3.5.3 lib/health-data-standards/import/cat1/procedure_performed_importer.rb
health-data-standards-3.5.2 lib/health-data-standards/import/cat1/procedure_performed_importer.rb
health-data-standards-3.5.1 lib/health-data-standards/import/cat1/procedure_performed_importer.rb
health-data-standards-3.5.0 lib/health-data-standards/import/cat1/procedure_performed_importer.rb
health-data-standards-3.4.6 lib/health-data-standards/import/cat1/procedure_performed_importer.rb