Sha256: 1d914c6f58262626ee394d1c9e2a1aa5351a728fae5acb1b24b3a751cd83ec81

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

module AthenaHealth
  module Endpoints
    module Configurations
      def all_facilities(practice_id:, department_id:, order_type:, params: {})
        response = @api.call(
          endpoint: "#{practice_id}/chart/configuration/facilities",
          method: :get,
          params: params.merge!(departmentid: department_id, ordertype: order_type)
        )

        response.map {|facility| AthenaHealth::Facility.new(facility) }
      end

      def all_medications(practice_id:, search_value:)
        response = @api.call(
          endpoint: "#{practice_id}/reference/medications",
          method: :get,
          params: { searchvalue: search_value }
        )

        response.map {|medication| AthenaHealth::Medication.new(medication) }
      end

      def all_allergies(practice_id:, search_value:)
        response = @api.call(
          endpoint: "#{practice_id}/reference/allergies",
          method: :get,
          params: { searchvalue: search_value }
        )

        response.map {|allergy| AthenaHealth::Allergy.new(allergy) }
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
athena_health-1.0.17 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.16 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.15 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.14 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.13 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.12 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.11 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.10 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.9 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.8 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.7 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.6 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.5 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.4 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.3 lib/athena_health/endpoints/configurations.rb