medivo 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/medivo/lab_appointment/handlers.coffee +2 -2
- data/app/assets/javascripts/medivo/lab_list/handlers.coffee +2 -0
- data/app/models/medivo/appointment.rb +2 -2
- data/lib/generators/medivo/templates/search.html.haml +5 -2
- data/lib/medivo/version.rb +1 -1
- data/spec/dummy/app/views/labs/search.html.haml +3 -0
- data/spec/models/appointment_spec.rb +3 -3
- metadata +19 -21
- data/spec/dummy/tmp/pids/server.pid +0 -1
@@ -23,7 +23,7 @@ $(document).ready ->
|
|
23
23
|
)
|
24
24
|
.bind('ajax:complete', (event, data)->
|
25
25
|
form = $(this)
|
26
|
-
form.find('.
|
26
|
+
form.find('.appointment_spinner_elem').hide()
|
27
27
|
)
|
28
28
|
.bind('ajax:error', (xhr, status, error)->
|
29
29
|
form = $(this)
|
@@ -47,7 +47,7 @@ $(document).ready ->
|
|
47
47
|
form.find('.error_message').append(span)
|
48
48
|
span.fadeOut(4000)
|
49
49
|
false
|
50
|
-
form.find('.
|
50
|
+
form.find('.appointment_spinner_elem').show()
|
51
51
|
|
52
52
|
# override this proc to do your own success handling
|
53
53
|
Appointment.SuccessHandler = (form, event, data) ->
|
@@ -9,6 +9,7 @@ $(document).ready ->
|
|
9
9
|
$('form#lab_data_search .error_message').append(span)
|
10
10
|
span.fadeOut(4000)
|
11
11
|
false
|
12
|
+
$('lab_search_spinner_elem').show()
|
12
13
|
)
|
13
14
|
.bind('ajax:success', (event, data)->
|
14
15
|
window.map_view.center_point = data.zip_location
|
@@ -18,6 +19,7 @@ $(document).ready ->
|
|
18
19
|
$('form#lab_data_search input[type=submit]').prop("disabled", false)
|
19
20
|
)
|
20
21
|
.bind('ajax:complete', (event, data)->
|
22
|
+
$('lab_search_spinner_elem').hide()
|
21
23
|
)
|
22
24
|
|
23
25
|
###### handle toggle to show more labs ########
|
@@ -31,9 +31,9 @@ module Medivo
|
|
31
31
|
# @param time_id time_id formatted to string in LABCORP_FORMAT
|
32
32
|
# @param user user info must include date_of_birth, first_name, last_name,
|
33
33
|
# email_address, phone_number
|
34
|
-
def make(lab_code,
|
34
|
+
def make(lab_code, time, user)
|
35
35
|
if real_data?
|
36
|
-
data = resource.post :params=>{:labcorp_id=>lab_code, :
|
36
|
+
data = resource.post :params=>{:labcorp_id=>lab_code, :time=>time, :user=>user}
|
37
37
|
JSON.parse(data)
|
38
38
|
else
|
39
39
|
{ confirmation: nil }
|
@@ -42,6 +42,9 @@
|
|
42
42
|
.error_message
|
43
43
|
|
44
44
|
= text_field_tag :zip_code, params[:zip_code]
|
45
|
+
.lab_search_spinner_elem{:style=>'display:none'}
|
46
|
+
%center
|
47
|
+
%img{ :src => "/assets/medivo/ajax_waiting.gif", :height => "20", :width => "20"}
|
45
48
|
%p
|
46
49
|
= submit_tag "Search", :id=> :find_labs, :class=>'button'
|
47
50
|
|
@@ -64,8 +67,8 @@ Search for appointment times
|
|
64
67
|
= form_tag(medivo.data_appointments_path, :method=>:get, :id=>'appointment_data_search', :remote=>true) do
|
65
68
|
%div
|
66
69
|
Enter a Date
|
67
|
-
.
|
68
|
-
%img
|
70
|
+
.appointment_spinner_elem{:style=>'display:none'}
|
71
|
+
%img{ :src => "/assets/medivo/ajax_waiting.gif", :height => "20", :width => "20"}
|
69
72
|
.error_message
|
70
73
|
|
71
74
|
= text_field_tag :date, (Date.today+3.days).strftime("%m/%d/%Y")
|
data/lib/medivo/version.rb
CHANGED
@@ -42,6 +42,9 @@
|
|
42
42
|
.error_message
|
43
43
|
|
44
44
|
= text_field_tag :zip_code, params[:zip_code]
|
45
|
+
.lab_search_spinner_elem{:style=>'display:none'}
|
46
|
+
%center
|
47
|
+
%img{ :src => "/assets/medivo/ajax_waiting.gif", :height => "20", :width => "20"}
|
45
48
|
%p
|
46
49
|
= submit_tag "Search", :id=> :find_labs, :class=>'button'
|
47
50
|
|
@@ -48,15 +48,15 @@ describe Medivo::Appointment do
|
|
48
48
|
describe "making appointments" do
|
49
49
|
|
50
50
|
describe "with valid data" do
|
51
|
-
let(:
|
51
|
+
let(:time) { Time.parse("2011-11-03 08:30 AM") }
|
52
52
|
let(:user) { {first_name: 'dude', last_name: 'man', date_of_birth: '12/28/1980',
|
53
53
|
email_address: 'dudeman@dude.com', phone_number: '4155551212'} }
|
54
54
|
let(:confirmation_code) { '123' }
|
55
55
|
|
56
56
|
it "returns appointment confirmation" do
|
57
57
|
body = {confirmation: confirmation_code}
|
58
|
-
stub_appointment_confirmation(lab_code,
|
59
|
-
Medivo::Appointment.make(lab_code,
|
58
|
+
stub_appointment_confirmation(lab_code, time, user, body, 200)
|
59
|
+
Medivo::Appointment.make(lab_code, time, user)['confirmation'].should == confirmation_code
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
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.2.
|
4
|
+
version: 0.2.9
|
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: &
|
17
|
+
requirement: &2166352460 !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: *
|
25
|
+
version_requirements: *2166352460
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: jquery-rails
|
28
|
-
requirement: &
|
28
|
+
requirement: &2166352040 !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: *
|
36
|
+
version_requirements: *2166352040
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: coffee-script
|
39
|
-
requirement: &
|
39
|
+
requirement: &2166351560 !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: *
|
47
|
+
version_requirements: *2166351560
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: haml-rails
|
50
|
-
requirement: &
|
50
|
+
requirement: &2166351140 !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: *
|
58
|
+
version_requirements: *2166351140
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: geocoder
|
61
|
-
requirement: &
|
61
|
+
requirement: &2166350720 !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: *
|
69
|
+
version_requirements: *2166350720
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rest-client
|
72
|
-
requirement: &
|
72
|
+
requirement: &2166350300 !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: *
|
80
|
+
version_requirements: *2166350300
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: pdfkit
|
83
|
-
requirement: &
|
83
|
+
requirement: &2166349880 !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: *
|
91
|
+
version_requirements: *2166349880
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: prawn
|
94
|
-
requirement: &
|
94
|
+
requirement: &2166349440 !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: *
|
102
|
+
version_requirements: *2166349440
|
103
103
|
description: Use the medivo platform to find lab locations, make labcorp appointments,
|
104
104
|
place lab orders
|
105
105
|
email:
|
@@ -269,7 +269,6 @@ files:
|
|
269
269
|
- spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4
|
270
270
|
- spec/dummy/tmp/cache/assets/E59/D50/sprockets%2Fbe1cc4d9b0efb617e58baa16dd1dee58
|
271
271
|
- spec/dummy/tmp/image_path_fb5f3a59200b_1320622886.pdf
|
272
|
-
- spec/dummy/tmp/pids/server.pid
|
273
272
|
- spec/fixtures/hl7/lc_hga1c_abnormal.hl7
|
274
273
|
- spec/fixtures/hl7/lc_hga1c_normal.hl7
|
275
274
|
- spec/fixtures/images/southeast.jpg
|
@@ -312,7 +311,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
312
311
|
version: '0'
|
313
312
|
segments:
|
314
313
|
- 0
|
315
|
-
hash:
|
314
|
+
hash: 1268188960065843641
|
316
315
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
317
316
|
none: false
|
318
317
|
requirements:
|
@@ -321,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
320
|
version: '0'
|
322
321
|
segments:
|
323
322
|
- 0
|
324
|
-
hash:
|
323
|
+
hash: 1268188960065843641
|
325
324
|
requirements: []
|
326
325
|
rubyforge_project:
|
327
326
|
rubygems_version: 1.6.2
|
@@ -429,7 +428,6 @@ test_files:
|
|
429
428
|
- spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4
|
430
429
|
- spec/dummy/tmp/cache/assets/E59/D50/sprockets%2Fbe1cc4d9b0efb617e58baa16dd1dee58
|
431
430
|
- spec/dummy/tmp/image_path_fb5f3a59200b_1320622886.pdf
|
432
|
-
- spec/dummy/tmp/pids/server.pid
|
433
431
|
- spec/fixtures/hl7/lc_hga1c_abnormal.hl7
|
434
432
|
- spec/fixtures/hl7/lc_hga1c_normal.hl7
|
435
433
|
- spec/fixtures/images/southeast.jpg
|
@@ -1 +0,0 @@
|
|
1
|
-
98443
|