npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aqua-io

v0.1.0

Published

Official Aqua-io API library client (ICD-9 and ICD-10).

Downloads

12

Readme

aqua-io-node-js

Official Aqua-io API library client for node.js/io.js. Currently covers Aqua.io's ICD-9 and ICD-10 APIs.

Getting Started

To use the Aqua.io API, you need to have proper API credentials, which you can get for free by signing up.

You may also want to read up on the API documentation.

Installation

Make sure you have npm installed.

$ npm install aqua-io

Versions

Works with [ 0.8 / 0.9 / 0.10 / 0.11 ]

Usage

var aquaIo = require('aqua-io');

// Then we instantiate a client (as shown below)

Build a client

Get an access token using your aqua.io credentials
var client = aquaIo.client({
    client_id: '09a8b7',
    client_secret: '1a2b3'
}, clientOptions);

var token = client.accessToken().retrieve()
All other API calls require an access token
var client = aquaIo.client({
    acess_token: token.body.access_token
}, clientOptions);

Client Options

The following options are available while instantiating a client:

  • base: Base url for the api
  • user_agent: Default user-agent for all requests
  • headers: Default headers for all requests
  • request_type: Default format of the request body

Response information

All the callbacks provided to an api call will receive the response as shown below

// You can also omit the 'methodOptions' param below
client.klass('args').method('args', methodOptions, function (err, response) {
    if (err) console.log(err);

    response.code;
    // >>> 200

    response.headers;
    // >>> {'x-server': 'apache'}
}
JSON response

When the response sent by server is json, it is decoded into a hash

response.body;
// >>> [{"short_description": "INFECTIOUS AND PARASIT...", "api_path": "icd9/001-139", "name": "001-139", "description": "INFECTIOUS AND PARASITIC DISEASES (001-139)"},  ... ]

Method Options

The following options are available while calling a method of an api:

  • headers: Headers for the request
  • query: Query parameters for the url
  • body: Body of the request
  • request_type: Format of the request body

Request body information

Set request_type in options to modify the body accordingly

RAW request

When the value is set to raw, don't modify the body at all.

JSON request

When the value is set to json, JSON encode the body.

ICD-9 api

Returns an ICD-9 code.

var icd9 = client.icd9();
All top-level codes (GET codes/v1/icd9)

Returns all top-level ICD-9 codes. Useful for helping a user navigate down the ICD-9 hierarchy to find a code.

icd9.topLevelCodes(options, callback);
Retrieve a single code. (GET codes/v1/icd9/:code_name)

Returns a single code matching the name, if any exists. Replace periods with hypens (e.g. '066-4' for '066.4')

The following arguments are required:

  • code_name: name of code
icd9.singleCode("066-4", options, callback);
Search for codes by name. (GET codes/v1/icd9?q[name_cont]=:query)

Returns all codes whose name contains the search string.

The following arguments are required:

  • query: the search query string
icd9.searchByName("082-2", options, callback);
Search for codes by description. (GET codes/v1/icd9?q[description_cont]=:query)

Returns all codes whose description contains the search string.

The following arguments are required:

  • query: the search query string
icd9.searchByDescription("eastern equine", options, callback);
Search for codes by name or description. (GET codes/v1/icd9?q[name_or_description_cont]=:query)

Returns all codes whose name or description contains the search string.

The following arguments are required:

  • query: the search query string
icd9.searchByNameOrDescription("west nile", options, callback);

ICD-10 api

Returns an ICD-10 code.

var icd10 = client.icd10();
All top-level codes (GET codes/v1/icd10)

Returns all top-level ICD-10 codes. Useful for helping a user navigate down the ICD-10 hierarchy to find a code.

icd10.topLevelCodes(options, callback);
Retrieve a single code. (GET codes/v1/icd10/:code_name)

Returns a single code matching the name, if any exists. Replace periods with hypens (e.g. 'R50-9' for 'R50.9')

The following arguments are required:

  • code_name: name of code
icd10.singleCode("R50-9", options, callback);
Search for codes by name. (GET codes/v1/icd10?q[name_cont]=:query)

Returns all codes whose name contains the search string.

The following arguments are required:

  • query: the search query string
icd10.searchByName("b05", options, callback);
Search for codes by description. (GET codes/v1/icd10?q[description_cont]=:query)

Returns all codes whose description contains the search string.

The following arguments are required:

  • query: the search query string
icd10.searchByDescription("mumps", options, callback);
Search for codes by name or description. (GET codes/v1/icd10?q[name_or_description_cont]=:query)

Returns all codes whose name or description contains the search string.

The following arguments are required:

  • query: the search query string
icd10.searchByNameOrDescription("rubella", options, callback);

Contributors

Here is a list of Contributors

TODO

License

MIT

Bug Reports

Report here.

Contact

Michael Carroll at Aqua.io

[email protected]

@aqua_io

This library initially generated by alpaca.