medivo 0.1.23 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,17 +1,21 @@
1
1
  module Medivo
2
2
  class LabsController < ActionController::Base
3
+ layout false
4
+
3
5
  def lab_data
4
6
  lab_data = Medivo::Lab.data_for_zip(params[:zip_code])
5
- render :json=> lab_data, :layout => nil
7
+ render :json=> lab_data
6
8
  end
7
9
 
8
10
  def appointment_data
9
- data = Medivo::Appointment.find(params[:lab_code], params[:appointment_date])
10
- render :json=> data, :layout => nil
11
- rescue => e
12
- render :json=> {:status=>'Error', :message=>"Problem getting data: #{e.message}"},
13
- :status=> 500,
14
- :layout => nil
11
+ data = Medivo::Appointment.find(params[:lab_code], params[:appointment_date], params[:am_pm])
12
+ render :json=> data
13
+ rescue RestClient::RequestTimeout, RestClient::InternalServerError => te
14
+ render :status=> te.http_code, :json=> {:message=>"Could be lab_code is wrong, or labcorp server is down"}
15
+ rescue RestClient::Exception => br
16
+ render :status=> br.http_code, :json=> {:message=>br.response}
17
+ rescue Exception => e
18
+ render :status=> 500, :json=> {:message=>e.message}
15
19
  end
16
20
  end
17
21
  end
@@ -1,6 +1,5 @@
1
1
  module Medivo
2
- module OrdersControllerHelpers
3
- p self
2
+ module OrdersController
4
3
  protected
5
4
 
6
5
  def set_pdf_headers
@@ -3,9 +3,10 @@ require 'restclient'
3
3
  module Medivo
4
4
  class Appointment
5
5
 
6
- def self.find(lab_code, date)
6
+ def self.find(lab_code, date, am_pm=nil)
7
7
  if real_data?
8
- resource.get :params=>{:labcorp_id=>lab_code, :appointment_date=>date}
8
+ json = resource.get :params=>{:labcorp_id=>lab_code, :appointment_date=>date}
9
+ JSON.parse(json)
9
10
  else
10
11
  build_fake_data(date)
11
12
  end
@@ -17,7 +18,8 @@ module Medivo
17
18
  @config = ResourceConfig.find 'appointment_resource.yml'
18
19
  RestClient::Resource.new @config.href, :timeout => (@config.timeout || 12)
19
20
  rescue => e
20
- p e
21
+ Rails.logger.error e.inspect
22
+ # blow up later, so the server can start
21
23
  end
22
24
  end
23
25
 
@@ -1,3 +1,3 @@
1
1
  module Medivo
2
- VERSION = "0.1.23 "
2
+ VERSION = "0.1.24 "
3
3
  end
@@ -11,10 +11,10 @@ module Medivo
11
11
  end
12
12
 
13
13
  ##
14
- # file_path String path to pdf file with variable fields
15
- # variables Hash the hash of variables to fill in
14
+ # @param file_path [String] path to pdf file with variable fields
15
+ # @param variables [Hash] the hash of variables to fill in
16
16
  #
17
- # return pdf File
17
+ # @return [File] the pdf file
18
18
  #
19
19
  def self.variable_fields(file_path, variables)
20
20
  raise "variables #{variables} should be a hash" unless variables.is_a? Hash
@@ -26,16 +26,16 @@ module Medivo
26
26
  end
27
27
 
28
28
  ##
29
- # file_path String path to pdf file with variable fields
30
- # variables Hash the hash of variables to fill in
31
- # image_data Array of image info like:
32
- # [ {:path=>'/absolute/path/to/image1.jpg', :options=>{ :at=>[x_pos, y_pos]} },
29
+ # @param file_path [String] path to pdf file with variable fields
30
+ # @param variables [Hash] the hash of variables to fill in
31
+ # @param image_data [Array] of image info like:
32
+ # [ {:path=>'/absolute/path/to/image1.jpg', :options=>{ :at=>[x_pos, y_pos]} },
33
33
  # {:path=>'/absolute/path/to/image2.jpg', :options=>{ :at=>[20, 800], :width=>20, :height=>40} }
34
- # ]
34
+ # ]
35
35
  #
36
- # return pdf File
36
+ # @return [File] pdf
37
37
  #
38
- # NOTE: need to create tmp dir in home directory for temporary image files
38
+ # NOTE: you need to create tmp dir in home directory for temporary image files
39
39
  #
40
40
  def self.variable_fields_with_images(file_path, variables, image_data=[])
41
41
  content_pdf = variable_fields(file_path, variables)
@@ -1,5 +1,5 @@
1
1
  class OrdersController < ActionController::Base
2
- include Medivo::OrdersControllerHelpers
2
+ include Medivo::OrdersController
3
3
 
4
4
  before_filter :set_pdf_headers, :get_lab_order, :only=>[:download_requisition,:download_result]
5
5
 
@@ -3832,3 +3832,382 @@ Served asset /medivo/markerC.png - 304 Not Modified (0ms)
3832
3832
 
3833
3833
  Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-11-06 12:35:50 -0500
3834
3834
  Served asset /medivo/arrow.png - 304 Not Modified (0ms)
3835
+
3836
+
3837
+ Started GET "/labs/appointment_data" for 127.0.0.1 at 2011-11-09 10:40:39 -0500
3838
+
3839
+ ActionController::RoutingError (No route matches [GET] "/labs/appointment_data"):
3840
+
3841
+
3842
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.6ms)
3843
+
3844
+
3845
+ Started GET "/medivo/labs/appointment_data" for 127.0.0.1 at 2011-11-09 10:41:22 -0500
3846
+ Processing by Medivo::LabsController#appointment_data as */*
3847
+ Completed 500 Internal Server Error in 662ms
3848
+
3849
+ ArgumentError (wrong number of arguments (3 for 2)):
3850
+
3851
+
3852
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms)
3853
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3854
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (4.7ms)
3855
+
3856
+
3857
+ Started GET "/medivo/labs/appointment_data" for 127.0.0.1 at 2011-11-09 10:41:50 -0500
3858
+ Processing by Medivo::LabsController#appointment_data as */*
3859
+ Completed 500 Internal Server Error in 169ms
3860
+
3861
+ RestClient::BadRequest (400 Bad Request):
3862
+
3863
+
3864
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
3865
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3866
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.1ms)
3867
+
3868
+
3869
+ Started GET "/medivo/labs/appointment_data" for 127.0.0.1 at 2011-11-09 10:44:12 -0500
3870
+ Processing by Medivo::LabsController#appointment_data as */*
3871
+ Completed 500 Internal Server Error in 132ms
3872
+
3873
+ RestClient::BadRequest (400 Bad Request):
3874
+
3875
+
3876
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
3877
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3878
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.1ms)
3879
+
3880
+
3881
+ Started GET "/medivo/labs/appointment_data?labcorp_id=2" for 127.0.0.1 at 2011-11-09 10:44:25 -0500
3882
+ Processing by Medivo::LabsController#appointment_data as */*
3883
+ Parameters: {"labcorp_id"=>"2"}
3884
+ Completed 500 Internal Server Error in 118ms
3885
+
3886
+ RestClient::BadRequest (400 Bad Request):
3887
+
3888
+
3889
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
3890
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
3891
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.2ms)
3892
+
3893
+
3894
+ Started GET "/medivo/labs/appointment_data?labcorp_id=2" for 127.0.0.1 at 2011-11-09 10:44:44 -0500
3895
+ Processing by Medivo::LabsController#appointment_data as */*
3896
+ Parameters: {"labcorp_id"=>"2"}
3897
+ Completed 500 Internal Server Error in 124ms
3898
+
3899
+ RestClient::BadRequest (400 Bad Request):
3900
+
3901
+
3902
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
3903
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3904
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.1ms)
3905
+
3906
+
3907
+ Started GET "/medivo/labs/appointment_data?labcorp_id=2" for 127.0.0.1 at 2011-11-09 10:45:23 -0500
3908
+ Processing by Medivo::LabsController#appointment_data as */*
3909
+ Parameters: {"labcorp_id"=>"2"}
3910
+ Completed 500 Internal Server Error in 133ms
3911
+
3912
+ RestClient::BadRequest (400 Bad Request):
3913
+
3914
+
3915
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
3916
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3917
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.2ms)
3918
+
3919
+
3920
+ Started GET "/medivo/labs/appointment_data?labcorp_id=2" for 127.0.0.1 at 2011-11-09 10:45:46 -0500
3921
+ Processing by Medivo::LabsController#appointment_data as */*
3922
+ Parameters: {"labcorp_id"=>"2"}
3923
+ Completed 500 Internal Server Error in 136ms
3924
+
3925
+ RestClient::BadRequest (400 Bad Request):
3926
+
3927
+
3928
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.8ms)
3929
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3930
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.1ms)
3931
+
3932
+
3933
+ Started GET "/medivo/labs/appointment_data?labcor_id=2" for 127.0.0.1 at 2011-11-09 10:45:56 -0500
3934
+ Processing by Medivo::LabsController#appointment_data as */*
3935
+ Parameters: {"labcor_id"=>"2"}
3936
+ Completed 500 Internal Server Error in 117ms
3937
+
3938
+ RestClient::BadRequest (400 Bad Request):
3939
+
3940
+
3941
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
3942
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
3943
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.3ms)
3944
+
3945
+
3946
+ Started GET "/medivo/labs/appointment_data?labcor_id=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 10:46:09 -0500
3947
+ Processing by Medivo::LabsController#appointment_data as */*
3948
+ Parameters: {"labcor_id"=>"2", "appointment_date"=>"123"}
3949
+ Completed 500 Internal Server Error in 117ms
3950
+
3951
+ RestClient::BadRequest (400 Bad Request):
3952
+
3953
+
3954
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.8ms)
3955
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3956
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (2.9ms)
3957
+
3958
+
3959
+ Started GET "/medivo/labs/appointment_data?labcorp_id=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 10:46:15 -0500
3960
+ Processing by Medivo::LabsController#appointment_data as */*
3961
+ Parameters: {"labcorp_id"=>"2", "appointment_date"=>"123"}
3962
+ Completed 500 Internal Server Error in 142ms
3963
+
3964
+ RestClient::BadRequest (400 Bad Request):
3965
+
3966
+
3967
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
3968
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
3969
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.2ms)
3970
+
3971
+
3972
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 10:47:55 -0500
3973
+ Processing by Medivo::LabsController#appointment_data as */*
3974
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
3975
+ Completed 500 Internal Server Error in 768ms
3976
+
3977
+ RestClient::BadRequest (400 Bad Request):
3978
+
3979
+
3980
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.4ms)
3981
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
3982
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (4.1ms)
3983
+
3984
+
3985
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 10:59:11 -0500
3986
+ Processing by Medivo::LabsController#appointment_data as */*
3987
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
3988
+ Completed 200 OK in 771ms (Views: 0.1ms)
3989
+
3990
+
3991
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:01:08 -0500
3992
+ Processing by Medivo::LabsController#appointment_data as */*
3993
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
3994
+ Completed 500 Internal Server Error in 780ms (Views: 0.3ms)
3995
+
3996
+
3997
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:01:56 -0500
3998
+ Processing by Medivo::LabsController#appointment_data as */*
3999
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4000
+ Completed 200 OK in 113ms (Views: 0.1ms)
4001
+
4002
+
4003
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:02:08 -0500
4004
+ Processing by Medivo::LabsController#appointment_data as */*
4005
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4006
+ Completed 200 OK in 123ms (Views: 0.1ms)
4007
+
4008
+
4009
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:02:27 -0500
4010
+ Processing by Medivo::LabsController#appointment_data as */*
4011
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4012
+ Completed 500 Internal Server Error in 124ms (Views: 0.2ms)
4013
+
4014
+
4015
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:02:52 -0500
4016
+ Processing by Medivo::LabsController#appointment_data as */*
4017
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4018
+ Completed 200 OK in 135ms (Views: 0.8ms)
4019
+
4020
+
4021
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:03:01 -0500
4022
+ Processing by Medivo::LabsController#appointment_data as */*
4023
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4024
+ Completed 200 OK in 117ms (Views: 0.1ms)
4025
+
4026
+
4027
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:03:23 -0500
4028
+ Processing by Medivo::LabsController#appointment_data as */*
4029
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4030
+ Completed 500 Internal Server Error in 130ms (Views: 0.2ms)
4031
+
4032
+
4033
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:04:01 -0500
4034
+ Processing by Medivo::LabsController#appointment_data as */*
4035
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4036
+ Completed 200 OK in 125ms (Views: 0.1ms)
4037
+
4038
+
4039
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:06:02 -0500
4040
+ Processing by Medivo::LabsController#appointment_data as */*
4041
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4042
+ Completed 500 Internal Server Error in 1ms
4043
+
4044
+ SyntaxError (/Users/danielsudol/projects/medivo/medivo_resource/app/models/medivo/appointment.rb:15: syntax error, unexpected ',', expecting tASSOC
4045
+ {e.http_code, e.response}
4046
+ ^
4047
+ /Users/danielsudol/projects/medivo/medivo_resource/app/models/medivo/appointment.rb:15: syntax error, unexpected '}', expecting keyword_end
4048
+ /Users/danielsudol/projects/medivo/medivo_resource/app/models/medivo/appointment.rb:41: syntax error, unexpected $end, expecting keyword_end):
4049
+
4050
+
4051
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
4052
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
4053
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.6ms)
4054
+
4055
+
4056
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:06:12 -0500
4057
+ Processing by Medivo::LabsController#appointment_data as */*
4058
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4059
+ Completed 200 OK in 123ms (Views: 0.3ms)
4060
+
4061
+
4062
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:09:18 -0500
4063
+ Processing by Medivo::LabsController#appointment_data as */*
4064
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4065
+ Completed 400 Bad Request in 132ms (Views: 0.2ms)
4066
+
4067
+
4068
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:09:33 -0500
4069
+ Processing by Medivo::LabsController#appointment_data as */*
4070
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4071
+ Completed 400 Bad Request in 120ms (Views: 0.2ms)
4072
+
4073
+
4074
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:09:55 -0500
4075
+ Processing by Medivo::LabsController#appointment_data as */*
4076
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4077
+ Completed 400 Bad Request in 142ms (Views: 0.2ms)
4078
+
4079
+
4080
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:10:24 -0500
4081
+ Processing by Medivo::LabsController#appointment_data as */*
4082
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4083
+ Completed 400 Bad Request in 124ms (Views: 0.3ms)
4084
+
4085
+
4086
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:10:47 -0500
4087
+ Processing by Medivo::LabsController#appointment_data as */*
4088
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4089
+ Completed 400 Bad Request in 125ms (Views: 0.2ms)
4090
+
4091
+
4092
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:11:03 -0500
4093
+ Processing by Medivo::LabsController#appointment_data as */*
4094
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4095
+ Completed 400 Bad Request in 115ms (Views: 0.2ms)
4096
+
4097
+
4098
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:11:19 -0500
4099
+ Processing by Medivo::LabsController#appointment_data as */*
4100
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4101
+ Completed 500 Internal Server Error in 130ms
4102
+
4103
+ NoMethodError (undefined method `to_array' for "[:error, \"Appointment_date must be in %m/%d/%Y date format\"]":String):
4104
+
4105
+
4106
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
4107
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
4108
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.2ms)
4109
+
4110
+
4111
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:17:00 -0500
4112
+ Processing by Medivo::LabsController#appointment_data as */*
4113
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4114
+ Completed 500 Internal Server Error in 144ms
4115
+
4116
+ NoMethodError (undefined method `to_array' for "Appointment_date must be in %m/%d/%Y date format":String):
4117
+
4118
+
4119
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
4120
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
4121
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.2ms)
4122
+
4123
+
4124
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=123" for 127.0.0.1 at 2011-11-09 11:17:17 -0500
4125
+ Processing by Medivo::LabsController#appointment_data as */*
4126
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"123"}
4127
+ Completed 400 Bad Request in 120ms (Views: 0.3ms)
4128
+
4129
+
4130
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:17:57 -0500
4131
+ Processing by Medivo::LabsController#appointment_data as */*
4132
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4133
+ Completed 500 Internal Server Error in 9847ms (Views: 0.3ms)
4134
+
4135
+
4136
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:18:36 -0500
4137
+ Processing by Medivo::LabsController#appointment_data as */*
4138
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4139
+ Completed 500 Internal Server Error in 8595ms (Views: 0.2ms)
4140
+
4141
+
4142
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:19:18 -0500
4143
+ Processing by Medivo::LabsController#appointment_data as */*
4144
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4145
+ Completed 500 Internal Server Error in 9756ms
4146
+
4147
+ NoMethodError (undefined method `pp' for #<Medivo::LabsController:0x00000100f6dca8>):
4148
+
4149
+
4150
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
4151
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
4152
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.2ms)
4153
+
4154
+
4155
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:19:36 -0500
4156
+ Processing by Medivo::LabsController#appointment_data as */*
4157
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4158
+ Completed 500 Internal Server Error in 9759ms (Views: 0.2ms)
4159
+
4160
+
4161
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:20:59 -0500
4162
+ Processing by Medivo::LabsController#appointment_data as */*
4163
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4164
+ Completed 500 Internal Server Error in 9822ms (Views: 0.3ms)
4165
+
4166
+
4167
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:21:34 -0500
4168
+ Processing by Medivo::LabsController#appointment_data as */*
4169
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4170
+ Completed 500 Internal Server Error in 12064ms (Views: 0.2ms)
4171
+
4172
+
4173
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:27:36 -0500
4174
+ Processing by Medivo::LabsController#appointment_data as */*
4175
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4176
+ Completed 500 Internal Server Error in 10436ms (Views: 0.4ms)
4177
+
4178
+
4179
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:30:18 -0500
4180
+ Processing by Medivo::LabsController#appointment_data as */*
4181
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4182
+ Completed 500 Internal Server Error in 9853ms
4183
+
4184
+ NameError (uninitialized constant RestClient::Timeout):
4185
+
4186
+
4187
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
4188
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
4189
+ Rendered /Users/danielsudol/.rvm/gems/ruby-1.9.2-p290@medivo_resource/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.1ms)
4190
+
4191
+
4192
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:31:12 -0500
4193
+ Processing by Medivo::LabsController#appointment_data as */*
4194
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4195
+ Completed 500 Internal Server Error in 9662ms (Views: 0.3ms)
4196
+
4197
+
4198
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:32:13 -0500
4199
+ Processing by Medivo::LabsController#appointment_data as */*
4200
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4201
+ Completed 500 Internal Server Error in 9387ms (Views: 0.2ms)
4202
+
4203
+
4204
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:33:13 -0500
4205
+ Processing by Medivo::LabsController#appointment_data as */*
4206
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4207
+ Completed 500 Internal Server Error in 9547ms (Views: 0.2ms)
4208
+
4209
+
4210
+ Started GET "/medivo/labs/appointment_data?lab_code=2&appointment_date=11/10/2011" for 127.0.0.1 at 2011-11-09 11:35:54 -0500
4211
+ Processing by Medivo::LabsController#appointment_data as */*
4212
+ Parameters: {"lab_code"=>"2", "appointment_date"=>"11/10/2011"}
4213
+ Completed 500 Internal Server Error in 10232ms (Views: 0.3ms)
@@ -952,3 +952,42 @@ Completed 200 OK in 940ms (Views: 109.2ms)
952
952
  Processing by OrdersController#download_result as HTML
953
953
  Sent data unitedhealthcare_result.pdf (3.1ms)
954
954
  Completed 200 OK in 698ms (Views: 2.2ms)
955
+ Processing by OrdersController#download_requisition as HTML
956
+ Rendered text template (0.0ms)
957
+ Sent data unitedhealthcare_requisition.pdf (72.0ms)
958
+ Completed 200 OK in 926ms (Views: 71.5ms)
959
+ Processing by OrdersController#download_result as HTML
960
+ Sent data unitedhealthcare_result.pdf (2.0ms)
961
+ Completed 200 OK in 696ms (Views: 1.2ms)
962
+
963
+
964
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-11-09 10:17:18 -0500
965
+ Processing by Medivo::LabsController#lab_data as HTML
966
+ Parameters: {"zip_code"=>"90210"}
967
+ Completed 200 OK in 636ms (Views: 1.0ms)
968
+
969
+
970
+ Started GET "/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-11-09 10:17:21 -0500
971
+ Processing by LabsController#lab_search as HTML
972
+ Parameters: {"zip_code"=>"90210"}
973
+ Completed 200 OK in 213ms (Views: 35.8ms)
974
+
975
+
976
+ Started GET "/assets/application.css" for 127.0.0.1 at 2011-11-09 10:17:21 -0500
977
+ Served asset /application.css - 200 OK (4ms)
978
+
979
+
980
+ Started GET "/assets/application.js" for 127.0.0.1 at 2011-11-09 10:17:21 -0500
981
+ Served asset /application.js - 200 OK (68ms)
982
+
983
+
984
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-11-09 10:17:22 -0500
985
+ Served asset /medivo/markerA.png - 200 OK (1ms)
986
+
987
+
988
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-11-09 10:17:22 -0500
989
+ Served asset /medivo/markerB.png - 200 OK (1ms)
990
+
991
+
992
+ Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-11-09 10:17:22 -0500
993
+ Served asset /medivo/arrow.png - 200 OK (2ms)
@@ -0,0 +1 @@
1
+ 9674
@@ -17,7 +17,7 @@ describe Medivo::FdfGenerator do
17
17
  end
18
18
 
19
19
  it "fill in pdf form" do
20
- pdf_path = medivo_fixture_path "negative_results.pdf"
20
+ pdf_path = medivo_fixture_path "hepc_negative_results.pdf"
21
21
  pdf_output = `pdftk #{pdf_path} fill_form #{@fdf.path} output - flatten`
22
22
  text = pdf_stream_to_text(pdf_output)
23
23
  @fields.each do |key,value|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: medivo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &2170464640 !ruby/object:Gem::Requirement
17
+ requirement: &2169801500 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.1.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2170464640
25
+ version_requirements: *2169801500
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: jquery-rails
28
- requirement: &2170464140 !ruby/object:Gem::Requirement
28
+ requirement: &2169801080 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2170464140
36
+ version_requirements: *2169801080
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: coffee-script
39
- requirement: &2170463660 !ruby/object:Gem::Requirement
39
+ requirement: &2169800620 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2170463660
47
+ version_requirements: *2169800620
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: haml-rails
50
- requirement: &2170463240 !ruby/object:Gem::Requirement
50
+ requirement: &2169800180 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2170463240
58
+ version_requirements: *2169800180
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: geocoder
61
- requirement: &2170462820 !ruby/object:Gem::Requirement
61
+ requirement: &2169799760 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *2170462820
69
+ version_requirements: *2169799760
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rest-client
72
- requirement: &2170462380 !ruby/object:Gem::Requirement
72
+ requirement: &2169799340 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *2170462380
80
+ version_requirements: *2169799340
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: pdfkit
83
- requirement: &2170461960 !ruby/object:Gem::Requirement
83
+ requirement: &2169798920 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *2170461960
91
+ version_requirements: *2169798920
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: prawn
94
- requirement: &2170461540 !ruby/object:Gem::Requirement
94
+ requirement: &2169798500 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,7 +99,7 @@ dependencies:
99
99
  version: '0'
100
100
  type: :runtime
101
101
  prerelease: false
102
- version_requirements: *2170461540
102
+ version_requirements: *2169798500
103
103
  description: Use the medivo platform to find lab locations, make labcorp appointments,
104
104
  place lab orders
105
105
  email:
@@ -139,7 +139,7 @@ files:
139
139
  - app/assets/stylesheets/medivo/application.css
140
140
  - app/controllers/medivo/application_controller.rb
141
141
  - app/controllers/medivo/labs_controller.rb
142
- - app/controllers/medivo/orders_controller_helpers.rb
142
+ - app/controllers/medivo/orders_controller.rb
143
143
  - app/models/medivo/appointment.rb
144
144
  - app/models/medivo/insurance_order.rb
145
145
  - app/models/medivo/lab.rb
@@ -262,6 +262,7 @@ files:
262
262
  - spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4
263
263
  - spec/dummy/tmp/cache/assets/E59/D50/sprockets%2Fbe1cc4d9b0efb617e58baa16dd1dee58
264
264
  - spec/dummy/tmp/image_path_fb5f3a59200b_1320622886.pdf
265
+ - spec/dummy/tmp/pids/server.pid
265
266
  - spec/fixtures/hepc_negative_results.pdf
266
267
  - spec/fixtures/hepc_result_faq.pdf
267
268
  - spec/fixtures/lc_order_with_normal_results.xml
@@ -299,7 +300,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
300
  version: '0'
300
301
  segments:
301
302
  - 0
302
- hash: 308755030467878558
303
+ hash: -800371975511940167
303
304
  required_rubygems_version: !ruby/object:Gem::Requirement
304
305
  none: false
305
306
  requirements:
@@ -308,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
308
309
  version: '0'
309
310
  segments:
310
311
  - 0
311
- hash: 308755030467878558
312
+ hash: -800371975511940167
312
313
  requirements: []
313
314
  rubyforge_project:
314
315
  rubygems_version: 1.6.2
@@ -411,6 +412,7 @@ test_files:
411
412
  - spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4
412
413
  - spec/dummy/tmp/cache/assets/E59/D50/sprockets%2Fbe1cc4d9b0efb617e58baa16dd1dee58
413
414
  - spec/dummy/tmp/image_path_fb5f3a59200b_1320622886.pdf
415
+ - spec/dummy/tmp/pids/server.pid
414
416
  - spec/fixtures/hepc_negative_results.pdf
415
417
  - spec/fixtures/hepc_result_faq.pdf
416
418
  - spec/fixtures/lc_order_with_normal_results.xml