# Shop by Drug

The IFP Medical quoting workflow supports evaluation of prescription drug coverage. This process is commonly referred to as Shop by Drug, short for shopping for health insurance plans while evaluating drug coverage within the formulary for each quoted plan. The Shop by Drug workflow is a two step process in which the user must first identify the prescription drug(s) to evaluate coverage for.&#x20;

1. [Search for a Drug](#search-for-a-specific-drug) - use the "Drug Search" endpoint to identify one or more of the end user's drugs.&#x20;
2. [Quote Applicants with Drug Data](#quote-applicants-with-drug-data) - quote the end user in the IFP Medical market with the selected drugs, returning available plans and their benefits, premiums, and formulary coverage details. Formulary details include the standardized drug tier, prior authorization, step therapy, and quantity limits, where available.&#x20;

## Search for a Specific Drug&#x20;

Before drug(s) can be evaluated for coverage in the Shop by Doc flow, they must be identified via the Drug Search API. The Drug Search endpoint ([API docs](https://docs.ideonapi.com/#drugs-drugs-get)) supports look ups by:

* **Search Term** `search_term` - the primary means for drug identification. The search term string evaluates partial or full matches against the drug names.
* **RxCUI** `rx_cui` - the RXCui identifier from [RxNorm](https://www.nlm.nih.gov/research/umls/rxnorm/index.html), the database maintained by the National Library of Medicine. Each RxCUI identifier provides a consistent, normalized key to represent a clinical drug.&#x20;

In addition to passing either `search_term` or `rx_cui`, we strongly recommend passing `require_formulary=true` in every call. This limits results to only return drugs present in at least one carrier's formulary, which prevents users from selecting drugs that may exist in the drug dataset but are not covered by any carrier's plans.

### Identifying Drugs

A drug in Ideon's data is unique by its `med_id`, which is Ideon's foreign key for a given drug. A distinct `med_id` is associated to one or more `drug_package_id`, which is the standard identifier for drug packages as defined in the FDA's [National Drug Code Directory](https://www.fda.gov/drugs/drug-approvals-and-databases/national-drug-code-directory). To evaluate drug coverage via the Shop By Doc flow, the `med_id` and/or the `drug_package_id` must be passed when quoting applicants.&#x20;

Please note that `rx_cui` is considered the highest level drug identifier. It does not include different packages, forms, or strengths for the drug. It can correspond to multiple distinct drugs, as identified by their `med_id`'s. Given this, the `rx_cui` is not a valid value to pass in the call to the "Medical Plan Search" endpoint.&#x20;

### Drug Names&#x20;

The `name` of the drug is sourced from the RxNorm database. All information in each `drug_packages` object is sourced from the [FDA's National Drug Code (NDC) Directory](https://www.fda.gov/drugs/drug-approvals-and-databases/national-drug-code-directory), including `proprietary_name` and `non_proprietary_name` .&#x20;

The drug various drug name fields can each exceed 2,000 characters. For a user-friendly experience, we recommend displaying the distinct `proprietary_name` present in the response, and provide an additional option to select an `active_ingredient_strength` for each of the returned drugs. We also recommend using the full drug `name` as a fallback, to account for rare instances when the aforementioned fields are missing or empty.

## Quote Applicants with Drug Data

### Quoting an Individual with Drug Coverage&#x20;

The `med_id` and/or `drug_package_id` identifiers selected in the previous step can be passed in the request body of the Medical Plan Search endpoint ([API docs](https://docs.ideonapi.com/#major-medical-plans-major-medical-plans-post)) to evaluate drug coverages for each of the quoted plans. Each selected drug should be included in its own object in the `drug_packages` array, where the drug can be defined by the `med_id`, `drug_package_id` (which corresponds to the `id` in the request schema), or both. We recommend including a maximum of 50 `med_id` or `drug_package_id` in each given quote request.

The drug identifiers passed in the `drug_packages` array are not validated. If the identifiers passed in the `drug_packages` array are invalid or not found, the quote will succeed and the `coverages` array in the response will return as an empty array.&#x20;

### Drug Coverage in the Response&#x20;

If the `drug_packages` array is included in the request body, then a `coverages` array will be included in the response schema. An object is included in the `coverages` array for each unique drug and quoted plan combination for which the drug is covered or not covered in the plan's formulary. For example, if two unique drugs are included in the `drug_packages` array and each of those drugs is covered by the formulary of three quoted plans, then there will be six objects in the `coverages` array - one for each combination of the drug and plan.

For each of the objects representing a covered drug-plan combination in the `coverages` array, the following data points are included:&#x20;

* **Quantity Limit** `quantity_limit` - a boolean indicating whether there is a limitation on the amount or quantity of the drug that will be dispensed.
* **Prior Authorization** `prior_authorization` - a boolean indicating whether the plan enrollee is required to obtain approval from the payer before the drug is covered under the benefit.
  * Please note that the process for approval for drugs that require prior authorization is nuanced and can require additional approvals or medical exceptions. We strongly recommend that for any drug for which `prior_authorization=true`, the coverage status displayed to end users reflects that nuance. We suggest including a note such as "This drug requires prior authorization or, in rare scenarios, a non-formulary exception to be covered by the carrier". This approach ensures accurate representation of drugs that require additional review before coverage is determined and prevents misleading end-user displays.
* **Step Therapy** `step_therapy` - a boolean indicating whether the plan enrollee is required to try one or more lower cost or preferred therapies before coverage of the more expensive or alternative drug is permitted.
* **Tier** `tier` - this field denotes the cost-sharing or formulary placement level for a drug under a given plan. Please refer to the descriptions for each tier in our API documentation for the Medical Plan Search endpoint ([API docs](https://docs.ideonapi.com/#major-medical-plans-major-medical-plans-post)).
  * Covered drugs are generally indicated by the following drug tiers when `prior_authorization=false`: `preferred_generic`, `non_preferred_generic`, `generic`, `preferred_brand`, `non_preferred_brand`, `specialty`, `non_preferred_specialty`
  * Not covered drugs are indicated by the tier `not_covered`, meaning the drug is explicitly not covered by the plan's formulary. These drugs should not be displayed as covered under the plan.
  * Not listed drugs are indicated by the tier `not_listed`, meaning the drug is neither explicitly covered nor excluded. These drugs should not be displayed as covered under the plan.
* **Plan Identifier** `plan_id` - identifier for the health plan for which the drug coverage applies to.
* **Drug Package Identifier** `drug_package_id` - this identifier refers to the specific packing unit for the drug, as managed within the FDA's NDC directory. If a `med_id` is passed in the request's `drug_packages` array, then the corresponding `drug_package_id` in the response's `coverages` array will be the `med_id`, formatted as an integer (shown in the first object in the sample response below). If a `drug_package_id` is passed in the request, then the `drug_package_id` in the response will be the `drug_package_id`, formatted as a string (shown in the second object in the sample response below).

{% code title="Sample Drug Coverages Array in the Plan Search Response" %}

```json
{
    "coverages": [
        {
            "quantity_limit": false,
            "prior_authorization": false,
            "step_therapy": false,
            "tier": "not_covered",
            "plan_id": "27833IL0140016",
            "drug_package_id": 584911
        },
        {
            "quantity_limit": false,
            "prior_authorization": false,
            "step_therapy": false,
            "tier": "preferred_generic",
            "plan_id": "42529IL0080007",
            "drug_package_id": "00071-0157-23"
        }
    ]
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ideonapi.gitbook.io/quote-and-select/quote-individuals/shop-by-drug.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
