RxMix Tutorial
Introduction
RxMix is an interface for building applications that allows users to combine functions of the RxNorm, RxTerms, RxClass, and Interaction APIs. RxMix offers several notable features:- Function composition. The RxMix interface allows the user to build a workflow of API functions to execute. This saves the user from having to write complex programs to handle multiple function calls. Examples of function composition are contained in the examples below.
- Batch processing. Through the user interface, RxMix allows the user to process large amounts of data through the user defined workflow. The user can provide a file containing a list of inputs, such as drug names or drug identifiers, for input to the workflow. RxMix will execute the workflow and inform the user via email when the job has completed, providing information on how to retrieve the results.
- Output in XML, JSON or Text. RxMix offers the user the choice of formatting the output in XML, JSON, or text.
- Interactive mode. RxMix allows users to interactively test and display the results of the workflow on a single input value.
Users of the RxMix interface should be familiar with the RxNorm, RxClass, Interaction, and/or the RxTerms API functions.
RxMix video tutorials:
- Using RxMix to Retrieve NDCs for an Ingredient: Interactive Mode
- Using RxMix to Retrieve NDCs for an Ingredient: Batch Mode
- Pre-Built Workflows in RxMix. Finding Drugs that May Treat a Disease
RxMix web page
Batch example
A Simple Example
This example illustrates the basic operations of the RxMix interface. In this example, we will build a workflow containing two functions in order to find what diseases/condition a drug treats using the NDF-RT API. We will run this workflow interactively.Note: The NDF-RT API was discontinued in February 2019. The last NDF-RT data set was issued in Februrary 2018.
The figure below shows the initial RxMix page.

The main panel is divided up into eight sections.
- Workflow is where the workflow is displayed. The workflow can be loaded from a file or built using the "Select Funtion" menu.
- Build is where the workflow can be constructed by allowing users to select API functions and add them to build a workflow.
- Load is where workflows can be imported into RxMix. The "FROM WORKFLOW LIBRARY" button allows the user to select one workflow from a library of common use cases. The "FROM MY WORKFLOWS" button allows the user to select a previously saved workflow.
- Input is where the user specifies the input values needed to run the workflow. The Batch tab allows the user to run batch jobs on the workflow.
- Output (left side) is where the user specifies the output type (JSON, TEXT, TABLE or XML), and the output filters.
- Execute contains buttons that allows the user the clear, save or run (interactively) the workflow.
- Documentation contains the descriptions of the functions and the parameters in the APIs used in the workflows
- Output (below documentation) contains the results of the interactive run.
To define a workflow, first click on the arrow at the right side of the box under Select Function, and a menu of the available functions will be displayed like the figure below.

The menu of available functions shows the API (RxNorm, RxTerms, RxClass, or Interaction) type and the names for each available function.
Scroll down to the NDF-RT functions and select the NDF-RT API function findConceptsByName. The workflow area is changed to the figure below.

The findConceptsByName function needs two parameters. The concept name parameter will be specified in the input data section. The other parameter, the kind name, is specified in the workflow area. RxMix provides a default value (all kinds are selected) for this field.
Note: The documentation for a selected function can
be viewed by positioning the cursor over the help icon ![]() |
Uncheck all then select DRUG_KIND in the kind menu. Click the Add to Workflow button to add the function to the workflow. The workflow area is changed to the figure below.

Notice that a Remove Last button has appeared below the workflow diagram. This allows the last function in the workflow to be removed.
The next step is to add the second function to the workflow. From the function menu under NDF-RT, select getRelatedConceptsByRole. Under the Optional Parameters, select may_treat {NDFRT} from the role_type drop down menu.

Then click on the Add to Workflow button. The workflow is changed to the figure below.

The next step is to add the input data. The input for this workflow needs a drug name. Type in sotalol in the input box.

The Output Filter lists the fields to be included in the output.

Now click on the Run Interactive button in the EXECUTE section to start the processing. The results will be shown as a table (the output format selected) in the Output area.

Congratulations, you have created and run your first workflow in RxMix.
The next example will demonstrate the use of batch processing in RxMix. View the batch example.