class Roqua::Healthy::Client

Attributes

a19_endpoint[R]
a19_password[R]
a19_username[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/roqua/healthy/client.rb, line 9
def initialize(options = {})
  @a19_endpoint = options[:a19_endpoint] || Roqua::Healthy.a19_endpoint
  @a19_username = options[:a19_username]
  @a19_password = options[:a19_password]
end

Public Instance Methods

fetch_a19(patient_id) click to toggle source
# File lib/roqua/healthy/client.rb, line 19
def fetch_a19(patient_id)
  with_instrumentation 'hl7.a19', patient_id: patient_id do
    message = A19::Fetcher.new(patient_id, self).fetch
    patient = A19::Transformer.new(message).to_patient
    patient
  end
end
use_basic_auth?() click to toggle source
# File lib/roqua/healthy/client.rb, line 15
def use_basic_auth?
  @a19_username.present? || @a19_password.present?
end