You should be able to use the RxNav REST service to obtain a list of
NDCs given a SMART medication's RxNorm code. It sounds like you have
the right idea with the /ndcs function you mentioned below.
For example, if I run the API Playground app on Alex Lewis, and then
click "GET", I can pull out the first drug's code via:
response.where('?m rdf:type sp:Medication').where('?m sp:drugName
?n').where('?n sp:code ?c')[0].c.value
Yielding: http://rxnav.nlm.nih.gov/REST/rxcui/855334
If I tack on '/ndcs/', I get the URL:
http://rxnav.nlm.nih.gov/REST/rxcui/855334/ndcs
Dereferencing this yields an XML document from the NLM, with a list of
(several!) NDC codes.
Hope this helps,
Josh
The SMART team believes that a proliferation of coding systems (for
drugs as well as other entities in the medical record) can make
writing health apps unnecessarily difficult -- and it sounds like
you're experiencing this difficulty! We try to make life easier for
SMART app developers by providing consistent, predictable codes. For
medications, we're using RxNorm SCDs and SBDs (not english names,
though we do provide these as title attributes alongside RxNorm
codes). So when you obtain a SMART medication list, the RxNorm code
for each medication should be clear and unambiguous.
When it comes to mapping drug codes between systems, the RxNorm
database provided by the National Library of Medicine is a very useful
resource. Some of its power is exposed through a public-facing REST
interface at http://rxnav.nlm.nih.gov/RxNormRestAPI.html -- but for
deeper mapping capabilities you may need to download the database and
query it directly (more info at
http://www.nlm.nih.gov/research/umls/rxnorm/docs/rxnormfiles.html).
From the RxNav documentation, you can query for RxNorm identifiers by
NDC or NUI:
* http://rxnav.nlm.nih.gov/REST/rxcui?idtype=NDC&id=54569456800
* http://rxnav.nlm.nih.gov/REST/rxcui?idtype=NUI&id=N0000155159
I hope this helps,
Josh