Sha256: deb20360268de7363da37727f0d58412fac7f8f109afb46fc76b6a37e9c2496f

Contents?: true

Size: 1.16 KB

Versions: 16

Compression:

Stored size: 1.16 KB

Contents

module HealthDataStandards
  module Import
    module C32
      class CareGoalImporter < CDA::SectionImporter

        def initialize(entry_finder=CDA::EntryFinder.new("//cda:section[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.124']/cda:entry/cda:*[cda:templateId/@root='2.16.840.1.113883.10.20.1.25']"))
          super(entry_finder)
        end
        
        def create_entry(goal_element, nrh = CDA::NarrativeReferenceHandler.new)
          importer = case goal_element.name
                       when "observation" then CDA::ResultImporter.new
                       when "supply" then CDA::MedicalEquipment.new
                       when "substanceAdministration" then CDA::MedicationImporter.new
                       when "encounter" then CDA::EncounterImporter.new
                       when "procedure" then CDA::ProcedureImporter.new
                       else CDA::SectionImporter.new(nil) #don't need entry xpath, since we already have the entry
                       end
            
          entry = importer.create_entry(goal_element, nrh)
          extract_reason_or_negation(goal_element, entry)

          entry
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
health-data-standards-4.3.5 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.3.4 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.3.3 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.3.2 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.3.1 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.3.0 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.2.0 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.1.0 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.0.6 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.0.5 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.0.4 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.0.3 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.0.2 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.0.1 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-4.0.0 lib/health-data-standards/import/c32/care_goal_importer.rb
health-data-standards-3.7.0 lib/health-data-standards/import/c32/care_goal_importer.rb