Sha256: 851b5f8c94bad7aa732a8cadb30afb593b4a51c5667e3f8a378251b687b2c580

Contents?: true

Size: 601 Bytes

Versions: 7

Compression:

Stored size: 601 Bytes

Contents

module Roqua
  module Healthy
    class Client
      include ::Roqua::Logging

      attr_accessor :a19_endpoint

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

      def a19_endpoint
        @a19_endpoint || Roqua::Healthy.a19_endpoint
      end

      def fetch_a19(patient_id)
        eventlog.lifecycle('roqua.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
    end
  end
end

require_relative 'a19'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
roqua-healthy-1.1.6 lib/roqua/healthy/client.rb
roqua-healthy-1.1.5 lib/roqua/healthy/client.rb
roqua-healthy-1.1.4 lib/roqua/healthy/client.rb
roqua-healthy-1.1.3 lib/roqua/healthy/client.rb
roqua-healthy-1.1.2 lib/roqua/healthy/client.rb
roqua-healthy-1.1.1 lib/roqua/healthy/client.rb
roqua-healthy-1.1.0 lib/roqua/healthy/client.rb