eligible 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ 2016-05-10 Eligible <support@eligible.com>
2
+ * 2.6.1
3
+ - Suppressing ssl_verify_callback return code warning
4
+ - Added new endpoints: received_pdf, precert and referral
5
+ - Refactored the code and fixed couple of bugs
6
+ - Documentation updates for the endpoints
7
+
1
8
  2016-02-23 Eligible <support@eligible.com>
2
9
 
3
10
  * 2.6.0
data/README.md CHANGED
@@ -36,7 +36,7 @@ Eligible.test = true
36
36
  On each api call, you can overwrite the api key or the test parameter:
37
37
 
38
38
  ```ruby
39
- Eligible::Demographic.get({:api_key => 'NEW_KEY', :test => false})
39
+ Eligible::Coverage.get({:api_key => 'NEW_KEY', :test => false})
40
40
  ```
41
41
 
42
42
  ### Response Format
@@ -45,7 +45,7 @@ By default, all responses are in JSON, but you can request raw
45
45
  access to X12 by adding is as a parameter on the api call:
46
46
 
47
47
  ```ruby
48
- Eligible::Demographic.get({:format => "x12"})
48
+ Eligible::Coverage.get({:format => "x12"})
49
49
  ```
50
50
 
51
51
  # Important notes
@@ -56,8 +56,9 @@ the parameter `payer_id`, required for most of the api calls, is
56
56
  provided by Eligible from its website, in xml and json format, which
57
57
  you can embed into your applications.
58
58
 
59
- [https://eligible.com/resources/information-sources.xml](https://eligible.com/resources/information-sources.xml)
60
- [https://eligible.com/resources/information-sources.json](https://eligible.com/resources/information-sources.json)
59
+ [https://eligible.com/resources/payers/eligibility.xml](https://eligible.com/resources/payers/eligibility.xml)
60
+
61
+ [https://eligible.com/resources/payers/eligibility.json](https://eligible.com/resources/payers/eligibility.json)
61
62
 
62
63
  ## Payer List for Claims
63
64
 
@@ -65,8 +66,23 @@ the parameter `payer_id`, required for claims, is provided by Eligible
65
66
  from its website, in xml and json format, which you can embed into
66
67
  your applications.
67
68
 
68
- [https://eligible.com/resources/claims-payer.xml](https://eligible.com/resources/claims-payer.xml)
69
- [https://eligible.com/resources/claims-payer.json](https://eligible.com/resources/claims-payer.json)
69
+ ## Medical
70
+
71
+ [https://eligible.com/resources/payers/claims/medical.xml](https://eligible.com/resources/payers/claims/medical.xml)
72
+
73
+ [https://eligible.com/resources/payers/claims/medical.json](https://eligible.com/resources/payers/claims/medical.json)
74
+
75
+ ## Institutional
76
+
77
+ [https://eligible.com/resources/payers/claims/institutional.xml](https://eligible.com/resources/payers/claims/institutional.xml)
78
+
79
+ [https://eligible.com/resources/payers/claims/institutional.json](https://eligible.com/resources/payers/claims/institutional.json)
80
+
81
+ ## Dental
82
+
83
+ [https://eligible.com/resources/payers/claims/dental.xml](https://eligible.com/resources/payers/claims/dental.xml)
84
+
85
+ [https://eligible.com/resources/payers/claims/dental.json](https://eligible.com/resources/payers/claims/dental.json)
70
86
 
71
87
  ## Service Type Codes
72
88
 
@@ -91,16 +107,16 @@ On all results you can check for errors in `result.error`. The raw
91
107
  json format is available by using `result.to_hash`.
92
108
 
93
109
  ```ruby
94
- demographic = Eligible::Demographic.get(params)
95
- demographic.error
96
- demographic.to_hash
110
+ coverage = Eligible::Coverage.get(params)
111
+ coverage.error
112
+ coverage.to_hash
97
113
  ```
98
114
 
99
115
  ## Coverage
100
116
 
101
117
  ### Reference
102
118
 
103
- [https://eligible.com/rest#coverage](https://eligible.com/rest#coverage)
119
+ [https://reference.eligible.com/#coverage](https://reference.eligible.com/#coverage)
104
120
 
105
121
  ### Retrieve eligibility and benefit information
106
122
 
@@ -123,34 +139,35 @@ coverage.to_hash # returns all coverage info for the request
123
139
  coverage.error # return error, if any
124
140
  ```
125
141
 
126
- ## Demographic
142
+ ## Cost Estimate
127
143
 
128
144
  ### Reference
145
+ [https://eligible.com/reference/cost-estimates](https://eligible.com/reference/cost-estimates)
129
146
 
130
- [https://eligible.com/rest#demographics](https://eligible.com/rest#demographics)
131
-
132
- ### Fetch demographics for a patient
147
+ ### Retrieve cost estimate information
133
148
 
134
149
  ```ruby
135
150
  params = {
136
- :payer_name => "Aetna",
137
- :payer_id => "000001",
138
- :provider_last_name => "Last",
139
- :provider_first_name => "First",
140
- :provider_npi => "12345678",
141
- :member_id => "12345678",
142
- :member_last_name => "Austen",
143
- :member_first_name => "Jane",
144
- :member_dob => "1955-12-14"
151
+ service_type: '98',
152
+ network: 'IN',
153
+ payer_id: '00001',
154
+ provider_npi: '1234567893',
155
+ member_id: 'COST_ESTIMATE_001',
156
+ member_dob: '1886-01-01',
157
+ provider_price: '200',
158
+ level: 'individual'
145
159
  }
146
160
 
147
- demographic = Eligible::Demographic.get(params)
148
- demographic.to_hash # returns all coverage info for the request
149
- demographic.error # return error, if any
161
+ cost_estimate = Eligible::Coverage.cost_estimate(params)
162
+ cost_estimate.to_hash # returns all coverage info along with cost estimate
150
163
  ```
151
164
 
152
165
  ## Medicare
153
166
 
167
+ ### Reference
168
+
169
+ [https://reference.eligible.com/#medicare](https://reference.eligible.com/#medicare)
170
+
154
171
  ### Retrieve eligibility and benefit information from CMS Medicare for a patient.
155
172
 
156
173
  ```ruby
@@ -173,7 +190,7 @@ medicare.error # return error, if any
173
190
 
174
191
  All the batch api calls will notify the results via webhook. You can
175
192
  setup a webhook in your
176
- [Dashboard](https://ligible.com/dashboard/webhooks). All batch api
193
+ [Dashboard](https://eligible.com/dashboard/webhooks). All batch api
177
194
  calls return a *reference_id* value and the *number_of_items*
178
195
  submitted.
179
196
 
@@ -215,42 +232,6 @@ result.to_hash # returns the api call results
215
232
  result.error # return error, if any
216
233
  ```
217
234
 
218
- ### Demographic Batch API
219
-
220
- ```ruby
221
- params = {
222
- "parameters"=>[
223
- {
224
- "id"=>1,
225
- "payer_name"=>"UnitedHealthCare",
226
- "payer_id"=>"00112",
227
- "service_provider_npi"=>"12341234",
228
- "subscriber_id"=>"98769876",
229
- "subscriber_first_name"=>"Jane",
230
- "subscriber_last_name"=>"Austen",
231
- "service_provider_last_name"=>"Gaurav",
232
- "service_provider_first_name"=>"Gupta",
233
- "subscriber_dob"=>"1947-10-07"
234
- },
235
- {
236
- "id"=>2,
237
- "payer_name"=>"UnitedHealthCare",
238
- "payer_id"=>"00112",
239
- "service_provider_npi"=>"67676767",
240
- "subscriber_id"=>"98989898",
241
- "subscriber_first_name"=>"Gaurav",
242
- "subscriber_last_name"=>"Gupta",
243
- "service_provider_last_name"=>"Jane",
244
- "service_provider_first_name"=>"Austen",
245
- "subscriber_dob"=>"1947-08-15"
246
- }
247
- ]
248
- }
249
- result = Eligible::Demographic.batch_post(params)
250
- result.to_hash # returns the api call results
251
- result.error # return error, if any
252
- ```
253
-
254
235
  ### Medicare Batch API
255
236
 
256
237
  ```ruby
@@ -290,6 +271,9 @@ Enrollment requests can have multiple enrollment NPIs. You can repeat
290
271
  the enrollment for a NPI multiple times across different enrollment
291
272
  requests.
292
273
 
274
+ ### Reference
275
+ [https://reference.eligible.com/#enrollment-introduction](https://reference.eligible.com/#enrollment-introduction)
276
+
293
277
  ### Create an Enrollment Request
294
278
 
295
279
  ```ruby
@@ -343,6 +327,10 @@ enrollment = Eligible::Enrollment.get(params)
343
327
 
344
328
  ## Claims
345
329
 
330
+ ### Reference
331
+
332
+ [https://reference.eligible.com/#create-a-claim](https://reference.eligible.com/#create-a-claim)
333
+
346
334
  ### Create Claim object
347
335
 
348
336
  ```ruby
@@ -438,7 +426,7 @@ claim = Eligible::Claim.get(params) # returns acknowledgment information on an i
438
426
 
439
427
  ### Reference
440
428
 
441
- [https://eligible.com/rest#payment-status](https://eligible.com/rest#payment-status)
429
+ [https://reference.eligible.com/#payment-status](https://reference.eligible.com/#payment-status)
442
430
 
443
431
  ### Retrieve Payment status
444
432
 
@@ -473,6 +461,10 @@ result = Eligible::X12.post(params)
473
461
 
474
462
  ## Tickets
475
463
 
464
+ ### Reference
465
+
466
+ [https://reference.eligible.com/#create-a-ticket](https://reference.eligible.com/#create-a-ticket)
467
+
476
468
  ### Create a ticket
477
469
 
478
470
  ```ruby
@@ -528,6 +520,226 @@ comments.error # return error, if any
528
520
  Eligible::Ticket.all
529
521
  ```
530
522
 
523
+ ## Customer
524
+
525
+ ### Reference
526
+
527
+ [https://reference.eligible.com/#customers-introduction](https://reference.eligible.com/#customers-introduction)
528
+
529
+ ### Create a customer
530
+
531
+ ```ruby
532
+ customer_params = { customer: { name: "ABC company",
533
+ site_name: "ABC site name"
534
+ }
535
+ }
536
+ customer_response = Eligible::Customer.post(customer_params)
537
+ customer_response.to_json
538
+ ```
539
+
540
+ ### Get a customer
541
+
542
+ ```ruby
543
+ customer_params = { customer_id: "123" }
544
+ customer_response = Eligible::Customer.get(customer_params)
545
+ customer_response.to_json
546
+ ```
547
+
548
+ ### Update a customer
549
+
550
+ ```ruby
551
+ customer_params = { customer_id: "123",
552
+ customer: { site_name: "XYZ site name" }
553
+ }
554
+ customer_response = Eligible::Customer.update(customer_params)
555
+ customer_response.to_json
556
+ ```
557
+
558
+ ### Get all customers
559
+
560
+ ```ruby
561
+ customer_params = {}
562
+ customer_response = Eligible::Customer.all(customer_params)
563
+ customer_response.to_json
564
+ ```
565
+
566
+ ## Received Pdf
567
+
568
+ ### Reference
569
+
570
+ [https://reference.eligible.com/#view-received-pdf](https://reference.eligible.com/#view-received-pdf)
571
+
572
+ ### Get received pdf
573
+
574
+ ```ruby
575
+ params = { enrollment_npi_id: '123' }
576
+ response = Eligible::ReceivedPdf.get(params)
577
+ response.to_hash
578
+ ```
579
+
580
+ ### Download received pdf
581
+ By default, it downloads to /tmp/received_pdf.pdf
582
+ ```ruby
583
+ params = { enrollment_npi_id: '123', filename: 'file_path_where_to_download' }
584
+ Eligible::ReceivedPdf.download(params)
585
+ ```
586
+
587
+ ## Original Signature Pdf
588
+
589
+ ### Reference
590
+
591
+ [https://reference.eligible.com/#create-original-signature-pdf](https://reference.eligible.com/#create-original-signature-pdf)
592
+
593
+ ### Get original signature pdf
594
+
595
+ ```ruby
596
+ params = { enrollment_npi_id: '123' }
597
+ response = Eligible::OriginalSignaturePdf.get(params)
598
+ response.to_hash
599
+ ```
600
+
601
+ ### Create original signature pdf
602
+
603
+ ```ruby
604
+ params = { enrollment_npi_id: '123' }
605
+ params[:file] = File.new('path_to_file')
606
+ response = Eligible::OriginalSignaturePdf.post(params)
607
+ response.to_hash
608
+ ```
609
+
610
+ ### Update original signature pdf
611
+
612
+ ```ruby
613
+ params = { enrollment_npi_id: '123' }
614
+ params[:file] = File.new('path_to_new_file')
615
+ response = Eligible::OriginalSignaturePdf.update(params)
616
+ response.to_hash
617
+ ```
618
+
619
+ ### Download original signature pdf
620
+ By default, it downloads to /tmp/original_signature_pdf.pdf
621
+ ```ruby
622
+ params = { enrollment_npi_id: '123', filename: 'file_path_where_to_download' }
623
+ Eligible::OriginalSignaturePdf.download(params)
624
+ ```
625
+
626
+ ### Delete original signature pdf
627
+
628
+ ```ruby
629
+ params = { enrollment_npi_id: '123' }
630
+ response = Eligible::OriginalSignaturePdf.delete(params)
631
+ response.to_hash
632
+ ```
633
+
634
+ ## Payer
635
+
636
+ ### Reference
637
+
638
+ [https://reference.eligible.com/#introduction](https://reference.eligible.com/#introduction)
639
+
640
+ ### List all the payers
641
+
642
+ ```ruby
643
+ response = Eligible::Payer.list({})
644
+ response.collect { |payer| payer.to_hash }
645
+ ```
646
+
647
+ ### View a single payer
648
+
649
+ ```ruby
650
+ params = { payer_id: '12345' }
651
+ response = Eligible::Payer.get(params)
652
+ response.to_hash
653
+ ```
654
+
655
+ ### Search options for a payer
656
+
657
+ ```ruby
658
+ params = { payer_id: '12345' }
659
+ response = Eligible::Payer.search_options(params)
660
+ response.to_hash
661
+ ```
662
+
663
+ ### Search options for all payers
664
+
665
+ ```ruby
666
+ response = Eligible::Payer.search_options({})
667
+ response.collect { |payer| payer.to_hash }
668
+ ```
669
+
670
+ ## Precertification
671
+
672
+ ### Reference
673
+
674
+ [https://reference.eligible.com/#precertification](https://reference.eligible.com/#precertification)
675
+
676
+ ### Inquiry
677
+
678
+ ```ruby
679
+ params = { provider_npi: '1234567893',
680
+ member_id: 'ABCDEF',
681
+ member_dob: '2016-03-04'
682
+ }
683
+ response = Eligible::Precert.inquiry(params)
684
+ response.to_hash
685
+ ```
686
+
687
+ ### Create
688
+
689
+ ```ruby
690
+ params = { 'requester' => { 'information' => 'test' },
691
+ 'subscriber' => { 'last_name' => 'XYZ',
692
+ 'first_name' => 'AVC',
693
+ 'id' => '231213'
694
+ },
695
+ 'event' => { 'provider' => 'information' },
696
+ 'services' => [{ 'service' => 'test' }]
697
+ }
698
+ response = Eligible::Precert.create(params)
699
+ response.to_hash
700
+ ```
701
+
702
+ ## Referral
703
+
704
+ ### Inquiry
705
+
706
+ ```ruby
707
+ params = { provider_npi: '1234567893',
708
+ member_id: 'ABCDEF',
709
+ member_dob: '2016-03-04'
710
+ }
711
+ response = Eligible::Referral.inquiry(params)
712
+ response.to_hash
713
+ ```
714
+
715
+ ### Create
716
+
717
+ ```ruby
718
+ params = { 'requester' => { 'information' => 'test' },
719
+ 'subscriber' => { 'last_name' => 'XYZ',
720
+ 'first_name' => 'AVC',
721
+ 'id' => '231213'
722
+ },
723
+ 'event' => { 'provider' => 'information' },
724
+ 'services' => [{ 'service' => 'test' }]
725
+ }
726
+ response = Eligible::Referral.create(params)
727
+ response.to_hash
728
+ ```
729
+
730
+ ## Errors
731
+
732
+ This is the list of errors thrown from the eligible ruby gem.
733
+
734
+ 1. Eligible::EligibleError - Base class for the customized errors raised from Eligible gem.
735
+ 2. Eligible::APIError - Raised when there is some invalid response from the api call. Raised for error codes other than 400, 401 and 404.
736
+ 3. Eligible::APIConnectionError - Raised when there is some network issue like socket error, not able to connect to Eligible etc.
737
+ 4. Eligible::InvalidRequestError - Raised when error code is 400 or 404.
738
+ 5. Eligible::AuthenticationError - Raised when authentication fails. Mostly due to wrong api key.
739
+ 6. NotImplementedError - Raised when the functionality you are trying to use doesn't exist.
740
+ 7. ArgumentError - Raised when all the required params are not provided.
741
+
742
+
531
743
  ## Contributing
532
744
 
533
745
  Running `rake` will run the test suite along with rubocop as a basic