allscripts_unity_client 1.3.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +66 -66
- data/allscripts_unity_client.gemspec +32 -32
- data/lib/allscripts_unity_client/client.rb +215 -205
- data/lib/allscripts_unity_client/client_driver.rb +15 -42
- data/lib/allscripts_unity_client/client_options.rb +68 -0
- data/lib/allscripts_unity_client/json_client_driver.rb +46 -50
- data/lib/allscripts_unity_client/json_unity_request.rb +20 -20
- data/lib/allscripts_unity_client/json_unity_response.rb +1 -1
- data/lib/allscripts_unity_client/soap_client_driver.rb +29 -29
- data/lib/allscripts_unity_client/timezone.rb +15 -10
- data/lib/allscripts_unity_client/unity_request.rb +17 -17
- data/lib/allscripts_unity_client/unity_response.rb +3 -3
- data/lib/allscripts_unity_client/utilities.rb +5 -5
- data/lib/allscripts_unity_client/version.rb +1 -1
- data/lib/allscripts_unity_client.rb +21 -25
- data/spec/allscripts_unity_client_spec.rb +12 -16
- data/spec/client_driver_spec.rb +1 -49
- data/spec/client_options_spec.rb +134 -0
- data/spec/client_spec.rb +9 -9
- data/spec/factories/allscripts_unity_client_parameters_factory.rb +2 -2
- data/spec/factories/client_driver_factory.rb +4 -5
- data/spec/factories/client_factory.rb +2 -2
- data/spec/factories/client_options.rb +13 -0
- data/spec/factories/json_client_driver_factory.rb +1 -1
- data/spec/factories/json_unity_request_factory.rb +1 -1
- data/spec/factories/json_unity_response_factory.rb +1 -1
- data/spec/factories/magic_request_factory.rb +4 -4
- data/spec/factories/soap_client_driver_factory.rb +1 -1
- data/spec/factories/timezone_factory.rb +2 -2
- data/spec/factories/unity_request_factory.rb +3 -3
- data/spec/factories/unity_response_factory.rb +2 -2
- data/spec/json_client_driver_spec.rb +18 -86
- data/spec/json_unity_request_spec.rb +7 -7
- data/spec/json_unity_response_spec.rb +6 -6
- data/spec/soap_client_driver_spec.rb +20 -82
- data/spec/spec_helper.rb +5 -9
- data/spec/support/shared_examples_for_client_driver.rb +37 -58
- data/spec/support/shared_examples_for_unity_request.rb +13 -13
- data/spec/support/shared_examples_for_unity_response.rb +4 -4
- data/spec/timezone_spec.rb +31 -11
- data/spec/unity_request_spec.rb +7 -7
- data/spec/unity_response_spec.rb +4 -4
- data/spec/utilities_spec.rb +2 -2
- metadata +30 -57
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ecd96ba97fa670be830e0a85f10e577201e6363b
|
4
|
+
data.tar.gz: 87af8b8cbf7ebcea83ef5b0cf69d0ad67f3d2ab6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b0c13a8a52bca8a0ad7a26ca837f1d8820922dd952ac08ccba9a23c03331731f141757ebcd7a7489f322ece978f4742dc630728cf30e40c4ceaeb905bb5e6a9d
|
7
|
+
data.tar.gz: 83b22d9a877b32fe3014450e4ab4500baedd05b945a7f81367046d8823afd4b873cc0db14a615a79ede8a5767db92315c69b87308e9dda4e456e91b3b7f41586
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Allscripts Unity Client [![Build Status](https://travis-ci.org/healthfinch/allscripts-unity-client.png?branch=
|
1
|
+
# Allscripts Unity Client [![Build Status](https://travis-ci.org/healthfinch/allscripts-unity-client.png?branch=master)](https://travis-ci.org/healthfinch/allscripts-unity-client) [![Coverage Status](https://coveralls.io/repos/healthfinch/allscripts-unity-client/badge.png?branch=master)](https://coveralls.io/r/healthfinch/allscripts-unity-client?branch=master)
|
2
2
|
|
3
3
|
The `allscripts_unity_client` gem is a Ruby client for the Allscripts Unity API. See http://remotecentral.allscripts.com/UnityAPIReference for more documentation on the API.
|
4
4
|
|
@@ -25,10 +25,10 @@ A Unity API client can be created using the `AllscriptsUnityClient.create` facto
|
|
25
25
|
|
26
26
|
```ruby
|
27
27
|
unity_client = AllscriptsUnityClient.create({
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
31
|
-
:
|
28
|
+
base_unity_url: "http://unity.base.url",
|
29
|
+
appname: "appname",
|
30
|
+
username: "username",
|
31
|
+
password: "password"
|
32
32
|
})
|
33
33
|
```
|
34
34
|
|
@@ -37,11 +37,11 @@ A JSON client can also be created using the `:mode` option:
|
|
37
37
|
```ruby
|
38
38
|
# Mode defaults to :soap
|
39
39
|
unity_client = AllscriptsUnityClient.create({
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
40
|
+
mode: :json,
|
41
|
+
base_unity_url: "http://unity.base.url",
|
42
|
+
appname: "appname",
|
43
|
+
username: "username",
|
44
|
+
password: "password"
|
45
45
|
})
|
46
46
|
```
|
47
47
|
|
@@ -80,18 +80,18 @@ The endpoint used to make API calls in Unity is called Magic. Magic can be acces
|
|
80
80
|
|
81
81
|
```ruby
|
82
82
|
unity_client.magic({
|
83
|
-
:
|
84
|
-
:
|
85
|
-
:
|
86
|
-
:
|
87
|
-
:
|
88
|
-
:
|
89
|
-
:
|
90
|
-
:
|
91
|
-
:
|
92
|
-
:
|
93
|
-
:
|
94
|
-
:
|
83
|
+
action: "action",
|
84
|
+
userid: "userid",
|
85
|
+
appname: "appname", # Only use to override default. Default: unity_client.appname
|
86
|
+
patientid: "patientid",
|
87
|
+
token: "token", # Only use to override default. Default: unity_client.security_token
|
88
|
+
parameter1: "parameter1",
|
89
|
+
parameter2: "parameter2",
|
90
|
+
parameter3: "parameter3",
|
91
|
+
parameter4: "parameter4",
|
92
|
+
parameter5: "parameter5",
|
93
|
+
parameter6: "parameter6",
|
94
|
+
data: "data"
|
95
95
|
})
|
96
96
|
```
|
97
97
|
|
@@ -136,11 +136,11 @@ format. See [TZInfo](http://tzinfo.github.io/) for more information:
|
|
136
136
|
|
137
137
|
```ruby
|
138
138
|
unity_client = AllscriptsUnityClient.create({
|
139
|
-
:
|
140
|
-
:
|
141
|
-
:
|
142
|
-
:
|
143
|
-
:
|
139
|
+
timezone: "America/New_York",
|
140
|
+
base_unity_url: "http://unity.base.url",
|
141
|
+
appname: "appname",
|
142
|
+
username: "username",
|
143
|
+
password: "password"
|
144
144
|
})
|
145
145
|
```
|
146
146
|
|
@@ -153,23 +153,23 @@ By default Ruby's `Logger` is used and logs to `STDOUT` with a level of `Logger:
|
|
153
153
|
|
154
154
|
```ruby
|
155
155
|
unity_client = AllscriptsUnityClient.create({
|
156
|
-
:
|
157
|
-
:
|
158
|
-
:
|
159
|
-
:
|
160
|
-
:
|
156
|
+
base_unity_url: "http://unity.base.url",
|
157
|
+
appname: "appname",
|
158
|
+
username: "username",
|
159
|
+
password: "password",
|
160
|
+
logger: Rails.logger
|
161
161
|
})
|
162
162
|
```
|
163
163
|
|
164
|
-
Logging can
|
164
|
+
Logging can be disabled by setting the `:logger` option to nil (this is the default):
|
165
165
|
|
166
166
|
```ruby
|
167
167
|
unity_client = AllscriptsUnityClient.create({
|
168
|
-
:
|
169
|
-
:
|
170
|
-
:
|
171
|
-
:
|
172
|
-
:
|
168
|
+
base_unity_url: "http://unity.base.url",
|
169
|
+
appname: "appname",
|
170
|
+
username: "username",
|
171
|
+
password: "password",
|
172
|
+
logger: nil
|
173
173
|
})
|
174
174
|
```
|
175
175
|
|
@@ -181,11 +181,11 @@ An HTTP proxy can be configured using the `:proxy` option:
|
|
181
181
|
|
182
182
|
```ruby
|
183
183
|
unity_client = AllscriptsUnityClient.create({
|
184
|
-
:
|
185
|
-
:
|
186
|
-
:
|
187
|
-
:
|
188
|
-
:
|
184
|
+
base_unity_url: "http://unity.base.url",
|
185
|
+
appname: "appname",
|
186
|
+
username: "username",
|
187
|
+
password: "password",
|
188
|
+
proxy: "http://localhost:8888"
|
189
189
|
})
|
190
190
|
```
|
191
191
|
|
@@ -200,11 +200,11 @@ accept USA locale dates by default. There are currently no plans to support othe
|
|
200
200
|
|
201
201
|
```ruby
|
202
202
|
unity_client = AllscriptsUnityClient.create({
|
203
|
-
:
|
204
|
-
:
|
205
|
-
:
|
206
|
-
:
|
207
|
-
:
|
203
|
+
base_unity_url: "http://unity.base.url",
|
204
|
+
appname: "appname",
|
205
|
+
username: "username",
|
206
|
+
password: "password",
|
207
|
+
timezone: "America/New_York"
|
208
208
|
})
|
209
209
|
|
210
210
|
unity_client.get_security_token!
|
@@ -217,12 +217,12 @@ The above example would output the following `Hash`:
|
|
217
217
|
|
218
218
|
```
|
219
219
|
{
|
220
|
-
:
|
221
|
-
:
|
222
|
-
:
|
223
|
-
:
|
224
|
-
:
|
225
|
-
:
|
220
|
+
server_time_zone: "Eastern Standard Time",
|
221
|
+
server_time: #<DateTime: 2013-11-01T15:49:23+00:00 ((2456598j,56963s,0n),+0s,2299161j)>,
|
222
|
+
server_date_time_offset: #<DateTime: 2013-11-01T19:49:23+00:00 ((2456598j,71363s,0n),+0s,2299161j)>,
|
223
|
+
system: "Enterprise EHR",
|
224
|
+
product_version: "11.2.3.32.000",
|
225
|
+
uaibornondate: #<Date: 2013-07-10 ((2456484j,0s,0n),+0s,2299161j)>
|
226
226
|
}
|
227
227
|
```
|
228
228
|
|
@@ -230,12 +230,12 @@ The above example would output the following `Hash`:
|
|
230
230
|
|
231
231
|
```ruby
|
232
232
|
unity_client = AllscriptsUnityClient.create({
|
233
|
-
:
|
234
|
-
:
|
235
|
-
:
|
236
|
-
:
|
237
|
-
:
|
238
|
-
:
|
233
|
+
mode: :json
|
234
|
+
base_unity_url: "http://unity.base.url",
|
235
|
+
appname: "appname",
|
236
|
+
username: "username",
|
237
|
+
password: "password",
|
238
|
+
timezone: "America/New_York"
|
239
239
|
})
|
240
240
|
|
241
241
|
unity_client.get_security_token!
|
@@ -248,12 +248,12 @@ The above example would output the following `Hash`:
|
|
248
248
|
|
249
249
|
```
|
250
250
|
{
|
251
|
-
:
|
252
|
-
:
|
253
|
-
:
|
254
|
-
:
|
255
|
-
:
|
256
|
-
:
|
251
|
+
server_time_zone: "Eastern Standard Time",
|
252
|
+
server_time: #<DateTime: 2013-11-01T15:49:23+00:00 ((2456598j,56963s,0n),+0s,2299161j)>,
|
253
|
+
server_date_time_offset: #<DateTime: 2013-11-01T19:49:23+00:00 ((2456598j,71363s,0n),+0s,2299161j)>,
|
254
|
+
system: "Enterprise EHR",
|
255
|
+
product_version: "11.2.3.32.000",
|
256
|
+
uaibornondate: #<Date: 2013-07-10 ((2456484j,0s,0n),+0s,2299161j)>
|
257
257
|
}
|
258
258
|
```
|
259
259
|
|
@@ -1,40 +1,40 @@
|
|
1
1
|
lib = File.expand_path('../lib/', __FILE__)
|
2
2
|
$:.unshift lib unless $:.include?(lib)
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require 'allscripts_unity_client/version'
|
5
|
+
require 'date'
|
6
6
|
|
7
7
|
Gem::Specification.new do |gem|
|
8
|
-
gem.name =
|
8
|
+
gem.name = 'allscripts_unity_client'
|
9
9
|
gem.version = AllscriptsUnityClient::VERSION
|
10
10
|
gem.date = Date.today
|
11
|
-
gem.required_ruby_version =
|
12
|
-
gem.license =
|
13
|
-
gem.homepage =
|
14
|
-
|
15
|
-
gem.summary =
|
16
|
-
gem.description =
|
17
|
-
|
18
|
-
gem.authors = [
|
19
|
-
gem.email =
|
20
|
-
|
21
|
-
gem.require_paths = [
|
22
|
-
|
23
|
-
gem.files = `git ls-files`.split("\n")
|
24
|
-
|
25
|
-
gem.add_runtime_dependency
|
26
|
-
gem.add_runtime_dependency
|
27
|
-
gem.add_runtime_dependency
|
28
|
-
gem.add_runtime_dependency
|
29
|
-
gem.add_runtime_dependency
|
30
|
-
gem.add_runtime_dependency
|
31
|
-
gem.add_runtime_dependency
|
32
|
-
|
33
|
-
gem.add_development_dependency
|
34
|
-
gem.add_development_dependency
|
35
|
-
gem.add_development_dependency
|
36
|
-
gem.add_development_dependency
|
37
|
-
gem.add_development_dependency
|
38
|
-
gem.add_development_dependency
|
39
|
-
gem.add_development_dependency
|
11
|
+
gem.required_ruby_version = '> 1.9.3'
|
12
|
+
gem.license = 'MIT'
|
13
|
+
gem.homepage = 'https://github.com/healthfinch/allscripts-unity-client'
|
14
|
+
|
15
|
+
gem.summary = 'Allscripts Unity API client'
|
16
|
+
gem.description = 'Provides a simple interface to the Allscripts Unity API using JSON or SOAP. Developed at healthfinch, Inc. http://healthfinch.com'
|
17
|
+
|
18
|
+
gem.authors = ['Ash Gupta', 'Neil Goodman']
|
19
|
+
gem.email = %w(ash.gupta@healthfinch.com neil@healthfinch.com)
|
20
|
+
|
21
|
+
gem.require_paths = ['lib']
|
22
|
+
|
23
|
+
gem.files = `git ls-files`.split("\n").delete_if { |file| /^\.ruby-version$/.match(file) }
|
24
|
+
|
25
|
+
gem.add_runtime_dependency 'savon', '~> 2.3.0'
|
26
|
+
gem.add_runtime_dependency 'faraday', '~> 0.9.0'
|
27
|
+
gem.add_runtime_dependency 'em-http-request', '~> 1.1.2'
|
28
|
+
gem.add_runtime_dependency 'tzinfo', '~> 0.3.29'
|
29
|
+
gem.add_runtime_dependency 'nokogiri', '< 1.6', '>= 1.4.0'
|
30
|
+
gem.add_runtime_dependency 'nori', '~> 2.3.0'
|
31
|
+
gem.add_runtime_dependency 'american_date', '~> 1.1.0'
|
32
|
+
|
33
|
+
gem.add_development_dependency 'factory_girl', '~> 4.4.0'
|
34
|
+
gem.add_development_dependency 'rake', '~> 10.3.1'
|
35
|
+
gem.add_development_dependency 'faker', '~> 1.3.0'
|
36
|
+
gem.add_development_dependency 'rspec', '~> 3.0.0.beta2'
|
37
|
+
gem.add_development_dependency 'simplecov', '~> 0.8.2'
|
38
|
+
gem.add_development_dependency 'webmock', '~> 1.17.4'
|
39
|
+
gem.add_development_dependency 'coveralls', '~> 0.7.0'
|
40
40
|
end
|