lib/rxnorm.js
function queryRxNormApproximate(medname, maxEntries, callback) {
    // maxEntries is optional
    if (!callback) {
        callback = maxEntries;
        maxEntries = 5;
    }

    query("http://rxnav.nlm.nih.gov/REST/approximateTerm.json", {
        term: medname,
        maxEntries: maxEntries
    }, callback);
}
function queryRxNormApproximate(medname, maxEntries, callback) {
    // maxEntries is optional
    if (!callback) {
        callback = maxEntries;
        maxEntries = 5;
    }

    query("http://rxnav.nlm.nih.gov/REST/approximateTerm.json", {
        term: medname,
        maxEntries: maxEntries
    }, callback);
}
function queryRxNormApproximate ( medname , maxEntries , callback ) { // maxEntries is optional if ( ! callback ) { callback = maxEntries ; maxEntries = 5 ; } query ( "http://rxnav.nlm.nih.gov/REST/approximateTerm.json" , { term : medname , maxEntries : maxEntries } , callback ) ; }
find a medication by approximate name
find a medication by approximate name