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 render :json=> {:code=>'Failure', :msg=>"Problem getting data"}, :status=> 500, :layout => nil end end end