getAllNDCs

Information returned
National Drug Codes (NDC) associated with a concept
Service domain
https://rxnav.nlm.nih.gov
HTTP request
GET  /REST/rxcui/rxcui/allndcs.xml?history=0or1

This function is deprecated.

Please consider getAllHistoricalNDCs instead.

Description

Get the National Drug Codes (NDCs) for the RxNorm concept. All NDCs, whether presently associated with the RxNorm concept or associated with it in the past, can be returned.

Currently associated NDCs are those NDCs present in the current version of RxNorm.

Past NDCs include all NDCs ever mentioned in any version of RxNorm, regardless of presence in the current version.

Scope

Current: concepts in the current RxNorm data set that have an atom with SUPPRESS=N

Parameters

ParameterLocationUseDescriptionDefault
rxcuiPathRequiredRxNorm identifier
formatPathOptional

Notation for results

One of:
.xml
Get results in XML
.json
Get results in JSON
.xml
historyQueryOptionalDepth of history to retrieve
One of:
0
NDCs presently associated with the concept
1
NDCs ever associated with the concept
1

All query parameters are case-insensitive.

Output structure

Results are available as either XML or JSON.

  • The XML result has the root element rxnormdata. It is described in the XML Schema for the RxNorm API; the relevant element structure is summarized below. Elements that would be empty might be left out.

  • The JSON result is an object {...}, analogous to the content of the XML rxnormdata. Fields that might occur multiple times in the XML are expressed as an array. Fields that would be empty might be null or left out. Numbers are expressed as strings.

Both XML and JSON results follow the same outline:

rxnormdata
Root element in XML, or anonymous object in JSON
ndcConcept
ndcTime (array)
NDC and period of association
ndc (array of 1)
National Drug Code (NDC) in CMS 11-digit format
startDate
the first RxNorm release where the NDC was active for this concept. Format is YYYYMM
endDate
the last RxNorm release where the NDC was active for this concept. Format is YYYYMM

Example: NDCs for Zithromax 100 MG Injectable Solution (RxCUI=351772)

XML: https://rxnav.nlm.nih.gov/REST/rxcui/351772/allndcs

JSON: https://rxnav.nlm.nih.gov/REST/rxcui/351772/allndcs.json

An XML result is shown below.

<rxnormdata>
    <ndcConcept>
        <ndcTime>
            <ndc>00069040001</ndc>
            <startDate>201401</startDate>
            <endDate>201510</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>00069040010</ndc>
            <startDate>201401</startDate>
            <endDate>201510</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>00069315014</ndc>
            <startDate>200706</startDate>
            <endDate>201510</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>00069315083</ndc>
            <startDate>200706</startDate>
            <endDate>201510</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>00069315084</ndc>
            <startDate>201304</startDate>
            <endDate>201510</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>54569468100</ndc>
            <startDate>200706</startDate>
            <endDate>201101</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>54868452700</ndc>
            <startDate>200810</startDate>
            <endDate>201510</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>55154271505</ndc>
            <startDate>200706</startDate>
            <endDate>201206</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>61947315000</ndc>
            <startDate>200708</startDate>
            <endDate>201206</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>61947315001</ndc>
            <startDate>200706</startDate>
            <endDate>201206</endDate>
        </ndcTime>
        <ndcTime>
            <ndc>61947315003</ndc>
            <startDate>200706</startDate>
            <endDate>201206</endDate>
        </ndcTime>
    </ndcConcept>
</rxnormdata>