The NABP assigns a unique seven-digit code for each licensed pharmacy in the United States. The NABP number is being referred to as the NCPDP pharmacy number. The first two digits indicate state; and the seventh is a “check” digit. Below is the SAS code which generates the mapping of the first two digits of NABP number and state abbreviation code:
data nabp2_state_cd;
input nabp2 $ state_cd $ @@;
datalines;
01 AL 02 AK 03 AZ 04 AR 05 CA
06 CO 07 CT 08 DE 09 DC 10 FL
11 GA 12 HI 13 ID 14 IL 15 IN
16 IA 17 KS 18 KY 19 LA 20 ME
21 MD 22 MA 23 MI 24 MN 25 MS
26 MO 27 MT 28 NE 29 NV 30 NH
31 NJ 32 NM 33 NY 34 NC 35 ND
36 OH 37 OK 38 OR 39 PA 40 PR
41 RI 42 SC 43 SD 44 TN 45 TX
46 UT 47 VT 48 VA 49 WA 50 WV
51 WI 52 WY 55 MP 56 CA
; run;