app/controllers/medivo/labs_controller.rb in medivo-0.0.12 vs app/controllers/medivo/labs_controller.rb in medivo-0.0.13
- old
+ new
@@ -2,7 +2,17 @@
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 = if Rails.env.development?
+ "{\"times\":[\"11/03/2011|08:30 AM\",\"11/04/2011|08:30 AM\",\"11/02/2011|09:00 AM\",\"11/01/2011|09:30 AM\",\"11/02/2011|09:30 AM\",\"11/03/2011|09:30 AM\",\"11/04/2011|09:30 AM\",\"10/31/2011|10:00 AM\",\"11/01/2011|10:00 AM\",\"11/02/2011|10:00 AM\",\"11/03/2011|10:00 AM\",\"11/04/2011|10:00 AM\",\"11/05/2011|10:00 AM\",\"10/31/2011|10:30 AM\",\"11/01/2011|10:30 AM\",\"11/02/2011|10:30 AM\",\"11/03/2011|10:30 AM\",\"10/31/2011|11:00 AM\",\"11/01/2011|11:00 AM\",\"11/02/2011|11:00 AM\",\"11/03/2011|11:00 AM\",\"11/04/2011|11:00 AM\",\"11/05/2011|11:00 AM\",\"10/31/2011|01:30 PM\",\"11/01/2011|01:30 PM\",\"11/02/2011|01:30 PM\",\"11/03/2011|01:30 PM\",\"11/04/2011|01:30 PM\",\"10/31/2011|02:00 PM\",\"11/01/2011|02:00 PM\",\"11/02/2011|02:00 PM\",\"11/03/2011|02:00 PM\",\"10/31/2011|02:30 PM\",\"11/01/2011|02:30 PM\",\"11/02/2011|02:30 PM\",\"11/03/2011|02:30 PM\",\"11/04/2011|02:30 PM\",\"10/31/2011|03:00 PM\",\"11/01/2011|03:00 PM\",\"11/02/2011|03:00 PM\",\"11/03/2011|03:00 PM\",\"11/04/2011|03:00 PM\",\"10/31/2011|03:30 PM\",\"11/01/2011|03:30 PM\",\"11/02/2011|03:30 PM\",\"11/03/2011|03:30 PM\",\"11/04/2011|03:30 PM\",\"10/31/2011|04:00 PM\",\"11/01/2011|04:00 PM\",\"11/02/2011|04:00 PM\",\"11/03/2011|04:00 PM\",\"11/04/2011|04:00 PM\"]}"
+ else
+ Medivo::Appointment.find(params[:lab_code], params[:date])
+ end
+ render :json=> data, :layout => nil
+ end
end
end
+