GithubHelp home page GithubHelp logo

eligible-ruby's Introduction

Eligible

Ruby bindings for the Eligible API

Installation

Add this line to your application's Gemfile:

gem 'eligible'

And then execute:

$ bundle

Or install it yourself with:

$ gem install eligible

Usage

Setup

require 'eligible'
Eligible.api_key = YOUR_KEY

Retrieve Plan object and query it

params = {
  :payer_name => "Aetna",
  :payer_id   => "000001",
  :service_provider_last_name => "Last",
  :service_provider_first_name => "First",
  :service_provider_NPI => "1928384219",
  :subscriber_id => "W120923801",
  :subscriber_last_name => "Austen",
  :subscriber_first_name => "Jane",
  :subscriber_dob => "1955-12-14"
}

plan = Eligible::Plan.get(params)
plan.all      # returns all fields on the plan, per the plan/all endpoint
plan.status   # returns status fields on the plan, per the plan/status endpoint
## Etc.: plan.deductible, plan.dates, plan.balance, plan.stop_loss 

Retrieve Service object and query it

params = {
  :payer_name => "Aetna",
  :payer_id   => "000001",
  :service_provider_last_name => "Last",
  :service_provider_first_name => "First",
  :service_provider_NPI => "1928384219",
  :subscriber_id => "W120923801",
  :subscriber_last_name => "Austen",
  :subscriber_first_name => "Jane",
  :subscriber_dob => "1955-12-14"
}

service = Eligible::Service.get(params)
service.all     # returns all fields for the service, per service/all
service.visits  # returns the visits for the service, per service/visits
## Etc.: service.copayment, service.coinsurance, service.deductible

Retrieve Demographic object and query it

params = {
  :payer_name => "Aetna",
  :payer_id   => "000001",
  :service_provider_last_name => "Last",
  :service_provider_first_name => "First",
  :service_provider_NPI => "1928384219",
  :subscriber_id => "W120923801",
  :subscriber_last_name => "Austen",
  :subscriber_first_name => "Jane",
  :subscriber_dob => "1955-12-14"
}

demographic = Eligible::Demographic.get(params)
demographic.all # returns all fields for the demographic, per demographic/all
demographic.zip # returns the patient's zip code, per demographic/zip
## Etc.: demographic.employer, demographic.address, demographic.dob

Retrieve Claim object

params = {
  :payer_name => "Aetna",
  :payer_id => "000001",
  :information_receiver_organization_name => "Organization",
  :information_receiver_last_name => "Last",
  :information_receiver_first_name => "First",
  :information_receiver_etin => "1386332",
  :service_provider_organization_name => "Marshall Group",
  :service_provider_last_name => "Last",
  :service_provider_first_name => "First",
  :service_provider_npi => "1928384219",
  :service_provider_tax_id => "1386332",
  :subscriber_id => "W120923801",
  :subscriber_last_name => "Last", 
  :subscriber_first_name => "First",
  :subscriber_dob => "1955-12-14",
  :dependent_last_name => "Last",
  :dependent_first_name => "First",
  :dependent_dob => "1975-12-14",
  :dependent_gender => "M",
  :trace_number => "12345",
  :claim_control_number => "67890",
  :claim_charge_amount => "45.00",
  :claim_start_date => "2013-01-05",
  :claim_end_date => "2013-01-05"
}    

claim = Eligible::Claim.get(params)
claim.status # Returns in real time the status (paid, not paid, rejected, denied, etc) of claim specified.

Tests

You can run tests with

rake test

If you do send a pull request, please add passing tests for the new feature/fix.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Run tests (see above)
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

eligible-ruby's People

Contributors

andrewpbrett avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.