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

rxnorm-js

v0.1.1

Published

Library for querying the RXNorm API

Downloads

23

Readme

rxnorm-js

===========

RxNorm and OpenFDA Medication Database querying. This library provides the following exports:

  • queryfdaCode - search adverse events for drugs using RxNorm
  • queryfdaName - search adverse events for drugs with the same brand or generic name
  • queryRxImageCode - find images for a medication with a certain rxcui code
  • queryRxNormName - find a medication by name
  • queryRxNormSpelling - find spelling suggestions for a medication
  • queryRxNormApproximate - find a medication by approximate name
  • queryRxNormDFG - find a medication by dose form group
  • queryMedlinePage - query medlinePlus Connect
  • queryRxNormGroup - query dose form groups

Data Examples

queryfdaCode

example: https://api.fda.gov/drug/event.json?search=patient.drug.openfda.rxcui:"318272"&count=patient.reaction.reactionmeddrapt.exact
response:
meta: {
        disclaimer: "openFDA is a beta research project and not for clinical use. While we make every effort to ensure that data is accurate, you should assume all results are unvalidated.",
        license: "http://open.fda.gov/license",
        last_updated: "2015-01-21"
    },
    results: [{
            term: "FLUSHING",
            count: 10017
        }, {
            term: "DYSPNOEA",
            count: 9273
        }, {
            term: "NAUSEA",
            count: 9105
        }, {
            term: "DIZZINESS",
            count: 8347
        }
    }]

queryRxImageCode

example: http://rximage.nlm.nih.gov/api/rximage/1/rxnav?rxcui=309114
response:
{
    replyStatus: {
        success: true,
        imageCount: 4,
        totalImageCount: 4,
        date: "2015-04-27 11:03:15 GMT",
        matchedTerms: {
            rxcui: "309114"
        }
    },
    nlmRxImages: [{
            id: 185646439,
            ndc11: "00093-3147-01",
            part: 1,
            relabelersNdc9: [{@
                sourceNdc9: "00093-3147",
                ndc9: [
                    "10544-0020",
                    "35356-0980",
                    "42549-0565",
                    "53808-0222",
                    "55289-0058",
                    "60429-0037",
                    "66116-0255"
                ]
            }],
            status: "Former imprint",
            rxcui: 309114,
            splSetId: "19307ff0-71de-477b-965d-ea243e5ede3a",
            acqDate: "12-02-2009",
            name: "Cephalexin 500 MG Oral Capsule",
            labeler: "Teva Pharmaceuticals USA Inc",
            imageUrl: "http://rximage.nlm.nih.gov/image/images/gallery/original/00093-3147-01_RXNAVIMAGE10_24231258.jpg",
            imageSize: 663359,
            attribution: "National Library of Medicine | Lister Hill National Center for Biomedical Communications | Office of High Performance Computing and Communications | Medicos Consultants LLC"
        }
    }
}

queryRxNormName

example: http://rxnav.nlm.nih.gov/REST/rxcui?name=lipitor
returns: 
 <rxnormdata>
  <idGroup>
      <name>lipitor</name>
      <rxnormId>153165</rxnormId>
  </idGroup>
 </rxnormdata>

queryMedlinePage

example: http://apps2.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.88&mainSearchCriteria.v.c=637188&mainSearchCriteria.v.dn=Chantix%200.5%20MG%20Oral%20Tablet&informationRecipient.languageCode.c=en&knowledgeResponseType=application/json
returns:
{
    feed: {
        xsi: "http://www.w3.org/2001/XMLSchema-instance",
        base: "http://www.nlm.nih.gov/medlineplus/",
        lang: "en",
        title: {},
        subtitle: {},
        author: {},
        updated: {},
        category: [],
        id: {},
        entry: [{
            lang: "en",
            title: {
                _value: "Varenicline",
                type: "text"
            },
            link: [{
                title: "Varenicline",
                rel: "alternate",
                type: "html",
                href: "http://www.nlm.nih.gov/medlineplus/druginfo/meds/a606024.html"
            }],
            id: {
                _value: "tag: nlm.nih.gov, 2015-30-04:/medlineplus/druginfo/meds/a606024.html"
            },
            updated: {
                _value: "2015-04-29T22:04:39Z"
            },
            summary: {
                _value: "",
                type: "html"
            }
        }]
    }
}