Sha256: 87111de6ab64499eb866b083f7c97d0f57b45d158501a8580d1a58a0ea9d927e

Contents?: true

Size: 686 Bytes

Versions: 63

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/feeds"
require "attr_extras"

module Renalware
  module Feeds
    module Files
      module PrimaryCarePhysicians
        class ImportCSV
          pattr_initialize :csv_path

          def call
            import_practices_csv_using_sql_function
          end

          private

          # See migration for SQL function definition
          def import_practices_csv_using_sql_function
            conn = ActiveRecord::Base.connection
            conn.execute(
              "SELECT renalware.import_gps_csv(#{conn.quote(csv_path.realpath.to_s)}::text)"
            )
          end
        end
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
renalware-core-2.0.78 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.77 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.76 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.75 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.74 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.73 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.72 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.71 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.70 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.69 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.68 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.67 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.64 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.63 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.62 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.61 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.60 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.58 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.57 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb
renalware-core-2.0.56 app/models/renalware/feeds/files/primary_care_physicians/import_csv.rb