pokitdok-ruby 0.7.1 → 0.7.2

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.
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: pokitdok-ruby 0.7.1 ruby lib
5
+ # stub: pokitdok-ruby 0.7.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pokitdok-ruby"
9
- s.version = "0.7.1"
9
+ s.version = "0.7.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["John Riney"]
14
- s.date = "2014-10-22"
14
+ s.date = "2015-05-22"
15
15
  s.description = "Gem for easy access to the PokitDok Platform APIs."
16
16
  s.email = "john.riney@pokitdok.com"
17
17
  s.extra_rdoc_files = [
@@ -54,12 +54,14 @@ Gem::Specification.new do |s|
54
54
  "vcr_cassettes/plans_no_args.yml",
55
55
  "vcr_cassettes/providers.yml",
56
56
  "vcr_cassettes/referrals.yml",
57
+ "vcr_cassettes/scheduling.yml",
58
+ "vcr_cassettes/scheduling_scoped.yml",
57
59
  "vcr_cassettes/trading_partners_get.yml",
58
60
  "vcr_cassettes/trading_partners_index.yml"
59
61
  ]
60
62
  s.homepage = "http://github.com/pokitdok/pokitdok-ruby"
61
63
  s.licenses = ["MIT"]
62
- s.rubygems_version = "2.2.2"
64
+ s.rubygems_version = "2.4.3"
63
65
  s.summary = "Gem for easy access to the PokitDok Platform APIs"
64
66
 
65
67
  if s.respond_to? :specification_version then
@@ -81,6 +83,7 @@ Gem::Specification.new do |s|
81
83
  s.add_development_dependency(%q<webmock>, ["~> 1.17"])
82
84
  s.add_development_dependency(%q<guard>, ["~> 2.6"])
83
85
  s.add_development_dependency(%q<guard-minitest>, ["~> 2.2"])
86
+ s.add_development_dependency(%q<terminal-notifier>, [">= 0"])
84
87
  s.add_development_dependency(%q<terminal-notifier-guard>, ["~> 1.5"])
85
88
  s.add_development_dependency(%q<guard-rubocop>, ["~> 1.0"])
86
89
  s.add_development_dependency(%q<coveralls>, [">= 0"])
@@ -100,6 +103,7 @@ Gem::Specification.new do |s|
100
103
  s.add_dependency(%q<webmock>, ["~> 1.17"])
101
104
  s.add_dependency(%q<guard>, ["~> 2.6"])
102
105
  s.add_dependency(%q<guard-minitest>, ["~> 2.2"])
106
+ s.add_dependency(%q<terminal-notifier>, [">= 0"])
103
107
  s.add_dependency(%q<terminal-notifier-guard>, ["~> 1.5"])
104
108
  s.add_dependency(%q<guard-rubocop>, ["~> 1.0"])
105
109
  s.add_dependency(%q<coveralls>, [">= 0"])
@@ -120,6 +124,7 @@ Gem::Specification.new do |s|
120
124
  s.add_dependency(%q<webmock>, ["~> 1.17"])
121
125
  s.add_dependency(%q<guard>, ["~> 2.6"])
122
126
  s.add_dependency(%q<guard-minitest>, ["~> 2.2"])
127
+ s.add_dependency(%q<terminal-notifier>, [">= 0"])
123
128
  s.add_dependency(%q<terminal-notifier-guard>, ["~> 1.5"])
124
129
  s.add_dependency(%q<guard-rubocop>, ["~> 1.0"])
125
130
  s.add_dependency(%q<coveralls>, [">= 0"])
@@ -2,8 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- CLIENT_ID = 'WbkhoNbwuJRWdz0w9Ehl'
6
- CLIENT_SECRET = 'OPA9HSOUMJLYyZrH4VRPZLoL51gGtm7U4OxuYiz6'
5
+ CLIENT_ID = 'jlHrMhG8CZudpJXHp0Rr'
6
+ CLIENT_SECRET = '347iuIN8T7zOzE7wtyk1vQGfjxuTE3yjxb8nlFev'
7
+ SCHEDULE_AUTH_CODE = 'KmCCkuYkSmPEf7AxaCIUApX1pUFedJx9CrDWPMD8'
7
8
  POKITDOK_TEST_URL = 'http://localhost:5002'
8
9
 
9
10
  def check_meta_and_data(result)
@@ -18,17 +19,18 @@ describe PokitDok do
18
19
 
19
20
  VCR.use_cassette 'auth' do
20
21
  @pokitdok = PokitDok::PokitDok.new(CLIENT_ID, CLIENT_SECRET)
22
+ @pokitdok.scope_code('user_schedule', SCHEDULE_AUTH_CODE)
21
23
  end
22
24
  end
23
25
 
24
26
  it 'should default to the v4 api specification' do
25
- @pokitdok.api_url.must_equal 'http://localhost:5002/api/v4'
27
+ @pokitdok.api_url.must_match /.*v4.*/
26
28
  end
27
29
 
28
30
  it 'should revert to the v3 api specification if requested' do
29
31
  VCR.use_cassette 'auth' do
30
32
  @pokitdok3 = PokitDok::PokitDok.new(CLIENT_ID, CLIENT_SECRET, 'v3')
31
- @pokitdok3.api_url.must_equal 'http://localhost:5002/api/v3'
33
+ @pokitdok3.api_url.must_match /.*v3.*/
32
34
  end
33
35
  end
34
36
 
@@ -186,7 +188,33 @@ describe PokitDok do
186
188
 
187
189
  check_meta_and_data @payers
188
190
  refute_nil @payers['data']
189
- @payers['data'].size.must_equal 295
191
+ @payers['data'].length.must_be :>, 1
192
+ end
193
+ end
194
+
195
+ describe 'Plans endpoint no args' do
196
+ it 'should expose the plans endpoint' do
197
+ query = {}
198
+
199
+ VCR.use_cassette 'plans_no_args' do
200
+ @plans = @pokitdok.plans(query)
201
+ end
202
+
203
+ check_meta_and_data @plans
204
+ @plans['data'].must_be_instance_of Array
205
+ end
206
+ end
207
+
208
+ describe 'Plans endpoint' do
209
+ it 'should expose the plans endpoint' do
210
+ query = {'state' => 'TX', 'plan_type' => 'PPO'}
211
+
212
+ VCR.use_cassette 'plans' do
213
+ @plans = @pokitdok.plans(query)
214
+ end
215
+
216
+ check_meta_and_data @plans
217
+ @plans['data'].must_be_instance_of Array
190
218
  end
191
219
  end
192
220
 
@@ -218,58 +246,138 @@ describe PokitDok do
218
246
  end
219
247
  end
220
248
 
221
- describe 'Trading Partners endpoint index' do
222
- it 'should expose the trading partners endpoint (index call)' do
223
- query = {}
249
+ describe 'Scheduling endpoints' do
250
+ it 'should list the schedulers' do
251
+ VCR.use_cassette 'scheduling' do
252
+ @schedulers = @pokitdok.schedulers
253
+ end
224
254
 
225
- VCR.use_cassette 'trading_partners_index' do
226
- @trading_partners = @pokitdok.trading_partners(query)
255
+ check_meta_and_data @schedulers
256
+ @schedulers['data'].length.must_be :>, 1
257
+ end
258
+
259
+ it 'should give details on a specific scheduler' do
260
+ VCR.use_cassette 'scheduling' do
261
+ @scheduler = @pokitdok.scheduler({ uuid: '967d207f-b024-41cc-8cac-89575a1f6fef' })
227
262
  end
228
263
 
229
- check_meta_and_data @trading_partners
230
- @trading_partners['data'].must_be_instance_of Array
231
- @trading_partners['data'].length.must_be :>, 1
264
+ check_meta_and_data @scheduler
265
+ @scheduler['data'].length.must_equal 1
266
+ @scheduler['data'].first['name'].must_equal "Greenway"
232
267
  end
233
- end
234
268
 
235
- describe 'Trading Partners endpoint get' do
236
- it 'should expose the trading partners endpoint (get call)' do
237
- query = { trading_partner_id: 'MOCKPAYER' }
269
+ it 'should list appointment types' do
270
+ VCR.use_cassette 'scheduling' do
271
+ @appointment_types = @pokitdok.appointment_types
272
+ end
238
273
 
239
- VCR.use_cassette 'trading_partners_get' do
240
- @trading_partners = @pokitdok.trading_partners(query)
274
+ check_meta_and_data @appointment_types
275
+ @appointment_types['data'].length.must_be :>, 1
276
+ end
277
+
278
+ it 'should give details on a specific appointment type' do
279
+ VCR.use_cassette 'scheduling' do
280
+ @appointment_type = @pokitdok.appointment_type({ uuid: 'ef987695-0a19-447f-814d-f8f3abbf4860' })
241
281
  end
242
282
 
243
- check_meta_and_data @trading_partners
244
- @trading_partners['data'].must_be_instance_of Hash
283
+ check_meta_and_data @appointment_type
284
+ @appointment_type['data'].length.must_equal 1
285
+ @appointment_type['data'].first['type'].must_equal "OV1"
245
286
  end
246
- end
247
287
 
248
- describe 'Plans endpoint no args' do
249
- it 'should expose the plans endpoint' do
250
- query = {}
288
+ it 'should query for open appointment slots' do
289
+ VCR.use_cassette 'scheduling_scoped' do
290
+ @slots = @pokitdok.open_appointment_slots({
291
+ start_date: "2015-01-01T00:00:00",
292
+ end_date: "2015-02-05T00:00:00",
293
+ appointment_type: "office_visit",
294
+ patient_uuid: "8ae236ff-9ccc-44b0-8717-42653cd719d0"
295
+ })
296
+ end
251
297
 
252
- VCR.use_cassette 'plans_no_args' do
253
- @plans = @pokitdok.plans(query)
298
+ check_meta_and_data @slots
299
+ @slots['data'].length.must_be :>, 1
300
+ end
301
+
302
+ it 'should book appointment for an open slot' do
303
+ appt_uuid = "ef987691-0a19-447f-814d-f8f3abbf4859"
304
+ booking_query = {
305
+ patient: {
306
+ _uuid: "500ef469-2767-4901-b705-425e9b6f7f83",
307
+ email: "john@johndoe.com",
308
+ phone: "800-555-1212",
309
+ birth_date: "1970-01-01",
310
+ first_name: "John",
311
+ last_name: "Doe",
312
+ member_id: "M000001"
313
+ },
314
+ description: "Welcome to M0d3rN Healthcare"
315
+ }
316
+
317
+ VCR.use_cassette 'scheduling_scoped' do
318
+ @response = @pokitdok.book_appointment(appt_uuid, booking_query)
254
319
  end
255
320
 
256
- check_meta_and_data @plans
257
- @plans['data'].must_be_instance_of Array
321
+ check_meta_and_data @response
322
+ @response['data']['booked'].must_equal true
258
323
  end
259
- end
260
324
 
261
- describe 'Plans endpoint' do
262
- it 'should expose the plans endpoint' do
263
- query = {'state' => 'TX', 'plan_type' => 'PPO'}
325
+ it 'should update appointment attributes' do
326
+ appt_uuid = "ef987691-0a19-447f-814d-f8f3abbf4859"
327
+ update_query = {
328
+ description: "Welcome to M0d3rN Healthcare"
329
+ }
264
330
 
265
- VCR.use_cassette 'plans' do
266
- @plans = @pokitdok.plans(query)
331
+ VCR.use_cassette 'scheduling_scoped' do
332
+ @response = @pokitdok.update_appointment(appt_uuid, update_query)
267
333
  end
268
334
 
269
- check_meta_and_data @plans
270
- @plans['data'].must_be_instance_of Array
335
+ check_meta_and_data @response
336
+ end
337
+
338
+ it 'should cancel a specified appointment' do
339
+ VCR.use_cassette 'scheduling_scoped' do
340
+ @cancel_response =
341
+ @pokitdok.cancel_appointment "ef987691-0a19-447f-814d-f8f3abbf4859"
342
+ end
343
+
344
+ @cancel_response.must_equal true
345
+ end
346
+
347
+ it 'should raise an ArgumentError if a scoped method is' \
348
+ ' called without a scope code being set' do
349
+ VCR.use_cassette 'auth' do
350
+ @pd = PokitDok::PokitDok.new(CLIENT_ID, CLIENT_SECRET)
351
+ end
352
+
353
+ assert_raises(ArgumentError) do
354
+ @pd.cancel_appointment({ id: '123456' })
355
+ end
271
356
  end
272
357
  end
273
358
 
359
+ describe 'Trading Partners endpoints' do
360
+ it 'should expose the trading partners endpoint (index call)' do
361
+ query = {}
362
+
363
+ VCR.use_cassette 'trading_partners_index' do
364
+ @trading_partners = @pokitdok.trading_partners(query)
365
+ end
366
+
367
+ check_meta_and_data @trading_partners
368
+ @trading_partners['data'].must_be_instance_of Array
369
+ @trading_partners['data'].length.must_be :>, 1
370
+ end
371
+
372
+ it 'should expose the trading partners endpoint (get call)' do
373
+ VCR.use_cassette 'trading_partners_get' do
374
+ @trading_partners = @pokitdok.trading_partners({ trading_partner_id: 'aetna' })
375
+ end
376
+
377
+ check_meta_and_data @trading_partners
378
+ @trading_partners['data'].must_be_instance_of Hash
379
+ @trading_partners['data']['name'].must_equal "Aetna"
380
+ end
381
+ end
274
382
  end
275
383
  end
@@ -8,9 +8,9 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - pokitdok-ruby 0.4.1 ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
11
+ - pokitdok-ruby 0.8 ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
12
12
  Authorization:
13
- - Bearer zwHIWGYIyYqGAZgczUzBpsGrhaRZFmd6mQqLaTFR
13
+ - Bearer EJe5ksfv6vqMctOYzUQtXbS4mNKw6Sr1MYRLnHNF
14
14
  Accept-Encoding:
15
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
16
  Accept:
@@ -23,244 +23,44 @@ http_interactions:
23
23
  Content-Type:
24
24
  - text/html; charset=utf-8
25
25
  Content-Length:
26
- - '18351'
26
+ - '2180'
27
27
  Mimetype:
28
28
  - application/json
29
29
  Charset:
30
30
  - utf-8
31
31
  Server:
32
- - Werkzeug/0.9.4 Python/2.7.3
32
+ - Werkzeug/0.9.4 Python/2.7.6
33
33
  Date:
34
- - Wed, 22 Oct 2014 19:18:49 GMT
34
+ - Mon, 02 Mar 2015 22:34:20 GMT
35
35
  body:
36
36
  encoding: UTF-8
37
- string: '{"meta": {"rate_limit_amount": 9, "rate_limit_reset": 1414009128, "application_mode":
38
- "test", "processing_time": 25, "rate_limit_cap": 8434, "result_count": 79,
39
- "activity_id": "5448031956c02c4489b7da95", "next": "http://localhost:5002/api/v4/activities/?offset=20"},
40
- "data": [{"units_of_work": 1, "name": "payers", "parameters": {"state": "CA"},
41
- "state": {"name": "completed", "title": "Completed"}, "trading_partner_id":
42
- "PokitDok", "id": "5446e2d356c02c3df3b7da95", "transition_path": ["process",
43
- "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.738000", "name":
44
- "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:51.766000",
45
- "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
46
- 1, "name": "providers", "parameters": {"npi": "1467560003"}, "state": {"name":
47
- "completed", "title": "Completed"}, "trading_partner_id": "PokitDok", "id":
48
- "5446e2d356c02c3de9b7da95", "transition_path": ["process", "complete"], "history":
49
- [{"record_dt": "2014-10-21T22:48:51.193000", "name": "init", "title": "Initializing"},
50
- {"record_dt": "2014-10-21T22:48:51.196000", "name": "processing", "title":
51
- "Processing transactions"}]}, {"units_of_work": 1, "name": "tradingpartners",
52
- "parameters": {"id": "MOCKPAYER"}, "state": {"name": "completed", "title":
53
- "Completed"}, "trading_partner_id": "PokitDok", "id": "5446e2d256c02c3dddb7da95",
54
- "transition_path": ["process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:50.539000",
55
- "name": "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:50.542000",
56
- "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
57
- 1, "name": "cash_prices", "parameters": {"cpt_code": "90658", "zip_code":
58
- "94403"}, "state": {"name": "completed", "title": "Completed"}, "trading_partner_id":
59
- "PokitDok", "id": "5446e2d356c02c3de7b7da95", "transition_path": ["process",
60
- "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.161000", "name":
61
- "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:51.162000",
62
- "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
63
- 1, "name": "payers", "parameters": {"state": "CA"}, "state": {"name": "completed",
64
- "title": "Completed"}, "trading_partner_id": "PokitDok", "id": "5446e60756c02c3ec0b7da95",
65
- "transition_path": ["process", "complete"], "history": [{"record_dt": "2014-10-21T23:02:31.488000",
66
- "name": "init", "title": "Initializing"}, {"record_dt": "2014-10-21T23:02:31.514000",
67
- "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
68
- 1, "name": "activities", "state": {"name": "completed", "title": "Completed"},
69
- "trading_partner_id": "PokitDok", "id": "5446e2d356c02c3de5b7da95", "transition_path":
70
- ["process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.121000",
71
- "name": "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:51.130000",
72
- "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
73
- 1, "name": "insurance_prices", "parameters": {"cpt_code": "87799", "zip_code":
74
- "32218"}, "state": {"name": "completed", "title": "Completed"}, "trading_partner_id":
75
- "PokitDok", "id": "5446e2d256c02c3dd9b7da95", "transition_path": ["process",
76
- "complete"], "history": [{"record_dt": "2014-10-21T22:48:50.473000", "name":
77
- "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:50.474000",
78
- "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
79
- 1, "name": "plans", "parameters": {"state": "TX", "plan_type": "PPO"}, "state":
37
+ string: '{"meta": {"rate_limit_amount": 4, "rate_limit_reset": 1425339260, "application_mode":
38
+ "test", "processing_time": 29, "rate_limit_cap": 1000, "activity_id": "54f4e56c0640fd11086300b2",
39
+ "result_count": 4}, "data": [{"units_of_work": 1, "_type": "PlatformActivityModel",
40
+ "name": "plans", "_uuid": "093dd7e8-3794-4660-a511-b0241222234a", "state":
80
41
  {"name": "completed", "title": "Completed"}, "trading_partner_id": "PokitDok",
81
- "id": "5446e2d256c02c3ddbb7da95", "transition_path": ["process", "complete"],
82
- "history": [{"record_dt": "2014-10-21T22:48:50.508000", "name": "init", "title":
83
- "Initializing"}, {"record_dt": "2014-10-21T22:48:50.509000", "name": "processing",
84
- "title": "Processing transactions"}]}, {"units_of_work": 1, "name": "tradingpartners",
42
+ "id": "54f4e56c0640fd11086300af", "transition_path": ["process", "complete"],
43
+ "history": [{"record_dt": "2015-03-02T22:34:20.194000", "name": "init", "title":
44
+ "Initializing"}, {"record_dt": "2015-03-02T22:34:20.206000", "name": "processing",
45
+ "title": "Processing transactions"}]}, {"units_of_work": 1, "_type": "PlatformActivityModel",
46
+ "name": "tradingpartners", "parameters": {"id": "aetna"}, "_uuid": "f8bf9082-bc44-4264-a10f-9445a7a473f6",
85
47
  "state": {"name": "completed", "title": "Completed"}, "trading_partner_id":
86
- "PokitDok", "id": "5446e2d356c02c3de3b7da95", "transition_path": ["process",
87
- "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.032000", "name":
88
- "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:51.085000",
48
+ "PokitDok", "id": "54f4e56c0640fd11086300b0", "transition_path": ["process",
49
+ "complete"], "history": [{"record_dt": "2015-03-02T22:34:20.249000", "name":
50
+ "init", "title": "Initializing"}, {"record_dt": "2015-03-02T22:34:20.262000",
89
51
  "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
90
- 1, "name": "plans", "state": {"name": "completed", "title": "Completed"},
91
- "trading_partner_id": "PokitDok", "id": "5446e60856c02c3ec5b7da95", "transition_path":
92
- ["process", "complete"], "history": [{"record_dt": "2014-10-21T23:02:32.028000",
93
- "name": "init", "title": "Initializing"}, {"record_dt": "2014-10-21T23:02:32.029000",
94
- "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
95
- 20, "name": "batch file", "state": {"name": "completed", "title": "Completed"},
96
- "trading_partner_id": "MOCKPAYER", "id": "5446e2d256c02c3ddfb7da95", "transition_path":
97
- ["store", "queue", "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:50.959000",
98
- "name": "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:50.961000",
99
- "name": "stored", "title": "Batch transactions stored for later processing"},
100
- {"record_dt": "2014-10-21T22:48:50.995000", "name": "queued", "title": "In
101
- queue waiting to start"}, {"record_dt": "2014-10-21T22:48:51.542000", "name":
102
- "processing", "title": "Processing transactions"}]}, {"units_of_work": 1,
103
- "name": "eligibility", "parameters": {"service_types": ["health_benefit_plan_coverage"],
104
- "client_id": "WbkhoNbwuJRWdz0w9Ehl", "payer": {"id": "MOCKPAYER", "name":
105
- "MOCKPAYER"}, "member": {"birth_date": "1996-06-13", "first_name": "Hassan",
106
- "last_name": "Walker", "plan_start_date": "2014-03-05", "id": "773415451"},
107
- "parent_id": "5446e2d256c02c3ddfb7da95", "correlation_id": "ad6e0a02-0fb2-4332-87d3-9f77efe11db6",
108
- "trading_partner_id": "MOCKPAYER", "provider": {"organization_name": "Wuckert
109
- Inc", "npi": "581603684"}, "async": true, "transaction_code": "request"},
110
- "remaining_transitions": ["generate", "store", "transmit", "wait", "receive",
111
- "process", "complete"], "parent_id": "5446e2d256c02c3ddfb7da95", "state":
112
- {"name": "scheduled", "title": "Scheduled for next available transmission
113
- to Trading Partner"}, "trading_partner_id": "MOCKPAYER", "id": "5446e2d356c02c3d8acd4617",
114
- "transition_path": ["schedule", "generate", "store", "transmit", "wait", "receive",
115
- "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.332000",
116
- "name": "init", "title": "Initializing"}]}, {"units_of_work": 1, "name": "providers",
117
- "parameters": {"npi": "1467560003"}, "state": {"name": "completed", "title":
118
- "Completed"}, "trading_partner_id": "PokitDok", "id": "5446e60856c02c3ecdb7da95",
119
- "transition_path": ["process", "complete"], "history": [{"record_dt": "2014-10-21T23:02:32.293000",
120
- "name": "init", "title": "Initializing"}, {"record_dt": "2014-10-21T23:02:32.294000",
52
+ 1, "_type": "PlatformActivityModel", "name": "tradingpartners", "_uuid": "df82af8f-4eea-4ce0-b506-80290cfaf439",
53
+ "state": {"name": "completed", "title": "Completed"}, "trading_partner_id":
54
+ "PokitDok", "id": "54f4e56c0640fd11086300b1", "transition_path": ["process",
55
+ "complete"], "history": [{"record_dt": "2015-03-02T22:34:20.308000", "name":
56
+ "init", "title": "Initializing"}, {"record_dt": "2015-03-02T22:34:20.315000",
121
57
  "name": "processing", "title": "Processing transactions"}]}, {"units_of_work":
122
- 1, "name": "eligibility", "parameters": {"service_types": ["health_benefit_plan_coverage"],
123
- "client_id": "WbkhoNbwuJRWdz0w9Ehl", "payer": {"id": "MOCKPAYER", "name":
124
- "MOCKPAYER"}, "member": {"birth_date": "1996-05-07", "first_name": "Jerod",
125
- "last_name": "Tromp", "plan_start_date": "2014-03-05", "id": "545943979"},
126
- "parent_id": "5446e2d256c02c3ddfb7da95", "correlation_id": "ad6e0a02-0fb2-4332-87d3-9f77efe11db6",
127
- "trading_partner_id": "MOCKPAYER", "provider": {"organization_name": "Wuckert
128
- Inc", "npi": "581603684"}, "async": true, "transaction_code": "request"},
129
- "remaining_transitions": ["generate", "store", "transmit", "wait", "receive",
130
- "process", "complete"], "parent_id": "5446e2d256c02c3ddfb7da95", "state":
131
- {"name": "scheduled", "title": "Scheduled for next available transmission
132
- to Trading Partner"}, "trading_partner_id": "MOCKPAYER", "id": "5446e2d356c02c3d8acd4616",
133
- "transition_path": ["schedule", "generate", "store", "transmit", "wait", "receive",
134
- "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.324000",
135
- "name": "init", "title": "Initializing"}]}, {"units_of_work": 1, "name": "claims",
136
- "parameters": {"claim": {"plan_participation": "assigned", "provider_signature":
137
- true, "total_charge_amount": "60.0", "claim_frequency": "original", "place_of_service":
138
- "office", "direct_payment": "y", "patient_signature_on_file": true, "information_release":
139
- "informed_consent", "service_lines": [{"diagnosis_codes": ["487.1"], "unit_count":
140
- "1.0", "unit_type": "units", "charge_amount": "60.0", "service_date": "2014-06-01",
141
- "procedure_code": "99213"}]}, "trading_partner_id": "MOCKPAYER", "payer":
142
- {"organization_name": "MOCKPAYER", "plan_id": "MOCKPAYER"}, "subscriber":
143
- {"first_name": "Jane", "last_name": "Doe", "gender": "female", "member_id":
144
- "W000000000", "payer_responsibility": "primary", "address": {"address_lines":
145
- ["123 N MAIN ST"], "state": "SC", "zipcode": "29301", "city": "SPARTANBURG"},
146
- "birth_date": "1970-01-01"}, "correlation_id": "3eab49a5-4e77-4ec5-9ffb-bd8a29adade0",
147
- "client_id": "WbkhoNbwuJRWdz0w9Ehl", "receiver": {"organization_name": "MOCKRECEIVER",
148
- "id": "MOCKRECEIVER"}, "submitter": {"organization_name": "POKITDOK TESTING",
149
- "id": "POKITDOKTEST", "email": "support@pokitdok.com"}, "async": false, "billing_provider":
150
- {"first_name": "Jerome", "last_name": "Aya-Ay", "npi": "1467560003", "taxonomy_code":
151
- "207Q00000X", "address": {"address_lines": ["8311 WARREN H ABERNATHY HWY"],
152
- "state": "SC", "zipcode": "29301", "city": "SPARTANBURG"}, "tax_id": "123456789"},
153
- "transaction_code": "chargeable"}, "remaining_transitions": ["generate", "store",
154
- "transmit", "wait", "receive", "process", "complete"], "state": {"name": "scheduled",
155
- "title": "Scheduled for next available transmission to Trading Partner"},
156
- "trading_partner_id": "MOCKPAYER", "id": "5446e2d256c02c3dd5b7da95", "transition_path":
157
- ["schedule", "generate", "store", "transmit", "wait", "receive", "process",
158
- "complete"], "history": [{"record_dt": "2014-10-21T22:48:50.267000", "name":
159
- "init", "title": "Initializing"}]}, {"units_of_work": 1, "name": "referrals",
160
- "parameters": {"patient": {"birth_date": "1970-01-01", "first_name": "JANE",
161
- "last_name": "DOE", "id": "1234567890"}, "trading_partner_id": "MOCKPAYER",
162
- "payer": {"organization_name": "Mock Payer for Testing", "id": "MOCKPAYER"},
163
- "originating_company_id": "123456789", "correlation_id": "d5b56815-f4b6-43c0-8bbc-68cacf249c4c",
164
- "client_id": "WbkhoNbwuJRWdz0w9Ehl", "provider": {"first_name": "CHRISTINA",
165
- "last_name": "BERTOLAMI", "npi": "1619131232"}, "async": false, "event": {"category":
166
- "specialty_care_review", "diagnoses": [{"date": "2014-09-30", "code": "384.20"}],
167
- "place_of_service": "office", "delivery": {"quantity_qualifier": "visits",
168
- "quantity": 1}, "provider": {"phone": "8645822900", "first_name": "JOHN",
169
- "last_name": "FOSTER", "npi": "1154387751"}, "certification_type": "initial",
170
- "type": "consultation"}}, "state": {"name": "completed", "title": "Completed"},
171
- "result": {"patient": {"first_name": "JANE", "last_name": "DOE", "id": "1234567890"},
172
- "trading_partner_id": "MOCKPAYER", "payer": {"organization_name": "MOCK PAYER
173
- INC", "id": "MOCKPAYER"}, "originating_company_id": "9012345678", "correlation_id":
174
- "d5b56815-f4b6-43c0-8bbc-68cacf249c4c", "client_id": "WbkhoNbwuJRWdz0w9Ehl",
175
- "provider": {"first_name": "CHRISTINA", "last_name": "BERTOLAMI", "tax_id":
176
- "1619131232"}, "async": false, "event": {"category": "specialty_care_review",
177
- "diagnoses": [{"date": "2005-04-30", "code": "410.90"}], "place_of_service":
178
- "office", "review": {"certification_number": "AUTH0001", "second_surgical_opinion_required":
179
- false, "certification_action": "certified_in_total"}, "delivery": {"quantity_qualifier":
180
- "visits", "quantity": 1}, "provider": {"first_name": "JOHN", "last_name":
181
- "FOSTER", "tax_id": "1154387751"}, "certification_type": "initial", "type":
182
- "consultation"}, "valid_request": true}, "trading_partner_id": "MOCKPAYER",
183
- "id": "5446e2d256c02c3dd7b7da95", "transition_path": ["generate", "transmit",
184
- "wait", "receive", "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:50.303000",
185
- "name": "init", "title": "Initializing"}, {"record_dt": "2014-10-21T22:48:50.394000",
186
- "name": "generating", "title": "Generating transactions"}, {"record_dt": "2014-10-21T22:48:50.396000",
187
- "name": "transmitting", "title": "Transmitting transactions to Trading Partner"},
188
- {"record_dt": "2014-10-21T22:48:50.397000", "name": "waiting", "title": "Waiting
189
- on Trading Partner Response"}, {"record_dt": "2014-10-21T22:48:50.398000",
190
- "name": "receiving", "title": "Receiving transactions from Trading Partner"},
191
- {"record_dt": "2014-10-21T22:48:50.429000", "name": "processing", "title":
192
- "Processing transactions"}]}, {"units_of_work": 1, "name": "enrollment", "parameters":
193
- {"reference_number": "12456", "version": "4.0.0", "payer": {"tax_id": "654456654"},
194
- "update_dt": "Wed Mar 26 22:18:47 2014", "deleted": false, "major_version":
195
- "4", "subscriber": {"maintenance_type": "Addition", "first_name": "JOHN",
196
- "last_name": "DOE", "benefits": [{"maintenance_type": "Addition", "late_enrollment":
197
- false, "begin_date": "Sat Jun 1 00:00:00 1996", "benefit_type": "Health",
198
- "coordination_of_benefits": [{"status": "Unknown", "group_or_policy_number":
199
- "890111", "payer_responsibility": "Primary"}]}, {"maintenance_type": "Addition",
200
- "late_enrollment": false, "begin_date": "Sat Jun 1 00:00:00 1996", "benefit_type":
201
- "Dental"}, {"maintenance_type": "Addition", "late_enrollment": false, "begin_date":
202
- "Sat Jun 1 00:00:00 1996", "benefit_type": "Vision"}], "relationship": "Self",
203
- "contacts": [{"communication_type2": "Work Phone Number", "primary_communication_type":
204
- "Home Phone Number", "communication_number2": "7172341240", "primary_communication_number":
205
- "7172343334"}], "benefit_status": "Active", "gender": "Male", "employment_status":
206
- "Full-time", "subscriber_number": "123456789", "group_or_policy_number": "123456001",
207
- "maintenance_reason": "Active", "member_id": "123456789", "handicapped": false,
208
- "eligibility_begin_date": "Thu May 23 00:00:00 1996", "ssn": "123456789",
209
- "address": {"city": "CAMP HILL", "line2": "APT 3G", "county": "CUMBERLAND",
210
- "state": "PA", "postal_code": "17011", "line": "100 MARKET ST"}, "birth_date":
211
- "Fri Aug 16 00:00:00 1940", "middle_name": "P", "substance_abuse": false,
212
- "tobacco_use": false}, "correlation_id": "11f6e7aa-509a-4181-94c8-ce5395f8f100",
213
- "insert_dt": "Wed Mar 26 22:18:47 2014", "trading_partner_id": "MOCKPAYER",
214
- "purpose": "Original", "client_id": "WbkhoNbwuJRWdz0w9Ehl", "action": "Change",
215
- "dependents": [], "sponsor": {"tax_id": "999888777"}}, "remaining_transitions":
216
- ["generate", "store", "transmit", "wait", "receive", "process", "complete"],
217
- "state": {"name": "scheduled", "title": "Scheduled for next available transmission
218
- to Trading Partner"}, "trading_partner_id": "MOCKPAYER", "id": "5446e2d356c02c3debb7da95",
219
- "transition_path": ["schedule", "generate", "store", "transmit", "wait", "receive",
220
- "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.235000",
221
- "name": "init", "title": "Initializing"}]}, {"units_of_work": 1, "name": "eligibility",
222
- "parameters": {"service_types": ["health_benefit_plan_coverage"], "client_id":
223
- "WbkhoNbwuJRWdz0w9Ehl", "payer": {"id": "MOCKPAYER", "name": "MOCKPAYER"},
224
- "member": {"birth_date": "1992-01-26", "first_name": "Keyon", "last_name":
225
- "Ortiz", "plan_start_date": "2014-03-05", "id": "178470414"}, "parent_id":
226
- "5446e2d256c02c3ddfb7da95", "correlation_id": "ad6e0a02-0fb2-4332-87d3-9f77efe11db6",
227
- "trading_partner_id": "MOCKPAYER", "provider": {"organization_name": "Wuckert
228
- Inc", "npi": "581603684"}, "async": true, "transaction_code": "request"},
229
- "remaining_transitions": ["generate", "store", "transmit", "wait", "receive",
230
- "process", "complete"], "parent_id": "5446e2d256c02c3ddfb7da95", "state":
231
- {"name": "scheduled", "title": "Scheduled for next available transmission
232
- to Trading Partner"}, "trading_partner_id": "MOCKPAYER", "id": "5446e2d356c02c3d8acd4621",
233
- "transition_path": ["schedule", "generate", "store", "transmit", "wait", "receive",
234
- "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.437000",
235
- "name": "init", "title": "Initializing"}]}, {"units_of_work": 1, "name": "eligibility",
236
- "parameters": {"service_types": ["health_benefit_plan_coverage"], "client_id":
237
- "WbkhoNbwuJRWdz0w9Ehl", "payer": {"id": "MOCKPAYER", "name": "MOCKPAYER"},
238
- "member": {"birth_date": "1995-04-14", "first_name": "Jimmie", "last_name":
239
- "Monahan", "plan_start_date": "2014-03-05", "id": "315531994"}, "parent_id":
240
- "5446e2d256c02c3ddfb7da95", "correlation_id": "ad6e0a02-0fb2-4332-87d3-9f77efe11db6",
241
- "trading_partner_id": "MOCKPAYER", "provider": {"organization_name": "Wuckert
242
- Inc", "npi": "581603684"}, "async": true, "transaction_code": "request"},
243
- "remaining_transitions": ["generate", "store", "transmit", "wait", "receive",
244
- "process", "complete"], "parent_id": "5446e2d256c02c3ddfb7da95", "state":
245
- {"name": "scheduled", "title": "Scheduled for next available transmission
246
- to Trading Partner"}, "trading_partner_id": "MOCKPAYER", "id": "5446e2d356c02c3d8acd461d",
247
- "transition_path": ["schedule", "generate", "store", "transmit", "wait", "receive",
248
- "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.389000",
249
- "name": "init", "title": "Initializing"}]}, {"units_of_work": 1, "name": "eligibility",
250
- "parameters": {"service_types": ["health_benefit_plan_coverage"], "client_id":
251
- "WbkhoNbwuJRWdz0w9Ehl", "payer": {"id": "MOCKPAYER", "name": "MOCKPAYER"},
252
- "member": {"birth_date": "1978-01-09", "first_name": "Markus", "last_name":
253
- "Bednar", "plan_start_date": "2014-03-05", "id": "674957204"}, "parent_id":
254
- "5446e2d256c02c3ddfb7da95", "correlation_id": "ad6e0a02-0fb2-4332-87d3-9f77efe11db6",
255
- "trading_partner_id": "MOCKPAYER", "provider": {"organization_name": "Wuckert
256
- Inc", "npi": "581603684"}, "async": true, "transaction_code": "request"},
257
- "remaining_transitions": ["generate", "store", "transmit", "wait", "receive",
258
- "process", "complete"], "parent_id": "5446e2d256c02c3ddfb7da95", "state":
259
- {"name": "scheduled", "title": "Scheduled for next available transmission
260
- to Trading Partner"}, "trading_partner_id": "MOCKPAYER", "id": "5446e2d356c02c3d8acd461e",
261
- "transition_path": ["schedule", "generate", "store", "transmit", "wait", "receive",
262
- "process", "complete"], "history": [{"record_dt": "2014-10-21T22:48:51.402000",
263
- "name": "init", "title": "Initializing"}]}]}'
58
+ 1, "_type": "PlatformActivityModel", "name": "activities", "remaining_transitions":
59
+ ["complete"], "_uuid": "19844132-985d-41a8-a127-30035e57179e", "state": {"name":
60
+ "processing", "title": "Processing transactions"}, "trading_partner_id": "PokitDok",
61
+ "id": "54f4e56c0640fd11086300b2", "transition_path": ["process", "complete"],
62
+ "history": [{"record_dt": "2015-03-02T22:34:20.350000", "name": "init", "title":
63
+ "Initializing"}]}]}'
264
64
  http_version:
265
- recorded_at: Wed, 22 Oct 2014 19:18:49 GMT
266
- recorded_with: VCR 2.9.2
65
+ recorded_at: Mon, 02 Mar 2015 22:34:20 GMT
66
+ recorded_with: VCR 2.9.3