Search, Review, and Compare Prices with Aetna GoodRx API and Sample App Appery.io Plug-in

This post is is in the process of being updated for a more current version of the Aetna API.

How the plug-in works

Aetna GoodRx API and Sample App plug-in can be instantly added to any new or existing app. Aetna GoodRx is offering RESTful services that help to find the lowest retail cash price as offered by a national chain pharmacy for a given pharmaceutical. In addition, user will receive a URL for each result that will navigate to the page in the GoodRx mobile web experience that will display the pharmacy that is offering that price, and even find the closest branch to on their current location.

The ready-to-run app makes it super easy to start using the API. To add Aetna GoodRx plug-in:

  1. From Appery.io builder, select Create New -> From Plug-in
  2. Open Healthcare, then select Aetna GoodRx API and Sample App

grx001

After importing the plugin, set the default page to GoodRx_SearchPage, set the theme to GoodRx_Theme and check the Render all pages in one HTML file checkbox.

Using GoodRx API requires an API key which you can get from http://developer.carepass.com. To enter the API key, open Services/Aetna_GoodRx_Settings file:

Selection_836

Once the API key is set, click the Test button (upper right corner) to launch the app in the browser. The start page looks like this:

grx002

The page contains the search attributes for drugs as follows:

  • Drug Name (open text field, required if National Drug Code Directory identifier field is empty)
    • For example: lipitor
  • Drug form (drop-down, optional).
    • Possible values:
      • Tablet
      • Capsule
      • Injectable
      • Liquid
  • Dosage in mg (optional, requires digits)
    • For example: 10
  • Quantity (optional, requires digits)
    • For example: 30
  • Manufacturer Type (drop-down, optional)
    • Possible values:
      • Brand
      • Generic
  • National Drug Code Directory identifier (open text field, required if Drug Name is empty)

To test the app, you should enter some search parameters. For example, let’s enter “lipitor” in the “Drug Name” field. If you click the Search button then, you’ll see the screen with the search results:

grx003

If you click the Go to website button, you will be redirected to GoodRx desktop website or mobile website (if you launch the app on a mobile device).

grx004

The page shows information about the drug as well as information where it can be purchased.

Inside the plug-in

Now that we’ve seen how this sample app works, let’s dig deeper to see how the GoodRx API is exposed on the Appery.io platform.

GoodRx_LowPriceSearch service

GoodRx_LowPriceSearch is used for getting the list of the lower prices of the requested drugs. The URL and the main settings of the service as shown below:

grx005

If you open the Request tab, you’ll see that only the apikey parameter is defined here. The reason for this is that the service can receive different sets of parameters, so all the other required parameters are added dynamically in Javascript Helper.search() function before service invocation.

grx006

The response parameters are displayed under the Response tab:

grx007

GoodRx_Settings service

This service holds the API key. It is used in GoodRx_LowPriceSearch service.

grx008