unityapi 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +3 -9
- data/lib/unityapi/unity_client.rb +11 -4
- data/lib/unityapi/version.rb +1 -1
- metadata +2 -2
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -48,16 +48,10 @@ For a full list of supported calls please browse the source found in lib/unityap
|
|
48
48
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
49
49
|
4. Push to the branch (`git push origin my-new-feature`)
|
50
50
|
5. Create new Pull Request
|
51
|
-
=======
|
52
|
-
unityapi
|
53
|
-
========
|
54
51
|
|
55
|
-
|
52
|
+
## Additional Information
|
56
53
|
|
57
|
-
Maintainer
|
58
|
-
|
59
|
-
Ash Gupta (https://github.com/incomethax)
|
60
|
-
|
61
|
-
License
|
54
|
+
Maintainer(s): Ash Gupta (https://github.com/incomethax)
|
62
55
|
|
56
|
+
License:
|
63
57
|
MIT License. Copyright 2012 healthfinch, Inc. http://www.healthfinch.com
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Unityapi
|
2
2
|
class UnityClient
|
3
3
|
require 'savon'
|
4
|
-
attr_accessor :client, :security_token, :user, :pass, :app
|
5
|
-
def initialize(user, pass, app, path_to_wsdl)
|
4
|
+
attr_accessor :client, :security_token, :user, :pass, :app, :proxy
|
5
|
+
def initialize(user, pass, app, path_to_wsdl, proxy = nil)
|
6
6
|
@user = user
|
7
7
|
@pass = pass
|
8
8
|
@app = app
|
@@ -12,7 +12,12 @@ module Unityapi
|
|
12
12
|
config.pretty_print_xml = true
|
13
13
|
HTTPI.log = false
|
14
14
|
end
|
15
|
-
@client = Savon.client
|
15
|
+
@client = Savon.client do |wsdl, http|
|
16
|
+
wsdl.document = path_to_wsdl
|
17
|
+
if proxy
|
18
|
+
http.proxy = proxy
|
19
|
+
end
|
20
|
+
end
|
16
21
|
@security_token = get_security_token(user, pass)
|
17
22
|
end
|
18
23
|
|
@@ -197,7 +202,9 @@ module Unityapi
|
|
197
202
|
def get_patient_activity(user_id, patient_id)
|
198
203
|
response = magic_action("GetPatientActivity", user_id, patient_id)
|
199
204
|
rootobj = response.body[:magic_response][:magic_result][:diffgram][:getpatientactivityresponse]
|
200
|
-
return {:encounters => rootobj[:getpatientactivityinfo], :problems => rootobj[:getpatientactivityinfo2],
|
205
|
+
return {:encounters => rootobj[:getpatientactivityinfo], :problems => rootobj[:getpatientactivityinfo2],
|
206
|
+
:vitals => rootobj[:getpatientactivityinfo3], :results => rootobj[:getpatientactivityinfo4],
|
207
|
+
:orders => rootobj[:getpatientactivityinfo5], :procedures => rootobj[:getpatientactivityinfo6]}
|
201
208
|
end
|
202
209
|
|
203
210
|
def get_patient_by_mrn(user_id, mrn)
|
data/lib/unityapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unityapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|