module Medivo class LabsController < ActionController::Base def lab_data lab_data = Medivo::Lab.data_for_zip(params[:zip_code]) render :json=> lab_data, :layout => nil end def appointment_data data = Medivo::Appointment.find(params[:lab_code], params[:appointment_date]) render :json=> data, :layout => nil rescue => e render :json=> {:status=>'Error', :message=>"Problem getting data: #{e.message}"}, :status=> 500, :layout => nil end end end