Hello STATA gurus,
I have medications data captured by a string variable “med1”, for example “Zocor 2010 20mg”. I need to connect to a web based database (API) that will examine the medication name and return the possible standardized medication code to my database. There is a list of commands that the web-based server recognizes and returns the requested values.
For example “approximateTerm” command for the medication presented in the example above (Zocor 2010 20mg) returns the following medication information in XML http://rxnav.nlm.nih.gov/REST/approx...g&maxEntries=3
(returns)
<rxnormdata>
<approximateGroup>
<inputTerm>zocor 10 mg</inputTerm>
<maxEntries>3</maxEntries>
<comment/>
<candidate>
<rxcui>563653</rxcui>
<score>75</score>
<rank>1</rank>
</candidate>
Etc.
I need information in the new columns: “rxcui” (it will be “563653”) and “rank” (“1”). How do I query the web based API and read this info into STATA? Any suggestions are appreciated!!!
Thanks!
Max
I have medications data captured by a string variable “med1”, for example “Zocor 2010 20mg”. I need to connect to a web based database (API) that will examine the medication name and return the possible standardized medication code to my database. There is a list of commands that the web-based server recognizes and returns the requested values.
For example “approximateTerm” command for the medication presented in the example above (Zocor 2010 20mg) returns the following medication information in XML http://rxnav.nlm.nih.gov/REST/approx...g&maxEntries=3
(returns)
<rxnormdata>
<approximateGroup>
<inputTerm>zocor 10 mg</inputTerm>
<maxEntries>3</maxEntries>
<comment/>
<candidate>
<rxcui>563653</rxcui>
<score>75</score>
<rank>1</rank>
</candidate>
Etc.
I need information in the new columns: “rxcui” (it will be “563653”) and “rank” (“1”). How do I query the web based API and read this info into STATA? Any suggestions are appreciated!!!
Thanks!
Max
Comment