Sha256: 110d27b3d4507534a87057e5c8428f0f3aa350fccf8c3dfa1b036bf6514fb74c

Contents?: true

Size: 1.47 KB

Versions: 27

Compression:

Stored size: 1.47 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

      def all_insurances(practice_id:, plan_name:, member_id:, state:, params: {})
        response = @api.call(
          endpoint: "#{practice_id}/insurancepackages",
          method: :get,
          params: params.merge!(
            insuranceplanname: plan_name,
            memberid: member_id,
            stateofcoverage: state
          )
        )

        AthenaHealth::InsuranceCollection.new(response)
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
athena_health-1.0.46 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.45 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.44 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.43 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.42 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.41 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.39 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.38 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.37 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.36 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.35 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.34 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.33 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.31 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.30 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.29 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.28 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.27 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.26 lib/athena_health/endpoints/configurations.rb
athena_health-1.0.25 lib/athena_health/endpoints/configurations.rb