Sha256: 03c4c4fde666ca5ab5a95dd74f91ef4f6ffde4b7181dad9effff55041fe457af

Contents?: true

Size: 448 Bytes

Versions: 16

Compression:

Stored size: 448 Bytes

Contents

require 'rest_client'
require 'nokogiri'
module HealthDataStandards
  module Util
    class NLMHelper
      def self.validateNLMUser(nlmUrl, proxy, nlmLicenseCode, nlmUser, nlmPassword)
        RestClient.proxy = proxy
        nlmResult = RestClient.post nlmUrl, {user: nlmUser, password: nlmPassword, licenseCode: nlmLicenseCode}
        doc = Nokogiri::XML(nlmResult)
        return doc.search('Result').text == 'true'
      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/util/nlm_helper.rb
health-data-standards-4.3.4 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.3.3 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.3.2 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.3.1 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.3.0 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.2.0 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.1.0 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.0.6 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.0.5 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.0.4 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.0.3 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.0.2 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.0.1 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-4.0.0 lib/health-data-standards/util/nlm_helper.rb
health-data-standards-3.7.0 lib/health-data-standards/util/nlm_helper.rb