module AthenaHealth module Endpoints module Encounters def find_encounter(practice_id:, encounter_id:) response = @api.call( endpoint: "#{practice_id}/chart/encounter/#{encounter_id}", method: :get ) Encounter.new(response.first) end def encounter_orders(practice_id:, encounter_id:) response = @api.call( endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/orders", method: :get ) orders_collection = [] response.each {|x| orders_collection << OrderCollection.new(x)} orders_collection end def encounter_order(practice_id:, encounter_id:, order_id:) response = @api.call( endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/orders/#{order_id}", method: :get ) Order.new(response) end end end end