RxNorm API
getNDCStatus
- Information returned
- Status of a National Drug Code (NDC)
- Service domain
- https://rxnav.nlm.nih.gov
- HTTP request
- GETÂ /REST/ndcstatus.xml?ndc=value&start=value&end=value&history=value&altpkg=value
Description
Get the status and history of a National Drug Code (NDC) or of an alternate packaging if the code specified by the ndc parameter is not found and the altpkg parameter requests substitution.
If both start and end are specified (as YYYYMM), only history records that overlap with that time interval will be returned.
All history records are returned (subject to the date range, if specified) unless the history parameter indicates that only the latest of those records is desired.
Each ndcHistory record indicates a drug concept (originalRxcui) and the first and last releases of RxNorm that related the NDC to it (startDate and endDate respectively). NDC associations that are still in effect have an endDate of the current RxNorm release.
The ndc response element reflects the NDC described in the response, which might be an alternate packaging if the code specified by the ndc parameter is not found and the altpkg parameter requests substitution.
- ACTIVE
- The NDC is recognized by RxNorm as active and is associated with an active concept. The RxCUI associated with the NDC is contained in the returned history data.
- OBSOLETE
- The NDC previously existed in RxNorm, but is no longer recognized as active. The history data will indicate the time periods and RxCUI(s) associated with the NDC.
- ALIEN
- The NDC is or was contained only in a source vocabulary other than RxNorm. This status means that the NDC has never been active in RxNorm.
- UNKNOWN
- The NDC is unknown or invalid. This means that the NDC has never been active in RxNorm, is not in a source vocabulary other than RxNorm, and no history data is available.
When status is ALIEN, the ndcSourceMapping indicates the RXCUI associated with the NDC by each NDC source. One of these RXCUIs is also reflected in the main rxcui, conceptName, and conceptStatus response elements. A concept name of "PROPRIETARY" indicates that a name from a non-proprietary source does not exist for this concept. Some NDCs designated as ALIEN come from sources external to RxNorm (such as FDA, LEGACY, or MEDICARE) and will not have a RxCUI specified.
The conceptName response element reflects the RxNorm concept name when the NDC status is ACTIVE or OBSOLETE. Otherwise, the name is drawn from an NDC source.
Status values for the related RxNorm concept are described at getRxcuiHistoryStatus.
To find all alternate packagings of an NDC code, see findRelatedNDCs.
Scope
Current and Historical: concepts in current and previous RxNorm data sets
Parameters
Parameter | Location | Use | Description | Default |
---|---|---|---|---|
format | Path | Optional | Notation for results One of:
| .xml |
ndc | Query | Required | NDC (CMS 11-digit, or 5-3-2, 5-4-1, or 4-4-2; no asterisks) | |
start | Query | Optional | Start of date interval, as YYYYMM (e.g., 201408) | |
end | Query | Optional | End of date interval, as YYYYMM (e.g., 201408) | |
history | Query | Optional | Number of history entries to retrieve One of:
| 0 |
altpkg | Query | Optional | Whether to retrieve information for an alternative packaging if the specified NDC is not found One of:
| 0 |
All query parameters are case-insensitive.
Note that HTTP requires that query parameters be "URL encoded". For full information on URL encoding, please refer to IETF RFC 3986, "Uniform Resource Identifier".
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
- ndcStatus
- ndc11
- National Drug Code (NDC) in CMS 11-digit format
- status
- NDC status
- active
- whether the NDC is currently considered active by RxNorm's NDC sources (YES/NO)
- rxnormNdc
- whether the NDC is part of the RxNorm NDC set (YES/NO)
- rxcui
- RxNorm identifier
- conceptName
- A name for the concept
- conceptStatus
- RxNorm concept status
- sourceList
- Source vocabularies where the NDC is found
- sourceName (array)
- Source vocabulary
- altNdc
- 'Y' when the ndc11 field contains an NDC other than the one specified by the user
- ndcSourceMapping (array)
- Concepts with which the NDC was most recently associated
- ndcSource
- Source of the NDC
- ndcActive
- Whether the source considers this NDC as currently marketed (YES/NO)
- ndcRxcui
- Concept the source associated with the NDC
- ndcConceptName
- Concept name from RxNorm
- ndcConceptStatus
- Concept status (Active, Obsolete, Remapped, Quantified, NotCurrent)
- ndcHistory (array)
- History of the NDC within the RxNorm vocabulary
- activeRxcui
- This field may be blank if the original RxNorm concept is no longer active. It may also be different than the original RxCUI if the concept has been remapped.
- originalRxcui
- The RxNorm concept associated with the NDC at the time the NDC was active.
- 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
See also
Example: Active NDC with two history records
XML: https://rxnav.nlm.nih.gov/REST/ndcstatus?ndc=00071015723
JSON: https://rxnav.nlm.nih.gov/REST/ndcstatus.json?ndc=00071015723
From June 2007 through July 2009 the NDC was associated with RxNorm concept identified by RxCUI 617311. From June 2007 to the present the NDC is associated with RxCUI 617320.
An XML result is shown below.
<rxnormdata> <ndcStatus> <ndc11>00071015723</ndc11> <status>ACTIVE</status> <active>YES</active> <rxnormNdc>YES</rxnormNdc> <rxcui>617320</rxcui> <conceptName>atorvastatin 40 MG Oral Tablet [Lipitor]</conceptName> <conceptStatus>ACTIVE</conceptStatus> <sourceList> <sourceName>GS</sourceName> <sourceName>MMSL</sourceName> <sourceName>MMX</sourceName> <sourceName>MTHFDA</sourceName> <sourceName>MTHSPL</sourceName> <sourceName>RXNORM</sourceName> <sourceName>VANDF</sourceName> </sourceList> <altNdc>N</altNdc> <comment/> <ndcHistory> <activeRxcui>617320</activeRxcui> <originalRxcui>617320</originalRxcui> <startDate>200706</startDate> <endDate>202501</endDate> </ndcHistory> <ndcHistory> <activeRxcui>617311</activeRxcui> <originalRxcui>617311</originalRxcui> <startDate>200706</startDate> <endDate>200901</endDate> </ndcHistory> </ndcStatus> </rxnormdata>
Example: Obsolete NDC
XML: https://rxnav.nlm.nih.gov/REST/ndcstatus?ndc=00364666854
JSON: https://rxnav.nlm.nih.gov/REST/ndcstatus.json?ndc=00364666854
The NDC is obsolete, last active in January 2011. The RxNorm concept that it was associated with, 312656, is also obsolete, indicated by the value in the conceptStatus field.
An XML result is shown below.
<rxnormdata> <ndcStatus> <ndc11>00364666854</ndc11> <status>OBSOLETE</status> <active>NO</active> <rxnormNdc>YES</rxnormNdc> <rxcui>312656</rxcui> <conceptName>promazine 50 MG/ML Injectable Solution</conceptName> <conceptStatus>OBSOLETE</conceptStatus> <sourceList> <sourceName>MMSL</sourceName> <sourceName>MMX</sourceName> <sourceName>RXNORM</sourceName> <sourceName>VANDF</sourceName> </sourceList> <altNdc>N</altNdc> <comment/> <ndcHistory> <activeRxcui/> <originalRxcui>312656</originalRxcui> <startDate>200706</startDate> <endDate>201101</endDate> </ndcHistory> </ndcStatus> </rxnormdata>
Example: NDC that was never active in RxNorm
XML: https://rxnav.nlm.nih.gov/REST/ndcstatus?ndc=70074040143
JSON: https://rxnav.nlm.nih.gov/REST/ndcstatus.json?ndc=70074040143
The NDC status is Alien, meaning that the NDC has never been active in RxNorm, but is recognized by a non-RxNorm source. No history records are returned since it has never been active in RxNorm.
An XML result is shown below.
<rxnormdata> <ndcStatus> <ndc11>70074040143</ndc11> <status>ALIEN</status> <active>YES</active> <rxnormNdc>NO</rxnormNdc> <rxcui>692607</rxcui> <conceptName>JEVITY 1 CAL LIQUID</conceptName> <conceptStatus>NOTCURRENT</conceptStatus> <sourceList> <sourceName>VANDF</sourceName> </sourceList> <altNdc>N</altNdc> <comment/> <ndcSourceMapping> <ndcSource>VANDF</ndcSource> <ndcActive>YES</ndcActive> <ndcRxcui>692607</ndcRxcui> <ndcConceptName>JEVITY 1 CAL LIQUID</ndcConceptName> <ndcConceptStatus>NotCurrent</ndcConceptStatus> </ndcSourceMapping> </ndcStatus> </rxnormdata>
Example: Alternate packaging
XML: https://rxnav.nlm.nih.gov/REST/ndcstatus?ndc=00115954405&altpkg=1
JSON: https://rxnav.nlm.nih.gov/REST/ndcstatus.json?ndc=00115954405&altpkg=1
The requested NDC, 00115954405, is unknown. Because altpkg is 1, the API found an alternate packaging and reported on it instead.
An XML result is shown below.
<rxnormdata> <ndcStatus> <ndc11>00115954401</ndc11> <status>OBSOLETE</status> <active>NO</active> <rxnormNdc>YES</rxnormNdc> <rxcui>857340</rxcui> <conceptName>bethanechol chloride 50 MG Oral Tablet</conceptName> <conceptStatus>ACTIVE</conceptStatus> <sourceList> <sourceName>GS</sourceName> <sourceName>MMSL</sourceName> <sourceName>MMX</sourceName> <sourceName>MTHFDA</sourceName> <sourceName>MTHSPL</sourceName> <sourceName>NDDF</sourceName> <sourceName>RXNORM</sourceName> <sourceName>VANDF</sourceName> </sourceList> <altNdc>Y</altNdc> <comment/> <ndcHistory> <activeRxcui>857340</activeRxcui> <originalRxcui>857340</originalRxcui> <startDate>200908</startDate> <endDate>202311</endDate> </ndcHistory> <ndcHistory> <activeRxcui>857340</activeRxcui> <originalRxcui>197410</originalRxcui> <startDate>200709</startDate> <endDate>200907</endDate> </ndcHistory> </ndcStatus> </rxnormdata>