Sha256: d20451047101680bb6e20a8c0b01d64b79fa05ddfa485075ee548d427cc6a543

Contents?: true

Size: 925 Bytes

Versions: 40

Compression:

Stored size: 925 Bytes

Contents

module HealthDataStandards
  module Import
    module GreenC32
      class SupportImporter < SectionImporter
        include Singleton
        
        def import(support_doc)
          support_doc.root.add_namespace_definition('gc32', "urn:hl7-org:greencda:c32")
          support_element = support_doc.at_xpath("./gc32:support")
          support = Support.new(type: support_element.at_xpath("./gc32:type").try(:content),
                                relationship: support_element.at_xpath("./gc32:relationship").try(:text))
          extract_name(support_element, support)
          support.address = extract_address(support_element.at_xpath("./gc32:address"))
          support.telecom = extract_telecom(support_element.at_xpath("./gc32:telecom"))
          support.mothers_maiden_name = support_element.at_xpath("./gc32:mothersMaidenName").try(:text)
          support
        end
        
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
health-data-standards-3.2.3 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.2.2 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.2.1 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.2.0 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.1.1 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.1.0 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.0.6 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.0.5 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.0.4 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-3.0.3 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.2.1 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.2.0 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.1.4 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.1.3 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.1.2 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.1.1 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.1.0 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-2.0.0 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-1.0.1 lib/health-data-standards/import/green_c32/support_importer.rb
health-data-standards-1.0.0 lib/health-data-standards/import/green_c32/support_importer.rb