Class: Roqua::Healthy::Client

Inherits:
Object
  • Object
show all
Includes:
Support::Instrumentation
Defined in:
lib/roqua/healthy/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



8
9
10
# File 'lib/roqua/healthy/client.rb', line 8

def initialize(options = {})
  @a19_endpoint = options[:a19_endpoint]
end

Instance Attribute Details

#a19_endpointObject

Returns the value of attribute a19_endpoint.



6
7
8
# File 'lib/roqua/healthy/client.rb', line 6

def a19_endpoint
  @a19_endpoint
end

Instance Method Details

#fetch_a19(patient_id) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/roqua/healthy/client.rb', line 16

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