Sha256: 5ee5996f333a9dac60cc0c68125d1aafd56fcd0550c8b8021dda9b44367e8970

Contents?: true

Size: 938 Bytes

Versions: 47

Compression:

Stored size: 938 Bytes

Contents

module HealthDataStandards
  module Import
    module CDA
      # Helpers for importing C32 addresses and telecoms
      module LocatableImportUtils
        def import_address(address_element)
          address = Address.new
          address.use = address_element['use']
          address.street = address_element.xpath("./cda:streetAddressLine").map {|street| street.text}
          address.city = address_element.at_xpath("./cda:city").try(:text)
          address.state = address_element.at_xpath("./cda:state").try(:text)
          address.zip = address_element.at_xpath("./cda:postalCode").try(:text)
          address.country = address_element.at_xpath("./cda:country").try(:text)
          address
        end

        def import_telecom(telecom_element)
          tele = Telecom.new
          tele.value = telecom_element['value']
          tele.use = telecom_element['use']
          tele
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
health-data-standards-4.3.5 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.3.4 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.3.3 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.3.2 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.3.1 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.3.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.2.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.1.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.0.6 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.0.5 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.0.4 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.0.3 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.0.2 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.0.1 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-4.0.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.7.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.6.1 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.5.3 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.5.2 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.5.1 lib/health-data-standards/import/cda/locatable_import_utils.rb