require 'kidney_exchange'

class KidneyExchangeController < ApplicationController
  acts_as_web_service  
  web_service_api :kidney_exchange
  wsdl_service_name 'KidneyExchange'

  def find(data, operation, altruistic_chain_length)	
    KidneyExchange::KidneyAllocator.new(KIDNEY_APP_CONFIG, KIDNEY_WEIGHT_CONFIG).find_xml(data, operation, 'lemon', altruistic_chain_length)
  end

  def find_nhsbt(data)
    KidneyExchange::KidneyAllocator.new(KIDNEY_APP_CONFIG, KIDNEY_WEIGHT_CONFIG).find_xml(data, 'optimal', 'lemon', 1)
  end
end
