Wrapper library for Ribbon API destined for Node.js and React
NOTE: Current version supports only a few GET
requests available in Ribbon API.
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
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!
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.
By contributing, you agree that your contributions will be licensed under its MIT License.
Using npm:
$ npm install ribbon-client
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",
});
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.
Getting clinical areas (Docs
const data: ProvidersResponse = await ribbon.ClinicalAreas.find({
clinical_area: "skin",
});
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",
});
Getting conditions list (Docs)
// search for conditions related to cancer
const data: ConditionsResponse = await ribbon.Conditions.find({
search: "cancer",
});
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",
});
Getting languages list(Docs)
// search for languages that include "lish" phrase in their names
const data: LanguagesResponse = await ribbon.Languages.find({
search: "lish",
});
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"],
},
});
Getting organizations list (Docs)
// search for organizarions in Boston
const data: OrganizationsResponse = await ribbon.Organizations.find({
address: "boston",
});
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",
});
Getting procedures list (Docs)
// search for procedures related to x-ray
const data: ProceduresResponse = await ribbon.Procedures.find({
search: "x-ray",
});
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,
},
});
Getting specialties list (Docs)
// search for specialties related to cancer
const data: SpecialtiesResponse = await ribbon.Specialties.find({
search: "cancer",
});
Getting treatments list (Docs)
// search for treatments related to insomnia
const data: TreatmentsResponse = await ribbon.Treatments.find({
search: "insomnia",
});