1 The SAS System 11:51 Tuesday, October 2, 2007
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
NOTE: This session is executing on the XP_PRO platform.
NOTE: SAS 9.1.3 Service Pack 4
NOTE: SAS initialization used:
real time 5.17 seconds
cpu time 0.70 seconds
NOTE: AUTOEXEC processing beginning; file is C:\Program Files\SAS\SAS 9.1\autoexec.sas.
NOTE: AUTOEXEC processing completed.
1 OPTIONS LS=132 PS=59;
2
3 TITLE1 "HC-094I";
4 TITLE2 "Sample SAS Job for Example A";
5
6 LIBNAME IN "C:\DATA";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\DATA
7
8 ************************************************************************************************
9 * Calculate the expenditures for prescribed medicines associated with medical visits for asthma.
10 ************************************************************************************************;
11
12 PROC FORMAT;
13 VALUE EVENTYPE
14 1 = "1 MVIS"
15 2 = "2 OPAT"
16 3 = "3 EROM"
17 4 = "4 STAZ"
18 5 = "5 DVIS"
19 6 = "6 OMED"
20 7 = "7 HVIS"
21 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
22
23 RUN;
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.10 seconds
cpu time 0.00 seconds
24
25 *-------------------------------------------------------------------------------------
26 * Get condition records coded as asthma.
2 The SAS System 11:51 Tuesday, October 2, 2007
27 *-------------------------------------------------------------------------------------;
28 DATA ASCONDS;
29 SET IN.H96 (KEEP=CONDIDX CCCODEX);
30 IF CCCODEX="128";
31
32 RUN;
NOTE: There were 104855 observations read from the data set IN.H96.
NOTE: The data set WORK.ASCONDS has 1869 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.48 seconds
cpu time 0.15 seconds
33
34 *------------------------------------------------------------------------------------
35 * Get the events linked to each of the asthma condition records.
36 *------------------------------------------------------------------------------------;
37 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;
NOTE: There were 1869 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCONDS has 1869 observations and 2 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.09 seconds
cpu time 0.01 seconds
38
39 proc print data=asconds (obs=50);
40 title3 "sample print of work.asconds - sorted by condidx";
41 title4 "COND (H96) records where cccodex=128";
42 run;
NOTE: There were 50 observations read from the data set WORK.ASCONDS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.34 seconds
cpu time 0.06 seconds
43
44 PROC SORT DATA=IN.H94IF1 OUT=CLNK; BY CONDIDX; RUN;
NOTE: There were 343960 observations read from the data set IN.H94IF1.
NOTE: The data set WORK.CLNK has 343960 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 8.65 seconds
cpu time 1.37 seconds
45
46 DATA ASCLNKS;
47 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
48 ASCONDS(IN=INASCOND KEEP=CONDIDX);
49 BY CONDIDX;
50 IF INCLNK & INASCOND;
51 RUN;
3 The SAS System 11:51 Tuesday, October 2, 2007
NOTE: There were 343960 observations read from the data set WORK.CLNK.
NOTE: There were 1869 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7360 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 4.21 seconds
cpu time 0.53 seconds
52
53 proc print data=asclnks (obs=75);
54 by condidx;
55 id condidx;
56 format eventype eventype.;
57 title3 "sample print of work.asclnks - sorted by condidx";
58 title4 "events linked to asthma condition records";
59 run;
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed pages 2-3.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.12 seconds
cpu time 0.01 seconds
60
61 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;
NOTE: There were 7360 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7360 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.06 seconds
cpu time 0.03 seconds
62
63 proc print data=asclnks (obs=50);
64 format eventype eventype.;
65 title3 "sample print of work.asclnks - sorted by evntidx";
66 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
67
68 DATA ASCLNKS;
69 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
70 BY EVNTIDX;
71 IF FIRST.EVNTIDX;
72 RUN;
NOTE: There were 7360 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7338 observations and 2 variables.
4 The SAS System 11:51 Tuesday, October 2, 2007
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
73
74 proc print data=asclnks (obs=50);
75 title3 "sample print of unique evntidxs from work.asclnks";
76 format eventype eventype.;
77 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
78
79 *--------------------------------------------------------------------------------------------
80 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
81 *--------------------------------------------------------------------------------------------;
82 DATA MVIS;
83 SET IN.H94G (KEEP=EVNTIDX PERWT05F SEETLKPV);
84 IF PERWT05F > 0 & SEETLKPV NE 2;
85 RUN;
NOTE: There were 152748 observations read from the data set IN.H94G.
NOTE: The data set WORK.MVIS has 148765 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 6.21 seconds
cpu time 0.49 seconds
86
87 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;
NOTE: There were 148765 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.MVIS has 148765 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.39 seconds
cpu time 0.37 seconds
88
89 *---------------------------------------------------------------------------------------------
90 * Identify MVIS events which were for asthma.
91 *---------------------------------------------------------------------------------------------;
92 DATA ASMVIS;
93 MERGE ASCLNKS (IN=INASCLNK)
94 MVIS (IN=INMVIS KEEP=EVNTIDX);
95 BY EVNTIDX;
96 IF INASCLNK & INMVIS;
97 RUN;
NOTE: There were 7338 observations read from the data set WORK.ASCLNKS.
NOTE: There were 148765 observations read from the data set WORK.MVIS.
5 The SAS System 11:51 Tuesday, October 2, 2007
NOTE: The data set WORK.ASMVIS has 2174 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.25 seconds
cpu time 0.23 seconds
98
99 proc print data=asmvis (obs=50);
100 format eventype eventype.;
101 title3 "sample print of work.asmvis";
102 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-094G) events";
103 run;
NOTE: There were 50 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE PRINT printed page 6.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
104
105 *-------------------------------------------------------------------------------------
106 * Get PMED IDs linked to the MVIS events which were for asthma.
107 *-------------------------------------------------------------------------------------;
108 PROC SORT DATA=IN.H94IF2 OUT=RXLK; BY EVNTIDX; RUN;
NOTE: There were 59331 observations read from the data set IN.H94IF2.
NOTE: The data set WORK.RXLK has 59331 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.31 seconds
cpu time 0.24 seconds
109
110 proc print data=rxlk (obs=140);
111 by evntidx;
112 id evntidx;
113 var linkidx eventype;
114 format eventype eventype.;
115 title3 "sample print of work.rxlk - sorted by evntidx";
116 title4 "Rx+event link file records (HC-94IF2)";
117 run;
NOTE: There were 140 observations read from the data set WORK.RXLK.
NOTE: The PROCEDURE PRINT printed pages 7-11.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
118
119 DATA PMEDIDS;
120 MERGE RXLK (IN=INRXLK KEEP=EVNTIDX LINKIDX EVENTYPE)
121 ASMVIS(IN=INASMVIS KEEP=EVNTIDX);
122 BY EVNTIDX;
123 IF INRXLK & INASMVIS;
124 RUN;
6 The SAS System 11:51 Tuesday, October 2, 2007
NOTE: There were 59331 observations read from the data set WORK.RXLK.
NOTE: There were 2174 observations read from the data set WORK.ASMVIS.
NOTE: The data set WORK.PMEDIDS has 1940 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.10 seconds
cpu time 0.11 seconds
125
126 proc print data=pmedids (obs=50);
127 by evntidx;
128 id evntidx;
129 format eventype eventype.;
130 title3 "sample print of work.pmedids - sorted by evntidx";
131 title4 "work.rxlk records for evntidxs in work.asmvis";
132 run;
NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed pages 12-13.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
133
134 PROC SORT DATA=PMEDIDS; BY LINKIDX; RUN;
NOTE: There were 1940 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 1940 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
135
136 proc print data=pmedids (obs=50);
137 format eventype eventype.;
138 title3 "sample print of work.pmedids - sorted by linkidx";
139 run;
NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed page 14.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
140
141 DATA PMEDIDS;
142 SET PMEDIDS (KEEP=LINKIDX);
143 BY LINKIDX;
144 IF FIRST.LINKIDX;
145 RUN;
NOTE: There were 1940 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 1853 observations and 1 variables.
7 The SAS System 11:51 Tuesday, October 2, 2007
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
146
147 proc print data=pmedids (obs=50);
148 title3 "sample print of unique linkidxs in work.pmedids";
149 run;
NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed page 15.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
150
151 *-----------------------------------------------------------------------------------------
152 * Get PMED records linked to MVIS events which were for asthma.
153 *-----------------------------------------------------------------------------------------;
154 PROC SORT DATA=IN.H94A OUT=PMED; BY LINKIDX; RUN;
NOTE: There were 317587 observations read from the data set IN.H94A.
NOTE: The data set WORK.PMED has 317587 observations and 13 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 20.71 seconds
cpu time 2.65 seconds
155
156 DATA MVPMEDS;
157 MERGE PMED (KEEP=LINKIDX RXRECIDX RXXP05X PERWT05F RXNAME)
158 PMEDIDS (IN=A);
159 BY LINKIDX;
160 IF A;
161 RUN;
NOTE: There were 317587 observations read from the data set WORK.PMED.
NOTE: There were 1853 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.MVPMEDS has 4900 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 2.53 seconds
cpu time 0.54 seconds
162
163 proc print data=mvpmeds (obs=200);
164 var rxrecidx rxname RXXP05X PERWT05F;
165 by linkidx;
166 id linkidx;
167 title3 "sample print of work.mvpmeds";
168 title4 "PMED (HC-094A) records for unique linkidxs in work.pmedids";
169 run;
NOTE: There were 200 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE PRINT printed pages 16-21.
8 The SAS System 11:51 Tuesday, October 2, 2007
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
170
171 PROC MEANS DATA=MVPMEDS N SUM;
172 VAR RXXP05X;
173 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
174 RUN;
NOTE: There were 4900 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 22.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.29 seconds
cpu time 0.01 seconds
175
176 PROC MEANS DATA=MVPMEDS N SUM;
177 VAR RXXP05X;
178 WEIGHT PERWT05F;
179 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
180 TITLE5 "Weighted";
181 RUN;
NOTE: There were 4900 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 23.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.04 seconds
cpu time 0.00 seconds
182
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 50.78 seconds
cpu time 7.79 seconds
HC-094I 11:51 Tuesday, October 2, 2007 1
Sample SAS Job for Example A
sample print of work.asconds - sorted by condidx
COND (H96) records where cccodex=128
Obs CONDIDX CCCODEX
1 300180180093 128
2 300180250064 128
3 300490270010 128
4 300600350034 128
5 300610290019 128
6 300680130051 128
7 300830210012 128
8 300910450025 128
9 301170420016 128
10 301320230021 128
11 302050190018 128
12 302560570015 128
13 302740680016 128
14 302850140023 128
15 302920640046 128
16 302930150015 128
17 302950160019 128
18 302950230018 128
19 302980530024 128
20 303350230045 128
21 303490360020 128
22 303510370015 128
23 303600490028 128
24 303670100066 128
25 303730200010 128
26 303760240088 128
27 303780330060 128
28 303780400075 128
29 304220290013 128
30 304220360012 128
31 304250390016 128
32 304280150074 128
33 304570200013 128
34 304710110124 128
35 304740470017 128
36 304780320015 128
37 304840230070 128
38 305260250057 128
39 305260320084 128
40 305350320069 128
41 305460360018 128
42 305490330016 128
43 305490400015 128
44 305540110050 128
45 305890140018 128
46 306130130099 128
47 306160160019 128
48 306160160081 128
49 306460410012 128
50 306630300010 128
HC-094I 11:51 Tuesday, October 2, 2007 2
Sample SAS Job for Example A
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
300180180093 300180180134 8 PMED
300180180261 8 PMED
300180250064 300180250141 8 PMED
300490270010 300490270015 8 PMED
300600350034 300600350155 8 PMED
300600350162 8 PMED
300610290019 300610290021 1 MVIS
300610290045 8 PMED
300610290052 8 PMED
300610290076 1 MVIS
300610290083 1 MVIS
300610290090 1 MVIS
300610290103 1 MVIS
300610290110 1 MVIS
300610290127 1 MVIS
300610290134 1 MVIS
300610290141 1 MVIS
300610290158 1 MVIS
300610290165 8 PMED
300610290172 8 PMED
300610290189 8 PMED
300610290196 8 PMED
300610290209 8 PMED
300610290216 8 PMED
300610290285 1 MVIS
300610290329 8 PMED
300610290336 8 PMED
300610290343 8 PMED
300610290350 8 PMED
300610290367 8 PMED
300610290374 8 PMED
300610290398 8 PMED
300610290401 8 PMED
300830210012 300830210042 4 STAZ
300830210066 1 MVIS
300830210097 8 PMED
300830210100 8 PMED
300830210155 8 PMED
300830210162 8 PMED
300830210179 8 PMED
300910450025 300910450020 1 MVIS
300910450044 8 PMED
300910450051 8 PMED
HC-094I 11:51 Tuesday, October 2, 2007 3
Sample SAS Job for Example A
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
300910450025 300910450099 8 PMED
300910450102 8 PMED
301170420016 301170420017 8 PMED
301170420024 8 PMED
301320230021 301320230030 8 PMED
301320230047 8 PMED
301320230232 8 PMED
301320230249 8 PMED
301320230270 8 PMED
301320230287 8 PMED
302560570015 302560570036 8 PMED
302560570043 1 MVIS
302560570050 8 PMED
302560570067 8 PMED
302560570074 8 PMED
302560570081 8 PMED
302560570101 8 PMED
302920640046 302920640065 1 MVIS
302920640096 8 PMED
302920640109 8 PMED
302920640116 8 PMED
302930150015 302930150027 8 PMED
302930150034 8 PMED
302930150058 8 PMED
302930150065 8 PMED
302930150130 8 PMED
302930150147 8 PMED
302950230018 302950230019 8 PMED
302950230057 8 PMED
302980530024 302980530010 1 MVIS
302980530034 8 PMED
302980530041 8 PMED
HC-094I 11:51 Tuesday, October 2, 2007 4
Sample SAS Job for Example A
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 300180180093 300180180134 8 PMED
2 300180180093 300180180261 8 PMED
3 300180250064 300180250141 8 PMED
4 300490270010 300490270015 8 PMED
5 300600350034 300600350155 8 PMED
6 300600350034 300600350162 8 PMED
7 300610290019 300610290021 1 MVIS
8 300610290019 300610290045 8 PMED
9 300610290019 300610290052 8 PMED
10 300610290019 300610290076 1 MVIS
11 300610290019 300610290083 1 MVIS
12 300610290019 300610290090 1 MVIS
13 300610290019 300610290103 1 MVIS
14 300610290019 300610290110 1 MVIS
15 300610290019 300610290127 1 MVIS
16 300610290019 300610290134 1 MVIS
17 300610290019 300610290141 1 MVIS
18 300610290019 300610290158 1 MVIS
19 300610290019 300610290165 8 PMED
20 300610290019 300610290172 8 PMED
21 300610290019 300610290189 8 PMED
22 300610290019 300610290196 8 PMED
23 300610290019 300610290209 8 PMED
24 300610290019 300610290216 8 PMED
25 300610290019 300610290285 1 MVIS
26 300610290019 300610290329 8 PMED
27 300610290019 300610290336 8 PMED
28 300610290019 300610290343 8 PMED
29 300610290019 300610290350 8 PMED
30 300610290019 300610290367 8 PMED
31 300610290019 300610290374 8 PMED
32 300610290019 300610290398 8 PMED
33 300610290019 300610290401 8 PMED
34 300830210012 300830210042 4 STAZ
35 300830210012 300830210066 1 MVIS
36 300830210012 300830210097 8 PMED
37 300830210012 300830210100 8 PMED
38 300830210012 300830210155 8 PMED
39 300830210012 300830210162 8 PMED
40 300830210012 300830210179 8 PMED
41 300910450025 300910450020 1 MVIS
42 300910450025 300910450044 8 PMED
43 300910450025 300910450051 8 PMED
44 300910450025 300910450099 8 PMED
45 300910450025 300910450102 8 PMED
46 301170420016 301170420017 8 PMED
47 301170420016 301170420024 8 PMED
48 301320230021 301320230030 8 PMED
49 301320230021 301320230047 8 PMED
50 301320230021 301320230232 8 PMED
HC-094I 11:51 Tuesday, October 2, 2007 5
Sample SAS Job for Example A
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 300180180134 8 PMED
2 300180180261 8 PMED
3 300180250141 8 PMED
4 300490270015 8 PMED
5 300600350155 8 PMED
6 300600350162 8 PMED
7 300610290021 1 MVIS
8 300610290045 8 PMED
9 300610290052 8 PMED
10 300610290076 1 MVIS
11 300610290083 1 MVIS
12 300610290090 1 MVIS
13 300610290103 1 MVIS
14 300610290110 1 MVIS
15 300610290127 1 MVIS
16 300610290134 1 MVIS
17 300610290141 1 MVIS
18 300610290158 1 MVIS
19 300610290165 8 PMED
20 300610290172 8 PMED
21 300610290189 8 PMED
22 300610290196 8 PMED
23 300610290209 8 PMED
24 300610290216 8 PMED
25 300610290285 1 MVIS
26 300610290329 8 PMED
27 300610290336 8 PMED
28 300610290343 8 PMED
29 300610290350 8 PMED
30 300610290367 8 PMED
31 300610290374 8 PMED
32 300610290398 8 PMED
33 300610290401 8 PMED
34 300830210042 4 STAZ
35 300830210066 1 MVIS
36 300830210097 8 PMED
37 300830210100 8 PMED
38 300830210155 8 PMED
39 300830210162 8 PMED
40 300830210179 8 PMED
41 300910450020 1 MVIS
42 300910450044 8 PMED
43 300910450051 8 PMED
44 300910450099 8 PMED
45 300910450102 8 PMED
46 301170420017 8 PMED
47 301170420024 8 PMED
48 301320230030 8 PMED
49 301320230047 8 PMED
50 301320230232 8 PMED
HC-094I 11:51 Tuesday, October 2, 2007 6
Sample SAS Job for Example A
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-094G) events
Obs EVNTIDX EVENTYPE
1 300610290021 1 MVIS
2 300610290076 1 MVIS
3 300610290083 1 MVIS
4 300610290090 1 MVIS
5 300610290103 1 MVIS
6 300610290110 1 MVIS
7 300610290127 1 MVIS
8 300610290134 1 MVIS
9 300610290141 1 MVIS
10 300610290158 1 MVIS
11 300610290285 1 MVIS
12 300830210066 1 MVIS
13 300910450020 1 MVIS
14 302560570043 1 MVIS
15 302920640065 1 MVIS
16 302980530010 1 MVIS
17 302980530065 1 MVIS
18 303510370044 1 MVIS
19 303510370195 1 MVIS
20 303510370277 1 MVIS
21 303600490060 1 MVIS
22 303670100312 1 MVIS
23 303670100329 1 MVIS
24 303730200014 1 MVIS
25 303730200021 1 MVIS
26 303730200038 1 MVIS
27 303730200045 1 MVIS
28 303730200052 1 MVIS
29 303730200069 1 MVIS
30 303730200165 1 MVIS
31 303730200172 1 MVIS
32 303730200189 1 MVIS
33 303760240258 1 MVIS
34 303760240265 1 MVIS
35 303760240272 1 MVIS
36 303760240289 1 MVIS
37 303760240296 1 MVIS
38 303760240316 1 MVIS
39 303760240330 1 MVIS
40 303760240347 1 MVIS
41 303760240361 1 MVIS
42 303760240378 1 MVIS
43 303760240498 1 MVIS
44 303760240532 1 MVIS
45 303760240549 1 MVIS
46 303760240556 1 MVIS
47 303760240570 1 MVIS
48 303760240587 1 MVIS
49 303760240594 1 MVIS
50 303760240607 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 7
Sample SAS Job for Example A
sample print of work.rxlk - sorted by evntidx
Rx+event link file records (HC-94IF2)
EVNTIDX LINKIDX EVENTYPE
300040100030 300040100061 1 MVIS
300040270023 300040270030 1 MVIS
300050150011 300050150059 1 MVIS
300050150066 1 MVIS
300050150073 1 MVIS
300050150080 1 MVIS
300050150097 1 MVIS
300050150028 300050150100 1 MVIS
300050150117 300050150193 1 MVIS
300050150302 300050150333 1 MVIS
300050150340 1 MVIS
300050150357 1 MVIS
300050150364 1 MVIS
300050150371 1 MVIS
300050150388 1 MVIS
300050150395 1 MVIS
300060120012 300060120101 5 DVIS
300060120067 300060120118 1 MVIS
300060120081 300060120125 1 MVIS
300060290012 300060290067 1 MVIS
300060290081 300060290132 1 MVIS
300060290163 300060290170 2 OPAT
300060290187 2 OPAT
300060360029 300060360050 1 MVIS
300080830011 300080830059 1 MVIS
300080830066 1 MVIS
300080830073 1 MVIS
300090130018 300090130070 1 MVIS
300090130032 300090130087 1 MVIS
300090130094 1 MVIS
300090130107 300090130138 1 MVIS
300090130114 300090130145 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 8
Sample SAS Job for Example A
sample print of work.rxlk - sorted by evntidx
Rx+event link file records (HC-94IF2)
EVNTIDX LINKIDX EVENTYPE
300100100058 300100100116 1 MVIS
300100100205 300100100236 1 MVIS
300110100233 300110100377 1 MVIS
300110100308 300110100384 1 MVIS
300110100322 300110100391 3 EROM
300110100428 300110100579 1 MVIS
300110100586 1 MVIS
300110100593 1 MVIS
300110100517 300110100606 5 DVIS
300130120016 300130120023 1 MVIS
300140290018 300140290025 1 MVIS
300150170043 300150170156 1 MVIS
300150170163 1 MVIS
300150170170 1 MVIS
300150170187 1 MVIS
300150170194 1 MVIS
300150170207 1 MVIS
300150170214 1 MVIS
300150170221 1 MVIS
300150170238 1 MVIS
300150170245 1 MVIS
300150170252 1 MVIS
300150170269 1 MVIS
300150170276 1 MVIS
300150170132 300150170163 4 STAZ
300150170214 4 STAZ
300150170276 4 STAZ
300150170283 4 STAZ
300150170149 300150170170 1 MVIS
300150170207 1 MVIS
300150170276 1 MVIS
300150170341 300150170389 1 MVIS
300160270011 300160270066 1 MVIS
300160270124 300160270131 5 DVIS
HC-094I 11:51 Tuesday, October 2, 2007 9
Sample SAS Job for Example A
sample print of work.rxlk - sorted by evntidx
Rx+event link file records (HC-94IF2)
EVNTIDX LINKIDX EVENTYPE
300170230011 300170230066 3 EROM
300170230155 300170230186 1 MVIS
300180180014 300180180052 1 MVIS
300180180069 1 MVIS
300180180076 1 MVIS
300180180083 1 MVIS
300180180090 1 MVIS
300180180103 1 MVIS
300180180110 1 MVIS
300180180127 1 MVIS
300180180134 1 MVIS
300190110054 300190110092 1 MVIS
300200310018 300200310049 1 MVIS
300200310063 300200310070 1 MVIS
300200310087 300200310107 1 MVIS
300210180078 300210180112 1 MVIS
300210180129 1 MVIS
300210180092 300210180136 1 MVIS
300220190210 300220190309 1 MVIS
300220190316 1 MVIS
300220190227 300220190323 1 MVIS
300220190330 1 MVIS
300220190234 300220190347 1 MVIS
300220190354 1 MVIS
300230230025 300230230032 1 MVIS
300230410014 300230410021 1 MVIS
300270370013 300270370020 1 MVIS
300280150010 300280150109 1 MVIS
300280150116 1 MVIS
300280150034 300280150123 1 MVIS
300280150130 1 MVIS
300280150147 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 10
Sample SAS Job for Example A
sample print of work.rxlk - sorted by evntidx
Rx+event link file records (HC-94IF2)
EVNTIDX LINKIDX EVENTYPE
300280150041 300280150154 5 DVIS
300280150205 300280150274 1 MVIS
300280150281 1 MVIS
300280150298 1 MVIS
300280150229 300280150301 1 MVIS
300280220010 300280220065 1 MVIS
300280220072 1 MVIS
300280220027 300280220089 1 MVIS
300280220123 300280220161 1 MVIS
300280220178 1 MVIS
300280390034 300280390212 1 MVIS
300280390229 1 MVIS
300280390236 1 MVIS
300280390250 300280390332 1 MVIS
300280460027 300280460065 5 DVIS
300280460034 300280460072 1 MVIS
300280460058 300280460072 1 MVIS
300280460096 300280460089 5 DVIS
300300190017 300300190024 1 MVIS
300310120055 300310120062 1 MVIS
300310120106 300310120151 1 MVIS
300320170024 300320170106 1 MVIS
300320170113 1 MVIS
300320170120 1 MVIS
300320170137 1 MVIS
300320170144 1 MVIS
300320170151 1 MVIS
300320170031 300320170168 1 MVIS
300320170199 300320170288 1 MVIS
300320170226 300320170288 1 MVIS
300320170295 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 11
Sample SAS Job for Example A
sample print of work.rxlk - sorted by evntidx
Rx+event link file records (HC-94IF2)
EVNTIDX LINKIDX EVENTYPE
300320170226 300320170308 1 MVIS
300320170315 1 MVIS
300320170322 1 MVIS
300320170339 1 MVIS
300320170346 1 MVIS
300320170264 300320170315 3 EROM
300320170360 300320170404 1 MVIS
300320240031 300320240048 1 MVIS
300320310017 300320310048 1 MVIS
300320310062 300320310079 1 MVIS
300340340025 300340340032 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 12
Sample SAS Job for Example A
sample print of work.pmedids - sorted by evntidx
work.rxlk records for evntidxs in work.asmvis
EVNTIDX LINKIDX EVENTYPE
300610290021 300610290038 1 MVIS
300610290076 300610290165 1 MVIS
300610290090 300610290172 1 MVIS
300610290285 300610290329 1 MVIS
300910450020 300910450037 1 MVIS
300910450044 1 MVIS
300910450051 1 MVIS
300910450068 1 MVIS
302560570043 302560570050 1 MVIS
302560570067 1 MVIS
302560570074 1 MVIS
302560570081 1 MVIS
302920640065 302920640096 1 MVIS
302920640109 1 MVIS
302920640116 1 MVIS
302980530010 302980530034 1 MVIS
302980530041 1 MVIS
302980530058 1 MVIS
303510370195 303510370208 1 MVIS
303510370277 303510370342 1 MVIS
303600490060 303600490173 1 MVIS
303730200014 303730200196 1 MVIS
303730200165 303730200254 1 MVIS
303730200261 1 MVIS
303730200278 1 MVIS
303780330083 303780330158 1 MVIS
303780330165 1 MVIS
303780330103 303780330172 1 MVIS
303780330216 303780330254 1 MVIS
303780330261 1 MVIS
304250390016 304250390047 1 MVIS
304250390054 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 13
Sample SAS Job for Example A
sample print of work.pmedids - sorted by evntidx
work.rxlk records for evntidxs in work.asmvis
EVNTIDX LINKIDX EVENTYPE
304250390023 304250390047 1 MVIS
304250390054 1 MVIS
304250390105 304250390136 1 MVIS
305260250246 305260250304 1 MVIS
305260250311 1 MVIS
305460360163 305460360252 1 MVIS
305460360269 1 MVIS
305460360276 1 MVIS
305540110012 305540110050 1 MVIS
305540110067 1 MVIS
305540110074 1 MVIS
305540110081 1 MVIS
305540110098 1 MVIS
305540110101 1 MVIS
305540110036 305540110118 1 MVIS
305540110170 305540110252 1 MVIS
305540110409 305540110492 1 MVIS
306160160018 306160160049 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 14
Sample SAS Job for Example A
sample print of work.pmedids - sorted by linkidx
Obs EVNTIDX LINKIDX EVENTYPE
1 300610290021 300610290038 1 MVIS
2 300610290076 300610290165 1 MVIS
3 300610290090 300610290172 1 MVIS
4 300610290285 300610290329 1 MVIS
5 300910450020 300910450037 1 MVIS
6 300910450020 300910450044 1 MVIS
7 300910450020 300910450051 1 MVIS
8 300910450020 300910450068 1 MVIS
9 302560570043 302560570050 1 MVIS
10 302560570043 302560570067 1 MVIS
11 302560570043 302560570074 1 MVIS
12 302560570043 302560570081 1 MVIS
13 302920640065 302920640096 1 MVIS
14 302920640065 302920640109 1 MVIS
15 302920640065 302920640116 1 MVIS
16 302980530010 302980530034 1 MVIS
17 302980530010 302980530041 1 MVIS
18 302980530010 302980530058 1 MVIS
19 303510370195 303510370208 1 MVIS
20 303510370277 303510370342 1 MVIS
21 303600490060 303600490173 1 MVIS
22 303730200014 303730200196 1 MVIS
23 303730200165 303730200254 1 MVIS
24 303730200165 303730200261 1 MVIS
25 303730200165 303730200278 1 MVIS
26 303780330083 303780330158 1 MVIS
27 303780330083 303780330165 1 MVIS
28 303780330103 303780330172 1 MVIS
29 303780330216 303780330254 1 MVIS
30 303780330216 303780330261 1 MVIS
31 304250390016 304250390047 1 MVIS
32 304250390023 304250390047 1 MVIS
33 304250390016 304250390054 1 MVIS
34 304250390023 304250390054 1 MVIS
35 304250390105 304250390136 1 MVIS
36 305260250246 305260250304 1 MVIS
37 305260250246 305260250311 1 MVIS
38 305460360163 305460360252 1 MVIS
39 305460360163 305460360269 1 MVIS
40 305460360163 305460360276 1 MVIS
41 305540110012 305540110050 1 MVIS
42 305540110012 305540110067 1 MVIS
43 305540110012 305540110074 1 MVIS
44 305540110012 305540110081 1 MVIS
45 305540110012 305540110098 1 MVIS
46 305540110012 305540110101 1 MVIS
47 305540110036 305540110118 1 MVIS
48 305540110170 305540110252 1 MVIS
49 305540110409 305540110492 1 MVIS
50 306160160018 306160160049 1 MVIS
HC-094I 11:51 Tuesday, October 2, 2007 15
Sample SAS Job for Example A
sample print of unique linkidxs in work.pmedids
Obs LINKIDX
1 300610290038
2 300610290165
3 300610290172
4 300610290329
5 300910450037
6 300910450044
7 300910450051
8 300910450068
9 302560570050
10 302560570067
11 302560570074
12 302560570081
13 302920640096
14 302920640109
15 302920640116
16 302980530034
17 302980530041
18 302980530058
19 303510370208
20 303510370342
21 303600490173
22 303730200196
23 303730200254
24 303730200261
25 303730200278
26 303780330158
27 303780330165
28 303780330172
29 303780330254
30 303780330261
31 304250390047
32 304250390054
33 304250390136
34 305260250304
35 305260250311
36 305460360252
37 305460360269
38 305460360276
39 305540110050
40 305540110067
41 305540110074
42 305540110081
43 305540110098
44 305540110101
45 305540110118
46 305540110252
47 305540110492
48 306160160049
49 306160160056
50 306160160063
HC-094I 11:51 Tuesday, October 2, 2007 16
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-094A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
300610290038 300610290038001 AZITHROMYCIN 39.57 14494.603115
300610290165 300610290165001 PREDNISONE 5.15 14494.603115
300610290165002 PREDNISONE 5.15 14494.603115
300610290165003 PREDNISONE 5.15 14494.603115
300610290165004 PREDNISONE 5.15 14494.603115
300610290172 300610290172001 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172002 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172003 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172004 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172005 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290329 300610290329001 ADVAIR DISKUS 250/50 153.37 14494.603115
300610290329002 ADVAIR DISKUS 250/50 153.37 14494.603115
300910450037 300910450037001 ADDERALL XR 97.53 9170.443811
300910450037002 ADDERALL XR 90.50 9170.443811
300910450037003 ADDERALL XR 90.50 9170.443811
300910450037004 ADDERALL XR 90.50 9170.443811
300910450037005 ADDERALL XR 90.50 9170.443811
300910450044 300910450044001 ADVAIR DISKUS 250/50 430.69 9170.443811
300910450051 300910450051001 ALBUTEROL INHALER 29.79 9170.443811
300910450051002 ALBUTEROL INHALER 29.79 9170.443811
300910450068 300910450068001 CLARINEX 40.00 9170.443811
300910450068002 CLARINEX 40.00 9170.443811
302560570050 302560570050001 CLARITIN 10.20 4791.575621
302560570067 302560570067001 ACCUNEB (PF) 63.99 4791.575621
302560570074 302560570074001 RHINOCORT AQUA (120 METERED SPRAYS) 74.29 4791.575621
302560570081 302560570081001 PREDNISOLONE (CHERRY) 20.35 4791.575621
302920640096 302920640096001 FLOVENT HFA 94.06 1608.784718
302920640109 302920640109001 FLOVENT HFA 70.77 1608.784718
302920640116 302920640116001 ALBUTEROL 7.25 1608.784718
302980530034 302980530034001 FLOVENT HFA 78.68 12707.553309
302980530041 302980530041001 ALBUTEROL 21.41 12707.553309
302980530058 302980530058001 FLONASE 69.49 12707.553309
HC-094I 11:51 Tuesday, October 2, 2007 17
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-094A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
303510370208 303510370208001 DEXAMETHASONE 13.95 25384.104215
303510370208002 DEXAMETHASONE 13.95 25384.104215
303510370342 303510370342001 ALBUTEROL 7.98 25384.104215
303600490173 303600490173001 XOPENEX (PF) 129.33 12427.409638
303730200196 303730200196001 HCTZ/LISINOPRIL 36.02 10062.157830
303730200254 303730200254001 AVELOX 96.30 10062.157830
303730200261 303730200261001 PREDNISONE 3.14 10062.157830
303730200278 303730200278001 ALBUTEROL 29.66 10062.157830
303780330158 303780330158001 ALBUTEROL SULFATE (VIAL) 21.75 18474.466386
303780330158002 ALBUTEROL SULFATE (VIAL) 21.75 18474.466386
303780330165 303780330165001 FLOVENT HFA 72.91 18474.466386
303780330165002 FLOVENT HFA 72.91 18474.466386
303780330172 303780330172001 SINGULAIR 90.69 18474.466386
303780330254 303780330254001 PREDNISOLONE SODIUM PHOSPHATE (DYE-FREE,GRAPE) 12.47 18474.466386
303780330254002 PREDNISOLONE SODIUM PHOSPHATE (DYE-FREE,GRAPE) 12.47 18474.466386
303780330261 303780330261001 XOPENEX (PF) 118.80 18474.466386
304250390047 304250390047001 ALBUTEROL 29.79 15760.782426
304250390047002 ALBUTEROL 29.79 15760.782426
304250390054 304250390054001 SINGULAIR 81.42 15760.782426
304250390136 304250390136001 ALBUTEROL 29.79 15760.782426
304250390136002 ALBUTEROL 29.79 15760.782426
304250390136003 ALBUTEROL 29.79 15760.782426
304250390136004 ALBUTEROL 29.79 15760.782426
304250390136005 ALBUTEROL 29.79 15760.782426
304250390136006 ALBUTEROL 29.79 15760.782426
305260250304 305260250304001 ALPRAZOLAM 14.37 3217.902738
305260250304002 ALPRAZOLAM 14.37 3217.902738
305260250304003 ALPRAZOLAM 14.37 3217.902738
305260250311 305260250311001 CYCLOBENZAPRINE 26.95 3217.902738
305260250311002 CYCLOBENZAPRINE 26.95 3217.902738
305260250311003 CYCLOBENZAPRINE 26.95 3217.902738
305460360252 305460360252001 ADVAIR DISKUS 250/50 149.07 904.304728
HC-094I 11:51 Tuesday, October 2, 2007 18
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-094A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
305460360269 305460360269001 LODRANE 24 (DYE-FREE) 30.20 904.304728
305460360276 305460360276001 ALBUTEROL 7.08 904.304728
305460360276002 ALBUTEROL 9.52 904.304728
305460360276003 ALBUTEROL 9.52 904.304728
305460360276004 ALBUTEROL 9.52 904.304728
305460360276005 ALBUTEROL 9.52 904.304728
305460360276006 ALBUTEROL 7.08 904.304728
305460360276007 ALBUTEROL 7.08 904.304728
305460360276008 ALBUTEROL 9.52 904.304728
305460360276009 ALBUTEROL 7.08 904.304728
305460360276010 ALBUTEROL 7.08 904.304728
305540110050 305540110050001 APAP/OXYCODONE 221.99 6027.017180
305540110050002 APAP/OXYCODONE 221.99 6027.017180
305540110050003 APAP/OXYCODONE 221.99 6027.017180
305540110067 305540110067001 SINGULAIR (UNIT OF USE) 90.49 6027.017180
305540110067002 SINGULAIR (UNIT OF USE) 90.49 6027.017180
305540110067003 SINGULAIR (UNIT OF USE) 90.49 6027.017180
305540110074 305540110074001 CARISOPRODOL 48.82 6027.017180
305540110074002 CARISOPRODOL 48.82 6027.017180
305540110074003 CARISOPRODOL 48.82 6027.017180
305540110081 305540110081001 PREVACID 134.86 6027.017180
305540110081002 PREVACID 134.86 6027.017180
305540110081003 PREVACID 134.86 6027.017180
305540110098 305540110098001 DIOVAN HCT (CAPLET) 59.18 6027.017180
305540110098002 DIOVAN HCT (CAPLET) 59.18 6027.017180
305540110098003 DIOVAN HCT (CAPLET) 59.18 6027.017180
305540110101 305540110101001 VERAPAMIL HCL 16.95 6027.017180
305540110101002 VERAPAMIL HCL 16.95 6027.017180
305540110101003 VERAPAMIL HCL 16.95 6027.017180
305540110118 305540110118001 AVANDIA (FILM-COATED, TILTAB) 120.09 6027.017180
305540110252 305540110252001 AVANDAMET (FILM COATED) 100.15 6027.017180
305540110252002 AVANDAMET (FILM COATED) 100.15 6027.017180
305540110492 305540110492001 APAP/OXYCODONE 214.16 6027.017180
305540110492002 APAP/OXYCODONE 214.16 6027.017180
305540110492003 APAP/OXYCODONE 214.16 6027.017180
305540110492004 APAP/OXYCODONE 214.16 6027.017180
306160160049 306160160049001 PREDNISONE 3.82 7976.414018
HC-094I 11:51 Tuesday, October 2, 2007 19
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-094A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
306160160056 306160160056001 ALBUTEROL 21.41 7976.414018
306160160063 306160160063001 FLOVENT 129.24 7976.414018
306160160070 306160160070001 MUCINEX 24.26 7976.414018
306160160087 306160160087001 PREVACID 153.17 7976.414018
306160160094 306160160094001 DOXEPIN 18.46 7976.414018
306460410089 306460410089001 KIDKARE COUGH/COLD (AF,CHERRY) 12.13 922.397151
306670130064 306670130064001 LOTREL 212.78 9543.282177
306670130064002 LOTREL 212.78 9543.282177
306670130064003 LOTREL 212.78 9543.282177
306670130064004 LOTREL 212.78 9543.282177
306670130064005 LOTREL 212.78 9543.282177
306670130064006 LOTREL 212.78 9543.282177
306670130071 306670130071001 ALBUTEROL/IPRATROPIUM 7.00 9543.282177
306670130071002 ALBUTEROL/IPRATROPIUM 7.00 9543.282177
306670130071003 ALBUTEROL/IPRATROPIUM 7.00 9543.282177
306670130071004 ALBUTEROL/IPRATROPIUM 7.00 9543.282177
306670130071005 ALBUTEROL/IPRATROPIUM 7.00 9543.282177
306670130071006 ALBUTEROL/IPRATROPIUM 7.00 9543.282177
306670130088 306670130088001 ADVAIR DISKUS 250/50 176.30 9543.282177
306670130088002 ADVAIR DISKUS 250/50 176.30 9543.282177
306670130088003 ADVAIR DISKUS 250/50 176.30 9543.282177
306670130088004 ADVAIR DISKUS 250/50 176.30 9543.282177
307540110065 307540110065001 PREVACID 123.87 3932.197198
307540110065002 PREVACID 122.37 3932.197198
307540110065003 PREVACID 122.37 3932.197198
307540110072 307540110072001 LOTREL 77.69 3932.197198
307540110072002 LOTREL 77.69 3932.197198
307540110089 307540110089001 MEPERIDINE/PROMETHAZINE 27.06 3932.197198
307540110096 307540110096001 LIPITOR 71.68 3932.197198
307540110096002 LIPITOR 71.68 3932.197198
307540110096003 LIPITOR 71.68 3932.197198
307540110096004 LIPITOR 71.68 3932.197198
307540110096005 LIPITOR 71.68 3932.197198
307540110096006 LIPITOR 71.68 3932.197198
307540110096007 LIPITOR 71.68 3932.197198
307540110109 307540110109001 PREMARIN 35.54 3932.197198
HC-094I 11:51 Tuesday, October 2, 2007 20
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-094A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
307540110109 307540110109002 PREMARIN 35.54 3932.197198
307540110109003 PREMARIN 35.54 3932.197198
307540110109004 PREMARIN 35.54 3932.197198
307540110116 307540110116001 FUROSEMIDE 8.99 3932.197198
307540110116002 FUROSEMIDE 8.99 3932.197198
307540110116003 FUROSEMIDE 8.99 3932.197198
307540110123 307540110123001 HYDROCHLOROTHIAZIDE 10.34 3932.197198
307540110130 307540110130001 PULMICORT 134.54 3932.197198
307540110130002 PULMICORT 134.54 3932.197198
307540110130003 PULMICORT 134.54 3932.197198
307540110147 307540110147001 ADVAIR 139.26 3932.197198
307540110147002 ADVAIR 139.26 3932.197198
307540110147003 ADVAIR 139.26 3932.197198
307540110154 307540110154001 NASONEX 73.19 3932.197198
307540110154002 NASONEX 73.19 3932.197198
307540110154003 NASONEX 73.19 3932.197198
307540110154004 NASONEX 73.19 3932.197198
307540110154005 NASONEX 73.19 3932.197198
307540110154006 NASONEX 73.19 3932.197198
307540110161 307540110161001 ALAVERT 20.53 3932.197198
307540110161002 ALAVERT 20.53 3932.197198
307750280067 307750280067001 ZOLOFT 90.51 28216.459168
307750280067002 ZOLOFT 90.51 28216.459168
307750280067003 ZOLOFT 90.51 28216.459168
307750280067004 ZOLOFT 82.69 28216.459168
307750280067005 ZOLOFT 82.69 28216.459168
307750280074 307750280074001 NEXIUM (UNIT OF USE) 157.69 28216.459168
307750280074002 NEXIUM (UNIT OF USE) 157.69 28216.459168
307750280074003 NEXIUM (UNIT OF USE) 157.69 28216.459168
307750280081 307750280081001 ALBUTEROL 21.41 28216.459168
307750280098 307750280098001 PROTONIX 122.63 28216.459168
307750280098002 PROTONIX 122.63 28216.459168
307850230082 307850230082001 ADVAIR 67.42 6052.476410
307850230082002 ADVAIR 67.42 6052.476410
307850230082003 ADVAIR 67.42 6052.476410
307850230082004 ADVAIR 67.42 6052.476410
308090360211 308090360211001 ALBUTEROL INHALER 39.90 7233.748978
HC-094I 11:51 Tuesday, October 2, 2007 21
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-094A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
308470230072 308470230072001 ALBUTEROL INHALER 39.90 6659.457209
308470230072002 ALBUTEROL INHALER 39.90 6659.457209
308470230089 308470230089001 ALBUTEROL 29.66 6659.457209
308470230130 308470230130001 ALBUTEROL INHALER 21.35 6659.457209
308600120037 308600120037001 METHYLPREDNISOLONE (DOSE PACK) 10.00 5766.034119
308600120044 308600120044001 FLOVENT 84.22 5766.034119
308600120051 308600120051001 COMBIVENT 5.44 5766.034119
308600120551 308600120551001 FLOVENT HFA 87.75 5766.034119
308600120551002 FLOVENT HFA 87.75 5766.034119
308600120551003 FLOVENT HFA 87.75 5766.034119
308600120568 308600120568001 COMBIVENT 37.95 5766.034119
308600120568002 COMBIVENT 37.95 5766.034119
308600120568003 COMBIVENT 37.95 5766.034119
308880430035 308880430035001 ALBUTEROL 21.41 4703.534649
308880430035002 ALBUTEROL 21.41 4703.534649
308880430080 308880430080001 ALBUTEROL 42.82 4703.534649
308880430080002 ALBUTEROL 42.82 4703.534649
308880430097 308880430097001 SINGULAIR (UNIT OF USE) 103.13 4703.534649
308880430097002 SINGULAIR (UNIT OF USE) 103.13 4703.534649
308890440078 308890440078001 CARBOFED DM (AF,SF,GRAPE) 7.29 10815.066372
308890440085 308890440085001 IBUPROFEN 4.98 10815.066372
308890440092 308890440092001 LOPERAMIDE HCL 7.47 10815.066372
308890440105 308890440105001 ALBUTEROL SULFATE (PF) 8.81 10815.066372
308890440112 308890440112001 PULMICORT RESPULES (5X6) 142.04 10815.066372
309040150317 309040150317001 COMBIVENT 79.90 10554.050996
309040150324 309040150324001 PULMICORT TURBUHALER 145.82 10554.050996
HC-094I 11:51 Tuesday, October 2, 2007 22
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma
The MEANS Procedure
Analysis Variable : RXXP05X SUM OF PAYMENTS RXSF05X-RXOU05X(IMPUTED)
N Sum
--------------------
4900 321991.88
--------------------
HC-094I 11:51 Tuesday, October 2, 2007 23
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma
Weighted
The MEANS Procedure
Analysis Variable : RXXP05X SUM OF PAYMENTS RXSF05X-RXOU05X(IMPUTED)
N Sum
--------------------
4900 2616476136
--------------------
1 The SAS System 11:52 Tuesday, October 2, 2007
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
NOTE: This session is executing on the XP_PRO platform.
NOTE: SAS 9.1.3 Service Pack 4
NOTE: SAS initialization used:
real time 4.00 seconds
cpu time 0.68 seconds
NOTE: AUTOEXEC processing beginning; file is C:\Program Files\SAS\SAS 9.1\autoexec.sas.
NOTE: AUTOEXEC processing completed.
1 OPTIONS LS=132 PS=59;
2
3 TITLE1 "HC-094I";
4 TITLE2 "Sample SAS Job for Example B";
5
6 LIBNAME IN "C:\data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\data
7
8 **************************************************************************************
9 * Calculate the expenditures for prescribed medicines associated with asthma.
10 **************************************************************************************;
11 PROC FORMAT;
12 VALUE EVENTYPE
13 1 = "1 MVIS"
14 2 = "2 OPAT"
15 3 = "3 EROM"
16 4 = "4 STAZ"
17 5 = "5 DVIS"
18 6 = "6 OMED"
19 7 = "7 HVIS"
20 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
21 RUN;
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.14 seconds
cpu time 0.00 seconds
22
23 *--------------------------------------------------------------------------------------
24 * Get condition records coded as asthma.
25 *--------------------------------------------------------------------------------------;
26 DATA ASCONDS;
2 The SAS System 11:52 Tuesday, October 2, 2007
27 SET IN.H96 (KEEP=CONDIDX CCCODEX);
28 IF CCCODEX="128";
29 RUN;
NOTE: There were 104855 observations read from the data set IN.H96.
NOTE: The data set WORK.ASCONDS has 1869 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 1.31 seconds
cpu time 0.15 seconds
30
31 *--------------------------------------------------------------------------
32 * Get the events linked to each of the asthma condition records.
33 *--------------------------------------------------------------------------;
34 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;
NOTE: There were 1869 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCONDS has 1869 observations and 2 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.14 seconds
cpu time 0.01 seconds
35
36 proc print data=asconds (obs=50);
37 title3 "sample print of work.asconds - sorted by condidx";
38 title4 "COND (H96) records where cccodex=128";
39 run;
NOTE: There were 50 observations read from the data set WORK.ASCONDS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.34 seconds
cpu time 0.06 seconds
40
41 PROC SORT DATA=IN.H94IF1 OUT=CLNK; BY CONDIDX; RUN;
NOTE: There were 343960 observations read from the data set IN.H94IF1.
NOTE: The data set WORK.CLNK has 343960 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 5.39 seconds
cpu time 1.28 seconds
42
43 DATA ASCLNKS;
44 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
45 ASCONDS(IN=INASCOND KEEP=CONDIDX);
46 BY CONDIDX;
47 IF INCLNK & INASCOND;
48 RUN;
NOTE: There were 343960 observations read from the data set WORK.CLNK.
NOTE: There were 1869 observations read from the data set WORK.ASCONDS.
3 The SAS System 11:52 Tuesday, October 2, 2007
NOTE: The data set WORK.ASCLNKS has 7360 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 3.17 seconds
cpu time 0.50 seconds
49
50 proc print data=asclnks (obs=75);
51 by condidx;
52 id condidx;
53 format eventype eventype.;
54 title3 "sample print of work.asclnks - sorted by condidx";
55 title4 "events linked to asthma condition records";
56 run;
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed pages 2-3.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.07 seconds
cpu time 0.00 seconds
57
58 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;
NOTE: There were 7360 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7360 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
59
60 proc print data=asclnks (obs=50);
61 format eventype eventype.;
62 title3 "sample print of work.asclnks - sorted by evntidx";
63 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
64
65 DATA ASCLNKS;
66 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
67 BY EVNTIDX;
68 IF FIRST.EVNTIDX;
69 RUN;
NOTE: There were 7360 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7338 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
4 The SAS System 11:52 Tuesday, October 2, 2007
70
71 proc print data=asclnks (obs=50);
72 format eventype eventype.;
73 title3 "sample print of unique evntidxs from work.asclnks";
74 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
75
76 *-------------------------------------------------------------------------------
77 * Get PMED records linked to asthma condition records.
78 *-------------------------------------------------------------------------------;
79 PROC SORT DATA=IN.H94A OUT=PMED; BY LINKIDX; RUN;
NOTE: There were 317587 observations read from the data set IN.H94A.
NOTE: The data set WORK.PMED has 317587 observations and 13 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 25.17 seconds
cpu time 2.70 seconds
80
81 DATA ASPMEDS;
82 MERGE PMED (KEEP=LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F)
83 ASCLNKS (IN=INASCLNK KEEP=EVNTIDX RENAME=(EVNTIDX=LINKIDX));
84 BY LINKIDX;
85 IF INASCLNK & PERWT05F>0;
86 RUN;
NOTE: There were 317587 observations read from the data set WORK.PMED.
NOTE: There were 7338 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASPMEDS has 10906 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 1.04 seconds
cpu time 0.61 seconds
87
88 proc print data=aspmeds (obs=300);
89 by linkidx;
90 id linkidx;
91 var rxrecidx rxname RXXP05X PERWT05F;
92 title3 "sample print of work.aspmeds";
93 title4 "PMED (HC-094A) records which link to condition records coded as asthma";
94 run;
NOTE: There were 300 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE PRINT printed pages 6-14.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
5 The SAS System 11:52 Tuesday, October 2, 2007
cpu time 0.01 seconds
95
96 PROC MEANS DATA=ASPMEDS N SUM;
97 VAR RXXP05X;
98 TITLE3 "Total Rx expenditures associated with asthma";
99 RUN;
NOTE: There were 10906 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE MEANS printed page 15.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.14 seconds
cpu time 0.03 seconds
100
101 PROC MEANS DATA=ASPMEDS N SUM;
102 VAR RXXP05X;
103 WEIGHT PERWT05F;
104 TITLE3 "Total Rx expenditures associated with asthma";
105 TITLE5 "Weighted";
106 RUN;
NOTE: There were 10906 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE MEANS printed page 16.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds
107
108
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 41.51 seconds
cpu time 6.21 seconds
HC-094I 11:52 Tuesday, October 2, 2007 1
Sample SAS Job for Example B
sample print of work.asconds - sorted by condidx
COND (H96) records where cccodex=128
Obs CONDIDX CCCODEX
1 300180180093 128
2 300180250064 128
3 300490270010 128
4 300600350034 128
5 300610290019 128
6 300680130051 128
7 300830210012 128
8 300910450025 128
9 301170420016 128
10 301320230021 128
11 302050190018 128
12 302560570015 128
13 302740680016 128
14 302850140023 128
15 302920640046 128
16 302930150015 128
17 302950160019 128
18 302950230018 128
19 302980530024 128
20 303350230045 128
21 303490360020 128
22 303510370015 128
23 303600490028 128
24 303670100066 128
25 303730200010 128
26 303760240088 128
27 303780330060 128
28 303780400075 128
29 304220290013 128
30 304220360012 128
31 304250390016 128
32 304280150074 128
33 304570200013 128
34 304710110124 128
35 304740470017 128
36 304780320015 128
37 304840230070 128
38 305260250057 128
39 305260320084 128
40 305350320069 128
41 305460360018 128
42 305490330016 128
43 305490400015 128
44 305540110050 128
45 305890140018 128
46 306130130099 128
47 306160160019 128
48 306160160081 128
49 306460410012 128
50 306630300010 128
HC-094I 11:52 Tuesday, October 2, 2007 2
Sample SAS Job for Example B
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
300180180093 300180180134 8 PMED
300180180261 8 PMED
300180250064 300180250141 8 PMED
300490270010 300490270015 8 PMED
300600350034 300600350155 8 PMED
300600350162 8 PMED
300610290019 300610290021 1 MVIS
300610290045 8 PMED
300610290052 8 PMED
300610290076 1 MVIS
300610290083 1 MVIS
300610290090 1 MVIS
300610290103 1 MVIS
300610290110 1 MVIS
300610290127 1 MVIS
300610290134 1 MVIS
300610290141 1 MVIS
300610290158 1 MVIS
300610290165 8 PMED
300610290172 8 PMED
300610290189 8 PMED
300610290196 8 PMED
300610290209 8 PMED
300610290216 8 PMED
300610290285 1 MVIS
300610290329 8 PMED
300610290336 8 PMED
300610290343 8 PMED
300610290350 8 PMED
300610290367 8 PMED
300610290374 8 PMED
300610290398 8 PMED
300610290401 8 PMED
300830210012 300830210042 4 STAZ
300830210066 1 MVIS
300830210097 8 PMED
300830210100 8 PMED
300830210155 8 PMED
300830210162 8 PMED
300830210179 8 PMED
300910450025 300910450020 1 MVIS
300910450044 8 PMED
300910450051 8 PMED
HC-094I 11:52 Tuesday, October 2, 2007 3
Sample SAS Job for Example B
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
300910450025 300910450099 8 PMED
300910450102 8 PMED
301170420016 301170420017 8 PMED
301170420024 8 PMED
301320230021 301320230030 8 PMED
301320230047 8 PMED
301320230232 8 PMED
301320230249 8 PMED
301320230270 8 PMED
301320230287 8 PMED
302560570015 302560570036 8 PMED
302560570043 1 MVIS
302560570050 8 PMED
302560570067 8 PMED
302560570074 8 PMED
302560570081 8 PMED
302560570101 8 PMED
302920640046 302920640065 1 MVIS
302920640096 8 PMED
302920640109 8 PMED
302920640116 8 PMED
302930150015 302930150027 8 PMED
302930150034 8 PMED
302930150058 8 PMED
302930150065 8 PMED
302930150130 8 PMED
302930150147 8 PMED
302950230018 302950230019 8 PMED
302950230057 8 PMED
302980530024 302980530010 1 MVIS
302980530034 8 PMED
302980530041 8 PMED
HC-094I 11:52 Tuesday, October 2, 2007 4
Sample SAS Job for Example B
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 300180180093 300180180134 8 PMED
2 300180180093 300180180261 8 PMED
3 300180250064 300180250141 8 PMED
4 300490270010 300490270015 8 PMED
5 300600350034 300600350155 8 PMED
6 300600350034 300600350162 8 PMED
7 300610290019 300610290021 1 MVIS
8 300610290019 300610290045 8 PMED
9 300610290019 300610290052 8 PMED
10 300610290019 300610290076 1 MVIS
11 300610290019 300610290083 1 MVIS
12 300610290019 300610290090 1 MVIS
13 300610290019 300610290103 1 MVIS
14 300610290019 300610290110 1 MVIS
15 300610290019 300610290127 1 MVIS
16 300610290019 300610290134 1 MVIS
17 300610290019 300610290141 1 MVIS
18 300610290019 300610290158 1 MVIS
19 300610290019 300610290165 8 PMED
20 300610290019 300610290172 8 PMED
21 300610290019 300610290189 8 PMED
22 300610290019 300610290196 8 PMED
23 300610290019 300610290209 8 PMED
24 300610290019 300610290216 8 PMED
25 300610290019 300610290285 1 MVIS
26 300610290019 300610290329 8 PMED
27 300610290019 300610290336 8 PMED
28 300610290019 300610290343 8 PMED
29 300610290019 300610290350 8 PMED
30 300610290019 300610290367 8 PMED
31 300610290019 300610290374 8 PMED
32 300610290019 300610290398 8 PMED
33 300610290019 300610290401 8 PMED
34 300830210012 300830210042 4 STAZ
35 300830210012 300830210066 1 MVIS
36 300830210012 300830210097 8 PMED
37 300830210012 300830210100 8 PMED
38 300830210012 300830210155 8 PMED
39 300830210012 300830210162 8 PMED
40 300830210012 300830210179 8 PMED
41 300910450025 300910450020 1 MVIS
42 300910450025 300910450044 8 PMED
43 300910450025 300910450051 8 PMED
44 300910450025 300910450099 8 PMED
45 300910450025 300910450102 8 PMED
46 301170420016 301170420017 8 PMED
47 301170420016 301170420024 8 PMED
48 301320230021 301320230030 8 PMED
49 301320230021 301320230047 8 PMED
50 301320230021 301320230232 8 PMED
HC-094I 11:52 Tuesday, October 2, 2007 5
Sample SAS Job for Example B
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 300180180134 8 PMED
2 300180180261 8 PMED
3 300180250141 8 PMED
4 300490270015 8 PMED
5 300600350155 8 PMED
6 300600350162 8 PMED
7 300610290021 1 MVIS
8 300610290045 8 PMED
9 300610290052 8 PMED
10 300610290076 1 MVIS
11 300610290083 1 MVIS
12 300610290090 1 MVIS
13 300610290103 1 MVIS
14 300610290110 1 MVIS
15 300610290127 1 MVIS
16 300610290134 1 MVIS
17 300610290141 1 MVIS
18 300610290158 1 MVIS
19 300610290165 8 PMED
20 300610290172 8 PMED
21 300610290189 8 PMED
22 300610290196 8 PMED
23 300610290209 8 PMED
24 300610290216 8 PMED
25 300610290285 1 MVIS
26 300610290329 8 PMED
27 300610290336 8 PMED
28 300610290343 8 PMED
29 300610290350 8 PMED
30 300610290367 8 PMED
31 300610290374 8 PMED
32 300610290398 8 PMED
33 300610290401 8 PMED
34 300830210042 4 STAZ
35 300830210066 1 MVIS
36 300830210097 8 PMED
37 300830210100 8 PMED
38 300830210155 8 PMED
39 300830210162 8 PMED
40 300830210179 8 PMED
41 300910450020 1 MVIS
42 300910450044 8 PMED
43 300910450051 8 PMED
44 300910450099 8 PMED
45 300910450102 8 PMED
46 301170420017 8 PMED
47 301170420024 8 PMED
48 301320230030 8 PMED
49 301320230047 8 PMED
50 301320230232 8 PMED
HC-094I 11:52 Tuesday, October 2, 2007 6
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
300180180134 300180180134001 ALBUTEROL 21.41 13214.861158
300180180134002 ALBUTEROL 21.41 13214.861158
300180180261 300180180261001 ALBUTEROL 21.41 13214.861158
300180180261002 ALBUTEROL 21.41 13214.861158
300180180261003 ALBUTEROL 21.41 13214.861158
300180180261004 ALBUTEROL 21.41 13214.861158
300180250141 300180250141001 METHYLPREDNISOLONE 54.00 13114.951312
300490270015 300490270015001 ALBUTEROL INHALER 18.90 10570.872683
300600350155 300600350155001 ALBUTEROL 12.50 5222.961568
300600350155002 ALBUTEROL 7.25 5222.961568
300600350162 300600350162001 FLOVENT HFA 89.32 5222.961568
300600350162002 FLOVENT HFA 89.32 5222.961568
300610290045 300610290045001 ADVAIR DISKUS 250/50 146.93 14494.603115
300610290045002 ADVAIR DISKUS 250/50 146.93 14494.603115
300610290045003 ADVAIR DISKUS 250/50 146.93 14494.603115
300610290052 300610290052001 ALBUTEROL 9.61 14494.603115
300610290052002 ALBUTEROL 9.65 14494.603115
300610290052003 ALBUTEROL 9.62 14494.603115
300610290165 300610290165001 PREDNISONE 5.15 14494.603115
300610290165002 PREDNISONE 5.15 14494.603115
300610290165003 PREDNISONE 5.15 14494.603115
300610290165004 PREDNISONE 5.15 14494.603115
300610290172 300610290172001 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172002 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172003 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172004 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290172005 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290189 300610290189001 SPIRIVA (W/HANDIHALER) 110.19 14494.603115
300610290189002 SPIRIVA (W/HANDIHALER) 110.19 14494.603115
300610290189003 SPIRIVA (W/HANDIHALER) 110.19 14494.603115
300610290189004 SPIRIVA (W/HANDIHALER) 110.19 14494.603115
300610290196 300610290196001 ALBUTEROL 9.61 14494.603115
300610290196002 ALBUTEROL 9.61 14494.603115
300610290196003 ALBUTEROL 7.32 14494.603115
300610290196004 ALBUTEROL 7.32 14494.603115
300610290196005 ALBUTEROL 9.61 14494.603115
300610290209 300610290209001 ALBUTEROL SULFATE (PF) 7.20 14494.603115
HC-094I 11:52 Tuesday, October 2, 2007 7
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
300610290209 300610290209002 ALBUTEROL SULFATE (PF) 7.20 14494.603115
300610290209003 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290209004 ALBUTEROL SULFATE (PF) 7.11 14494.603115
300610290209005 ALBUTEROL SULFATE (PF) 7.11 14494.603115
300610290209006 ALBUTEROL SULFATE (PF) 7.11 14494.603115
300610290216 300610290216001 PREDNISONE 3.30 14494.603115
300610290216002 PREDNISONE 3.30 14494.603115
300610290216003 PREDNISONE 3.67 14494.603115
300610290216004 PREDNISONE 3.67 14494.603115
300610290216005 PREDNISONE 3.67 14494.603115
300610290329 300610290329001 ADVAIR DISKUS 250/50 153.37 14494.603115
300610290329002 ADVAIR DISKUS 250/50 153.37 14494.603115
300610290336 300610290336001 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290336002 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290336003 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290336004 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290336005 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290336006 ADVAIR DISKUS 500/50 211.06 14494.603115
300610290343 300610290343001 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290343002 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290343003 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290343004 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290343005 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290343006 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290343007 ALBUTEROL SULFATE (PF) 6.75 14494.603115
300610290350 300610290350001 PREDNISONE 5.15 14494.603115
300610290350002 PREDNISONE 5.15 14494.603115
300610290350003 PREDNISONE 5.15 14494.603115
300610290350004 PREDNISONE 5.15 14494.603115
300610290350005 PREDNISONE 5.15 14494.603115
300610290350006 PREDNISONE 5.15 14494.603115
300610290367 300610290367001 LEVAQUIN (FILM-COATED) 142.74 14494.603115
300610290367002 LEVAQUIN (FILM-COATED) 142.74 14494.603115
300610290367003 LEVAQUIN (FILM-COATED) 142.74 14494.603115
300610290367004 LEVAQUIN (FILM-COATED) 142.74 14494.603115
300610290367005 LEVAQUIN (FILM-COATED) 142.74 14494.603115
300610290374 300610290374001 VERAPAMIL HCL (WHITE) 20.53 14494.603115
300610290374002 VERAPAMIL HCL (WHITE) 20.53 14494.603115
300610290374003 VERAPAMIL HCL (WHITE) 20.53 14494.603115
300610290374004 VERAPAMIL HCL (WHITE) 20.53 14494.603115
300610290374005 VERAPAMIL HCL (WHITE) 20.53 14494.603115
300610290374006 VERAPAMIL HCL (WHITE) 20.53 14494.603115
HC-094I 11:52 Tuesday, October 2, 2007 8
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
300610290398 300610290398001 RANITIDINE HCL 6.14 14494.603115
300610290398002 RANITIDINE HCL 6.14 14494.603115
300610290398003 RANITIDINE HCL 6.14 14494.603115
300610290398004 RANITIDINE HCL 6.14 14494.603115
300610290398005 RANITIDINE HCL 6.14 14494.603115
300610290398006 RANITIDINE HCL 6.14 14494.603115
300610290401 300610290401001 SINGULAIR (UNIT OF USE) 90.56 14494.603115
300610290401002 SINGULAIR (UNIT OF USE) 90.56 14494.603115
300610290401003 SINGULAIR (UNIT OF USE) 90.56 14494.603115
300610290401004 SINGULAIR (UNIT OF USE) 90.56 14494.603115
300610290401005 SINGULAIR (UNIT OF USE) 90.56 14494.603115
300610290401006 SINGULAIR (UNIT OF USE) 90.56 14494.603115
300610290401007 SINGULAIR (UNIT OF USE) 90.56 14494.603115
300830210097 300830210097001 SINGULAIR (UNIT OF USE) 86.12 14113.182137
300830210100 300830210100001 FLOVENT 129.24 14113.182137
300830210155 300830210155001 PREDNISONE 2.90 14113.182137
300830210162 300830210162001 SINGULAIR 144.89 14113.182137
300830210179 300830210179001 FLOVENT 129.24 14113.182137
300910450044 300910450044001 ADVAIR DISKUS 250/50 430.69 9170.443811
300910450051 300910450051001 ALBUTEROL INHALER 29.79 9170.443811
300910450051002 ALBUTEROL INHALER 29.79 9170.443811
300910450099 300910450099001 ADVAIR DISKUS 250/50 408.03 9170.443811
300910450099002 ADVAIR DISKUS 250/50 408.03 9170.443811
300910450102 300910450102001 ALBUTEROL 11.34 9170.443811
300910450102002 ALBUTEROL 11.34 9170.443811
300910450102003 ALBUTEROL 11.34 9170.443811
301170420017 301170420017001 CLARINEX 106.75 4349.570359
301170420017002 CLARINEX 106.75 4349.570359
301170420024 301170420024001 MONTELUKAST 90.69 4349.570359
301170420024002 MONTELUKAST 90.69 4349.570359
301320230030 301320230030001 ALBUTEROL 11.81 13408.326706
301320230047 301320230047001 ADVAIR DISKUS 500/50 211.06 13408.326706
301320230232 301320230232001 ALBUTEROL 9.65 13408.326706
HC-094I 11:52 Tuesday, October 2, 2007 9
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
301320230249 301320230249001 ADVAIR DISKUS 500/50 211.06 13408.326706
301320230270 301320230270001 ALBUTEROL 9.65 13408.326706
301320230270002 ALBUTEROL 9.65 13408.326706
301320230270003 ALBUTEROL 9.62 13408.326706
301320230287 301320230287001 ADVAIR DISKUS 500/50 211.06 13408.326706
301320230287002 ADVAIR DISKUS 500/50 211.06 13408.326706
301320230287003 ADVAIR DISKUS 500/50 211.06 13408.326706
301320230287004 ADVAIR DISKUS 500/50 211.06 13408.326706
301320230287005 ADVAIR DISKUS 500/50 211.06 13408.326706
302560570036 302560570036001 ALBUTEROL INHALER 18.90 4791.575621
302560570050 302560570050001 CLARITIN 10.20 4791.575621
302560570067 302560570067001 ACCUNEB (PF) 63.99 4791.575621
302560570074 302560570074001 RHINOCORT AQUA (120 METERED SPRAYS) 74.29 4791.575621
302560570081 302560570081001 PREDNISOLONE (CHERRY) 20.35 4791.575621
302560570101 302560570101001 ALBUTEROL SULFATE (PF) 30.50 4791.575621
302560570101002 ALBUTEROL SULFATE (PF) 30.50 4791.575621
302920640096 302920640096001 FLOVENT HFA 94.06 1608.784718
302920640109 302920640109001 FLOVENT HFA 70.77 1608.784718
302920640116 302920640116001 ALBUTEROL 7.25 1608.784718
302930150027 302930150027001 FLOVENT 112.06 5928.229861
302930150027002 FLOVENT 112.06 5928.229861
302930150034 302930150034001 SEREVENT DISKUS 97.04 5928.229861
302930150034002 SEREVENT DISKUS 102.22 5928.229861
302930150058 302930150058001 FLOVENT 112.06 5928.229861
302930150065 302930150065001 SEREVENT DISKUS 91.44 5928.229861
302930150130 302930150130001 FLOVENT 112.06 5928.229861
302930150147 302930150147001 SEREVENT DISKUS 98.04 5928.229861
302950230019 302950230019001 ALBUTEROL 39.00 1598.012428
302950230057 302950230057001 ALBUTEROL 14.60 1598.012428
302950230057002 ALBUTEROL 14.60 1598.012428
HC-094I 11:52 Tuesday, October 2, 2007 10
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
302980530034 302980530034001 FLOVENT HFA 78.68 12707.553309
302980530041 302980530041001 ALBUTEROL 21.41 12707.553309
303350230058 303350230058001 ACCOLATE 64.00 7972.673129
303350230089 303350230089001 ADVAIR 67.42 7972.673129
303350230274 303350230274001 PREDNISONE 5.00 7972.673129
303350230274002 PREDNISONE 5.00 7972.673129
303350230349 303350230349001 ACCOLATE 64.00 7972.673129
303350230349002 ACCOLATE 64.00 7972.673129
303350230349003 ACCOLATE 64.00 7972.673129
303350230349004 ACCOLATE 64.00 7972.673129
303350230370 303350230370001 ADVAIR 100/50 245.00 7972.673129
303350230370002 ADVAIR 100/50 245.00 7972.673129
303350230370003 ADVAIR 100/50 245.00 7972.673129
303350230370004 ADVAIR 100/50 245.00 7972.673129
303350230527 303350230527001 SINGULAIR 112.81 7972.673129
303490360024 303490360024001 SINGULAIR 92.22 2955.316741
303490360031 303490360031001 ALBUTEROL INHALER 21.35 2955.316741
303490360048 303490360048001 FLOVENT 71.41 2955.316741
303490360062 303490360062001 SINGULAIR (UNIT OF USE) 235.13 2955.316741
303490360062002 SINGULAIR (UNIT OF USE) 235.13 2955.316741
303490360079 303490360079001 FLOVENT 61.73 2955.316741
303490360079002 FLOVENT 61.73 2955.316741
303490360086 303490360086001 ALBUTEROL INHALER 39.90 2955.316741
303490360144 303490360144001 ALBUTEROL INHALER 21.35 2955.316741
303490360151 303490360151001 FLOVENT HFA 174.94 2955.316741
303510370099 303510370099001 ACCOLATE 84.16 25384.104215
303510370099002 ACCOLATE 84.16 25384.104215
303510370102 303510370102001 ADVAIR 100/50 132.01 25384.104215
303510370102002 ADVAIR 100/50 132.01 25384.104215
303510370119 303510370119001 ALBUTEROL 21.41 25384.104215
HC-094I 11:52 Tuesday, October 2, 2007 11
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
303510370133 303510370133001 ALBUTEROL 14.60 25384.104215
303510370208 303510370208001 DEXAMETHASONE 13.95 25384.104215
303510370208002 DEXAMETHASONE 13.95 25384.104215
303510370239 303510370239001 ADVAIR 100/50 132.01 25384.104215
303510370246 303510370246001 ALBUTEROL 21.41 25384.104215
303510370260 303510370260001 ALBUTEROL 7.98 25384.104215
303510370342 303510370342001 ALBUTEROL 7.98 25384.104215
303510370359 303510370359001 ALLEGRA 88.49 25384.104215
303510370359002 ALLEGRA 88.49 25384.104215
303510370359003 ALLEGRA 88.49 25384.104215
303510370359004 ALLEGRA 88.49 25384.104215
303510370359005 ALLEGRA 88.49 25384.104215
303510370366 303510370366001 ACCOLATE 84.16 25384.104215
303510370366002 ACCOLATE 84.16 25384.104215
303510370366003 ACCOLATE 84.16 25384.104215
303510370366004 ACCOLATE 84.16 25384.104215
303510370366005 ACCOLATE 84.16 25384.104215
303510370373 303510370373001 ADVAIR 100/50 132.01 25384.104215
303510370373002 ADVAIR 100/50 132.01 25384.104215
303510370373003 ADVAIR 100/50 132.01 25384.104215
303510370373004 ADVAIR 100/50 132.01 25384.104215
303510370373005 ADVAIR 100/50 132.01 25384.104215
303510370380 303510370380001 ALBUTEROL 21.41 25384.104215
303600490173 303600490173001 XOPENEX (PF) 129.33 12427.409638
303600490217 303600490217001 SINGULAIR 96.87 12427.409638
303670100158 303670100158001 WARFARIN SODIUM 15.95 3871.574902
303670100158002 WARFARIN SODIUM 15.95 3871.574902
303670100158003 WARFARIN SODIUM 15.95 3871.574902
303670100158004 WARFARIN SODIUM 15.95 3871.574902
303730200216 303730200216001 ALBUTEROL 21.41 10062.157830
303730200223 303730200223001 DYTAN (BERRY) 62.49 10062.157830
303730200247 303730200247001 ADVAIR DISKUS 250/50 176.30 10062.157830
303730200261 303730200261001 PREDNISONE 3.14 10062.157830
HC-094I 11:52 Tuesday, October 2, 2007 12
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
303730200278 303730200278001 ALBUTEROL 29.66 10062.157830
303730200285 303730200285001 SINGULAIR (UNIT OF USE) 103.13 10062.157830
303730200470 303730200470001 ALBUTEROL INHALER 29.79 10062.157830
303730200487 303730200487001 ADVAIR DISKUS 250/50 120.00 10062.157830
303730200494 303730200494001 ALBUTEROL 29.66 10062.157830
303730200494002 ALBUTEROL 29.66 10062.157830
303730200507 303730200507001 SINGULAIR 103.13 10062.157830
303730200507002 SINGULAIR 103.13 10062.157830
303730200507003 SINGULAIR 103.13 10062.157830
303730200507004 SINGULAIR 103.13 10062.157830
303760240525 303760240525001 ALBUTEROL 9.45 11756.819120
303760240525002 ALBUTEROL 9.45 11756.819120
303760241011 303760241011001 ALBUTEROL 9.45 11756.819120
303780330158 303780330158001 ALBUTEROL SULFATE (VIAL) 21.75 18474.466386
303780330158002 ALBUTEROL SULFATE (VIAL) 21.75 18474.466386
303780330165 303780330165001 FLOVENT HFA 72.91 18474.466386
303780330165002 FLOVENT HFA 72.91 18474.466386
303780330172 303780330172001 SINGULAIR 90.69 18474.466386
303780330254 303780330254001 PREDNISOLONE SODIUM PHOSPHATE (DYE-FREE,GRAPE) 12.47 18474.466386
303780330254002 PREDNISOLONE SODIUM PHOSPHATE (DYE-FREE,GRAPE) 12.47 18474.466386
303780330261 303780330261001 XOPENEX (PF) 118.80 18474.466386
303780330292 303780330292001 ALBUTEROL 9.87 18474.466386
303780330312 303780330312001 FLOVENT HFA 72.91 18474.466386
303780330312002 FLOVENT HFA 76.63 18474.466386
303780330312003 FLOVENT HFA 72.91 18474.466386
303780330312004 FLOVENT HFA 76.63 18474.466386
303780330329 303780330329001 ALBUTEROL SULFATE (VIAL) 21.75 18474.466386
303780330336 303780330336001 SINGULAIR (UNIT OF USE) 87.39 18474.466386
303780330336002 SINGULAIR (UNIT OF USE) 87.39 18474.466386
303780330336003 SINGULAIR (UNIT OF USE) 87.39 18474.466386
303780330336004 SINGULAIR (UNIT OF USE) 87.39 18474.466386
303780330336005 SINGULAIR (UNIT OF USE) 87.39 18474.466386
HC-094I 11:52 Tuesday, October 2, 2007 13
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
304220360027 304220360027001 ALBUTEROL 11.11 9874.793586
304220360089 304220360089001 ALBUTEROL 21.41 9874.793586
304220360089002 ALBUTEROL 21.41 9874.793586
304220360161 304220360161001 ALBUTEROL 17.69 9874.793586
304220360178 304220360178001 ALLEGRA 60.46 9874.793586
304220360192 304220360192001 ADVAIR DISKUS 100/50 130.27 9874.793586
304250390047 304250390047001 ALBUTEROL 29.79 15760.782426
304250390047002 ALBUTEROL 29.79 15760.782426
304250390054 304250390054001 SINGULAIR 81.42 15760.782426
304250390085 304250390085001 ALBUTEROL 29.79 15760.782426
304250390092 304250390092001 SINGULAIR 81.42 15760.782426
304250390136 304250390136001 ALBUTEROL 29.79 15760.782426
304250390136002 ALBUTEROL 29.79 15760.782426
304250390136003 ALBUTEROL 29.79 15760.782426
304250390136004 ALBUTEROL 29.79 15760.782426
304250390136005 ALBUTEROL 29.79 15760.782426
304250390136006 ALBUTEROL 29.79 15760.782426
304280150187 304280150187001 UNIPHYL 71.00 3395.891167
304280150187002 UNIPHYL 71.00 3395.891167
304280150194 304280150194001 ACCOLATE 84.16 3395.891167
304280150194002 ACCOLATE 84.16 3395.891167
304280150207 304280150207001 SEREVENT DISKUS 10.00 3395.891167
304280150207002 SEREVENT DISKUS 10.00 3395.891167
304280150214 304280150214001 FLOVENT 10.00 3395.891167
304280150214002 FLOVENT 10.00 3395.891167
304280150543 304280150543001 UNIPHYL 71.00 3395.891167
304280150543002 UNIPHYL 71.00 3395.891167
304280150550 304280150550001 ACCOLATE 84.16 3395.891167
304280150550002 ACCOLATE 84.16 3395.891167
304280150567 304280150567001 SEREVENT DISKUS 10.00 3395.891167
304280150567002 SEREVENT DISKUS 10.00 3395.891167
304570200094 304570200094001 ALBUTEROL 29.79 9559.357601
HC-094I 11:52 Tuesday, October 2, 2007 14
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-094A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP05X PERWT05F
304570200094 304570200094002 ALBUTEROL 29.79 9559.357601
304570200107 304570200107001 QVAR 77.44 9559.357601
304570200107002 QVAR 77.44 9559.357601
304570200169 304570200169001 ALBUTEROL 29.79 9559.357601
304570200176 304570200176001 QVAR 10.61 9559.357601
304710110188 304710110188001 ALBUTEROL INHALER 29.79 20265.653243
304780320048 304780320048001 ALBUTEROL INHALER 29.79 5003.054831
304780320055 304780320055001 SINGULAIR 85.14 5003.054831
304780320062 304780320062001 ADVAIR 114.84 5003.054831
305350320107 305350320107001 ALBUTEROL INHALER 18.90 16723.953247
305350320152 305350320152001 ALBUTEROL 74.65 16723.953247
305460360118 305460360118001 ADVAIR DISKUS 250/50 82.27 904.304728
305460360125 305460360125001 ALBUTEROL 22.69 904.304728
305460360252 305460360252001 ADVAIR DISKUS 250/50 149.07 904.304728
305460360269 305460360269001 LODRANE 24 (DYE-FREE) 30.20 904.304728
305460360276 305460360276001 ALBUTEROL 7.08 904.304728
305460360276002 ALBUTEROL 9.52 904.304728
305460360276003 ALBUTEROL 9.52 904.304728
305460360276004 ALBUTEROL 9.52 904.304728
305460360276005 ALBUTEROL 9.52 904.304728
305460360276006 ALBUTEROL 7.08 904.304728
305460360276007 ALBUTEROL 7.08 904.304728
305460360276008 ALBUTEROL 9.52 904.304728
305460360276009 ALBUTEROL 7.08 904.304728
305460360276010 ALBUTEROL 7.08 904.304728
305460360485 305460360485001 ADVAIR DISKUS 250/50 156.26 904.304728
305460360485002 ADVAIR DISKUS 250/50 156.26 904.304728
305460360485003 ADVAIR DISKUS 250/50 156.26 904.304728
305460360485004 ADVAIR DISKUS 250/50 156.26 904.304728
305460360485005 ADVAIR DISKUS 250/50 156.26 904.304728
305460360492 305460360492001 ALBUTEROL 18.99 904.304728
HC-094I 11:52 Tuesday, October 2, 2007 15
Sample SAS Job for Example B
Total Rx expenditures associated with asthma
The MEANS Procedure
Analysis Variable : RXXP05X SUM OF PAYMENTS RXSF05X-RXOU05X(IMPUTED)
N Sum
---------------------
10906 792241.41
---------------------
HC-094I 11:52 Tuesday, October 2, 2007 16
Sample SAS Job for Example B
Total Rx expenditures associated with asthma
Weighted
The MEANS Procedure
Analysis Variable : RXXP05X SUM OF PAYMENTS RXSF05X-RXOU05X(IMPUTED)
N Sum
---------------------
10906 7384252499
---------------------
1 The SAS System 11:53 Tuesday, October 2, 2007
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
NOTE: This session is executing on the XP_PRO platform.
NOTE: SAS 9.1.3 Service Pack 4
NOTE: SAS initialization used:
real time 3.67 seconds
cpu time 0.92 seconds
NOTE: AUTOEXEC processing beginning; file is C:\Program Files\SAS\SAS 9.1\autoexec.sas.
NOTE: AUTOEXEC processing completed.
1 OPTIONS LS=132 PS=59;
2
3 TITLE1 "HC-094I";
4 TITLE2 "Sample SAS Job for Example C";
5
6 LIBNAME IN "C:\DATA";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\DATA
7
8 *************************************************************************************
9 * Calculate the expenditures for medical visits associated with asthma.
10 *************************************************************************************;
11 PROC FORMAT;
12 VALUE EVENTYPE
13 1 = "1 MVIS"
14 2 = "2 OPAT"
15 3 = "3 EROM"
16 4 = "4 STAZ"
17 5 = "5 DVIS"
18 6 = "6 OMED"
19 7 = "7 HVIS"
20 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
21 RUN;
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.10 seconds
cpu time 0.03 seconds
22
23 *-----------------------------------------------------------------------------------
24 * Get conditions records coded as asthma.
25 *-----------------------------------------------------------------------------------;
26 DATA ASCONDS;
2 The SAS System 11:53 Tuesday, October 2, 2007
27 SET IN.H96 (KEEP=CONDIDX CCCODEX);
28 IF CCCODEX="128";
29 RUN;
NOTE: There were 104855 observations read from the data set IN.H96.
NOTE: The data set WORK.ASCONDS has 1869 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 1.25 seconds
cpu time 0.22 seconds
30
31 *------------------------------------------------------------------------------------
32 * Get the events linked to each of the asthma condition records.
33 *------------------------------------------------------------------------------------;
34 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;
NOTE: There were 1869 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCONDS has 1869 observations and 2 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.07 seconds
cpu time 0.00 seconds
35
36 proc print data=asconds (obs=50);
37 title3 "sample print of work.asconds - sorted by condidx";
38 title4 "COND (HC-096) records where cccodex=128";
39 run;
NOTE: There were 50 observations read from the data set WORK.ASCONDS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.32 seconds
cpu time 0.09 seconds
40
41 PROC SORT DATA=IN.H94IF1 OUT=CLNK; BY CONDIDX; RUN;
NOTE: There were 343960 observations read from the data set IN.H94IF1.
NOTE: The data set WORK.CLNK has 343960 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 6.53 seconds
cpu time 1.40 seconds
42
43 DATA ASCLNKS;
44 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
45 ASCONDS(IN=INASCOND KEEP=CONDIDX);
46 BY CONDIDX;
47 IF INCLNK & INASCOND;
48 RUN;
NOTE: There were 343960 observations read from the data set WORK.CLNK.
NOTE: There were 1869 observations read from the data set WORK.ASCONDS.
3 The SAS System 11:53 Tuesday, October 2, 2007
NOTE: The data set WORK.ASCLNKS has 7360 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 5.12 seconds
cpu time 0.50 seconds
49
50 proc print data=asclnks (obs=75);
51 by condidx;
52 id condidx;
53 format eventype eventype.;
54 title3 "sample print of work.asclnks - sorted by condidx";
55 title4 "events linked to asthma condition records";
56 run;
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed pages 2-3.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.07 seconds
cpu time 0.01 seconds
57
58 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;
NOTE: There were 7360 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7360 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
59
60 proc print data=asclnks (obs=50);
61 format eventype eventype.;
62 title3 "sample print of work.asclnks - sorted by evntidx";
63 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
64
65 DATA ASCLNKS;
66 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
67 BY EVNTIDX;
68 IF FIRST.EVNTIDX;
69 RUN;
NOTE: There were 7360 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7338 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
4 The SAS System 11:53 Tuesday, October 2, 2007
70
71 proc print data=asclnks (obs=50);
72 format eventype eventype.;
73 title3 "sample print of unique evntidxs from work.asclnks";
74 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
75
76 *--------------------------------------------------------------------------------------------
77 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
78 *--------------------------------------------------------------------------------------------;
79 DATA MVIS;
80 SET IN.H94G (KEEP=EVNTIDX PERWT05F SEETLKPV OBXP05X);
81 IF PERWT05F > 0 & SEETLKPV NE 2;
82 RUN;
NOTE: There were 152748 observations read from the data set IN.H94G.
NOTE: The data set WORK.MVIS has 148765 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 10.46 seconds
cpu time 0.53 seconds
83
84 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;
NOTE: There were 148765 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.MVIS has 148765 observations and 4 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.48 seconds
cpu time 0.46 seconds
85
86 *-------------------------------------------------------------------------------------
87 * Identify MVIS events which were for asthma.
88 *-------------------------------------------------------------------------------------;
89 DATA ASMVIS;
90 MERGE ASCLNKS (IN=INASCLNK)
91 MVIS (IN=INMVIS);
92 BY EVNTIDX;
93 IF INASCLNK & INMVIS;
94 RUN;
NOTE: There were 7338 observations read from the data set WORK.ASCLNKS.
NOTE: There were 148765 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 2174 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.26 seconds
5 The SAS System 11:53 Tuesday, October 2, 2007
cpu time 0.24 seconds
95
96 proc print data=asmvis (obs=50);
97 format eventype eventype.;
98 title3 "sample print of work.asmvis";
99 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-094G) events";
100 run;
NOTE: There were 50 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE PRINT printed page 6.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
101
102 PROC MEANS DATA=ASMVIS N SUM;
103 VAR OBXP05X;
104 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
105 RUN;
NOTE: There were 2174 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE MEANS printed page 7.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.14 seconds
cpu time 0.01 seconds
106
107 PROC MEANS DATA=ASMVIS N SUM;
108 VAR OBXP05X;
109 WEIGHT PERWT05F;
110 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
111 TITLE5 "Weighted";
112 RUN;
NOTE: There were 2174 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE MEANS printed page 8.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds
113
114
115
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 29.10 seconds
cpu time 4.70 seconds
HC-094I 11:53 Tuesday, October 2, 2007 1
Sample SAS Job for Example C
sample print of work.asconds - sorted by condidx
COND (HC-096) records where cccodex=128
Obs CONDIDX CCCODEX
1 300180180093 128
2 300180250064 128
3 300490270010 128
4 300600350034 128
5 300610290019 128
6 300680130051 128
7 300830210012 128
8 300910450025 128
9 301170420016 128
10 301320230021 128
11 302050190018 128
12 302560570015 128
13 302740680016 128
14 302850140023 128
15 302920640046 128
16 302930150015 128
17 302950160019 128
18 302950230018 128
19 302980530024 128
20 303350230045 128
21 303490360020 128
22 303510370015 128
23 303600490028 128
24 303670100066 128
25 303730200010 128
26 303760240088 128
27 303780330060 128
28 303780400075 128
29 304220290013 128
30 304220360012 128
31 304250390016 128
32 304280150074 128
33 304570200013 128
34 304710110124 128
35 304740470017 128
36 304780320015 128
37 304840230070 128
38 305260250057 128
39 305260320084 128
40 305350320069 128
41 305460360018 128
42 305490330016 128
43 305490400015 128
44 305540110050 128
45 305890140018 128
46 306130130099 128
47 306160160019 128
48 306160160081 128
49 306460410012 128
50 306630300010 128
HC-094I 11:53 Tuesday, October 2, 2007 2
Sample SAS Job for Example C
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
300180180093 300180180134 8 PMED
300180180261 8 PMED
300180250064 300180250141 8 PMED
300490270010 300490270015 8 PMED
300600350034 300600350155 8 PMED
300600350162 8 PMED
300610290019 300610290021 1 MVIS
300610290045 8 PMED
300610290052 8 PMED
300610290076 1 MVIS
300610290083 1 MVIS
300610290090 1 MVIS
300610290103 1 MVIS
300610290110 1 MVIS
300610290127 1 MVIS
300610290134 1 MVIS
300610290141 1 MVIS
300610290158 1 MVIS
300610290165 8 PMED
300610290172 8 PMED
300610290189 8 PMED
300610290196 8 PMED
300610290209 8 PMED
300610290216 8 PMED
300610290285 1 MVIS
300610290329 8 PMED
300610290336 8 PMED
300610290343 8 PMED
300610290350 8 PMED
300610290367 8 PMED
300610290374 8 PMED
300610290398 8 PMED
300610290401 8 PMED
300830210012 300830210042 4 STAZ
300830210066 1 MVIS
300830210097 8 PMED
300830210100 8 PMED
300830210155 8 PMED
300830210162 8 PMED
300830210179 8 PMED
300910450025 300910450020 1 MVIS
300910450044 8 PMED
300910450051 8 PMED
HC-094I 11:53 Tuesday, October 2, 2007 3
Sample SAS Job for Example C
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
300910450025 300910450099 8 PMED
300910450102 8 PMED
301170420016 301170420017 8 PMED
301170420024 8 PMED
301320230021 301320230030 8 PMED
301320230047 8 PMED
301320230232 8 PMED
301320230249 8 PMED
301320230270 8 PMED
301320230287 8 PMED
302560570015 302560570036 8 PMED
302560570043 1 MVIS
302560570050 8 PMED
302560570067 8 PMED
302560570074 8 PMED
302560570081 8 PMED
302560570101 8 PMED
302920640046 302920640065 1 MVIS
302920640096 8 PMED
302920640109 8 PMED
302920640116 8 PMED
302930150015 302930150027 8 PMED
302930150034 8 PMED
302930150058 8 PMED
302930150065 8 PMED
302930150130 8 PMED
302930150147 8 PMED
302950230018 302950230019 8 PMED
302950230057 8 PMED
302980530024 302980530010 1 MVIS
302980530034 8 PMED
302980530041 8 PMED
HC-094I 11:53 Tuesday, October 2, 2007 4
Sample SAS Job for Example C
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 300180180093 300180180134 8 PMED
2 300180180093 300180180261 8 PMED
3 300180250064 300180250141 8 PMED
4 300490270010 300490270015 8 PMED
5 300600350034 300600350155 8 PMED
6 300600350034 300600350162 8 PMED
7 300610290019 300610290021 1 MVIS
8 300610290019 300610290045 8 PMED
9 300610290019 300610290052 8 PMED
10 300610290019 300610290076 1 MVIS
11 300610290019 300610290083 1 MVIS
12 300610290019 300610290090 1 MVIS
13 300610290019 300610290103 1 MVIS
14 300610290019 300610290110 1 MVIS
15 300610290019 300610290127 1 MVIS
16 300610290019 300610290134 1 MVIS
17 300610290019 300610290141 1 MVIS
18 300610290019 300610290158 1 MVIS
19 300610290019 300610290165 8 PMED
20 300610290019 300610290172 8 PMED
21 300610290019 300610290189 8 PMED
22 300610290019 300610290196 8 PMED
23 300610290019 300610290209 8 PMED
24 300610290019 300610290216 8 PMED
25 300610290019 300610290285 1 MVIS
26 300610290019 300610290329 8 PMED
27 300610290019 300610290336 8 PMED
28 300610290019 300610290343 8 PMED
29 300610290019 300610290350 8 PMED
30 300610290019 300610290367 8 PMED
31 300610290019 300610290374 8 PMED
32 300610290019 300610290398 8 PMED
33 300610290019 300610290401 8 PMED
34 300830210012 300830210042 4 STAZ
35 300830210012 300830210066 1 MVIS
36 300830210012 300830210097 8 PMED
37 300830210012 300830210100 8 PMED
38 300830210012 300830210155 8 PMED
39 300830210012 300830210162 8 PMED
40 300830210012 300830210179 8 PMED
41 300910450025 300910450020 1 MVIS
42 300910450025 300910450044 8 PMED
43 300910450025 300910450051 8 PMED
44 300910450025 300910450099 8 PMED
45 300910450025 300910450102 8 PMED
46 301170420016 301170420017 8 PMED
47 301170420016 301170420024 8 PMED
48 301320230021 301320230030 8 PMED
49 301320230021 301320230047 8 PMED
50 301320230021 301320230232 8 PMED
HC-094I 11:53 Tuesday, October 2, 2007 5
Sample SAS Job for Example C
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 300180180134 8 PMED
2 300180180261 8 PMED
3 300180250141 8 PMED
4 300490270015 8 PMED
5 300600350155 8 PMED
6 300600350162 8 PMED
7 300610290021 1 MVIS
8 300610290045 8 PMED
9 300610290052 8 PMED
10 300610290076 1 MVIS
11 300610290083 1 MVIS
12 300610290090 1 MVIS
13 300610290103 1 MVIS
14 300610290110 1 MVIS
15 300610290127 1 MVIS
16 300610290134 1 MVIS
17 300610290141 1 MVIS
18 300610290158 1 MVIS
19 300610290165 8 PMED
20 300610290172 8 PMED
21 300610290189 8 PMED
22 300610290196 8 PMED
23 300610290209 8 PMED
24 300610290216 8 PMED
25 300610290285 1 MVIS
26 300610290329 8 PMED
27 300610290336 8 PMED
28 300610290343 8 PMED
29 300610290350 8 PMED
30 300610290367 8 PMED
31 300610290374 8 PMED
32 300610290398 8 PMED
33 300610290401 8 PMED
34 300830210042 4 STAZ
35 300830210066 1 MVIS
36 300830210097 8 PMED
37 300830210100 8 PMED
38 300830210155 8 PMED
39 300830210162 8 PMED
40 300830210179 8 PMED
41 300910450020 1 MVIS
42 300910450044 8 PMED
43 300910450051 8 PMED
44 300910450099 8 PMED
45 300910450102 8 PMED
46 301170420017 8 PMED
47 301170420024 8 PMED
48 301320230030 8 PMED
49 301320230047 8 PMED
50 301320230232 8 PMED
HC-094I 11:53 Tuesday, October 2, 2007 6
Sample SAS Job for Example C
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-094G) events
Obs EVNTIDX EVENTYPE SEETLKPV OBXP05X PERWT05F
1 300610290021 1 MVIS 1 41.00 14494.60
2 300610290076 1 MVIS 1 145.58 14494.60
3 300610290083 1 MVIS 1 176.04 14494.60
4 300610290090 1 MVIS 1 60.89 14494.60
5 300610290103 1 MVIS 1 143.45 14494.60
6 300610290110 1 MVIS 1 267.81 14494.60
7 300610290127 1 MVIS 1 80.58 14494.60
8 300610290134 1 MVIS 1 60.89 14494.60
9 300610290141 1 MVIS 1 60.89 14494.60
10 300610290158 1 MVIS 1 121.78 14494.60
11 300610290285 1 MVIS 1 60.89 14494.60
12 300830210066 1 MVIS 1 44.51 14113.18
13 300910450020 1 MVIS 1 30.57 9170.44
14 302560570043 1 MVIS 1 105.70 4791.58
15 302920640065 1 MVIS 1 50.48 1608.78
16 302980530010 1 MVIS 1 62.00 12707.55
17 302980530065 1 MVIS 1 95.00 12707.55
18 303510370044 1 MVIS 1 69.50 25384.10
19 303510370195 1 MVIS 1 47.14 25384.10
20 303510370277 1 MVIS 1 70.00 25384.10
21 303600490060 1 MVIS 1 20.00 12427.41
22 303670100312 1 MVIS 1 21.28 3871.57
23 303670100329 1 MVIS 1 37.50 3871.57
24 303730200014 1 MVIS 1 81.27 10062.16
25 303730200021 1 MVIS 1 51.99 10062.16
26 303730200038 1 MVIS 1 81.27 10062.16
27 303730200045 1 MVIS 1 51.99 10062.16
28 303730200052 1 MVIS 1 51.99 10062.16
29 303730200069 1 MVIS 1 81.27 10062.16
30 303730200165 1 MVIS 1 79.97 10062.16
31 303730200172 1 MVIS 1 66.00 10062.16
32 303730200189 1 MVIS 1 229.00 10062.16
33 303760240258 1 MVIS 1 55.00 11756.82
34 303760240265 1 MVIS 1 27.40 11756.82
35 303760240272 1 MVIS 1 55.00 11756.82
36 303760240289 1 MVIS 1 55.00 11756.82
37 303760240296 1 MVIS 1 55.00 11756.82
38 303760240316 1 MVIS 1 27.40 11756.82
39 303760240330 1 MVIS 1 27.40 11756.82
40 303760240347 1 MVIS 1 55.00 11756.82
41 303760240361 1 MVIS 1 27.40 11756.82
42 303760240378 1 MVIS 1 27.40 11756.82
43 303760240498 1 MVIS 1 27.40 11756.82
44 303760240532 1 MVIS 1 109.00 11756.82
45 303760240549 1 MVIS 1 55.00 11756.82
46 303760240556 1 MVIS 1 55.00 11756.82
47 303760240570 1 MVIS 1 27.40 11756.82
48 303760240587 1 MVIS 1 27.40 11756.82
49 303760240594 1 MVIS 1 55.00 11756.82
50 303760240607 1 MVIS 1 27.40 11756.82
HC-094I 11:53 Tuesday, October 2, 2007 7
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma
The MEANS Procedure
Analysis Variable : OBXP05X SUM OF OBSF05X - OBOT05X (IMPUTED)
N Sum
--------------------
2174 212947.90
--------------------
HC-094I 11:53 Tuesday, October 2, 2007 8
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma
Weighted
The MEANS Procedure
Analysis Variable : OBXP05X SUM OF OBSF05X - OBOT05X (IMPUTED)
N Sum
--------------------
2174 1858208530
--------------------
--------------------
<< previous page