unityapi 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -5,6 +5,7 @@
5
5
  .yardoc
6
6
  Gemfile.lock
7
7
  InstalledFiles
8
+ gembuild.txt
8
9
  _yardoc
9
10
  coverage
10
11
  doc/
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
- Ruby wrapper for Allscripts Unity API
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(path_to_wsdl)
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], :vitals => rootobj[:getpatientactivityinfo3], :results => rootobj[:getpatientactivityinfo4],:orders => rootobj[:getpatientactivityinfo5],:procedures => rootobj[:getpatientactivityinfo6], :item_7 => rootobj[:getpatientactivityinfo7], :item_8 => rootobj[:getpatientactivityinfo8]}
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)
@@ -1,3 +1,3 @@
1
1
  module Unityapi
2
- VERSION = "0.0.8"
2
+ VERSION = "0.1.0"
3
3
  end
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.8
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-09-27 00:00:00.000000000 Z
12
+ date: 2012-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon