Sha256: ab155740a644bb6cd8571d61a9e6ceea9b07f4c5c70dbdc0bd68c11d3b256d5e

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

module LifenFhir
  class Binary < Base

    attribute :uuid, String

    def fhir_payload
      {
        contentReference: {
          reference: reference
        }
      }
    end

    def download
      application_client.get("fhir/#{reference}", { accept: "application/pdf" })
    end

    private

      def application_client
        @application_client ||= AppAuthenticatedClient.new
      end

      def reference
        "Binary/#{uuid}"
      end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lifen_fhir-0.2.0 lib/lifen_fhir/binary.rb
lifen_fhir-0.1.1 lib/lifen_fhir/binary.rb