This is an Olive Helps loop used to look up drug information through the National Library of Medicine's publicly available RxNav API.
The purpose of this repo is for new loop authors to see the code used to build a production-ready loop. This example loop assumes some familiarity with Node, Typescript, and React, but attempts to explain concepts in a way that anyone with that familiarity can apply it to work within the Olive Helps platform. For more in-depth explanations and walkthroughs of developing for the Olive Helps platform, please visit the official Olive Helps developer documentation hub.
Some specific concepts used in this loop that that will be helpful to read about:
For development, you will need Node.js and the Olive Helps application installed on your machine.
Go to the official Node.js website and follow the instructions for your operating system.
If the installation was successful, you should be able to run the following commands:
$ node --version
v16.3.2
$ npm --version
8.3.0
-
If your
npm
version is out of date, use the following command:$ npm install npm -g
Go to the official Olive Helps installation guide and follow the instructions for your operating system.
If installation was successful, launching the Olive Helps application should open the sidebar on the right side of your screen.
-
In order to install and test the loop on your machine, you have to register to be an official loop developer (known as a "Loop Author"). Follow the "Become a Loop Author" guide to see how.
$ git clone https://github.com/open-olive/rxnav-example-loop
$ cd rxnav-example-loop
$ npm install
$ npm run lint # Run ESLint & Prettier to check for issues
$ npm run lint:fix # Fix all auto-fixable issues
$ npm run test # Run Jest unit tests
$ npm run test:coverage # Run Jest unit tests with coverage report
$ npm run build # Build the loop to be installed in Olive Helps
Now that the loop is built, you can install it locally to your Olive Helps to see it in action. Follow the "Local Loop Installation" guide to see how.
This product uses publicly available data from the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services; NLM is not responsible for the product and does not endorse or recommend this or any other product.