7

RxNorm is a database of drugs put out by the U.S. National Library of Medicine. I've pulled the RxNorm data into a Postgres database using some of the supplied MySQL scripts and some code that I wrote myself.

I am able to find the list of all strengths for a given drug, like say "gabapentin". First I find the identifier for "gabapentin":

select * from rxnconso where str = 'gabapentin' and sab = 'RXNORM';

which gives:

rxcui | lat | ts | lui | stt | sui | ispref | rxaui  |  saui  | scui  | sdui |  sab   | tty | code  |    str     | srl | suppress | cvf  
-------+-----+----+-----+-----+-----+--------+--------+--------+-------+------+--------+-----+-------+------------+-----+----------+------
25480 | ENG |    |     |     |     |        | 417389 | 417389 | 25480 |      | RXNORM | IN  | 25480 | gabapentin |     | N        | 4096

From that I learn that the identifier for gabapentin is '25480'. And then I can get the strengths for '25480' like so:

select * from rxnsat where atn='RXN_STRENGTH' and rxcui in (select distinct(rxcui) from rxnconso where rxcui in (select rxcui1 from rxnrel where rxcui2 = '25480')) order by NULLIF(regexp_replace(atv, E'\\D', '', 'g'), '')::int;

which gives:

  rxcui  | lui | sui |  rxaui  | stype |  code   | atui | satui |     atn      |  sab   |   atv    | suppress | cvf  
---------+-----+-----+---------+-------+---------+------+-------+--------------+--------+----------+----------+------
 997844  |     |     | 3276700 | AUI   | 997844  |      |       | RXN_STRENGTH | RXNORM | 25 MG/ML | N        | 4096
 346365  |     |     | 1533281 | AUI   | 346365  |      |       | RXN_STRENGTH | RXNORM | 50 MG/ML | N        | 4096
 345817  |     |     | 2061711 | AUI   | 345817  |      |       | RXN_STRENGTH | RXNORM | 100 MG   | N        | 4096
 1482816 |     |     | 5937983 | AUI   | 1482816 |      |       | RXN_STRENGTH | RXNORM | 300 MG   | N        | 4096
 345818  |     |     | 2061712 | AUI   | 345818  |      |       | RXN_STRENGTH | RXNORM | 300 MG   | N        | 4096
 345819  |     |     | 2061713 | AUI   | 345819  |      |       | RXN_STRENGTH | RXNORM | 400 MG   | N        | 4096
 346145  |     |     | 1532840 | AUI   | 346145  |      |       | RXN_STRENGTH | RXNORM | 600 MG   | N        | 4096
 1101334 |     |     | 3641350 | AUI   | 1101334 |      |       | RXN_STRENGTH | RXNORM | 600 MG   | N        | 4096
 346146  |     |     | 1532842 | AUI   | 346146  |      |       | RXN_STRENGTH | RXNORM | 800 MG   | N        | 4096

That means gabapentin is available in strengths of 25mg/mL, 50mg/mL, 100mg, 300mg (2 different forms), 400mg, 600mg (2 different forms), and 800mg.

But how do I find out what forms correspond to those different strengths? For instance, some of them are capsules, some are tablets, and some are solutions.

(If you go to this RxTerms demo page, you can enter "Gabapentin" in the first "Drug Name" field, and then choose the autocomplete option "Gabapentin (Oral Pill)", and then click in the Strength field, and you will see that it lists things like "300 mg Cap", "300 mg Tab", etc. RxTerms pulls its data from RxNorm, so it should be similar to the results gotten from querying RxNorm appropriately.)

2
  • I'm still interested in an answer to this, but I noticed that RxTerms provides comparable information in a much simpler format. There's basically one table, with one row for each item, such as a particular brand of gabapentin in a 100 mg tablet. See wwwcf.nlm.nih.gov/umlslicense/rxtermApp/rxTerm.cfm
    – aem
    Mar 26, 2015 at 21:19
  • 1
    it would be legitimate to post your comment as an answer. Self-answering is not considered a problem. Mar 27, 2015 at 14:48

1 Answer 1

0

Kind of stumbled upon this, while unlikely to help the OP seeing as this was asked years ago, hopefully someone will find this useful. I have not downloaded the full dataset but you can fetch the desired data here. I believe the rate limit is 20/second/IP address.

example call:

https://clinicaltables.nlm.nih.gov/api/rxterms/v3/search?sf=DISPLAY_NAME&ef=DISPLAY_NAME,STRENGTHS_AND_FORMS,RXCUIS,DISPLAY_NAME_SYNONYM&terms={your search term here}

this should get you all names, aliases, strengths and forms along with rxcuis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.