RxNav

Gem Version Dependency Status Code Climate Test Coverage Codeship Status for jbender/rx_nav_ruby

This gem makes it easier to work with the RxNav REST APIs, as enumerated on this page.

Currently, there are wrappers for the RxNorm, NDF-RT, and RxTerms APIs. Not all end points are covered, so be sure to check out the code to make sure the endpoint you're looking for is available in the wrapper. If it isn't, please feel free to fork, add it, and send a pull request.

Installation

Add this line to your application's Gemfile:

gem 'rx_nav'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rx_nav

Usage

Each service has it's own class, which have the class methods enumerated below. When appropriate, these methods will return Concepts, which are further queryable to retrieve more information about a specific drug. Question marks indicate optional parameters.

Please note that according to the NLM Terms of Service, you can will only be able to make 20 requests/second/IP, so keep that in mind when implementing this project.

NDF-RT (Class named NDFRT)

  • all_records_by_kind
  • get_info
  • find_by_name(name, kind?)
  • find_by_id(type, id)
  • find_by(x, id: y OR x, kind: y)
  • possible_roles
  • possible_properties
  • possible_kinds
  • possible_types
  • possible_associations
  • possible_options_for(type)
  • api_version

RxNorm

  • search_by_name(name, options?)
  • find_rxcui_by_id(type, id)
  • find_rxcui_by_name(name)
  • find_drugs_by_name(name)
  • spelling_suggestions(name)
  • status(id)
  • properties(id)
  • quantity(id)
  • strength(id)

RxTerms

  • all_concepts
  • all_info(id)

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. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request