|
The FDA Site for National Drug Codes includes
11 text files with key information. This information is more useful
when extracted and formatted. The data, SQL , scripts and procedures are available on our downloads page.
|
*;
* process ndc codes from USDA site;
* process ndc codes downloaded from
http://www.fda.gov/cder/ndc;
* last download was on 06-26-2006;
* unzip the FDA file ziptext.zip into the directory c:\data\ndc;
* change libname statement if different directory is used;
* note that the libname library name is case sensitive;
* read data, load into SQLite database;
* run various SQLite queries and Script Basic routines for analysis;
* last update 06-26-06;
libname ndc 'c:\data\ndc';
options obs=max;
data ndc.listings;
infile 'c:\data\ndc\listings.txt' ;
input
@1 seqno $7.
@9 lblcode $6.
@16 prodcode $4.
@21 strength $10.
@32 unit $10.
@43 rxotc $1.
@45 tradename $100.
;
run;
data ndc.packages;
infile 'c:\data\ndc\packages.txt' ;
input
@1 seqno $7.
@9 pkgcode $2.
@12 pkgsize $25.
@38 packtype $38.
;
run;
data ndc.formulat;
infile 'c:\data\ndc\formulat.txt' ;
input @1 seqno $7.
@9 strength $10.
@20 unit $5.
@26 ingred $100.
;
run;
data ndc.applicat;
infile 'c:\data\ndc\applicat.txt' ;
input
@1 seqno $3.
@9 applno $6.
@16 prodno $3.
;
run;
data ndc.firms;
infile 'c:\data\ndc\firms.txt' ;
input
@1 lblcode $6.
@8 firmname $65.
@74 addr1 $40.
@115 street $40.
@156 pobox $9.
@166 foreign $40.
@207 city $30.
@238 state $2.
@241 zip $9.
@251 province $30.
@282 country $40.
;
data ndc.routes;
infile 'c:\data\ndc\routes.txt' ;
input @1 seqno $7.
@9 route $3.
@13 routename $240.
;
run;
data ndc.doseform;
infile 'c:\data\ndc\doseform.txt';
input @1 seqno $7.
@9 doseform $3.
@13 dosename $240.
;
data ndc.tbldosag;
infile 'c:\data\ndc\tbldosag.txt';
input @1 doseform $3.
@5 dostrans $100.
;
run;
data ndc.tblroute;
infile 'c:\data\ndc\tblroute.txt';
input @1 route $3.
@5 routetrans $100.
;
run;
data ndc.tblunit;
infile 'c:\data\ndc\tblunit.txt';
input @1 unit $3.
@5 unittrans $100.
;
run;
* end of run;
|