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-3.5.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.4.6 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.4.5 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.4.4 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.4.3 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.4.2 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.4.1 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.4.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.12 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.3.0 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.11 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.10 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.8 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.7 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.6 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.5 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.4 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.3 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.2 lib/health-data-standards/import/cda/locatable_import_utils.rb
health-data-standards-3.2.1 lib/health-data-standards/import/cda/locatable_import_utils.rb