UNPKG

rxnav-api

Version:

promise-based interface to RXNAV to access RxNorm and other interesting medical information

24 lines (21 loc) 546 B
/** * test-rxnav-api.js * * shows examples * */ const RxnavApi = require('../src/rxnav-api') const restfulEndpointsList = () => { new RxnavApi().restfulEndpointsList() .then((res) => console.log(JSON.stringify(res))) .catch(err => console.log(`err=${err}`)) } // restfulEndpointsList() const rxnormSourceTypeList = () => { new RxnavApi().sourceTypeList() .then((res) => console.log(JSON.stringify(res))) .catch(err => console.log(`err=${err}`)) } // rxnormSourceTypeList()