Medication Search
Introduction
Within Photon, medication search is structured as a "tiered" search. That is, you search for a Drug
, then search for Product(s)
under that Drug, and finally search for Package(s)
under a product.
All Drugs returned from searching medications that have a MedicationType "Rx" are "prescrib-able". Drugs are free from having a specific 9 or 11-digit NDC reference and instead directly map to RxNorm concepts (using TTYs and RxCUI). Drugs are meant to be prescribed as a "concept" in which any number of products can fulfill the request - such as when branding doesn't matter.
Products, on the other hand, are specific medications on the market that have a 9-digit NDC attached. They may be generic, branded, over-the-counter, prescription, etc. These are meant to be prescribed in "Dispense as Written" scenarios where you expect the pharmacy to dispense a product of a certain brand.
Finally, Packages are the various package mutations a product can take and contain an 11-digit NDC of which the first 9 are shared with their referenced product. A package may be a blister pack, 30 count bottle, pouch, etc. It's very rare that you'd ever need to directly prescribe a package, but we offer them for convenience and information discovery.
Example
As an example, we're going to start by searching through the various drugs contained within Photon, selecting a drug and finding all of it's products, and finally iterating over it's packages
Drugs
To search for drugs within Photon, one can issue the following GraphQL query
{
medications(filter: { drug: { name: "Amoxicillin" }}) {
id
name
codes {
productNDC
}
form
strength
concept
manufacturer
}
}
A search on drugs is expecting to contain a name, and will return back all matching concepts.
A result set may look like the following:
{
"data": {
"medications": [
{
"id": "med_01GAMSZKQANK9GPZB24CFRJ443",
"name": "Amoxicillin 200 mg tablet, chewable",
"codes": {
"productNDC": null
},
"form": "tablet, chewable",
"strength": "200 mg",
"concept": "DRUG",
"manufacturer": null
},
{
"id": "med_01GAMSZKRFH6WKV1WCY940J6ST",
"name": "Amoxicillin 500 mg tablet, film coated",
"codes": {
"productNDC": null
},
"form": "tablet, film coated",
"strength": "500 mg",
"concept": "DRUG",
"manufacturer": null
}
]
}
}
An important thing to note is that all
DRUG
concepts in Photon lack a manufacturer (as you can have multiple different manufacturers products under the sameDRUG
, but always contain a defined strength and form
Products
Let's say we're interested in Amoxicillin 500 mg tablet, film coated
, but we want to prescribe a specific branded/manufacturer product on that drug. We can take the associated id, med_01GAMSZKRFH6WKV1WCY940J6ST
and request all products associated to that DRUG
{
medications(filter: { product: { drug: "med_01GAMSZKRFH6WKV1WCY940J6ST" }}) {
id
name
codes {
productNDC
}
form
strength
concept
manufacturer
}
}
The resulting products we see are:
{
"data": {
"medications": [
{
"id": "med_01GARTG4H9D2QJYNYNNR2NC7HH",
"name": "Amoxicillin 500 mg/1 tablet, film coated",
"codes": {
"productNDC": "65862-0014"
},
"form": "tablet, film coated",
"strength": "500 mg/1",
"concept": "PRODUCT",
"manufacturer": "Aurobindo Pharma Limited"
},
{
"id": "med_01GARTG4JHCFJXGFMVMA9TEQ1M",
"name": "Amoxicillin 500 mg/1 tablet, film coated",
"codes": {
"productNDC": "70518-3228"
},
"form": "tablet, film coated",
"strength": "500 mg/1",
"concept": "PRODUCT",
"manufacturer": "REMEDYREPACK INC."
}
]
}
}
Notice, while both are the same "medication" of Amoxicillin 500mg tablets, they are produced by 2 different manufacturers and have unique, identifier NDCs
Packages
Let's say you are interested in what packages Aurobindo Pharma Limited
has for it's Amoxicillin 500 mg/1 tablet, film coated
. You can use the associated Med ID, med_01GARTG4H9D2QJYNYNNR2NC7HH
, and make the following query:
{
medications(filter: { package: { product: "med_01GARTG4H9D2QJYNYNNR2NC7HH" }}) {
id
name
codes {
productNDC
packageNDC
}
form
strength
concept
manufacturer
}
}
We receive the following packages:
{
"data": {
"medications": [
{
"id": "med_01GARTN6WZXRPQ8HHEFKGBSEJ1",
"name": "Amoxil (Amoxicillin 500 mg/1) tablet, film coated, Pack [20 TABLET, FILM COATED IN 1 BOTTLE - Aurobindo Pharma Limited]",
"codes": {
"productNDC": "65862-0014",
"packageNDC": "65862-0014-20"
},
"form": "tablet, film coated",
"strength": "500 mg/1",
"concept": "PACKAGE",
"manufacturer": "Aurobindo Pharma Limited"
},
{
"id": "med_01GARTN6XQ79PDYR4AN2DHFXA2",
"name": "Amoxil (Amoxicillin 500 mg/1) tablet, film coated, Pack [100 TABLET, FILM COATED IN 1 BOTTLE - Aurobindo Pharma Limited]",
"codes": {
"productNDC": "65862-0014",
"packageNDC": "65862-0014-01"
},
"form": "tablet, film coated",
"strength": "500 mg/1",
"concept": "PACKAGE",
"manufacturer": "Aurobindo Pharma Limited"
},
{
"id": "med_01GARTN6Y9AZEC8W452SV4HVGK",
"name": "Amoxil (Amoxicillin 500 mg/1) tablet, film coated, Pack [500 TABLET, FILM COATED IN 1 BOTTLE - Aurobindo Pharma Limited]",
"codes": {
"productNDC": "65862-0014",
"packageNDC": "65862-0014-05"
},
"form": "tablet, film coated",
"strength": "500 mg/1",
"concept": "PACKAGE",
"manufacturer": "Aurobindo Pharma Limited"
}
]
}
}
Note, there are 3 different packages that seem are delineated by # of Tablets (20, 100, 500). Each of these has a unique 11-digit NDC (packageNDC
) of which the first 9 digits are shared with the productNDC
Updated over 1 year ago