module AthenaHealth::Endpoints::Configurations

Public Instance Methods

all_allergies(practice_id:, search_value:) click to toggle source
# File lib/athena_health/endpoints/configurations.rb, line 24
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
all_facilities(practice_id:, department_id:, order_type:, params: {}) click to toggle source
# File lib/athena_health/endpoints/configurations.rb, line 4
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
all_gender_identities(practice_id:, show2015edcehrtvalues: nil, limit: nil, offset: nil) click to toggle source
# File lib/athena_health/endpoints/configurations.rb, line 58
def all_gender_identities(practice_id:, show2015edcehrtvalues: nil, limit: nil, offset: nil)
  params = {
    show2015edcehrtvalues: show2015edcehrtvalues, limit: limit, offset: offset
  }.reject { |_k, v| v.nil? }

  GenderIdentityFieldCollection.new(
    @api.call(
      endpoint: "#{practice_id}/configuration/patients/genderidentity",
      method: :get,
      params: params
    )
  )
end
all_insurances(practice_id:, plan_name:, member_id:, state:, params: {}) click to toggle source
# File lib/athena_health/endpoints/configurations.rb, line 34
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
all_medications(practice_id:, search_value:) click to toggle source
# File lib/athena_health/endpoints/configurations.rb, line 14
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
all_order_types(practice_id:, search_value:) click to toggle source
# File lib/athena_health/endpoints/configurations.rb, line 48
def all_order_types(practice_id:, search_value:)
  response = @api.call(
    endpoint: "#{practice_id}/reference/order/lab",
    method: :get,
    params: { searchvalue: search_value }
  )

  response.map { |ordertype| AthenaHealth::OrderType.new(ordertype) }
end
available_screening_questionaires(practice_id:, limit: nil, offset: nil) click to toggle source
# File lib/athena_health/endpoints/configurations.rb, line 72
def available_screening_questionaires(practice_id:, limit: nil, offset: nil)
  params = {
    limit: limit, offset: offset
  }.reject { |_k, v| v.nil? }

  AthenaHealth::ScreeningQuestionaire::ScreeningQuestionaireTemplateCollection.new(
    @api.call(
      endpoint: "#{practice_id}/chart/questionnairescreeners",
      method: :get,
      params: params
    )
  )
end