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

ribbon-client

v0.0.1-beta.31

Published

a client for Ribbon API

Downloads

33

Readme

Overview

Wrapper library for Ribbon API destined for Node.js and React

NOTE: Current version supports only a few GET requests available in Ribbon API.

Table of Contents

Contributing

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

Any contributions you make will be under the MIT Software License

In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.

Report bugs using Github's issues

We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!

Write bug reports with detail, background, and sample code

Great Bug Reports tend to have:

  • A quick summary and/or background
  • Steps to reproduce
    • Be specific!
    • Give sample code if you can.
  • What you expected would happen
  • What actually happens
  • Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People love thorough bug reports. I'm not even kidding.

License

By contributing, you agree that your contributions will be licensed under its MIT License.

Installation

Using npm:

$ npm install ribbon-client

Usage

Getting started

Client for frontend applications (to be paired with a proxy server)

import { Ribbon } from "ribbon-client";

const ribbon = new Ribbon({
  url: "https://yourproxy.com/",
  target: "proxy",
});

Client for node application (to be connected to a test environment)

const Ribbon = require("ribbon-client");
const ribbon = new Ribbon({
  url: "https://test.ribbonhealth.com/v1/",
  target: "ribbon-test",
  apiKey: "000000",
});

Client for node application (to be connected to a production environment)

const Ribbon = require("ribbon-client");
const ribbon = new Ribbon({
  url: "https://ribbonhealth.com/v1/",
  target: "ribbon",
  apiKey: "000000",
});

Api

The client allows the user to build simple requests that are sent directly to the ribbon API or through a proxy server. A few examples are shown below.

Clinical Areas

Getting clinical areas (Docs

const data: ProvidersResponse = await ribbon.ClinicalAreas.find({
  clinical_area: "skin",
});

Condition Cost Estimate

Getting estimate (Docs)

const data: ConditionCostEstimateResponse =
  await ribbon.ConditionCostEstimate.find({
    condition_ids: [
      "00000000-0000-0000-0000-000000000000",
      "00000000-0000-0000-0000-000000000001",
    ],
    member_age: 50,
    member_gender: "f",
    member_zip: "00000",
  });

Conditions

Getting conditions list (Docs)

// search for conditions related to cancer
const data: ConditionsResponse = await ribbon.Conditions.find({
  search: "cancer",
});

Insurances

Getting insurances list (Docs)

// search for insurances of type PPO in Alaska state
const data: InsurancesResponse = await ribbon.Insurances.find({
  state: "AK",
  plan_type: "PPO",
});

Languages

Getting languages list(Docs)

// search for languages that include "lish" phrase in their names
const data: LanguagesResponse = await ribbon.Languages.find({
  search: "lish",
});

Locations

Getting locations list (Docs)

// search for locations in Washington that supports specific insurance
const data: LocationsResponse = await ribbon.Locations.find({
  address: "washington",
  insurance_ids: ["00000000-0000-0000-0000-000000000000"],
});

Excluding data from search (Docs)

// search for locations in Washington that don't support specific insurance
const data: LocationsResponse = await ribbon.Locations.find({
  address: "washington",
  exclude: {
    insurance_ids: ["00000000-0000-0000-0000-000000000000"],
  },
});

Organizations

Getting organizations list (Docs)

// search for organizarions in Boston
const data: OrganizationsResponse = await ribbon.Organizations.find({
  address: "boston",
});

Procedure Cost Estimate

Getting estimation (Docs)

const data: ProcedureCostEstimateResponse =
  await ribbon.ProcedureCostEstimate.find({
    procedure_ids: [
      "00000000-0000-0000-0000-000000000000",
      "00000000-0000-0000-0000-000000000001",
    ],
    member_zip: "00000",
  });

Procedures

Getting procedures list (Docs)

// search for procedures related to x-ray
const data: ProceduresResponse = await ribbon.Procedures.find({
  search: "x-ray",
});

Providers

Getting providers (Docs)

// search for high rated providers aged 45 and below
const data: ProvidersResponse = await ribbon.Providers.find({
  max_age: 45,
  min_rating: 9,
});

Specifying response shape (Docs)

// search providers but response should consist of only "clinical_areas" and "specialties" fields
const data: ProvidersResponse = await ribbon.Providers.find({
  max_age: 45,
  min_rating: 9,
  fields: ["clinical_areas", "specialties"],
});

Excluding data from search (Docs)

// search for low rated providers
const data: ProvidersResponse = await ribbon.Providers.find({
  max_age: 45,
  fields: ["ratings_avg", "first_name", "last_name", "age"],
  exclude: {
    min_rating: 3,
  },
});

Specialties

Getting specialties list (Docs)

// search for specialties related to cancer
const data: SpecialtiesResponse = await ribbon.Specialties.find({
  search: "cancer",
});

Treatments

Getting treatments list (Docs)

// search for treatments related to insomnia
const data: TreatmentsResponse = await ribbon.Treatments.find({
  search: "insomnia",
});