1 The SAS System 16:51 Wednesday, October 9, 2002
NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
Licensed to SOCIAL & SCIENTIFIC SYSTEMS INC, Site 0026405003.
NOTE: This session is executing on the WIN_95 platform.
NOTE: SAS initialization used:
real time 0.50 seconds
1 OPTIONS LS=132 PS=59;
2
3 TITLE1 "HC-033I";
4 TITLE2 'Sample SAS Job for Example A';
5
6 LIBNAME IN V8 'C:\DATA';
NOTE: Libref IN was successfully assigned as follows:
Engine: V8
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:
real time 0.10 seconds
24
25 *-------------------------------------------------------------------------------------
26 * Get condition records coded as asthma.
27 *-------------------------------------------------------------------------------------;
28 DATA ASCONDS;
29 SET IN.H37 (KEEP=CONDIDX CCCODEX);
30 IF CCCODEX="128";
31
32 RUN;
NOTE: There were 69897 observations read from the data set IN.H37.
NOTE: The data set WORK.ASCONDS has 1088 observations and 2 variables.
NOTE: DATA statement used:
real time 4.55 seconds
2 The SAS System 16:51 Wednesday, October 9, 2002
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 1088 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCONDS has 1088 observations and 2 variables.
NOTE: PROCEDURE SORT used:
real time 0.11 seconds
38
39 proc print data=asconds (obs=50);
40 title3 "sample print of work.asconds - sorted by condidx";
41 title4 "COND (H37) 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:
real time 0.32 seconds
43
44 PROC SORT DATA=IN.H33IF1 OUT=CLNK; BY CONDIDX; RUN;
NOTE: There were 208632 observations read from the data set IN.H33IF1.
NOTE: The data set WORK.CLNK has 208632 observations and 5 variables.
NOTE: PROCEDURE SORT used:
real time 3.95 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;
NOTE: There were 208632 observations read from the data set WORK.CLNK.
NOTE: There were 1088 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 4744 observations and 3 variables.
NOTE: DATA statement used:
real time 1.37 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;
3 The SAS System 16:51 Wednesday, October 9, 2002
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed pages 2-3.
NOTE: PROCEDURE PRINT used:
real time 0.16 seconds
60
61 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;
NOTE: There were 4744 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 4744 observations and 3 variables.
NOTE: PROCEDURE SORT used:
real time 1.71 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:
real 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 4744 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 4730 observations and 2 variables.
NOTE: DATA statement used:
real time 0.05 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:
real time 0.05 seconds
78
79 *--------------------------------------------------------------------------------------------
80 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
81 *--------------------------------------------------------------------------------------------;
4 The SAS System 16:51 Wednesday, October 9, 2002
82 DATA MVIS;
83 SET IN.H33G (KEEP=EVNTIDX PERWT99F SEETLKPV);
84 IF PERWT99F > 0 & SEETLKPV NE 2;
85 RUN;
NOTE: There were 100312 observations read from the data set IN.H33G.
NOTE: The data set WORK.MVIS has 96787 observations and 3 variables.
NOTE: DATA statement used:
real time 9.44 seconds
86
87 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;
NOTE: There were 96787 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.MVIS has 96787 observations and 3 variables.
NOTE: PROCEDURE SORT used:
real time 0.50 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 4730 observations read from the data set WORK.ASCLNKS.
NOTE: There were 96787 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 1575 observations and 2 variables.
NOTE: DATA statement used:
real time 0.32 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-033G) 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:
real time 0.00 seconds
104
105 *-------------------------------------------------------------------------------------
106 * Get PMED IDs linked to the MVIS events which were for asthma.
107 *-------------------------------------------------------------------------------------;
108 PROC SORT DATA=IN.H33IF2 OUT=RXLK; BY EVNTIDX; RUN;
5 The SAS System 16:51 Wednesday, October 9, 2002
NOTE: There were 41276 observations read from the data set IN.H33IF2.
NOTE: The data set WORK.RXLK has 41276 observations and 5 variables.
NOTE: PROCEDURE SORT used:
real time 0.82 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 eventidx";
116 title4 "Rx+event link file records (HC-33IF2)";
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:
real time 0.05 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;
NOTE: There were 41276 observations read from the data set WORK.RXLK.
NOTE: There were 1575 observations read from the data set WORK.ASMVIS.
NOTE: The data set WORK.PMEDIDS has 1356 observations and 3 variables.
NOTE: DATA statement used:
real time 0.22 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:
real time 0.04 seconds
133
134 PROC SORT DATA=PMEDIDS; BY LINKIDX; RUN;
NOTE: There were 1356 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 1356 observations and 3 variables.
6 The SAS System 16:51 Wednesday, October 9, 2002
NOTE: PROCEDURE SORT used:
real time 0.05 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:
real time 0.00 seconds
140
141 DATA PMEDIDS;
142 SET PMEDIDS (KEEP=LINKIDX);
143 BY LINKIDX;
144 IF FIRST.LINKIDX;
145 RUN;
NOTE: There were 1356 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 1217 observations and 1 variables.
NOTE: DATA statement used:
real time 0.04 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:
real time 0.06 seconds
150
151 *-----------------------------------------------------------------------------------------
152 * Get PMED records linked to MVIS events which were for asthma.
153 *-----------------------------------------------------------------------------------------;
154 PROC SORT DATA=IN.H33A OUT=PMED; BY LINKIDX; RUN;
NOTE: There were 173950 observations read from the data set IN.H33A.
NOTE: The data set WORK.PMED has 173950 observations and 54 variables.
NOTE: PROCEDURE SORT used:
real time 2:36.30
155
156 DATA MVPMEDS;
157 MERGE PMED (KEEP=LINKIDX RXRECIDX RXXP99X PERWT99F RXNAME)
158 PMEDIDS (IN=A);
159 BY LINKIDX;
7 The SAS System 16:51 Wednesday, October 9, 2002
160 IF A;
161 RUN;
NOTE: There were 173950 observations read from the data set WORK.PMED.
NOTE: There were 1217 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.MVPMEDS has 3021 observations and 5 variables.
NOTE: DATA statement used:
real time 25.09 seconds
162
163 proc print data=mvpmeds (obs=200);
164 var rxrecidx rxname RXXP99X PERWT99F;
165 by linkidx;
166 id linkidx;
167 title3 "sample print of work.mvpmeds";
168 title4 "PMED (HC-033A) 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.
NOTE: PROCEDURE PRINT used:
real time 0.05 seconds
170
171 PROC MEANS DATA=MVPMEDS N SUM;
172 VAR RXXP99X;
173 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
174 RUN;
NOTE: There were 3021 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 22.
NOTE: PROCEDURE MEANS used:
real time 0.61 seconds
175
176 PROC MEANS DATA=MVPMEDS N SUM;
177 VAR RXXP99X;
178 WEIGHT PERWT99F;
179 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
180 TITLE5 "Weighted";
181 RUN;
NOTE: There were 3021 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 23.
NOTE: PROCEDURE MEANS used:
real time 0.00 seconds
182
183
184
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used: real time 3:27.13
HC-033I 16:51 Wednesday, October 9, 2002 1
Sample SAS Job for Example A
sample print of work.asconds - sorted by condidx
COND (H37) records where cccodex=128
Obs CONDIDX CCCODEX
1 600090220017 128
2 600360220012 128
3 600500330031 128
4 600560180037 128
5 600700270076 128
6 600830270054 128
7 601020320041 128
8 601180130063 128
9 601180200034 128
10 601690160045 128
11 601790390019 128
12 602020250012 128
13 602040160013 128
14 602060290010 128
15 602860160024 128
16 602900380013 128
17 603100110047 128
18 603100280018 128
19 603250160020 128
20 603340280010 128
21 603360400017 128
22 603380290021 128
23 603560390011 128
24 603620120096 128
25 603880170017 128
26 603880310015 128
27 603890190047 128
28 603960450021 128
29 603990100018 128
30 604240290017 128
31 604260470018 128
32 604410490026 128
33 604490500013 128
34 604720360045 128
35 604840190067 128
36 604920340020 128
37 605020240135 128
38 605040160066 128
39 605180210045 128
40 605180350053 128
41 605190380015 128
42 605430190045 128
43 605630210055 128
44 606150370025 128
45 606180270049 128
46 606310190023 128
47 606510300073 128
48 606970190010 128
49 606970260047 128
50 606990460051 128
HC-033I 16:51 Wednesday, October 9, 2002 2
Sample SAS Job for Example A
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
600500330031 600500330143 1 MVIS
600500330150 1 MVIS
600500330174 1 MVIS
600500330181 1 MVIS
600560180037 600560180207 1 MVIS
600560180214 1 MVIS
600560180252 8 PMED
600560180269 8 PMED
600560180283 8 PMED
600560180290 8 PMED
600560180389 8 PMED
600560180396 8 PMED
600560180454 8 PMED
600700270076 600700270121 1 MVIS
600700270145 8 PMED
600700270169 8 PMED
600700270176 8 PMED
601020320041 601020320101 1 MVIS
601020320118 8 PMED
601020320125 8 PMED
601180130063 601180130264 8 PMED
601180200034 601180200240 1 MVIS
601180200288 1 MVIS
601180200322 8 PMED
601180200339 8 PMED
601180200480 8 PMED
601180200555 8 PMED
601180200562 8 PMED
601790390019 601790390062 1 MVIS
601790390079 8 PMED
601790390086 8 PMED
602020250012 602020250122 8 PMED
602020250177 8 PMED
602020250235 8 PMED
602040160013 602040160317 8 PMED
602040160324 8 PMED
602040160331 8 PMED
602860160024 602860160170 8 PMED
602860160207 8 PMED
602860160214 8 PMED
HC-033I 16:51 Wednesday, October 9, 2002 3
Sample SAS Job for Example A
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
602860160024 602860160221 8 PMED
602860160238 1 MVIS
602860160245 1 MVIS
602860160252 1 MVIS
602860160269 1 MVIS
602860160276 1 MVIS
602860160283 8 PMED
602860160303 8 PMED
602900380013 602900380465 1 MVIS
602900380472 1 MVIS
602900380489 1 MVIS
602900380554 8 PMED
602900380561 8 PMED
602900380578 8 PMED
602900380585 8 PMED
603100110047 603100110046 3 EROM
603100110084 1 MVIS
603100110091 8 PMED
603100110128 8 PMED
603100280018 603100280077 8 PMED
603250160020 603250160344 1 MVIS
603250160351 1 MVIS
603250160399 8 PMED
603340280010 603340280336 1 MVIS
603340280343 1 MVIS
603340280350 1 MVIS
603340280418 8 PMED
603340280432 8 PMED
603340280456 8 PMED
603340280463 8 PMED
603340280470 8 PMED
603340280521 1 MVIS
603340280583 8 PMED
603360400017 603360400078 8 PMED
603380290021 603380290349 8 PMED
HC-033I 16:51 Wednesday, October 9, 2002 4
Sample SAS Job for Example A
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 600500330031 600500330143 1 MVIS
2 600500330031 600500330150 1 MVIS
3 600500330031 600500330174 1 MVIS
4 600500330031 600500330181 1 MVIS
5 600560180037 600560180207 1 MVIS
6 600560180037 600560180214 1 MVIS
7 600560180037 600560180252 8 PMED
8 600560180037 600560180269 8 PMED
9 600560180037 600560180283 8 PMED
10 600560180037 600560180290 8 PMED
11 600560180037 600560180389 8 PMED
12 600560180037 600560180396 8 PMED
13 600560180037 600560180454 8 PMED
14 600700270076 600700270121 1 MVIS
15 600700270076 600700270145 8 PMED
16 600700270076 600700270169 8 PMED
17 600700270076 600700270176 8 PMED
18 601020320041 601020320101 1 MVIS
19 601020320041 601020320118 8 PMED
20 601020320041 601020320125 8 PMED
21 601180130063 601180130264 8 PMED
22 601180200034 601180200240 1 MVIS
23 601180200034 601180200288 1 MVIS
24 601180200034 601180200322 8 PMED
25 601180200034 601180200339 8 PMED
26 601180200034 601180200480 8 PMED
27 601180200034 601180200555 8 PMED
28 601180200034 601180200562 8 PMED
29 601790390019 601790390062 1 MVIS
30 601790390019 601790390079 8 PMED
31 601790390019 601790390086 8 PMED
32 602020250012 602020250122 8 PMED
33 602020250012 602020250177 8 PMED
34 602020250012 602020250235 8 PMED
35 602040160013 602040160317 8 PMED
36 602040160013 602040160324 8 PMED
37 602040160013 602040160331 8 PMED
38 602860160024 602860160170 8 PMED
39 602860160024 602860160207 8 PMED
40 602860160024 602860160214 8 PMED
41 602860160024 602860160221 8 PMED
42 602860160024 602860160238 1 MVIS
43 602860160024 602860160245 1 MVIS
44 602860160024 602860160252 1 MVIS
45 602860160024 602860160269 1 MVIS
46 602860160024 602860160276 1 MVIS
47 602860160024 602860160283 8 PMED
48 602860160024 602860160303 8 PMED
49 602900380013 602900380465 1 MVIS
50 602900380013 602900380472 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 5
Sample SAS Job for Example A
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 600500330143 1 MVIS
2 600500330150 1 MVIS
3 600500330174 1 MVIS
4 600500330181 1 MVIS
5 600560180207 1 MVIS
6 600560180214 1 MVIS
7 600560180252 8 PMED
8 600560180269 8 PMED
9 600560180283 8 PMED
10 600560180290 8 PMED
11 600560180389 8 PMED
12 600560180396 8 PMED
13 600560180454 8 PMED
14 600700270121 1 MVIS
15 600700270145 8 PMED
16 600700270169 8 PMED
17 600700270176 8 PMED
18 601020320101 1 MVIS
19 601020320118 8 PMED
20 601020320125 8 PMED
21 601180130264 8 PMED
22 601180200240 1 MVIS
23 601180200288 1 MVIS
24 601180200322 8 PMED
25 601180200339 8 PMED
26 601180200480 8 PMED
27 601180200555 8 PMED
28 601180200562 8 PMED
29 601790390062 1 MVIS
30 601790390079 8 PMED
31 601790390086 8 PMED
32 602020250122 8 PMED
33 602020250177 8 PMED
34 602020250235 8 PMED
35 602040160317 8 PMED
36 602040160324 8 PMED
37 602040160331 8 PMED
38 602860160170 8 PMED
39 602860160207 8 PMED
40 602860160214 8 PMED
41 602860160221 8 PMED
42 602860160238 1 MVIS
43 602860160245 1 MVIS
44 602860160252 1 MVIS
45 602860160269 1 MVIS
46 602860160276 1 MVIS
47 602860160283 8 PMED
48 602860160303 8 PMED
49 602900380465 1 MVIS
50 602900380472 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 6
Sample SAS Job for Example A
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-033G) events
Obs EVNTIDX EVENTYPE
1 600500330150 1 MVIS
2 600500330174 1 MVIS
3 600500330181 1 MVIS
4 600560180207 1 MVIS
5 600560180214 1 MVIS
6 601020320101 1 MVIS
7 601180200240 1 MVIS
8 601180200288 1 MVIS
9 601790390062 1 MVIS
10 602860160238 1 MVIS
11 602860160245 1 MVIS
12 602860160252 1 MVIS
13 602860160269 1 MVIS
14 602860160276 1 MVIS
15 602900380465 1 MVIS
16 602900380472 1 MVIS
17 602900380489 1 MVIS
18 603250160344 1 MVIS
19 603250160351 1 MVIS
20 603340280336 1 MVIS
21 603340280343 1 MVIS
22 603340280350 1 MVIS
23 603340280521 1 MVIS
24 603560390075 1 MVIS
25 603990100131 1 MVIS
26 604260470036 1 MVIS
27 604260470050 1 MVIS
28 604260470081 1 MVIS
29 604840190276 1 MVIS
30 604840190492 1 MVIS
31 604920340146 1 MVIS
32 604920340160 1 MVIS
33 604920340177 1 MVIS
34 605040160146 1 MVIS
35 605040160184 1 MVIS
36 605040160191 1 MVIS
37 605040160204 1 MVIS
38 605180210153 1 MVIS
39 605180210184 1 MVIS
40 605180350132 1 MVIS
41 605190380163 1 MVIS
42 605190380214 1 MVIS
43 605190380221 1 MVIS
44 605430190120 1 MVIS
45 605630210638 1 MVIS
46 605630210854 1 MVIS
47 605630211117 1 MVIS
48 605630211124 1 MVIS
49 605630211131 1 MVIS
50 605630211148 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 7
Sample SAS Job for Example A
sample print of work.rxlk - sorted by eventidx
Rx+event link file records (HC-33IF2)
EVNTIDX LINKIDX EVENTYPE
600010100183 600010100203 1 MVIS
600010100210 1 MVIS
600010100227 1 MVIS
600010100190 600010100203 1 MVIS
600010100210 1 MVIS
600010100227 1 MVIS
600010100241 600010100296 1 MVIS
600010100258 600010100309 1 MVIS
600010100265 600010100296 1 MVIS
600010100392 600010100405 1 MVIS
600010100412 1 MVIS
600010270323 600010270347 1 MVIS
600010270361 600010270467 1 MVIS
600010270385 600010270474 1 MVIS
600010270429 600010270481 2 OPAT
600010270436 600010270474 1 MVIS
600010270676 600010270710 1 MVIS
600020460030 600020460078 1 MVIS
600020520055 600020520079 1 MVIS
600050170027 600050170041 1 MVIS
600050170058 1 MVIS
600050480034 600050480041 1 MVIS
600110190116 600110190123 1 MVIS
600110190130 1 MVIS
600110260130 600110260185 1 MVIS
600110260192 1 MVIS
600110260205 1 MVIS
600110260212 1 MVIS
600110260229 1 MVIS
600110260154 600110260161 6 OMED
HC-033I 16:51 Wednesday, October 9, 2002 8
Sample SAS Job for Example A
sample print of work.rxlk - sorted by eventidx
Rx+event link file records (HC-33IF2)
EVNTIDX LINKIDX EVENTYPE
600110260178 600110260185 6 OMED
600110260236 600110260243 1 MVIS
600110260250 1 MVIS
600110260267 1 MVIS
600110260274 600110260332 1 MVIS
600110260349 1 MVIS
600110260356 1 MVIS
600110260298 600110260301 6 OMED
600110260318 600110260325 6 OMED
600140180135 600140180166 1 MVIS
600150150365 600150150430 4 STAZ
600150150543 600150150632 1 MVIS
600150220372 600150220416 1 MVIS
600170100089 600170100109 1 MVIS
600170270065 600170270089 1 MVIS
600170340041 600170340065 1 MVIS
600170340089 600170340096 1 MVIS
600170410027 600170410034 1 MVIS
600170410058 600170410065 1 MVIS
600170410072 600170410096 5 DVIS
600170410089 600170410096 1 MVIS
600180200218 600180200225 6 OMED
600180200232 600180200249 6 OMED
600190270062 600190270079 1 MVIS
600190270086 1 MVIS
600190340093 600190340106 1 MVIS
600200200040 600200200057 1 MVIS
600200200064 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 9
Sample SAS Job for Example A
sample print of work.rxlk - sorted by eventidx
Rx+event link file records (HC-33IF2)
EVNTIDX LINKIDX EVENTYPE
600210180247 600210180343 1 MVIS
600210180350 1 MVIS
600210180292 600210180367 1 MVIS
600210180374 1 MVIS
600210180381 1 MVIS
600210180398 1 MVIS
600210180401 600210180425 1 MVIS
600210180432 1 MVIS
600210180418 600210180449 1 MVIS
600210180456 1 MVIS
600210180470 600210180507 1 MVIS
600210180514 1 MVIS
600210250432 600210250456 1 MVIS
600210250463 1 MVIS
600210250470 1 MVIS
600220210087 600220210107 5 DVIS
600220210094 600220210114 1 MVIS
600240110148 600240110155 1 MVIS
600250170054 600250170085 1 MVIS
600250170092 1 MVIS
600250170061 600250170092 1 MVIS
600250170105 1 MVIS
600250170112 1 MVIS
600250170078 600250170129 1 MVIS
600260270049 600260270063 3 EROM
600260270056 600260270070 1 MVIS
600290210139 600290210146 1 MVIS
600290210153 1 MVIS
600290210160 1 MVIS
600290380026 600290380057 5 DVIS
600290380033 600290380064 1 MVIS
600290380040 600290380071 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 10
Sample SAS Job for Example A
sample print of work.rxlk - sorted by eventidx
Rx+event link file records (HC-33IF2)
EVNTIDX LINKIDX EVENTYPE
600290450146 600290450177 1 MVIS
600290450184 1 MVIS
600290450204 600290450211 1 MVIS
600290450266 600290450280 1 MVIS
600290450273 600290450297 1 MVIS
600290450300 1 MVIS
600290510147 600290510192 1 MVIS
600290510205 1 MVIS
600290510229 600290510243 1 MVIS
600290510250 1 MVIS
600290510267 1 MVIS
600290510236 600290510274 1 MVIS
600300180033 600300180040 1 MVIS
600310140048 600310140062 1 MVIS
600310140079 600310140086 1 MVIS
600310210086 600310210144 1 MVIS
600310210106 600310210151 1 MVIS
600310210168 1 MVIS
600310210175 600310210240 1 MVIS
600310210182 600310210257 1 MVIS
600310210202 600310210264 1 MVIS
600310210271 1 MVIS
600310380024 600310380031 1 MVIS
600310450055 600310450144 1 MVIS
600310450106 600310450151 1 MVIS
600310450168 1 MVIS
600310450113 600310450151 4 STAZ
600310450168 4 STAZ
600320260062 600320260093 5 DVIS
HC-033I 16:51 Wednesday, October 9, 2002 11
Sample SAS Job for Example A
sample print of work.rxlk - sorted by eventidx
Rx+event link file records (HC-33IF2)
EVNTIDX LINKIDX EVENTYPE
600320260113 600320260144 5 DVIS
600320260120 600320260151 1 MVIS
600320260137 600320260168 1 MVIS
600320260175 600320260199 1 MVIS
600320330079 600320330086 1 MVIS
600320330093 1 MVIS
600320530011 600320530028 1 MVIS
600320530035 600320530042 1 MVIS
600350190081 600350190101 1 MVIS
600350190098 600350190118 1 MVIS
600350260036 600350260043 1 MVIS
600350390136 600350390174 1 MVIS
600390200170 600390200252 1 MVIS
600390370485 600390370529 5 DVIS
600390370776 600390370803 1 MVIS
600390370827 600390370858 1 MVIS
600390440067 600390440098 1 MVIS
600410130337 600410130433 1 MVIS
600410130560 600410130604 1 MVIS
600420140086 600420140106 1 MVIS
600420140137 600420140182 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 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
600560180207 600560180252 1 MVIS
600560180269 1 MVIS
600560180214 600560180276 1 MVIS
601020320101 601020320118 1 MVIS
601020320125 1 MVIS
601180200240 601180200322 1 MVIS
601790390062 601790390079 1 MVIS
602860160238 602860160283 1 MVIS
602860160290 1 MVIS
602860160303 1 MVIS
602860160310 1 MVIS
602900380465 602900380554 1 MVIS
602900380561 1 MVIS
602900380578 1 MVIS
602900380585 1 MVIS
603250160344 603250160399 1 MVIS
603250160351 603250160399 1 MVIS
603340280521 603340280545 1 MVIS
603560390075 603560390082 1 MVIS
603560390099 1 MVIS
603990100131 603990100213 1 MVIS
603990100220 1 MVIS
603990100237 1 MVIS
604260470050 604260470067 1 MVIS
604260470074 1 MVIS
604260470081 604260470098 1 MVIS
604840190276 604840190290 1 MVIS
604840190303 1 MVIS
604840190310 1 MVIS
604840190327 1 MVIS
604840190334 1 MVIS
604840190341 1 MVIS
604840190358 1 MVIS
604840190365 1 MVIS
604840190372 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 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
604840190492 604840190536 1 MVIS
604840190543 1 MVIS
604840190550 1 MVIS
604840190567 1 MVIS
604840190574 1 MVIS
604840190581 1 MVIS
604840190598 1 MVIS
604840190601 1 MVIS
604840190618 1 MVIS
604920340146 604920340153 1 MVIS
604920340160 604920340184 1 MVIS
604920340191 1 MVIS
604920340204 1 MVIS
605040160146 605040160228 1 MVIS
605180210153 605180210204 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 14
Sample SAS Job for Example A
sample print of work.pmedids - sorted by linkidx
Obs EVNTIDX LINKIDX EVENTYPE
1 600560180207 600560180252 1 MVIS
2 600560180207 600560180269 1 MVIS
3 600560180214 600560180276 1 MVIS
4 601020320101 601020320118 1 MVIS
5 601020320101 601020320125 1 MVIS
6 601180200240 601180200322 1 MVIS
7 601790390062 601790390079 1 MVIS
8 602860160238 602860160283 1 MVIS
9 602860160238 602860160290 1 MVIS
10 602860160238 602860160303 1 MVIS
11 602860160238 602860160310 1 MVIS
12 602900380465 602900380554 1 MVIS
13 602900380465 602900380561 1 MVIS
14 602900380465 602900380578 1 MVIS
15 602900380465 602900380585 1 MVIS
16 603250160344 603250160399 1 MVIS
17 603250160351 603250160399 1 MVIS
18 603340280521 603340280545 1 MVIS
19 603560390075 603560390082 1 MVIS
20 603560390075 603560390099 1 MVIS
21 603990100131 603990100213 1 MVIS
22 603990100131 603990100220 1 MVIS
23 603990100131 603990100237 1 MVIS
24 604260470050 604260470067 1 MVIS
25 604260470050 604260470074 1 MVIS
26 604260470081 604260470098 1 MVIS
27 604840190276 604840190290 1 MVIS
28 604840190276 604840190303 1 MVIS
29 604840190276 604840190310 1 MVIS
30 604840190276 604840190327 1 MVIS
31 604840190276 604840190334 1 MVIS
32 604840190276 604840190341 1 MVIS
33 604840190276 604840190358 1 MVIS
34 604840190276 604840190365 1 MVIS
35 604840190276 604840190372 1 MVIS
36 604840190492 604840190536 1 MVIS
37 604840190492 604840190543 1 MVIS
38 604840190492 604840190550 1 MVIS
39 604840190492 604840190567 1 MVIS
40 604840190492 604840190574 1 MVIS
41 604840190492 604840190581 1 MVIS
42 604840190492 604840190598 1 MVIS
43 604840190492 604840190601 1 MVIS
44 604840190492 604840190618 1 MVIS
45 604920340146 604920340153 1 MVIS
46 604920340160 604920340184 1 MVIS
47 604920340160 604920340191 1 MVIS
48 604920340160 604920340204 1 MVIS
49 605040160146 605040160228 1 MVIS
50 605180210153 605180210204 1 MVIS
HC-033I 16:51 Wednesday, October 9, 2002 15
Sample SAS Job for Example A
sample print of unique linkidxs in work.pmedids
Obs LINKIDX
1 600560180252
2 600560180269
3 600560180276
4 601020320118
5 601020320125
6 601180200322
7 601790390079
8 602860160283
9 602860160290
10 602860160303
11 602860160310
12 602900380554
13 602900380561
14 602900380578
15 602900380585
16 603250160399
17 603340280545
18 603560390082
19 603560390099
20 603990100213
21 603990100220
22 603990100237
23 604260470067
24 604260470074
25 604260470098
26 604840190290
27 604840190303
28 604840190310
29 604840190327
30 604840190334
31 604840190341
32 604840190358
33 604840190365
34 604840190372
35 604840190536
36 604840190543
37 604840190550
38 604840190567
39 604840190574
40 604840190581
41 604840190598
42 604840190601
43 604840190618
44 604920340153
45 604920340184
46 604920340191
47 604920340204
48 605040160228
49 605180210204
50 605180210211
HC-033I 16:51 Wednesday, October 9, 2002 16
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
600560180252 600560180252001 AZMACORT 49.88 10969.95
600560180252002 AZMACORT 49.88 10969.95
600560180269 600560180269001 ATROVENT 34.62 10969.95
600560180276 600560180276001 BACITRACIN-POLYMYXIN 5.98 10969.95
601020320118 601020320118001 ALBUTEROL 27.69 2417.03
601020320125 601020320125001 AEROBID 69.79 2417.03
601180200322 601180200322001 SEREVENT 61.88 12830.77
601790390079 601790390079001 ERYZOLE 29.63 3796.15
602860160283 602860160283001 SEREVENT (REFILL) 61.70 9438.57
602860160283002 SEREVENT (REFILL) 61.70 9438.57
602860160283003 SEREVENT (REFILL) 61.70 9438.57
602860160283004 SEREVENT (REFILL) 58.39 9438.57
602860160283005 SEREVENT (REFILL) 58.39 9438.57
602860160283006 SEREVENT (REFILL) 61.70 9438.57
602860160283007 SEREVENT (REFILL) 61.70 9438.57
602860160283008 SEREVENT (REFILL) 61.70 9438.57
602860160290 602860160290001 LANOXIN 18.34 9438.57
602860160290002 LANOXIN 18.34 9438.57
602860160290003 LANOXIN 18.34 9438.57
602860160290004 LANOXIN 18.34 9438.57
602860160290005 LANOXIN 18.34 9438.57
602860160290006 LANOXIN 18.34 9438.57
602860160290007 LANOXIN 18.34 9438.57
602860160290008 LANOXIN 18.34 9438.57
602860160303 602860160303001 ALBUTEROL (REFILL) 19.44 9438.57
602860160303002 ALBUTEROL (REFILL) 19.44 9438.57
602860160303003 ALBUTEROL (REFILL) 19.44 9438.57
602860160303004 ALBUTEROL (REFILL) 19.44 9438.57
602860160303005 ALBUTEROL (REFILL) 19.44 9438.57
602860160303006 ALBUTEROL (REFILL) 19.44 9438.57
602860160303007 ALBUTEROL (REFILL) 19.44 9438.57
602860160303008 ALBUTEROL (REFILL) 19.44 9438.57
602860160310 602860160310001 DILTIA XT 28.41 9438.57
602860160310002 DILTIA XT 34.53 9438.57
602860160310003 DILTIA XT 34.53 9438.57
602860160310004 DILTIA XT 34.53 9438.57
602860160310005 DILTIA XT 34.53 9438.57
602860160310006 DILTIA XT 34.53 9438.57
602860160310007 DILTIA XT 34.53 9438.57
HC-033I 16:51 Wednesday, October 9, 2002 17
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
602860160310 602860160310008 DILTIA XT 44.29 9438.57
602900380554 602900380554001 CLARITIN 59.72 13953.92
602900380554002 CLARITIN 61.15 13953.92
602900380561 602900380561001 FLONASE 48.69 13953.92
602900380578 602900380578001 VANCERIL 38.99 13953.92
602900380578002 VANCERIL 38.99 13953.92
602900380585 602900380585001 PREDNISONE 3.40 13953.92
603250160399 603250160399001 PROVENTIL 28.65 12151.94
603340280545 603340280545001 LESCOL 39.74 16770.81
603560390082 603560390082001 ALLEGRA 76.98 27387.18
603560390099 603560390099001 MAXAIR 65.98 27387.18
603990100213 603990100213001 SINGULAIR (UNIT OF USE) 20.00 33402.48
603990100213002 SINGULAIR (UNIT OF USE) 20.00 33402.48
603990100220 603990100220001 AZMACORT 153.42 33402.48
603990100220002 AZMACORT 153.42 33402.48
603990100237 603990100237001 ALBUTEROL 128.46 33402.48
603990100237002 ALBUTEROL 128.46 33402.48
604260470067 604260470067001 VENTOLIN 31.80 13814.68
604260470074 604260470074001 ALLEGRA 53.45 13814.68
604260470098 604260470098001 VENTOLIN 31.80 13814.68
604840190290 604840190290001 K-DUR 20 45.76 6609.35
604840190303 604840190303001 FELDENE 221.79 6609.35
604840190310 604840190310001 BUMEX 25.87 6609.35
604840190327 604840190327001 NITROSTAT 5.48 6609.35
604840190334 604840190334001 LANOXIN 13.52 6609.35
604840190341 604840190341001 ZESTRIL 87.34 6609.35
604840190358 604840190358001 LIPITOR 264.64 6609.35
HC-033I 16:51 Wednesday, October 9, 2002 18
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
604840190365 604840190365001 PROVENTIL 28.65 6609.35
604840190365002 PROVENTIL 28.65 6609.35
604840190372 604840190372001 AEROBID-M (MENTHOL) 105.56 6609.35
604840190372002 AEROBID-M (MENTHOL) 105.56 6609.35
604840190536 604840190536001 K-DUR 20 45.76 6609.35
604840190536002 K-DUR 20 45.76 6609.35
604840190543 604840190543001 FELDENE 221.79 6609.35
604840190550 604840190550001 BUMETANIDE 17.95 6609.35
604840190550002 BUMETANIDE 17.95 6609.35
604840190567 604840190567001 LANOXIN 15.61 6609.35
604840190567002 LANOXIN 15.61 6609.35
604840190574 604840190574001 ZESTRIL 93.01 6609.35
604840190574002 ZESTRIL 93.01 6609.35
604840190581 604840190581001 LIPITOR 264.64 6609.35
604840190581002 LIPITOR 264.64 6609.35
604840190598 604840190598001 PROVENTIL 33.78 6609.35
604840190598002 PROVENTIL 33.78 6609.35
604840190598003 PROVENTIL 33.78 6609.35
604840190598004 PROVENTIL 33.78 6609.35
604840190601 604840190601001 AEROBID-M (MENTHOL) 124.60 6609.35
604840190601002 AEROBID-M (MENTHOL) 124.60 6609.35
604840190601003 AEROBID-M (MENTHOL) 124.60 6609.35
604840190601004 AEROBID-M (MENTHOL) 124.60 6609.35
604840190618 604840190618001 MEPROBAMATE 31.29 6609.35
604840190618002 MEPROBAMATE 31.29 6609.35
604920340153 604920340153001 PROVENTIL 31.56 8559.76
604920340184 604920340184001 PROVENTIL 31.56 8559.76
604920340191 604920340191001 AMOXICILLIN 5.00 8559.76
604920340204 604920340204001 BROMFENEX 24.33 8559.76
605040160228 605040160228001 ZITHROMAX 47.05 22242.49
605180210204 605180210204001 PREDNISOLONE 9.91 4222.85
605180210211 605180210211001 BECLOVENT 61.33 4222.85
HC-033I 16:51 Wednesday, October 9, 2002 19
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
605180350149 605180350149001 AMOXICILLIN 5.00 5740.98
605180350156 605180350156001 PREDNISOLONE 5.00 5740.98
605180350163 605180350163001 ALBUTEROL 21.57 5740.98
605190380170 605190380170001 VENTOLIN INHALER 29.61 17324.05
605190380170002 VENTOLIN INHALER 29.61 17324.05
605190380187 605190380187001 ZYBAN 83.74 17324.05
605190380194 605190380194001 PREDNISONE 6.75 17324.05
605190380238 605190380238001 VENTOLIN INHALER 29.61 17324.05
605190380245 605190380245001 PERCOCET 31.69 17324.05
605190380252 605190380252001 ZYBAN 83.74 17324.05
605190380269 605190380269001 PREDNISONE 2.99 17324.05
605430190137 605430190137001 BRONCHO SALINE 8.48 10412.02
605430190151 605430190151001 BRONCHO SALINE 8.48 10412.02
607130230407 607130230407001 ALBUTEROL 18.99 18005.26
607130230469 607130230469001 PREDNISONE 5.29 18005.26
607130230476 607130230476001 CEPHALEXIN 15.00 18005.26
607180140365 607180140365001 ACCOLATE 80.69 9832.99
607180140365002 ACCOLATE 80.69 9832.99
607180140365003 ACCOLATE 80.69 9832.99
607180140365004 ACCOLATE 80.69 9832.99
607180140365005 ACCOLATE 80.69 9832.99
607180140365006 ACCOLATE 80.69 9832.99
607180140365007 ACCOLATE 80.69 9832.99
607180140372 607180140372001 SYNTHROID 16.69 9832.99
607180140372002 SYNTHROID 16.69 9832.99
607180140372003 SYNTHROID 16.69 9832.99
607180140389 607180140389001 LASIX 13.98 9832.99
607180140389002 LASIX 13.98 9832.99
607180140389003 LASIX 13.98 9832.99
607180140389004 LASIX 13.98 9832.99
607180140389005 LASIX 13.98 9832.99
607180140389006 LASIX 13.98 9832.99
HC-033I 16:51 Wednesday, October 9, 2002 20
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
607180140396 607180140396001 AMITRIPTYLINE 10.35 9832.99
607180140396002 AMITRIPTYLINE 10.35 9832.99
607180140396003 AMITRIPTYLINE 10.35 9832.99
607180140409 607180140409001 PREVACID 106.85 9832.99
607180140409002 PREVACID 106.85 9832.99
607180140409003 PREVACID 106.85 9832.99
607180140409004 PREVACID 106.85 9832.99
607180140409005 PREVACID 106.85 9832.99
607180140416 607180140416001 VENTOLIN INHALER 29.61 9832.99
607180140416002 VENTOLIN INHALER 29.61 9832.99
607180140416003 VENTOLIN INHALER 29.61 9832.99
607180140416004 VENTOLIN INHALER 29.61 9832.99
607180140416005 VENTOLIN INHALER 29.61 9832.99
607180140416006 VENTOLIN INHALER 29.61 9832.99
607180140416007 VENTOLIN INHALER 29.61 9832.99
607180140423 607180140423001 FLOVENT 85.96 9832.99
607180140423002 FLOVENT 85.96 9832.99
607180140423003 FLOVENT 85.96 9832.99
607180140423004 FLOVENT 85.96 9832.99
607180140430 607180140430001 PROVENTIL 31.56 9832.99
607180140430002 PROVENTIL 31.56 9832.99
607180140430003 PROVENTIL 31.56 9832.99
607180140430004 PROVENTIL 31.56 9832.99
607180140430005 PROVENTIL 31.56 9832.99
607180140485 607180140485001 SYNTHROID 16.69 9832.99
607180140485002 SYNTHROID 16.69 9832.99
607180140485003 SYNTHROID 16.69 9832.99
607180140492 607180140492001 PREVACID 106.85 9832.99
607180140492002 PREVACID 106.85 9832.99
607180140492003 PREVACID 106.85 9832.99
607180140505 607180140505001 AMITRIPTYLINE 10.35 9832.99
607180140505002 AMITRIPTYLINE 10.35 9832.99
607180140505003 AMITRIPTYLINE 10.35 9832.99
607180140512 607180140512001 LASIX 16.69 9832.99
607180140512002 LASIX 16.69 9832.99
607180140512003 LASIX 16.69 9832.99
607180140529 607180140529001 VENTOLIN INHALER 29.61 9832.99
607180140529002 VENTOLIN INHALER 29.61 9832.99
607180140529003 VENTOLIN INHALER 29.61 9832.99
HC-033I 16:51 Wednesday, October 9, 2002 21
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
607180140536 607180140536001 VANCERIL 40.18 9832.99
607180140536002 VANCERIL 40.18 9832.99
607180140536003 VANCERIL 40.18 9832.99
607180140543 607180140543001 ACCOLATE 80.69 9832.99
607180140543002 ACCOLATE 80.69 9832.99
607180140543003 ACCOLATE 80.69 9832.99
607180140598 607180140598001 ACCOLATE 80.69 9832.99
607180140598002 ACCOLATE 80.69 9832.99
607180140601 607180140601001 SYNTHROID 16.69 9832.99
607180140601002 SYNTHROID 16.69 9832.99
607180140618 607180140618001 LASIX 16.69 9832.99
607180140618002 LASIX 16.69 9832.99
607180140625 607180140625001 VENTOLIN INHALER 29.11 9832.99
607180140625002 VENTOLIN INHALER 29.11 9832.99
607180140632 607180140632001 FLOVENT 85.96 9832.99
607180140632002 FLOVENT 85.96 9832.99
607180140649 607180140649001 PROVENTIL 31.56 9832.99
607180140649002 PROVENTIL 31.56 9832.99
607180140656 607180140656001 VANCERIL 40.18 9832.99
607180140656002 VANCERIL 40.18 9832.99
607180140663 607180140663001 EVISTA 72.55 9832.99
607180140663002 EVISTA 72.55 9832.99
607480251053 607480251053001 AZMACORT 65.98 13441.20
607480251053002 AZMACORT 64.69 13441.20
607480251060 607480251060001 ALBUTEROL 21.98 13441.20
607690100332 607690100332001 PROMETH/COD 14.40 27271.24
607690100349 607690100349001 ALLEGRA 59.65 27271.24
607690100356 607690100356001 CEPHALEXIN 9.12 27271.24
607870270088 607870270088001 ALBUTEROL 21.41 11692.55
608750280202 608750280202001 MINOCYCLINE 44.99 6819.65
608750280219 608750280219001 ALUPENT 25.33 6819.65
HC-033I 16:51 Wednesday, October 9, 2002 22
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma
The MEANS Procedure
Analysis Variable : RXXP99X SUM OF PAYMENTS RXSF99X-RXOU99X(IMPUTED)
N Sum
--------------------
3021 129776.76
--------------------
HC-033I 16:51 Wednesday, October 9, 2002 23
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma
Weighted
The MEANS Procedure
Analysis Variable : RXXP99X SUM OF PAYMENTS RXSF99X-RXOU99X(IMPUTED)
N Sum
--------------------
3021 1269547970
--------------------
1 The SAS System 16:56 Wednesday, October 9, 2002
NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
Licensed to SOCIAL & SCIENTIFIC SYSTEMS INC, Site 0026405003.
NOTE: This session is executing on the WIN_95 platform.
NOTE: SAS initialization used:
real time 3.50 seconds
1 OPTIONS LS=132 PS=59;
2
3 TITLE1 "HC-033I";
4 TITLE2 'Sample SAS Job for Example B';
5
6 LIBNAME IN 'C:\data';
NOTE: Directory for library IN contains files of mixed engine types.
NOTE: Libref IN was successfully assigned as follows:
Engine: V8
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:
real time 0.26 seconds
22
23 *--------------------------------------------------------------------------------------
24 * Get condition records coded as asthma.
25 *--------------------------------------------------------------------------------------;
26 DATA ASCONDS;
27 SET IN.H37 (KEEP=CONDIDX CCCODEX);
28 IF CCCODEX="128";
29 RUN;
NOTE: There were 69897 observations read from the data set IN.H37.
NOTE: The data set WORK.ASCONDS has 1088 observations and 2 variables.
NOTE: DATA statement used:
real time 9.23 seconds
30
2 The SAS System 16:56 Wednesday, October 9, 2002
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 1088 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCONDS has 1088 observations and 2 variables.
NOTE: PROCEDURE SORT used:
real time 0.10 seconds
35
36 proc print data=asconds (obs=50);
37 title3 "sample print of work.asconds - sorted by condidx";
38 title4 "COND (H37) 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:
real time 0.61 seconds
40
41 PROC SORT DATA=IN.H33IF1 OUT=CLNK; BY CONDIDX; RUN;
NOTE: There were 208632 observations read from the data set IN.H33IF1.
NOTE: The data set WORK.CLNK has 208632 observations and 5 variables.
NOTE: PROCEDURE SORT used:
real time 4.00 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 208632 observations read from the data set WORK.CLNK.
NOTE: There were 1088 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 4744 observations and 3 variables.
NOTE: DATA statement used:
real time 1.31 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.
3 The SAS System 16:56 Wednesday, October 9, 2002
NOTE: The PROCEDURE PRINT printed pages 2-3.
NOTE: PROCEDURE PRINT used:
real time 1.98 seconds
57
58 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;
NOTE: There were 4744 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 4744 observations and 3 variables.
NOTE: PROCEDURE SORT used:
real time 0.04 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:
real time 0.06 seconds
64
65 DATA ASCLNKS;
66 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
67 BY EVNTIDX;
68 IF FIRST.EVNTIDX;
69 RUN;
NOTE: There were 4744 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 4730 observations and 2 variables.
NOTE: DATA statement used:
real time 0.04 seconds
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:
real time 0.00 seconds
75
76 *-------------------------------------------------------------------------------
77 * Get PMED records linked to asthma condition records.
78 *-------------------------------------------------------------------------------;
79 PROC SORT DATA=IN.H33A OUT=PMED; BY LINKIDX; RUN;
4 The SAS System 16:56 Wednesday, October 9, 2002
NOTE: There were 173950 observations read from the data set IN.H33A.
NOTE: The data set WORK.PMED has 173950 observations and 54 variables.
NOTE: PROCEDURE SORT used:
real time 2:43.24
80
81 DATA ASPMEDS;
82 MERGE PMED (KEEP=LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F)
83 ASCLNKS (IN=INASCLNK KEEP=EVNTIDX RENAME=(EVNTIDX=LINKIDX));
84 BY LINKIDX;
85 IF INASCLNK & PERWT99F>0;
86 RUN;
NOTE: There were 173950 observations read from the data set WORK.PMED.
NOTE: There were 4730 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASPMEDS has 6325 observations and 5 variables.
NOTE: DATA statement used:
real time 27.46 seconds
87
88 proc print data=aspmeds (obs=300);
89 by linkidx;
90 id linkidx;
91 var rxrecidx rxname RXXP99X PERWT99F;
92 title3 "sample print of work.aspmeds";
93 title4 "PMED (HC-033A) 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-15.
NOTE: PROCEDURE PRINT used:
real time 0.16 seconds
95
96 PROC MEANS DATA=ASPMEDS N SUM;
97 VAR RXXP99X;
98 TITLE3 "Total Rx expenditures associated with asthma";
99 RUN;
NOTE: There were 6325 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE MEANS printed page 16.
NOTE: PROCEDURE MEANS used:
real time 0.72 seconds
100
101 PROC MEANS DATA=ASPMEDS N SUM;
102 VAR RXXP99X;
103 WEIGHT PERWT99F;
104 TITLE3 "Total Rx expenditures associated with asthma";
105 TITLE5 "Weighted";
106 RUN;
NOTE: There were 6325 observations read from the data set WORK.ASPMEDS.
5 The SAS System 16:56 Wednesday, October 9, 2002
NOTE: The PROCEDURE MEANS printed page 17.
NOTE: PROCEDURE MEANS used:
real time 0.00 seconds
107
108
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 3:33.76
HC-033I 16:56 Wednesday, October 9, 2002 1
Sample SAS Job for Example B
sample print of work.asconds - sorted by condidx
COND (H37) records where cccodex=128
Obs CONDIDX CCCODEX
1 600090220017 128
2 600360220012 128
3 600500330031 128
4 600560180037 128
5 600700270076 128
6 600830270054 128
7 601020320041 128
8 601180130063 128
9 601180200034 128
10 601690160045 128
11 601790390019 128
12 602020250012 128
13 602040160013 128
14 602060290010 128
15 602860160024 128
16 602900380013 128
17 603100110047 128
18 603100280018 128
19 603250160020 128
20 603340280010 128
21 603360400017 128
22 603380290021 128
23 603560390011 128
24 603620120096 128
25 603880170017 128
26 603880310015 128
27 603890190047 128
28 603960450021 128
29 603990100018 128
30 604240290017 128
31 604260470018 128
32 604410490026 128
33 604490500013 128
34 604720360045 128
35 604840190067 128
36 604920340020 128
37 605020240135 128
38 605040160066 128
39 605180210045 128
40 605180350053 128
41 605190380015 128
42 605430190045 128
43 605630210055 128
44 606150370025 128
45 606180270049 128
46 606310190023 128
47 606510300073 128
48 606970190010 128
49 606970260047 128
50 606990460051 128
HC-033I 16:56 Wednesday, October 9, 2002 2
Sample SAS Job for Example B
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
600500330031 600500330143 1 MVIS
600500330150 1 MVIS
600500330174 1 MVIS
600500330181 1 MVIS
600560180037 600560180207 1 MVIS
600560180214 1 MVIS
600560180252 8 PMED
600560180269 8 PMED
600560180283 8 PMED
600560180290 8 PMED
600560180389 8 PMED
600560180396 8 PMED
600560180454 8 PMED
600700270076 600700270121 1 MVIS
600700270145 8 PMED
600700270169 8 PMED
600700270176 8 PMED
601020320041 601020320101 1 MVIS
601020320118 8 PMED
601020320125 8 PMED
601180130063 601180130264 8 PMED
601180200034 601180200240 1 MVIS
601180200288 1 MVIS
601180200322 8 PMED
601180200339 8 PMED
601180200480 8 PMED
601180200555 8 PMED
601180200562 8 PMED
601790390019 601790390062 1 MVIS
601790390079 8 PMED
601790390086 8 PMED
602020250012 602020250122 8 PMED
602020250177 8 PMED
602020250235 8 PMED
602040160013 602040160317 8 PMED
602040160324 8 PMED
602040160331 8 PMED
602860160024 602860160170 8 PMED
602860160207 8 PMED
602860160214 8 PMED
HC-033I 16:56 Wednesday, October 9, 2002 3
Sample SAS Job for Example B
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
602860160024 602860160221 8 PMED
602860160238 1 MVIS
602860160245 1 MVIS
602860160252 1 MVIS
602860160269 1 MVIS
602860160276 1 MVIS
602860160283 8 PMED
602860160303 8 PMED
602900380013 602900380465 1 MVIS
602900380472 1 MVIS
602900380489 1 MVIS
602900380554 8 PMED
602900380561 8 PMED
602900380578 8 PMED
602900380585 8 PMED
603100110047 603100110046 3 EROM
603100110084 1 MVIS
603100110091 8 PMED
603100110128 8 PMED
603100280018 603100280077 8 PMED
603250160020 603250160344 1 MVIS
603250160351 1 MVIS
603250160399 8 PMED
603340280010 603340280336 1 MVIS
603340280343 1 MVIS
603340280350 1 MVIS
603340280418 8 PMED
603340280432 8 PMED
603340280456 8 PMED
603340280463 8 PMED
603340280470 8 PMED
603340280521 1 MVIS
603340280583 8 PMED
603360400017 603360400078 8 PMED
603380290021 603380290349 8 PMED
HC-033I 16:56 Wednesday, October 9, 2002 4
Sample SAS Job for Example B
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 600500330031 600500330143 1 MVIS
2 600500330031 600500330150 1 MVIS
3 600500330031 600500330174 1 MVIS
4 600500330031 600500330181 1 MVIS
5 600560180037 600560180207 1 MVIS
6 600560180037 600560180214 1 MVIS
7 600560180037 600560180252 8 PMED
8 600560180037 600560180269 8 PMED
9 600560180037 600560180283 8 PMED
10 600560180037 600560180290 8 PMED
11 600560180037 600560180389 8 PMED
12 600560180037 600560180396 8 PMED
13 600560180037 600560180454 8 PMED
14 600700270076 600700270121 1 MVIS
15 600700270076 600700270145 8 PMED
16 600700270076 600700270169 8 PMED
17 600700270076 600700270176 8 PMED
18 601020320041 601020320101 1 MVIS
19 601020320041 601020320118 8 PMED
20 601020320041 601020320125 8 PMED
21 601180130063 601180130264 8 PMED
22 601180200034 601180200240 1 MVIS
23 601180200034 601180200288 1 MVIS
24 601180200034 601180200322 8 PMED
25 601180200034 601180200339 8 PMED
26 601180200034 601180200480 8 PMED
27 601180200034 601180200555 8 PMED
28 601180200034 601180200562 8 PMED
29 601790390019 601790390062 1 MVIS
30 601790390019 601790390079 8 PMED
31 601790390019 601790390086 8 PMED
32 602020250012 602020250122 8 PMED
33 602020250012 602020250177 8 PMED
34 602020250012 602020250235 8 PMED
35 602040160013 602040160317 8 PMED
36 602040160013 602040160324 8 PMED
37 602040160013 602040160331 8 PMED
38 602860160024 602860160170 8 PMED
39 602860160024 602860160207 8 PMED
40 602860160024 602860160214 8 PMED
41 602860160024 602860160221 8 PMED
42 602860160024 602860160238 1 MVIS
43 602860160024 602860160245 1 MVIS
44 602860160024 602860160252 1 MVIS
45 602860160024 602860160269 1 MVIS
46 602860160024 602860160276 1 MVIS
47 602860160024 602860160283 8 PMED
48 602860160024 602860160303 8 PMED
49 602900380013 602900380465 1 MVIS
50 602900380013 602900380472 1 MVIS
HC-033I 16:56 Wednesday, October 9, 2002 5
Sample SAS Job for Example B
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 600500330143 1 MVIS
2 600500330150 1 MVIS
3 600500330174 1 MVIS
4 600500330181 1 MVIS
5 600560180207 1 MVIS
6 600560180214 1 MVIS
7 600560180252 8 PMED
8 600560180269 8 PMED
9 600560180283 8 PMED
10 600560180290 8 PMED
11 600560180389 8 PMED
12 600560180396 8 PMED
13 600560180454 8 PMED
14 600700270121 1 MVIS
15 600700270145 8 PMED
16 600700270169 8 PMED
17 600700270176 8 PMED
18 601020320101 1 MVIS
19 601020320118 8 PMED
20 601020320125 8 PMED
21 601180130264 8 PMED
22 601180200240 1 MVIS
23 601180200288 1 MVIS
24 601180200322 8 PMED
25 601180200339 8 PMED
26 601180200480 8 PMED
27 601180200555 8 PMED
28 601180200562 8 PMED
29 601790390062 1 MVIS
30 601790390079 8 PMED
31 601790390086 8 PMED
32 602020250122 8 PMED
33 602020250177 8 PMED
34 602020250235 8 PMED
35 602040160317 8 PMED
36 602040160324 8 PMED
37 602040160331 8 PMED
38 602860160170 8 PMED
39 602860160207 8 PMED
40 602860160214 8 PMED
41 602860160221 8 PMED
42 602860160238 1 MVIS
43 602860160245 1 MVIS
44 602860160252 1 MVIS
45 602860160269 1 MVIS
46 602860160276 1 MVIS
47 602860160283 8 PMED
48 602860160303 8 PMED
49 602900380465 1 MVIS
50 602900380472 1 MVIS
HC-033I 16:56 Wednesday, October 9, 2002 6
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
600560180252 600560180252001 AZMACORT 49.88 10969.95
600560180252002 AZMACORT 49.88 10969.95
600560180269 600560180269001 ATROVENT 34.62 10969.95
600560180283 600560180283001 ALBUTEROL 13.10 10969.95
600560180283002 ALBUTEROL 13.10 10969.95
600560180290 600560180290001 SEREVENT 61.88 10969.95
600560180290002 SEREVENT 57.46 10969.95
600560180389 600560180389001 SEREVENT 57.46 10969.95
600560180396 600560180396001 AZMACORT 49.88 10969.95
600560180454 600560180454001 AZMACORT 51.75 10969.95
600700270145 600700270145001 -9 34.15 9618.51
600700270169 600700270169001 -9 59.65 9618.51
600700270176 600700270176001 -9 34.15 9618.51
601020320118 601020320118001 ALBUTEROL 27.69 2417.03
601020320125 601020320125001 AEROBID 69.79 2417.03
601180130264 601180130264001 ALBUTEROL 21.99 10483.07
601180200322 601180200322001 SEREVENT 61.88 12830.77
601180200339 601180200339001 ALBUTEROL 21.41 12830.77
601180200480 601180200480001 SEREVENT 61.88 12830.77
601180200555 601180200555001 SEREVENT 61.88 12830.77
601180200555002 SEREVENT 61.88 12830.77
601180200562 601180200562001 ALBUTEROL 21.41 12830.77
601790390079 601790390079001 ERYZOLE 29.63 3796.15
601790390086 601790390086001 ALBUTEROL 17.09 3796.15
602020250122 602020250122001 BRONCHO SALINE 10.69 17379.85
602020250177 602020250177001 BRONCHO SALINE 10.69 17379.85
602020250177002 BRONCHO SALINE 10.69 17379.85
HC-033I 16:56 Wednesday, October 9, 2002 7
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
602020250235 602020250235001 BRONCHO SALINE 10.70 17379.85
602020250235002 BRONCHO SALINE 10.69 17379.85
602020250235003 BRONCHO SALINE 10.69 17379.85
602040160317 602040160317001 ACCOLATE 61.19 8913.37
602040160317002 ACCOLATE 61.19 8913.37
602040160324 602040160324001 SEREVENT 60.94 8913.37
602040160324002 SEREVENT 60.94 8913.37
602040160331 602040160331001 PROVENTIL HFA (M.D.I.) 27.99 8913.37
602040160331002 PROVENTIL HFA (M.D.I.) 27.99 8913.37
602040160331003 PROVENTIL HFA (M.D.I.) 27.99 8913.37
602040160331004 PROVENTIL HFA (M.D.I.) 27.99 8913.37
602040160331005 PROVENTIL HFA (M.D.I.) 27.99 8913.37
602040160331006 PROVENTIL HFA (M.D.I.) 27.99 8913.37
602860160170 602860160170001 PROVENTIL HFA (M.D.I.) 28.18 9438.57
602860160207 602860160207001 SEREVENT 61.88 9438.57
602860160207002 SEREVENT 61.88 9438.57
602860160207003 SEREVENT 61.88 9438.57
602860160214 602860160214001 FLOVENT 57.89 9438.57
602860160214002 FLOVENT 57.89 9438.57
602860160221 602860160221001 ALBUTEROL 9.47 9438.57
602860160283 602860160283001 SEREVENT (REFILL) 61.70 9438.57
602860160283002 SEREVENT (REFILL) 61.70 9438.57
602860160283003 SEREVENT (REFILL) 61.70 9438.57
602860160283004 SEREVENT (REFILL) 58.39 9438.57
602860160283005 SEREVENT (REFILL) 58.39 9438.57
602860160283006 SEREVENT (REFILL) 61.70 9438.57
602860160283007 SEREVENT (REFILL) 61.70 9438.57
602860160283008 SEREVENT (REFILL) 61.70 9438.57
602860160303 602860160303001 ALBUTEROL (REFILL) 19.44 9438.57
602860160303002 ALBUTEROL (REFILL) 19.44 9438.57
602860160303003 ALBUTEROL (REFILL) 19.44 9438.57
602860160303004 ALBUTEROL (REFILL) 19.44 9438.57
602860160303005 ALBUTEROL (REFILL) 19.44 9438.57
602860160303006 ALBUTEROL (REFILL) 19.44 9438.57
602860160303007 ALBUTEROL (REFILL) 19.44 9438.57
602860160303008 ALBUTEROL (REFILL) 19.44 9438.57
602900380554 602900380554001 CLARITIN 59.72 13953.92
602900380554002 CLARITIN 61.15 13953.92
HC-033I 16:56 Wednesday, October 9, 2002 8
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
602900380561 602900380561001 FLONASE 48.69 13953.92
602900380578 602900380578001 VANCERIL 38.99 13953.92
602900380578002 VANCERIL 38.99 13953.92
602900380585 602900380585001 PREDNISONE 3.40 13953.92
603100110091 603100110091001 BRONCHO SALINE 10.69 24703.59
603100110091002 BRONCHO SALINE 10.69 24703.59
603100110128 603100110128001 BRONCHO SALINE 6.93 24703.59
603100280077 603100280077001 BRONCHO SALINE 10.69 20234.81
603250160399 603250160399001 PROVENTIL 28.65 12151.94
603340280418 603340280418001 SEREVENT 61.88 16770.81
603340280432 603340280432001 SINGULAIR 69.50 16770.81
603340280432002 SINGULAIR 69.50 16770.81
603340280456 603340280456001 ZYRTEC 76.98 16770.81
603340280463 603340280463001 NASACORT 39.90 16770.81
603340280470 603340280470001 AZMACORT 85.98 16770.81
603340280583 603340280583001 SINGULAIR 71.17 16770.81
603360400078 603360400078001 SODIUM CHLORIDE (P.F.) 24.20 18809.56
603380290349 603380290349001 ALBUTEROL 9.06 12825.57
603560390082 603560390082001 ALLEGRA 76.98 27387.18
603560390099 603560390099001 MAXAIR 65.98 27387.18
603620120365 603620120365001 FLOVENT 50.67 10917.34
603620120365002 FLOVENT 50.67 10917.34
603620120372 603620120372001 PROVENTIL 42.82 10917.34
603620120372002 PROVENTIL 42.82 10917.34
603880170210 603880170210001 AZMACORT 51.14 8694.36
603880170272 603880170272001 FLOVENT 45.14 8694.36
603880170289 603880170289001 PROVENTIL 29.77 8694.36
HC-033I 16:56 Wednesday, October 9, 2002 9
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
603880170323 603880170323001 MAXAIR 79.56 8694.36
603880170347 603880170347001 AZMACORT 62.20 8694.36
603880310121 603880310121001 VENTOLIN 35.54 10382.67
603890190093 603890190093001 ALBUTEROL 27.03 8436.84
603960450139 603960450139001 WESTCORT 30.28 14945.46
603960450146 603960450146001 CROLOM 32.78 14945.46
603960450153 603960450153001 ALBUTEROL 10.21 14945.46
603960450160 603960450160001 VANCERIL DS 46.34 14945.46
603960450177 603960450177001 NASACORT AQ 35.71 14945.46
603960450184 603960450184001 CLARITIN 31.05 14945.46
603990100213 603990100213001 SINGULAIR (UNIT OF USE) 20.00 33402.48
603990100213002 SINGULAIR (UNIT OF USE) 20.00 33402.48
603990100220 603990100220001 AZMACORT 153.42 33402.48
603990100220002 AZMACORT 153.42 33402.48
603990100237 603990100237001 ALBUTEROL 128.46 33402.48
603990100237002 ALBUTEROL 128.46 33402.48
603990100251 603990100251001 SINGULAIR (UNIT OF USE) 20.00 33402.48
603990100282 603990100282001 AZMACORT 51.14 33402.48
603990100299 603990100299001 ALBUTEROL 21.41 33402.48
603990100302 603990100302001 SINGULAIR (UNIT OF USE) 20.00 33402.48
604240290151 604240290151001 PANFIL G 18.68 3875.88
604240290168 604240290168001 VENTOLIN 31.80 3875.88
604260470043 604260470043001 CHLORPHENIRAMINE MALEATE 53.01 13814.68
604260470043002 CHLORPHENIRAMINE MALEATE 53.01 13814.68
604260470043003 CHLORPHENIRAMINE MALEATE 53.01 13814.68
604260470043004 CHLORPHENIRAMINE MALEATE 53.01 13814.68
604260470043005 CHLORPHENIRAMINE MALEATE 53.01 13814.68
604260470067 604260470067001 VENTOLIN 31.80 13814.68
HC-033I 16:56 Wednesday, October 9, 2002 10
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
604260470098 604260470098001 VENTOLIN 31.80 13814.68
604720360099 604720360099001 BETASERON 72.00 7718.86
604840190365 604840190365001 PROVENTIL 28.65 6609.35
604840190365002 PROVENTIL 28.65 6609.35
604840190372 604840190372001 AEROBID-M (MENTHOL) 105.56 6609.35
604840190372002 AEROBID-M (MENTHOL) 105.56 6609.35
604840190454 604840190454001 PROVENTIL 57.30 6609.35
604840190454002 PROVENTIL 57.30 6609.35
604840190461 604840190461001 AEROBID-M (MENTHOL) 124.60 6609.35
604840190461002 AEROBID-M (MENTHOL) 113.80 6609.35
604840190598 604840190598001 PROVENTIL 33.78 6609.35
604840190598002 PROVENTIL 33.78 6609.35
604840190598003 PROVENTIL 33.78 6609.35
604840190598004 PROVENTIL 33.78 6609.35
604840190601 604840190601001 AEROBID-M (MENTHOL) 124.60 6609.35
604840190601002 AEROBID-M (MENTHOL) 124.60 6609.35
604840190601003 AEROBID-M (MENTHOL) 124.60 6609.35
604840190601004 AEROBID-M (MENTHOL) 124.60 6609.35
604920340153 604920340153001 PROVENTIL 31.56 8559.76
604920340184 604920340184001 PROVENTIL 31.56 8559.76
605020240337 605020240337001 PROVENTIL 28.65 10886.90
605020240337002 PROVENTIL 28.65 10886.90
605020240337003 PROVENTIL 28.65 10886.90
605020240337004 PROVENTIL 28.65 10886.90
605020240440 605020240440001 PROVENTIL 28.65 10886.90
605020240440002 PROVENTIL 28.65 10886.90
605020240440003 PROVENTIL 28.65 10886.90
605040160228 605040160228001 ZITHROMAX 47.05 22242.49
605040160297 605040160297001 ALBUTEROL 11.20 22242.49
605180210204 605180210204001 PREDNISOLONE 9.91 4222.85
605180210211 605180210211001 BECLOVENT 61.33 4222.85
605180350149 605180350149001 AMOXICILLIN 5.00 5740.98
HC-033I 16:56 Wednesday, October 9, 2002 11
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
605180350156 605180350156001 PREDNISOLONE 5.00 5740.98
605180350163 605180350163001 ALBUTEROL 21.57 5740.98
605190380149 605190380149001 VENTOLIN INHALER 29.11 17324.05
605190380149002 VENTOLIN INHALER 29.11 17324.05
605190380156 605190380156001 DURATEX 10.00 17324.05
605190380170 605190380170001 VENTOLIN INHALER 29.61 17324.05
605190380170002 VENTOLIN INHALER 29.61 17324.05
605190380194 605190380194001 PREDNISONE 6.75 17324.05
605190380207 605190380207001 SODIUM CHLORIDE (P.F.) 24.20 17324.05
605190380238 605190380238001 VENTOLIN INHALER 29.61 17324.05
605190380252 605190380252001 ZYBAN 83.74 17324.05
605190380269 605190380269001 PREDNISONE 2.99 17324.05
605430190137 605430190137001 BRONCHO SALINE 8.48 10412.02
605430190151 605430190151001 BRONCHO SALINE 8.48 10412.02
605630210587 605630210587001 COMBIVENT 35.93 7075.73
605630210741 605630210741001 COMBIVENT 38.23 7075.73
605630210741002 COMBIVENT 38.23 7075.73
605630210765 605630210765001 FLOVENT 51.99 7075.73
605630210765002 FLOVENT 51.99 7075.73
605630210823 605630210823001 CATAFLAM 37.23 7075.73
605630210823002 CATAFLAM 37.23 7075.73
605630211004 605630211004001 FLOVENT 56.93 7075.73
605630211004002 FLOVENT 56.93 7075.73
605630211004003 FLOVENT 56.93 7075.73
605630211004004 FLOVENT 56.93 7075.73
605630211059 605630211059001 COMBIVENT 39.68 7075.73
605630211059002 COMBIVENT 39.68 7075.73
605630211059003 COMBIVENT 39.68 7075.73
605630211059004 COMBIVENT 39.68 7075.73
606150370018 606150370018001 PANFIL G 18.68 8425.28
606150370018002 PANFIL G 18.68 8425.28
HC-033I 16:56 Wednesday, October 9, 2002 12
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
606510300119 606510300119001 ALBUTEROL 42.82 21543.55
606510300140 606510300140001 ALBUTEROL 42.82 21543.55
606990460126 606990460126001 ALBUTEROL INHALER 21.41 11232.56
607130230407 607130230407001 ALBUTEROL 18.99 18005.26
607130230469 607130230469001 PREDNISONE 5.29 18005.26
607130230476 607130230476001 CEPHALEXIN 15.00 18005.26
607180140365 607180140365001 ACCOLATE 80.69 9832.99
607180140365002 ACCOLATE 80.69 9832.99
607180140365003 ACCOLATE 80.69 9832.99
607180140365004 ACCOLATE 80.69 9832.99
607180140365005 ACCOLATE 80.69 9832.99
607180140365006 ACCOLATE 80.69 9832.99
607180140365007 ACCOLATE 80.69 9832.99
607180140416 607180140416001 VENTOLIN INHALER 29.61 9832.99
607180140416002 VENTOLIN INHALER 29.61 9832.99
607180140416003 VENTOLIN INHALER 29.61 9832.99
607180140416004 VENTOLIN INHALER 29.61 9832.99
607180140416005 VENTOLIN INHALER 29.61 9832.99
607180140416006 VENTOLIN INHALER 29.61 9832.99
607180140416007 VENTOLIN INHALER 29.61 9832.99
607180140423 607180140423001 FLOVENT 85.96 9832.99
607180140423002 FLOVENT 85.96 9832.99
607180140423003 FLOVENT 85.96 9832.99
607180140423004 FLOVENT 85.96 9832.99
607180140430 607180140430001 PROVENTIL 31.56 9832.99
607180140430002 PROVENTIL 31.56 9832.99
607180140430003 PROVENTIL 31.56 9832.99
607180140430004 PROVENTIL 31.56 9832.99
607180140430005 PROVENTIL 31.56 9832.99
607180140447 607180140447001 VANCERIL 40.18 9832.99
607180140447002 VANCERIL 40.18 9832.99
607180140529 607180140529001 VENTOLIN INHALER 29.61 9832.99
607180140529002 VENTOLIN INHALER 29.61 9832.99
607180140529003 VENTOLIN INHALER 29.61 9832.99
607180140536 607180140536001 VANCERIL 40.18 9832.99
607180140536002 VANCERIL 40.18 9832.99
607180140536003 VANCERIL 40.18 9832.99
HC-033I 16:56 Wednesday, October 9, 2002 13
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
607180140543 607180140543001 ACCOLATE 80.69 9832.99
607180140543002 ACCOLATE 80.69 9832.99
607180140543003 ACCOLATE 80.69 9832.99
607180140574 607180140574001 PROVENTIL 31.56 9832.99
607180140574002 PROVENTIL 31.56 9832.99
607180140574003 PROVENTIL 31.56 9832.99
607180140598 607180140598001 ACCOLATE 80.69 9832.99
607180140598002 ACCOLATE 80.69 9832.99
607180140625 607180140625001 VENTOLIN INHALER 29.11 9832.99
607180140625002 VENTOLIN INHALER 29.11 9832.99
607180140632 607180140632001 FLOVENT 85.96 9832.99
607180140632002 FLOVENT 85.96 9832.99
607180140649 607180140649001 PROVENTIL 31.56 9832.99
607180140649002 PROVENTIL 31.56 9832.99
607180140656 607180140656001 VANCERIL 40.18 9832.99
607180140656002 VANCERIL 40.18 9832.99
607480251053 607480251053001 AZMACORT 65.98 13441.20
607480251053002 AZMACORT 64.69 13441.20
607480251060 607480251060001 ALBUTEROL 21.98 13441.20
607480251255 607480251255001 ALBUTEROL 22.69 13441.20
607480251255002 ALBUTEROL 22.69 13441.20
607480251255003 ALBUTEROL 22.69 13441.20
607480251262 607480251262001 AZMACORT 66.69 13441.20
607480251262002 AZMACORT 66.69 13441.20
607480251262003 AZMACORT 66.69 13441.20
607480251495 607480251495001 ALBUTEROL 22.98 13441.20
607480251495002 ALBUTEROL 22.98 13441.20
607480251515 607480251515001 AZMACORT 65.98 13441.20
607480251515002 AZMACORT 65.98 13441.20
607480490074 607480490074001 ALBUTEROL 27.69 14091.47
607480490074002 ALBUTEROL 27.98 14091.47
607480490074003 ALBUTEROL 28.69 14091.47
607550160256 607550160256001 VANCERIL 38.82 17065.43
607550160256002 VANCERIL 38.82 17065.43
HC-033I 16:56 Wednesday, October 9, 2002 14
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
607550160263 607550160263001 COMBIVENT 41.51 17065.43
607550160263002 COMBIVENT 41.51 17065.43
607550160263003 COMBIVENT 41.51 17065.43
607550160345 607550160345001 VOLMAX 47.47 17065.43
607550160345002 VOLMAX 47.47 17065.43
607550160345003 VOLMAX 47.47 17065.43
607550160345004 VOLMAX 47.47 17065.43
607550160352 607550160352001 VANCERIL 38.82 17065.43
607550160352002 VANCERIL 38.82 17065.43
607550160352003 VANCERIL 38.82 17065.43
607550160352004 VANCERIL 38.82 17065.43
607550160376 607550160376001 VANCERIL 38.82 17065.43
607550160376002 VANCERIL 38.82 17065.43
607550160376003 VANCERIL 38.82 17065.43
607550160376004 VANCERIL 38.82 17065.43
607550160465 607550160465001 VANCERIL 38.82 17065.43
607550160465002 VANCERIL 38.82 17065.43
607550160465003 VANCERIL 38.82 17065.43
607550160472 607550160472001 COMBIVENT 36.69 17065.43
607550160472002 COMBIVENT 36.69 17065.43
607550160472003 COMBIVENT 36.69 17065.43
607690100332 607690100332001 PROMETH/COD 14.40 27271.24
607690100356 607690100356001 CEPHALEXIN 9.12 27271.24
607690100503 607690100503001 OXYMETAZOLINE 2.00 27271.24
607870270057 607870270057001 ALBUTEROL 21.99 11692.55
607870270057002 ALBUTEROL 21.99 11692.55
607870270057003 ALBUTEROL 21.99 11692.55
607870270088 607870270088001 ALBUTEROL 21.41 11692.55
608150530218 608150530218001 -9 4.76 24381.10
608150530225 608150530225001 AZMACORT 153.42 24381.10
608750280219 608750280219001 ALUPENT 25.33 6819.65
608750280219002 ALUPENT 25.33 6819.65
608860270086 608860270086001 COMBIVENT 39.68 25436.20
608900170269 608900170269001 AK-SPORE 31.80 10462.65
HC-033I 16:56 Wednesday, October 9, 2002 15
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-033A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
608900170269 608900170269002 AK-SPORE 31.80 10462.65
608900170269003 AK-SPORE 31.80 10462.65
608900170269004 AK-SPORE 31.80 10462.65
608900170269005 AK-SPORE 31.80 10462.65
608900170269006 AK-SPORE 31.80 10462.65
608900170269007 AK-SPORE 31.80 10462.65
608900170269008 AK-SPORE 31.80 10462.65
608900170269009 AK-SPORE 31.80 10462.65
608900170269010 AK-SPORE 31.80 10462.65
608900170269011 AK-SPORE 31.80 10462.65
608900170269012 AK-SPORE 31.80 10462.65
608900170269013 AK-SPORE 31.80 10462.65
HC-033I 16:56 Wednesday, October 9, 2002 16
Sample SAS Job for Example B
Total Rx expenditures associated with asthma
The MEANS Procedure
Analysis Variable : RXXP99X SUM OF PAYMENTS RXSF99X-RXOU99X(IMPUTED)
N Sum
--------------------
6325 265042.47
--------------------
HC-033I 16:56 Wednesday, October 9, 2002 17
Sample SAS Job for Example B
Total Rx expenditures associated with asthma
Weighted
The MEANS Procedure
Analysis Variable : RXXP99X SUM OF PAYMENTS RXSF99X-RXOU99X(IMPUTED)
N Sum
--------------------
6325 2967041557
--------------------
1 The SAS System 17:02 Wednesday, October 9, 2002
NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
Licensed to SOCIAL & SCIENTIFIC SYSTEMS INC, Site 0026405003.
NOTE: This session is executing on the WIN_95 platform.
NOTE: SAS initialization used:
real time 3.24 seconds
1
2 OPTIONS LS=132 PS=59;
3
4 TITLE1 "HC-033I";
5 TITLE2 'Sample SAS Job for Example C';
6
7 LIBNAME IN 'C:\DATA';
NOTE: Directory for library IN contains files of mixed engine types.
NOTE: Libref IN was successfully assigned as follows:
Engine: V8
Physical Name: C:\DATA
8
9 *************************************************************************************
10 * Calculate the expenditures for medical visits associated with asthma.
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 RUN;
NOTE: PROCEDURE FORMAT used:
real time 0.27 seconds
23
24 *-----------------------------------------------------------------------------------
25 * Get conditions records coded as asthma.
26 *-----------------------------------------------------------------------------------;
27 DATA ASCONDS;
28 SET IN.H37 (KEEP=CONDIDX CCCODEX);
29 IF CCCODEX="128";
30 RUN;
NOTE: There were 69897 observations read from the data set IN.H37.
NOTE: The data set WORK.ASCONDS has 1088 observations and 2 variables.
NOTE: DATA statement used:
real time 8.78 seconds
2 The SAS System 17:02 Wednesday, October 9, 2002
31
32 *------------------------------------------------------------------------------------
33 * Get the events linked to each of the asthma condition records.
34 *------------------------------------------------------------------------------------;
35 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;
NOTE: There were 1088 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCONDS has 1088 observations and 2 variables.
NOTE: PROCEDURE SORT used:
real time 0.17 seconds
36
37 proc print data=asconds (obs=50);
38 title3 "sample print of work.asconds - sorted by condidx";
39 title4 "COND (HC-037) records where cccodex=128";
40 run;
NOTE: There were 50 observations read from the data set WORK.ASCONDS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used:
real time 0.54 seconds
41
42 PROC SORT DATA=IN.H33IF1 OUT=CLNK; BY CONDIDX; RUN;
NOTE: There were 208632 observations read from the data set IN.H33IF1.
NOTE: The data set WORK.CLNK has 208632 observations and 5 variables.
NOTE: PROCEDURE SORT used:
real time 4.23 seconds
43
44 DATA ASCLNKS;
45 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
46 ASCONDS(IN=INASCOND KEEP=CONDIDX);
47 BY CONDIDX;
48 IF INCLNK & INASCOND;
49 RUN;
NOTE: There were 208632 observations read from the data set WORK.CLNK.
NOTE: There were 1088 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 4744 observations and 3 variables.
NOTE: DATA statement used:
real time 2.97 seconds
50
51 proc print data=asclnks (obs=75);
52 by condidx;
53 id condidx;
54 format eventype eventype.;
55 title3 "sample print of work.asclnks - sorted by condidx";
56 title4 "events linked to asthma condition records";
57 run;
3 The SAS System 17:02 Wednesday, October 9, 2002
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed pages 2-3.
NOTE: PROCEDURE PRINT used:
real time 0.17 seconds
58
59 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;
NOTE: There were 4744 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 4744 observations and 3 variables.
NOTE: PROCEDURE SORT used:
real time 0.04 seconds
60
61 proc print data=asclnks (obs=50);
62 format eventype eventype.;
63 title3 "sample print of work.asclnks - sorted by evntidx";
64 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 4.
NOTE: PROCEDURE PRINT used:
real time 0.00 seconds
65
66 DATA ASCLNKS;
67 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
68 BY EVNTIDX;
69 IF FIRST.EVNTIDX;
70 RUN;
NOTE: There were 4744 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 4730 observations and 2 variables.
NOTE: DATA statement used:
real time 0.04 seconds
71
72 proc print data=asclnks (obs=50);
73 format eventype eventype.;
74 title3 "sample print of unique evntidxs from work.asclnks";
75 run;
NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 5.
NOTE: PROCEDURE PRINT used:
real time 0.00 seconds
76
77 *--------------------------------------------------------------------------------------------
78 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
79 *--------------------------------------------------------------------------------------------;
80 DATA MVIS;
4 The SAS System 17:02 Wednesday, October 9, 2002
81 SET IN.H33G (KEEP=EVNTIDX PERWT99F SEETLKPV OBXP99X);
82 IF PERWT99F > 0 & SEETLKPV NE 2;
83 RUN;
NOTE: There were 100312 observations read from the data set IN.H33G.
NOTE: The data set WORK.MVIS has 96787 observations and 4 variables.
NOTE: DATA statement used:
real time 9.87 seconds
84
85 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;
NOTE: There were 96787 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.MVIS has 96787 observations and 4 variables.
NOTE: PROCEDURE SORT used:
real time 0.61 seconds
86
87 *-------------------------------------------------------------------------------------
88 * Identify MVIS events which were for asthma.
89 *-------------------------------------------------------------------------------------;
90 DATA ASMVIS;
91 MERGE ASCLNKS (IN=INASCLNK)
92 MVIS (IN=INMVIS);
93 BY EVNTIDX;
94 IF INASCLNK & INMVIS;
95 RUN;
NOTE: There were 4730 observations read from the data set WORK.ASCLNKS.
NOTE: There were 96787 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 1575 observations and 5 variables.
NOTE: DATA statement used:
real time 0.48 seconds
96
97 proc print data=asmvis (obs=50);
98 format eventype eventype.;
99 title3 "sample print of work.asmvis";
100 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-033G) events";
101 run;
NOTE: There were 50 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE PRINT printed page 6.
NOTE: PROCEDURE PRINT used:
real time 0.06 seconds
102
103 PROC MEANS DATA=ASMVIS N SUM;
104 VAR OBXP99X;
105 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
106 RUN;
NOTE: There were 1575 observations read from the data set WORK.ASMVIS.
5 The SAS System 17:02 Wednesday, October 9, 2002
NOTE: The PROCEDURE MEANS printed page 7.
NOTE: PROCEDURE MEANS used:
real time 0.31 seconds
107
108 PROC MEANS DATA=ASMVIS SUM;
109 VAR OBXP99X;
110 WEIGHT PERWT99F;
111 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
112 TITLE5 "Weighted";
113 RUN;
NOTE: There were 1575 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE MEANS printed page 8.
NOTE: PROCEDURE MEANS used:
real time 0.06 seconds
114
115
116
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 32.57 seconds
HC-033I 17:02 Wednesday, October 9, 2002 1
Sample SAS Job for Example C
sample print of work.asconds - sorted by condidx
COND (HC-037) records where cccodex=128
Obs CONDIDX CCCODEX
1 600090220017 128
2 600360220012 128
3 600500330031 128
4 600560180037 128
5 600700270076 128
6 600830270054 128
7 601020320041 128
8 601180130063 128
9 601180200034 128
10 601690160045 128
11 601790390019 128
12 602020250012 128
13 602040160013 128
14 602060290010 128
15 602860160024 128
16 602900380013 128
17 603100110047 128
18 603100280018 128
19 603250160020 128
20 603340280010 128
21 603360400017 128
22 603380290021 128
23 603560390011 128
24 603620120096 128
25 603880170017 128
26 603880310015 128
27 603890190047 128
28 603960450021 128
29 603990100018 128
30 604240290017 128
31 604260470018 128
32 604410490026 128
33 604490500013 128
34 604720360045 128
35 604840190067 128
36 604920340020 128
37 605020240135 128
38 605040160066 128
39 605180210045 128
40 605180350053 128
41 605190380015 128
42 605430190045 128
43 605630210055 128
44 606150370025 128
45 606180270049 128
46 606310190023 128
47 606510300073 128
48 606970190010 128
49 606970260047 128
50 606990460051 128
HC-033I 17:02 Wednesday, October 9, 2002 2
Sample SAS Job for Example C
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
600500330031 600500330143 1 MVIS
600500330150 1 MVIS
600500330174 1 MVIS
600500330181 1 MVIS
600560180037 600560180207 1 MVIS
600560180214 1 MVIS
600560180252 8 PMED
600560180269 8 PMED
600560180283 8 PMED
600560180290 8 PMED
600560180389 8 PMED
600560180396 8 PMED
600560180454 8 PMED
600700270076 600700270121 1 MVIS
600700270145 8 PMED
600700270169 8 PMED
600700270176 8 PMED
601020320041 601020320101 1 MVIS
601020320118 8 PMED
601020320125 8 PMED
601180130063 601180130264 8 PMED
601180200034 601180200240 1 MVIS
601180200288 1 MVIS
601180200322 8 PMED
601180200339 8 PMED
601180200480 8 PMED
601180200555 8 PMED
601180200562 8 PMED
601790390019 601790390062 1 MVIS
601790390079 8 PMED
601790390086 8 PMED
602020250012 602020250122 8 PMED
602020250177 8 PMED
602020250235 8 PMED
602040160013 602040160317 8 PMED
602040160324 8 PMED
602040160331 8 PMED
602860160024 602860160170 8 PMED
602860160207 8 PMED
602860160214 8 PMED
HC-033I 17:02 Wednesday, October 9, 2002 3
Sample SAS Job for Example C
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
602860160024 602860160221 8 PMED
602860160238 1 MVIS
602860160245 1 MVIS
602860160252 1 MVIS
602860160269 1 MVIS
602860160276 1 MVIS
602860160283 8 PMED
602860160303 8 PMED
602900380013 602900380465 1 MVIS
602900380472 1 MVIS
602900380489 1 MVIS
602900380554 8 PMED
602900380561 8 PMED
602900380578 8 PMED
602900380585 8 PMED
603100110047 603100110046 3 EROM
603100110084 1 MVIS
603100110091 8 PMED
603100110128 8 PMED
603100280018 603100280077 8 PMED
603250160020 603250160344 1 MVIS
603250160351 1 MVIS
603250160399 8 PMED
603340280010 603340280336 1 MVIS
603340280343 1 MVIS
603340280350 1 MVIS
603340280418 8 PMED
603340280432 8 PMED
603340280456 8 PMED
603340280463 8 PMED
603340280470 8 PMED
603340280521 1 MVIS
603340280583 8 PMED
603360400017 603360400078 8 PMED
603380290021 603380290349 8 PMED
HC-033I 17:02 Wednesday, October 9, 2002 4
Sample SAS Job for Example C
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 600500330031 600500330143 1 MVIS
2 600500330031 600500330150 1 MVIS
3 600500330031 600500330174 1 MVIS
4 600500330031 600500330181 1 MVIS
5 600560180037 600560180207 1 MVIS
6 600560180037 600560180214 1 MVIS
7 600560180037 600560180252 8 PMED
8 600560180037 600560180269 8 PMED
9 600560180037 600560180283 8 PMED
10 600560180037 600560180290 8 PMED
11 600560180037 600560180389 8 PMED
12 600560180037 600560180396 8 PMED
13 600560180037 600560180454 8 PMED
14 600700270076 600700270121 1 MVIS
15 600700270076 600700270145 8 PMED
16 600700270076 600700270169 8 PMED
17 600700270076 600700270176 8 PMED
18 601020320041 601020320101 1 MVIS
19 601020320041 601020320118 8 PMED
20 601020320041 601020320125 8 PMED
21 601180130063 601180130264 8 PMED
22 601180200034 601180200240 1 MVIS
23 601180200034 601180200288 1 MVIS
24 601180200034 601180200322 8 PMED
25 601180200034 601180200339 8 PMED
26 601180200034 601180200480 8 PMED
27 601180200034 601180200555 8 PMED
28 601180200034 601180200562 8 PMED
29 601790390019 601790390062 1 MVIS
30 601790390019 601790390079 8 PMED
31 601790390019 601790390086 8 PMED
32 602020250012 602020250122 8 PMED
33 602020250012 602020250177 8 PMED
34 602020250012 602020250235 8 PMED
35 602040160013 602040160317 8 PMED
36 602040160013 602040160324 8 PMED
37 602040160013 602040160331 8 PMED
38 602860160024 602860160170 8 PMED
39 602860160024 602860160207 8 PMED
40 602860160024 602860160214 8 PMED
41 602860160024 602860160221 8 PMED
42 602860160024 602860160238 1 MVIS
43 602860160024 602860160245 1 MVIS
44 602860160024 602860160252 1 MVIS
45 602860160024 602860160269 1 MVIS
46 602860160024 602860160276 1 MVIS
47 602860160024 602860160283 8 PMED
48 602860160024 602860160303 8 PMED
49 602900380013 602900380465 1 MVIS
50 602900380013 602900380472 1 MVIS
HC-033I 17:02 Wednesday, October 9, 2002 5
Sample SAS Job for Example C
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 600500330143 1 MVIS
2 600500330150 1 MVIS
3 600500330174 1 MVIS
4 600500330181 1 MVIS
5 600560180207 1 MVIS
6 600560180214 1 MVIS
7 600560180252 8 PMED
8 600560180269 8 PMED
9 600560180283 8 PMED
10 600560180290 8 PMED
11 600560180389 8 PMED
12 600560180396 8 PMED
13 600560180454 8 PMED
14 600700270121 1 MVIS
15 600700270145 8 PMED
16 600700270169 8 PMED
17 600700270176 8 PMED
18 601020320101 1 MVIS
19 601020320118 8 PMED
20 601020320125 8 PMED
21 601180130264 8 PMED
22 601180200240 1 MVIS
23 601180200288 1 MVIS
24 601180200322 8 PMED
25 601180200339 8 PMED
26 601180200480 8 PMED
27 601180200555 8 PMED
28 601180200562 8 PMED
29 601790390062 1 MVIS
30 601790390079 8 PMED
31 601790390086 8 PMED
32 602020250122 8 PMED
33 602020250177 8 PMED
34 602020250235 8 PMED
35 602040160317 8 PMED
36 602040160324 8 PMED
37 602040160331 8 PMED
38 602860160170 8 PMED
39 602860160207 8 PMED
40 602860160214 8 PMED
41 602860160221 8 PMED
42 602860160238 1 MVIS
43 602860160245 1 MVIS
44 602860160252 1 MVIS
45 602860160269 1 MVIS
46 602860160276 1 MVIS
47 602860160283 8 PMED
48 602860160303 8 PMED
49 602900380465 1 MVIS
50 602900380472 1 MVIS
HC-033I 17:02 Wednesday, October 9, 2002 6
Sample SAS Job for Example C
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-033G) events
Obs EVNTIDX EVENTYPE SEETLKPV OBXP99X PERWT99F
1 600500330150 1 MVIS 1 36.00 9877.66
2 600500330174 1 MVIS 1 36.00 9877.66
3 600500330181 1 MVIS 1 236.00 9877.66
4 600560180207 1 MVIS 1 56.00 10969.95
5 600560180214 1 MVIS 1 85.00 10969.95
6 601020320101 1 MVIS 1 35.00 2417.03
7 601180200240 1 MVIS 1 50.00 12830.77
8 601180200288 1 MVIS 1 50.00 12830.77
9 601790390062 1 MVIS 1 27.78 3796.15
10 602860160238 1 MVIS 1 35.58 9438.57
11 602860160245 1 MVIS 1 35.58 9438.57
12 602860160252 1 MVIS 1 23.94 9438.57
13 602860160269 1 MVIS 1 61.94 9438.57
14 602860160276 1 MVIS 1 44.88 9438.57
15 602900380465 1 MVIS 1 400.00 13953.92
16 602900380472 1 MVIS 1 242.67 13953.92
17 602900380489 1 MVIS 1 242.67 13953.92
18 603250160344 1 MVIS 1 85.06 12151.94
19 603250160351 1 MVIS 1 146.00 12151.94
20 603340280336 1 MVIS 1 47.00 16770.81
21 603340280343 1 MVIS 1 47.00 16770.81
22 603340280350 1 MVIS 1 47.00 16770.81
23 603340280521 1 MVIS 1 47.00 16770.81
24 603560390075 1 MVIS 1 573.90 27387.18
25 603990100131 1 MVIS 1 53.00 33402.48
26 604260470036 1 MVIS 1 46.05 13814.68
27 604260470050 1 MVIS 1 69.11 13814.68
28 604260470081 1 MVIS 1 46.05 13814.68
29 604840190276 1 MVIS 1 428.30 6609.35
30 604840190492 1 MVIS 1 1203.99 6609.35
31 604920340146 1 MVIS 1 15.00 8559.76
32 604920340160 1 MVIS 1 15.00 8559.76
33 604920340177 1 MVIS 1 15.00 8559.76
34 605040160146 1 MVIS 1 15.81 22242.49
35 605040160184 1 MVIS 1 19.84 22242.49
36 605040160191 1 MVIS 1 19.84 22242.49
37 605040160204 1 MVIS 1 10.67 22242.49
38 605180210153 1 MVIS 1 50.00 4222.85
39 605180210184 1 MVIS 1 85.37 4222.85
40 605180350132 1 MVIS 1 78.29 5740.98
41 605190380163 1 MVIS 1 30.00 17324.05
42 605190380214 1 MVIS 1 70.00 17324.05
43 605190380221 1 MVIS 1 70.00 17324.05
44 605430190120 1 MVIS 1 36.39 10412.02
45 605630210638 1 MVIS 1 40.00 7075.73
46 605630210854 1 MVIS 1 40.00 7075.73
47 605630211117 1 MVIS 1 41.31 7075.73
48 605630211124 1 MVIS 1 83.97 7075.73
49 605630211131 1 MVIS 1 83.97 7075.73
50 605630211148 1 MVIS 1 33.50 7075.73
HC-033I 17:02 Wednesday, October 9, 2002 7
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma
The MEANS Procedure
Analysis Variable : OBXP99X SUM OF OBSF99X-OBOT99X
N Sum
--------------------
1575 105032.00
--------------------
HC-033I 17:02 Wednesday, October 9, 2002 8
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma
Weighted
The MEANS Procedure
Analysis Variable : OBXP99X SUM OF OBSF99X-OBOT99X
Sum
------------
1228222996
------------
1 The SAS System 17:07 Wednesday, October 9, 2002
NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
Licensed to SOCIAL & SCIENTIFIC SYSTEMS INC, Site 0026405003.
NOTE: This session is executing on the WIN_95 platform.
NOTE: SAS initialization used:
real time 0.50 seconds
1
2 OPTIONS LS=132 PS=59;
3
4 TITLE1 "HC-033I";
5 TITLE2 'Sample SAS Job for Example D';
6
7 LIBNAME IN 'C:\DATA';
NOTE: Directory for library IN contains files of mixed engine types.
NOTE: Libref IN was successfully assigned as follows:
Engine: V8
Physical Name: C:\DATA
8 **************************************************************************************
9 * Calculate the expenditures for prescribed medicines associated
10 * with insulin reported by the household as an other medical expense.
11 **************************************************************************************;
12
13 PROC FORMAT;
14 VALUE EVENTYPE
15 1 = "1 MVIS"
16 2 = "2 OPAT"
17 3 = "3 EROM"
18 4 = "4 STAZ"
19 5 = "5 DVIS"
20 6 = "6 OMED"
21 7 = "7 HVIS"
22 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
23
24 VALUE OMTYPE
25 -9 = '-9 NOT ASCERTAINED'
26 -8 = '-8 DK'
27 -7 = '-7 REFUSED'
28 -1 = '-1 INAPPLICABLE'
29 1 = '1 GLASSES OR CONTACT LENSES'
30 2 = '2 INSULIN'
31 3 = '3 DIABETIC EQUIPMENT/SUPPLIES'
32 4 = '4 AMBULANCE SERVICES'
33 5 = '5 ORTHOPEDIC ITEMS'
34 6 = '6 HEARING DEVICES'
35 7 = '7 PROSTHESIS'
36 8 = '8 BATHROOM AIDS'
37 9 = '9 MEDICAL EQUIPMENT'
38 10 = '10 DISPOSABLE SUPPLIES'
39 11 = '11 ALTERATIONS/MODIFICATIONS'
40 91 = '91 OTHER'
41 ;
NOTE: Format OMTYPE has been output.
2 The SAS System 17:07 Wednesday, October 9, 2002
42 RUN;
NOTE: PROCEDURE FORMAT used:
real time 0.10 seconds
43
44 *-------------------------------------------------------------------------------------
45 * Get other medical records for insulin for persons with positive weights.
46 *-------------------------------------------------------------------------------------;
47
48 DATA OMED;
49 SET IN.H33C (KEEP=EVNTIDX PERWT99F OMTYPEX);
50 IF PERWT99F > 0 & OMTYPEX = 2;
51 RUN;
NOTE: There were 6079 observations read from the data set IN.H33C.
NOTE: The data set WORK.OMED has 378 observations and 3 variables.
NOTE: DATA statement used:
real time 0.22 seconds
52
53 proc print data=omed (obs=100);
54 var evntidx OMTYPEX PERWT99F;
55 format OMTYPEX omtype.;
56 title3 "sample print of OMED (HC-033C) records where OMTYPEX=2";
57 run;
NOTE: There were 100 observations read from the data set WORK.OMED.
NOTE: The PROCEDURE PRINT printed pages 1-2.
NOTE: PROCEDURE PRINT used:
real time 0.22 seconds
58
59 *-------------------------------------------------------------------------------------
60 * Get PMED IDs linked to the OMED events which were for insulin.
61 *-------------------------------------------------------------------------------------;
62
63 PROC SORT DATA=IN.H33IF2 OUT=RXLK; BY EVNTIDX; RUN;
NOTE: There were 41276 observations read from the data set IN.H33IF2.
NOTE: The data set WORK.RXLK has 41276 observations and 5 variables.
NOTE: PROCEDURE SORT used:
real time 0.76 seconds
64
65 proc print data=rxlk (obs=150);
66 by evntidx;
67 id evntidx;
68 var linkidx eventype;
69 format eventype eventype.;
70 title3 "sample print of Rx+event link file records (HC-33IF2) - sorted by eventidx";
71 run;
3 The SAS System 17:07 Wednesday, October 9, 2002
NOTE: There were 150 observations read from the data set WORK.RXLK.
NOTE: The PROCEDURE PRINT printed pages 3-7.
NOTE: PROCEDURE PRINT used:
real time 0.06 seconds
72
73 data omedrxlk;
74 set rxlk (where=(eventype=6));
75 run;
NOTE: There were 1056 observations read from the data set WORK.RXLK.
WHERE eventype=6;
NOTE: The data set WORK.OMEDRXLK has 1056 observations and 5 variables.
NOTE: DATA statement used:
real time 0.17 seconds
76 proc print data=omedrxlk (obs=120);
77 by evntidx;
78 id evntidx;
79 var linkidx eventype;
80 format eventype eventype.;
81 title3 "sample print of work.omedrxlk - sorted by eventidx";
82 title4 "Rx+event link file records (HC-33IF2) where eventype=6 (omed)";
83 run;
NOTE: There were 120 observations read from the data set WORK.OMEDRXLK.
NOTE: The PROCEDURE PRINT printed pages 8-12.
NOTE: PROCEDURE PRINT used:
real time 0.04 seconds
84
85 DATA PMEDIDS;
86 MERGE RXLK (IN=INRXLK KEEP=EVNTIDX LINKIDX EVENTYPE)
87 OMED (IN=INOMED KEEP=EVNTIDX);
88 BY EVNTIDX;
89 IF INRXLK & INOMED;
90 RUN;
NOTE: There were 41276 observations read from the data set WORK.RXLK.
NOTE: There were 378 observations read from the data set WORK.OMED.
NOTE: The data set WORK.PMEDIDS has 365 observations and 3 variables.
NOTE: DATA statement used:
real time 0.16 seconds
91
92 proc print data=pmedids (obs=50);
93 by evntidx;
94 id evntidx;
95 format eventype eventype.;
96 title3 "sample print of work.pmedids - sorted by evntidx";
97 title4 "work.rxlk records for omed events for insulin";
98 run;
4 The SAS System 17:07 Wednesday, October 9, 2002
NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed pages 13-14.
NOTE: PROCEDURE PRINT used:
real time 0.05 seconds
99
100 PROC SORT DATA=PMEDIDS; BY LINKIDX; RUN;
NOTE: There were 365 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 365 observations and 3 variables.
NOTE: PROCEDURE SORT used:
real time 0.05 seconds
101
102 proc print data=pmedids (obs=50);
103 format eventype eventype.;
104 title3 "sample print of work.pmedids - sorted by linkidx";
105 run;
NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed page 15.
NOTE: PROCEDURE PRINT used:
real time 0.04 seconds
106
107 DATA PMEDIDS;
108 SET PMEDIDS (KEEP=LINKIDX);
109 BY LINKIDX;
110 IF FIRST.LINKIDX;
111 KEEP LINKIDX;
112 RUN;
NOTE: There were 365 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 365 observations and 1 variables.
NOTE: DATA statement used:
real time 0.05 seconds
113
114 proc print data=pmedids (obs=50);
115 title3 "sample print of unique linkidxs in work.pmedids";
116 run;
NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed page 16.
NOTE: PROCEDURE PRINT used:
real time 0.00 seconds
117
118
119 *------------------------------------------------------------------------------------
120 * Get PMED records for OMED event which were for insulin.
121 *------------------------------------------------------------------------------------;
5 The SAS System 17:07 Wednesday, October 9, 2002
122 PROC SORT DATA=IN.H33A OUT=PMED; BY LINKIDX; RUN;
NOTE: There were 173950 observations read from the data set IN.H33A.
NOTE: The data set WORK.PMED has 173950 observations and 54 variables.
NOTE: PROCEDURE SORT used:
real time 2:19.67
123
124 DATA OMPMEDS;
125 MERGE PMED (KEEP=LINKIDX RXRECIDX RXXP99X PERWT99F RXNAME)
126 PMEDIDS (IN=A);
127 BY LINKIDX;
128 IF A & PERWT99F>0;
129 RUN;
NOTE: There were 173950 observations read from the data set WORK.PMED.
NOTE: There were 365 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.OMPMEDS has 1323 observations and 5 variables.
NOTE: DATA statement used:
real time 25.25 seconds
130
131 proc print data=ompmeds (obs=200);
132 by linkidx;
133 id linkidx;
134 var rxrecidx rxname RXXP99X PERWT99F;
135 title3 "sample print of work.pmeds";
136 title4 "PMED (HC-033A) records for unique linkidxs in work.pmedids";
137 run;
NOTE: There were 200 observations read from the data set WORK.OMPMEDS.
NOTE: The PROCEDURE PRINT printed pages 17-22.
NOTE: PROCEDURE PRINT used:
real time 0.06 seconds
138
139 PROC MEANS DATA=OMPMEDS N SUM;
140 VAR RXXP99X;
141 TITLE3 "Total Rx expenditures associated with other medical expenses for insulin";
142 RUN;
NOTE: There were 1323 observations read from the data set WORK.OMPMEDS.
NOTE: The PROCEDURE MEANS printed page 23.
NOTE: PROCEDURE MEANS used:
real time 0.61 seconds
143
144 PROC MEANS DATA=OMPMEDS N SUM;
145 VAR RXXP99X;
146 WEIGHT PERWT99F;
147 TITLE3 "Total Rx expenditures associated with other medical expenses for insulin";
148 TITLE5 "Weighted";
149 RUN;
6 The SAS System 17:07 Wednesday, October 9, 2002
NOTE: There were 1323 observations read from the data set WORK.OMPMEDS.
NOTE: The PROCEDURE MEANS printed page 24.
NOTE: PROCEDURE MEANS used:
real time 0.00 seconds
150
151
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 2:48.68
HC-033I 17:07 Wednesday, October 9, 2002 1
Sample SAS Job for Example D
sample print of OMED (HC-033C) records where OMTYPEX=2
Obs EVNTIDX OMTYPEX PERWT99F
1 600110260154 2 INSULIN 6026.89
2 600110260298 2 INSULIN 6026.89
3 600180200112 2 INSULIN 5250.25
4 600180200218 2 INSULIN 5250.25
5 600440100368 2 INSULIN 20642.52
6 600950160287 2 INSULIN 20531.71
7 603130220521 2 INSULIN 12356.94
8 603130220672 2 INSULIN 12356.94
9 603450140674 2 INSULIN 29084.63
10 603450140876 2 INSULIN 29084.63
11 604090140191 2 INSULIN 9172.62
12 604090140266 2 INSULIN 9172.62
13 604420240399 2 INSULIN 3234.62
14 605720140633 2 INSULIN 6988.48
15 605720210633 2 INSULIN 6995.28
16 605970410192 2 INSULIN 7651.08
17 605970410250 2 INSULIN 7651.08
18 606370150525 2 INSULIN 14527.20
19 606720190505 2 INSULIN 11135.72
20 606860200079 2 INSULIN 9408.74
21 607330100160 2 INSULIN 8366.18
22 607330100242 2 INSULIN 8366.18
23 608270110365 2 INSULIN 5724.97
24 608390120129 2 INSULIN 7847.06
25 608390120198 2 INSULIN 7847.06
26 608390120232 2 INSULIN 7847.06
27 608410130038 2 INSULIN 14690.01
28 608860100151 2 INSULIN 29135.03
29 608860100219 2 INSULIN 29135.03
30 608860100473 2 INSULIN 29135.03
31 609000160197 2 INSULIN 8332.99
32 609650290398 2 INSULIN 6882.13
33 610210190207 2 INSULIN 8376.77
34 610210190365 2 INSULIN 8376.77
35 610210190492 2 INSULIN 8376.77
36 610350290338 2 INSULIN 15538.62
37 610350290530 2 INSULIN 15538.62
38 610350290667 2 INSULIN 15538.62
39 610580110255 2 INSULIN 10100.96
40 610580110382 2 INSULIN 10100.96
41 611340320077 2 INSULIN 7524.25
42 611340320111 2 INSULIN 7524.25
43 611680170275 2 INSULIN 6602.92
44 611680170395 2 INSULIN 6602.92
45 611680170477 2 INSULIN 6602.92
46 611790100290 2 INSULIN 8753.26
47 612110140433 2 INSULIN 7635.15
48 612110140628 2 INSULIN 7635.15
49 612160300646 2 INSULIN 16747.88
50 612160300893 2 INSULIN 16747.88
51 612340260346 2 INSULIN 7074.42
52 612870250687 2 INSULIN 30516.34
53 612870250889 2 INSULIN 30516.34
HC-033I 17:07 Wednesday, October 9, 2002 2
Sample SAS Job for Example D
sample print of OMED (HC-033C) records where OMTYPEX=2
Obs EVNTIDX OMTYPEX PERWT99F
54 613880131093 2 INSULIN 6720.33
55 613910370251 2 INSULIN 17393.95
56 613910370326 2 INSULIN 17393.95
57 613910540176 2 INSULIN 19188.83
58 613930290200 2 INSULIN 11528.92
59 613950130263 2 INSULIN 8434.81
60 614500180057 2 INSULIN 17045.29
61 614500180095 2 INSULIN 17045.29
62 614910270323 2 INSULIN 3441.64
63 614910270467 2 INSULIN 3441.64
64 616060100222 2 INSULIN 19579.04
65 616060100291 2 INSULIN 19579.04
66 616130200277 2 INSULIN 18562.67
67 617200150354 2 INSULIN 16093.89
68 617520241198 2 INSULIN 8537.65
69 617710120331 2 INSULIN 6890.87
70 618090160144 2 INSULIN 9549.31
71 618090160271 2 INSULIN 9549.31
72 618090230086 2 INSULIN 4772.89
73 618090230182 2 INSULIN 4772.89
74 618120380383 2 INSULIN 10348.62
75 618200120285 2 INSULIN 24300.29
76 618300190661 2 INSULIN 7669.82
77 618300190825 2 INSULIN 7669.82
78 618300191051 2 INSULIN 7669.82
79 618420260255 2 INSULIN 11044.82
80 618420260344 2 INSULIN 11044.82
81 618770100345 2 INSULIN 13581.65
82 620050100119 2 INSULIN 15375.01
83 620120130764 2 INSULIN 7374.26
84 620330260302 2 INSULIN 30203.98
85 620330260371 2 INSULIN 30203.98
86 620980140441 2 INSULIN 4021.31
87 620980140701 2 INSULIN 4021.31
88 620980140869 2 INSULIN 4021.31
89 622360270350 2 INSULIN 13024.26
90 622360270610 2 INSULIN 13024.26
91 622690120862 2 INSULIN 11397.23
92 622690121163 2 INSULIN 11397.23
93 622690121341 2 INSULIN 11397.23
94 622790220405 2 INSULIN 5880.80
95 622840190396 2 INSULIN 15182.62
96 622840190529 2 INSULIN 15182.62
97 622950160487 2 INSULIN 10337.78
98 622950160576 2 INSULIN 10337.78
99 622950160689 2 INSULIN 10337.78
100 623040200325 2 INSULIN 12479.45
HC-033I 17:07 Wednesday, October 9, 2002 3
Sample SAS Job for Example D
sample print of Rx+event link file records (HC-33IF2) - sorted by eventidx
EVNTIDX LINKIDX EVENTYPE
600010100183 600010100203 1 MVIS
600010100210 1 MVIS
600010100227 1 MVIS
600010100190 600010100203 1 MVIS
600010100210 1 MVIS
600010100227 1 MVIS
600010100241 600010100296 1 MVIS
600010100258 600010100309 1 MVIS
600010100265 600010100296 1 MVIS
600010100392 600010100405 1 MVIS
600010100412 1 MVIS
600010270323 600010270347 1 MVIS
600010270361 600010270467 1 MVIS
600010270385 600010270474 1 MVIS
600010270429 600010270481 2 OPAT
600010270436 600010270474 1 MVIS
600010270676 600010270710 1 MVIS
600020460030 600020460078 1 MVIS
600020520055 600020520079 1 MVIS
600050170027 600050170041 1 MVIS
600050170058 1 MVIS
600050480034 600050480041 1 MVIS
600110190116 600110190123 1 MVIS
600110190130 1 MVIS
600110260130 600110260185 1 MVIS
600110260192 1 MVIS
600110260205 1 MVIS
600110260212 1 MVIS
600110260229 1 MVIS
600110260154 600110260161 6 OMED
600110260178 600110260185 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 4
Sample SAS Job for Example D
sample print of Rx+event link file records (HC-33IF2) - sorted by eventidx
EVNTIDX LINKIDX EVENTYPE
600110260236 600110260243 1 MVIS
600110260250 1 MVIS
600110260267 1 MVIS
600110260274 600110260332 1 MVIS
600110260349 1 MVIS
600110260356 1 MVIS
600110260298 600110260301 6 OMED
600110260318 600110260325 6 OMED
600140180135 600140180166 1 MVIS
600150150365 600150150430 4 STAZ
600150150543 600150150632 1 MVIS
600150220372 600150220416 1 MVIS
600170100089 600170100109 1 MVIS
600170270065 600170270089 1 MVIS
600170340041 600170340065 1 MVIS
600170340089 600170340096 1 MVIS
600170410027 600170410034 1 MVIS
600170410058 600170410065 1 MVIS
600170410072 600170410096 5 DVIS
600170410089 600170410096 1 MVIS
600180200218 600180200225 6 OMED
600180200232 600180200249 6 OMED
600190270062 600190270079 1 MVIS
600190270086 1 MVIS
600190340093 600190340106 1 MVIS
600200200040 600200200057 1 MVIS
600200200064 1 MVIS
600210180247 600210180343 1 MVIS
600210180350 1 MVIS
HC-033I 17:07 Wednesday, October 9, 2002 5
Sample SAS Job for Example D
sample print of Rx+event link file records (HC-33IF2) - sorted by eventidx
EVNTIDX LINKIDX EVENTYPE
600210180292 600210180367 1 MVIS
600210180374 1 MVIS
600210180381 1 MVIS
600210180398 1 MVIS
600210180401 600210180425 1 MVIS
600210180432 1 MVIS
600210180418 600210180449 1 MVIS
600210180456 1 MVIS
600210180470 600210180507 1 MVIS
600210180514 1 MVIS
600210250432 600210250456 1 MVIS
600210250463 1 MVIS
600210250470 1 MVIS
600220210087 600220210107 5 DVIS
600220210094 600220210114 1 MVIS
600240110148 600240110155 1 MVIS
600250170054 600250170085 1 MVIS
600250170092 1 MVIS
600250170061 600250170092 1 MVIS
600250170105 1 MVIS
600250170112 1 MVIS
600250170078 600250170129 1 MVIS
600260270049 600260270063 3 EROM
600260270056 600260270070 1 MVIS
600290210139 600290210146 1 MVIS
600290210153 1 MVIS
600290210160 1 MVIS
600290380026 600290380057 5 DVIS
600290380033 600290380064 1 MVIS
600290380040 600290380071 1 MVIS
600290450146 600290450177 1 MVIS
600290450184 1 MVIS
HC-033I 17:07 Wednesday, October 9, 2002 6
Sample SAS Job for Example D
sample print of Rx+event link file records (HC-33IF2) - sorted by eventidx
EVNTIDX LINKIDX EVENTYPE
600290450204 600290450211 1 MVIS
600290450266 600290450280 1 MVIS
600290450273 600290450297 1 MVIS
600290450300 1 MVIS
600290510147 600290510192 1 MVIS
600290510205 1 MVIS
600290510229 600290510243 1 MVIS
600290510250 1 MVIS
600290510267 1 MVIS
600290510236 600290510274 1 MVIS
600300180033 600300180040 1 MVIS
600310140048 600310140062 1 MVIS
600310140079 600310140086 1 MVIS
600310210086 600310210144 1 MVIS
600310210106 600310210151 1 MVIS
600310210168 1 MVIS
600310210175 600310210240 1 MVIS
600310210182 600310210257 1 MVIS
600310210202 600310210264 1 MVIS
600310210271 1 MVIS
600310380024 600310380031 1 MVIS
600310450055 600310450144 1 MVIS
600310450106 600310450151 1 MVIS
600310450168 1 MVIS
600310450113 600310450151 4 STAZ
600310450168 4 STAZ
600320260062 600320260093 5 DVIS
600320260113 600320260144 5 DVIS
600320260120 600320260151 1 MVIS
HC-033I 17:07 Wednesday, October 9, 2002 7
Sample SAS Job for Example D
sample print of Rx+event link file records (HC-33IF2) - sorted by eventidx
EVNTIDX LINKIDX EVENTYPE
600320260137 600320260168 1 MVIS
600320260175 600320260199 1 MVIS
600320330079 600320330086 1 MVIS
600320330093 1 MVIS
600320530011 600320530028 1 MVIS
600320530035 600320530042 1 MVIS
600350190081 600350190101 1 MVIS
600350190098 600350190118 1 MVIS
600350260036 600350260043 1 MVIS
600350390136 600350390174 1 MVIS
600390200170 600390200252 1 MVIS
600390370485 600390370529 5 DVIS
600390370776 600390370803 1 MVIS
600390370827 600390370858 1 MVIS
600390440067 600390440098 1 MVIS
600410130337 600410130433 1 MVIS
600410130560 600410130604 1 MVIS
600420140086 600420140106 1 MVIS
600420140137 600420140182 1 MVIS
600420140199 1 MVIS
600420140202 600420140219 1 MVIS
600420140226 1 MVIS
600430160234 600430160316 4 STAZ
600430160323 4 STAZ
600440100262 600440100286 1 MVIS
600440100293 1 MVIS
600440100306 1 MVIS
600440100313 1 MVIS
600440100320 1 MVIS
HC-033I 17:07 Wednesday, October 9, 2002 8
Sample SAS Job for Example D
sample print of work.omedrxlk - sorted by eventidx
Rx+event link file records (HC-33IF2) where eventype=6 (omed)
EVNTIDX LINKIDX EVENTYPE
600110260154 600110260161 6 OMED
600110260178 600110260185 6 OMED
600110260298 600110260301 6 OMED
600110260318 600110260325 6 OMED
600180200218 600180200225 6 OMED
600180200232 600180200249 6 OMED
600440100368 600440100375 6 OMED
600440100382 600440100399 6 OMED
600530220221 600530220238 6 OMED
600950160287 600950160294 6 OMED
600950160307 600950160314 6 OMED
601290100305 601290100312 6 OMED
601480210229 601480210236 6 OMED
601590290399 601590290402 6 OMED
601710160572 601710160589 6 OMED
602040300280 602040300297 6 OMED
602340170155 602340170162 6 OMED
602380290325 602380290332 6 OMED
602660220370 602660220387 6 OMED
602840250322 602840250339 6 OMED
603130220521 603130220538 6 OMED
603130220672 603130220689 6 OMED
603130220696 603130220709 6 OMED
603450140674 603450140681 6 OMED
603450140698 603450140701 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 9
Sample SAS Job for Example D
sample print of work.omedrxlk - sorted by eventidx
Rx+event link file records (HC-33IF2) where eventype=6 (omed)
EVNTIDX LINKIDX EVENTYPE
603450140852 603450140869 6 OMED
603450140876 603450140883 6 OMED
603530151036 603530151043 6 OMED
603530151194 603530151207 6 OMED
603530230145 603530230152 6 OMED
604090140191 604090140204 6 OMED
604090140211 604090140228 6 OMED
604090140266 604090140273 6 OMED
604090140280 604090140297 6 OMED
604420240399 604420240402 6 OMED
604420240419 604420240426 6 OMED
605100290080 605100290097 6 OMED
605190210574 605190210581 6 OMED
605190210670 605190210687 6 OMED
605190211046 605190211053 6 OMED
605480190323 605480190330 6 OMED
605480190392 605480190405 6 OMED
605720140633 605720140640 6 OMED
605720140657 605720140664 6 OMED
605720210633 605720210640 6 OMED
605720210657 605720210664 6 OMED
605740230318 605740230325 6 OMED
605970270527 605970270534 6 OMED
605970410192 605970410205 6 OMED
605970410212 605970410229 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 10
Sample SAS Job for Example D
sample print of work.omedrxlk - sorted by eventidx
Rx+event link file records (HC-33IF2) where eventype=6 (omed)
EVNTIDX LINKIDX EVENTYPE
605970410250 605970410267 6 OMED
605970410274 605970410281 6 OMED
606110200372 606110200389 6 OMED
606370150525 606370150532 6 OMED
606370150549 606370150556 6 OMED
606720190505 606720190512 6 OMED
606720190529 606720190536 6 OMED
606860200079 606860200086 6 OMED
606860200093 606860200106 6 OMED
607250190366 607250190373 6 OMED
607250190431 607250190448 6 OMED
607330100160 607330100177 6 OMED
607330100242 607330100259 6 OMED
607330100266 607330100273 6 OMED
608210300194 608210300207 6 OMED
608270110365 608270110372 6 OMED
608270110389 608270110396 6 OMED
608390120129 608390120136 6 OMED
608390120143 608390120150 6 OMED
608390120198 608390120201 6 OMED
608390120218 608390120225 6 OMED
608390120232 608390120249 6 OMED
608410130014 608410130021 6 OMED
608410130038 608410130045 6 OMED
608840210428 608840210435 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 11
Sample SAS Job for Example D
sample print of work.omedrxlk - sorted by eventidx
Rx+event link file records (HC-33IF2) where eventype=6 (omed)
EVNTIDX LINKIDX EVENTYPE
608860100151 608860100168 6 OMED
608860100175 608860100182 6 OMED
608860100219 608860100226 6 OMED
608860100233 608860100240 6 OMED
608860100473 608860100480 6 OMED
608860100497 608860100500 6 OMED
608940220632 608940220649 6 OMED
608940220803 608940220810 6 OMED
609000160197 609000160200 6 OMED
609000160217 609000160224 6 OMED
609310100445 609310100452 6 OMED
609500210533 609500210540 6 OMED
609510120143 609510120150 6 OMED
609650290398 609650290401 6 OMED
609650290418 609650290425 6 OMED
609880140766 609880140773 6 OMED
610000121047 610000121054 6 OMED
610000121345 610000121352 6 OMED
610210190207 610210190214 6 OMED
610210190221 610210190238 6 OMED
610210190365 610210190372 6 OMED
610210190389 610210190396 6 OMED
610210190492 610210190505 6 OMED
610210190512 610210190529 6 OMED
610350290338 610350290345 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 12
Sample SAS Job for Example D
sample print of work.omedrxlk - sorted by eventidx
Rx+event link file records (HC-33IF2) where eventype=6 (omed)
EVNTIDX LINKIDX EVENTYPE
610350290352 610350290369 6 OMED
610350290530 610350290547 6 OMED
610350290554 610350290561 6 OMED
610350290667 610350290674 6 OMED
610350290681 610350290698 6 OMED
610530360511 610530360528 6 OMED
610580110255 610580110262 6 OMED
610580110279 610580110286 6 OMED
610580110382 610580110399 6 OMED
611340320077 611340320084 6 OMED
611340320091 611340320104 6 OMED
611340320111 611340320128 6 OMED
611340320135 611340320142 6 OMED
611510100152 611510100169 6 OMED
611510100234 611510100241 6 OMED
611510100309 611510100316 6 OMED
611510340107 611510340114 6 OMED
611620120526 611620120533 6 OMED
611680170275 611680170282 6 OMED
611680170299 611680170302 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 13
Sample SAS Job for Example D
sample print of work.pmedids - sorted by evntidx
work.rxlk records for omed events for insulin
EVNTIDX LINKIDX EVENTYPE
600110260154 600110260161 6 OMED
600110260298 600110260301 6 OMED
600180200218 600180200225 6 OMED
600440100368 600440100375 6 OMED
600950160287 600950160294 6 OMED
603130220521 603130220538 6 OMED
603130220672 603130220689 6 OMED
603450140674 603450140681 6 OMED
603450140876 603450140883 6 OMED
604090140191 604090140204 6 OMED
604090140266 604090140273 6 OMED
604420240399 604420240402 6 OMED
605720140633 605720140640 6 OMED
605720210633 605720210640 6 OMED
605970410192 605970410205 6 OMED
605970410250 605970410267 6 OMED
606370150525 606370150532 6 OMED
606720190505 606720190512 6 OMED
606860200079 606860200086 6 OMED
607330100160 607330100177 6 OMED
607330100242 607330100259 6 OMED
608270110365 608270110372 6 OMED
608390120129 608390120136 6 OMED
608390120198 608390120201 6 OMED
608390120232 608390120249 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 14
Sample SAS Job for Example D
sample print of work.pmedids - sorted by evntidx
work.rxlk records for omed events for insulin
EVNTIDX LINKIDX EVENTYPE
608410130038 608410130045 6 OMED
608860100151 608860100168 6 OMED
608860100219 608860100226 6 OMED
608860100473 608860100480 6 OMED
609000160197 609000160200 6 OMED
609650290398 609650290401 6 OMED
610210190207 610210190214 6 OMED
610210190365 610210190372 6 OMED
610210190492 610210190505 6 OMED
610350290338 610350290345 6 OMED
610350290530 610350290547 6 OMED
610350290667 610350290674 6 OMED
610580110255 610580110262 6 OMED
610580110382 610580110399 6 OMED
611340320077 611340320084 6 OMED
611340320111 611340320128 6 OMED
611680170275 611680170282 6 OMED
611680170395 611680170408 6 OMED
611680170477 611680170484 6 OMED
611790100290 611790100303 6 OMED
612110140433 612110140440 6 OMED
612110140628 612110140635 6 OMED
612160300646 612160300653 6 OMED
612160300893 612160300906 6 OMED
612340260346 612340260353 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 15
Sample SAS Job for Example D
sample print of work.pmedids - sorted by linkidx
Obs EVNTIDX LINKIDX EVENTYPE
1 600110260154 600110260161 6 OMED
2 600110260298 600110260301 6 OMED
3 600180200218 600180200225 6 OMED
4 600440100368 600440100375 6 OMED
5 600950160287 600950160294 6 OMED
6 603130220521 603130220538 6 OMED
7 603130220672 603130220689 6 OMED
8 603450140674 603450140681 6 OMED
9 603450140876 603450140883 6 OMED
10 604090140191 604090140204 6 OMED
11 604090140266 604090140273 6 OMED
12 604420240399 604420240402 6 OMED
13 605720140633 605720140640 6 OMED
14 605720210633 605720210640 6 OMED
15 605970410192 605970410205 6 OMED
16 605970410250 605970410267 6 OMED
17 606370150525 606370150532 6 OMED
18 606720190505 606720190512 6 OMED
19 606860200079 606860200086 6 OMED
20 607330100160 607330100177 6 OMED
21 607330100242 607330100259 6 OMED
22 608270110365 608270110372 6 OMED
23 608390120129 608390120136 6 OMED
24 608390120198 608390120201 6 OMED
25 608390120232 608390120249 6 OMED
26 608410130038 608410130045 6 OMED
27 608860100151 608860100168 6 OMED
28 608860100219 608860100226 6 OMED
29 608860100473 608860100480 6 OMED
30 609000160197 609000160200 6 OMED
31 609650290398 609650290401 6 OMED
32 610210190207 610210190214 6 OMED
33 610210190365 610210190372 6 OMED
34 610210190492 610210190505 6 OMED
35 610350290338 610350290345 6 OMED
36 610350290530 610350290547 6 OMED
37 610350290667 610350290674 6 OMED
38 610580110255 610580110262 6 OMED
39 610580110382 610580110399 6 OMED
40 611340320077 611340320084 6 OMED
41 611340320111 611340320128 6 OMED
42 611680170275 611680170282 6 OMED
43 611680170395 611680170408 6 OMED
44 611680170477 611680170484 6 OMED
45 611790100290 611790100303 6 OMED
46 612110140433 612110140440 6 OMED
47 612110140628 612110140635 6 OMED
48 612160300646 612160300653 6 OMED
49 612160300893 612160300906 6 OMED
50 612340260346 612340260353 6 OMED
HC-033I 17:07 Wednesday, October 9, 2002 16
Sample SAS Job for Example D
sample print of unique linkidxs in work.pmedids
Obs LINKIDX
1 600110260161
2 600110260301
3 600180200225
4 600440100375
5 600950160294
6 603130220538
7 603130220689
8 603450140681
9 603450140883
10 604090140204
11 604090140273
12 604420240402
13 605720140640
14 605720210640
15 605970410205
16 605970410267
17 606370150532
18 606720190512
19 606860200086
20 607330100177
21 607330100259
22 608270110372
23 608390120136
24 608390120201
25 608390120249
26 608410130045
27 608860100168
28 608860100226
29 608860100480
30 609000160200
31 609650290401
32 610210190214
33 610210190372
34 610210190505
35 610350290345
36 610350290547
37 610350290674
38 610580110262
39 610580110399
40 611340320084
41 611340320128
42 611680170282
43 611680170408
44 611680170484
45 611790100303
46 612110140440
47 612110140635
48 612160300653
49 612160300906
50 612340260353
HC-033I 17:07 Wednesday, October 9, 2002 17
Sample SAS Job for Example D
sample print of work.pmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
600110260161 600110260161001 ILETIN REGULAR I (VIAL) 51.66 6026.89
600110260301 600110260301001 ILETIN REGULAR I (VIAL) 27.08 6026.89
600180200225 600180200225001 HUMULIN N (VIAL) 22.94 5250.25
600180200225002 HUMULIN N (VIAL) 22.94 5250.25
600180200225003 HUMULIN N (VIAL) 22.94 5250.25
600440100375 600440100375001 ILETIN REGULAR I (VIAL) 45.23 20642.52
600440100375002 ILETIN REGULAR I (VIAL) 51.66 20642.52
600440100375003 ILETIN REGULAR I (VIAL) 45.23 20642.52
600440100375004 ILETIN REGULAR I (VIAL) 45.23 20642.52
600440100375005 ILETIN REGULAR I (VIAL) 45.23 20642.52
600950160294 600950160294001 ILETIN REGULAR I (VIAL) 27.08 20531.71
603130220538 603130220538001 ILETIN REGULAR I (VIAL) 53.82 12356.94
603130220689 603130220689001 ILETIN REGULAR I (VIAL) 24.97 12356.94
603450140681 603450140681001 HUMALOG (VIAL) 24.09 29084.63
603450140681002 HUMALOG (VIAL) 24.09 29084.63
603450140681003 HUMALOG (VIAL) 24.09 29084.63
603450140681004 HUMALOG (VIAL) 24.09 29084.63
603450140883 603450140883001 HUMALOG (VIAL) 28.39 29084.63
603450140883002 HUMALOG (VIAL) 28.39 29084.63
603450140883003 HUMALOG (VIAL) 28.39 29084.63
603450140883004 HUMALOG (VIAL) 28.39 29084.63
603450140883005 HUMALOG (VIAL) 28.39 29084.63
604090140204 604090140204001 HUMULIN 70/30 (VIAL) 37.78 9172.62
604090140204002 HUMULIN 70/30 (VIAL) 37.78 9172.62
604090140204003 HUMULIN 70/30 (VIAL) 37.78 9172.62
604090140204004 HUMULIN 70/30 (VIAL) 37.78 9172.62
604090140204005 HUMULIN 70/30 (VIAL) 37.78 9172.62
604090140273 604090140273001 HUMULIN 70/30 (VIAL) 40.98 9172.62
604090140273002 HUMULIN 70/30 (VIAL) 39.58 9172.62
604090140273003 HUMULIN 70/30 (VIAL) 39.58 9172.62
604090140273004 HUMULIN 70/30 (VIAL) 39.58 9172.62
604420240402 604420240402001 HUMULIN 45.88 3234.62
604420240402002 HUMULIN 45.88 3234.62
604420240402003 HUMULIN 45.88 3234.62
604420240402004 HUMULIN 45.88 3234.62
604420240402005 HUMULIN 45.88 3234.62
604420240402006 HUMULIN 45.88 3234.62
604420240402007 HUMULIN 45.88 3234.62
HC-033I 17:07 Wednesday, October 9, 2002 18
Sample SAS Job for Example D
sample print of work.pmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
604420240402 604420240402008 HUMULIN 45.88 3234.62
604420240402009 HUMULIN 45.88 3234.62
604420240402010 HUMULIN 45.88 3234.62
605720140640 605720140640001 HUMULIN N (VIAL) 68.82 6988.48
605720140640002 HUMULIN N (VIAL) 68.82 6988.48
605720140640003 HUMULIN N (VIAL) 68.82 6988.48
605720210640 605720210640001 HUMULIN N (VIAL) 68.82 6995.28
605720210640002 HUMULIN N (VIAL) 68.82 6995.28
605720210640003 HUMULIN N (VIAL) 68.82 6995.28
605970410205 605970410205001 ILETIN REGULAR I (VIAL) 27.08 7651.08
605970410205002 ILETIN REGULAR I (VIAL) 27.08 7651.08
605970410267 605970410267001 ILETIN REGULAR I (VIAL) 27.08 7651.08
605970410267002 ILETIN REGULAR I (VIAL) 53.82 7651.08
605970410267003 ILETIN REGULAR I (VIAL) 53.82 7651.08
606370150532 606370150532001 ILETIN REGULAR I (VIAL) 53.82 14527.20
606370150532002 ILETIN REGULAR I (VIAL) 53.82 14527.20
606720190512 606720190512001 HUMULIN R (VIAL) 24.15 11135.72
606720190512002 HUMULIN R (VIAL) 24.15 11135.72
606720190512003 HUMULIN R (VIAL) 24.15 11135.72
606720190512004 HUMULIN R (VIAL) 24.15 11135.72
606860200086 606860200086001 HUMULIN N (VIAL) 35.98 9408.74
606860200086002 HUMULIN N (VIAL) 35.98 9408.74
606860200086003 HUMULIN N (VIAL) 35.98 9408.74
606860200086004 HUMULIN N (VIAL) 22.94 9408.74
606860200086005 HUMULIN N (VIAL) 22.94 9408.74
607330100177 607330100177001 HUMULIN 70/30 (VIAL) 46.70 8366.18
607330100177002 HUMULIN 70/30 (VIAL) 46.70 8366.18
607330100177003 HUMULIN 70/30 (VIAL) 46.70 8366.18
607330100259 607330100259001 HUMULIN 70/30 (VIAL) 48.88 8366.18
607330100259002 HUMULIN 70/30 (VIAL) 46.70 8366.18
607330100259003 HUMULIN 70/30 (VIAL) 48.88 8366.18
607330100259004 HUMULIN 70/30 (VIAL) 48.88 8366.18
607330100259005 HUMULIN 70/30 (VIAL) 48.88 8366.18
607330100259006 HUMULIN 70/30 (VIAL) 48.88 8366.18
608270110372 608270110372001 ILETIN REGULAR I (VIAL) 45.23 5724.97
608270110372002 ILETIN REGULAR I (VIAL) 51.66 5724.97
608390120136 608390120136001 ILETIN REGULAR I (VIAL) 24.97 7847.06
HC-033I 17:07 Wednesday, October 9, 2002 19
Sample SAS Job for Example D
sample print of work.pmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
608390120201 608390120201001 ILETIN REGULAR I (VIAL) 24.97 7847.06
608390120201002 ILETIN REGULAR I (VIAL) 24.97 7847.06
608390120249 608390120249001 ILETIN REGULAR I (VIAL) 24.97 7847.06
608410130045 608410130045001 ILETIN REGULAR I (VIAL) 24.97 14690.01
608410130045002 ILETIN REGULAR I (VIAL) 24.97 14690.01
608410130045003 ILETIN REGULAR I (VIAL) 24.97 14690.01
608410130045004 ILETIN REGULAR I (VIAL) 24.97 14690.01
608410130045005 ILETIN REGULAR I (VIAL) 24.97 14690.01
608410130045006 ILETIN REGULAR I (VIAL) 24.97 14690.01
608410130045007 ILETIN REGULAR I (VIAL) 24.97 14690.01
608860100168 608860100168001 ILETIN REGULAR I (VIAL) 27.08 29135.03
608860100168002 ILETIN REGULAR I (VIAL) 53.82 29135.03
608860100168003 ILETIN REGULAR I (VIAL) 53.82 29135.03
608860100168004 ILETIN REGULAR I (VIAL) 27.08 29135.03
608860100226 608860100226001 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100226002 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100226003 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100226004 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100226005 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100480 608860100480001 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100480002 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100480003 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100480004 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100480005 ILETIN REGULAR I (VIAL) 24.97 29135.03
608860100480006 ILETIN REGULAR I (VIAL) 24.97 29135.03
609000160200 609000160200001 ILETIN REGULAR I (VIAL) 24.97 8332.99
609000160200002 ILETIN REGULAR I (VIAL) 24.97 8332.99
609000160200003 ILETIN REGULAR I (VIAL) 24.97 8332.99
609650290401 609650290401001 ILETIN REGULAR I (VIAL) 51.66 6882.13
609650290401002 ILETIN REGULAR I (VIAL) 51.66 6882.13
609650290401003 ILETIN REGULAR I (VIAL) 45.23 6882.13
609650290401004 ILETIN REGULAR I (VIAL) 45.23 6882.13
610210190214 610210190214001 ILETIN REGULAR I (VIAL) 27.08 8376.77
610210190372 610210190372001 ILETIN REGULAR I (VIAL) 27.08 8376.77
610210190505 610210190505001 ILETIN REGULAR I (VIAL) 53.82 8376.77
610210190505002 ILETIN REGULAR I (VIAL) 53.82 8376.77
610210190505003 ILETIN REGULAR I (VIAL) 53.82 8376.77
610210190505004 ILETIN REGULAR I (VIAL) 53.82 8376.77
HC-033I 17:07 Wednesday, October 9, 2002 20
Sample SAS Job for Example D
sample print of work.pmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
610350290345 610350290345001 ILETIN REGULAR I (VIAL) 27.08 15538.62
610350290345002 ILETIN REGULAR I (VIAL) 27.08 15538.62
610350290345003 ILETIN REGULAR I (VIAL) 27.08 15538.62
610350290345004 ILETIN REGULAR I (VIAL) 53.82 15538.62
610350290345005 ILETIN REGULAR I (VIAL) 53.82 15538.62
610350290345006 ILETIN REGULAR I (VIAL) 53.82 15538.62
610350290345007 ILETIN REGULAR I (VIAL) 27.08 15538.62
610350290547 610350290547001 ILETIN REGULAR I (VIAL) 24.97 15538.62
610350290547002 ILETIN REGULAR I (VIAL) 24.97 15538.62
610350290547003 ILETIN REGULAR I (VIAL) 24.97 15538.62
610350290674 610350290674001 HUMULIN 70/30 (VIAL) 21.50 15538.62
610350290674002 HUMULIN 70/30 (VIAL) 21.50 15538.62
610350290674003 HUMULIN 70/30 (VIAL) 21.50 15538.62
610580110262 610580110262001 NOVOLIN N PREFILLED (SRN) 91.50 10100.96
610580110262002 NOVOLIN N PREFILLED (SRN) 91.50 10100.96
610580110262003 NOVOLIN N PREFILLED (SRN) 89.52 10100.96
610580110262004 NOVOLIN N PREFILLED (SRN) 89.52 10100.96
610580110262005 NOVOLIN N PREFILLED (SRN) 91.50 10100.96
610580110262006 NOVOLIN N PREFILLED (SRN) 89.52 10100.96
610580110399 610580110399001 ILETIN REGULAR I (VIAL) 51.66 10100.96
610580110399002 ILETIN REGULAR I (VIAL) 45.23 10100.96
610580110399003 ILETIN REGULAR I (VIAL) 51.66 10100.96
610580110399004 ILETIN REGULAR I (VIAL) 45.23 10100.96
610580110399005 ILETIN REGULAR I (VIAL) 51.66 10100.96
610580110399006 ILETIN REGULAR I (VIAL) 51.66 10100.96
610580110399007 ILETIN REGULAR I (VIAL) 45.23 10100.96
610580110399008 ILETIN REGULAR I (VIAL) 45.23 10100.96
610580110399009 ILETIN REGULAR I (VIAL) 51.66 10100.96
611340320084 611340320084001 INSULIN NPH HUMAN 18.75 7524.25
611340320128 611340320128001 ILETIN REGULAR I (VIAL) 27.08 7524.25
611340320128002 ILETIN REGULAR I (VIAL) 27.08 7524.25
611340320128003 ILETIN REGULAR I (VIAL) 27.08 7524.25
611340320128004 ILETIN REGULAR I (VIAL) 53.82 7524.25
611680170282 611680170282001 ILETIN REGULAR I (VIAL) 27.08 6602.92
611680170282002 ILETIN REGULAR I (VIAL) 53.82 6602.92
611680170282003 ILETIN REGULAR I (VIAL) 53.82 6602.92
611680170282004 ILETIN REGULAR I (VIAL) 27.08 6602.92
611680170282005 ILETIN REGULAR I (VIAL) 53.82 6602.92
611680170408 611680170408001 ILETIN REGULAR I (VIAL) 53.82 6602.92
611680170408002 ILETIN REGULAR I (VIAL) 53.82 6602.92
611680170408003 ILETIN REGULAR I (VIAL) 53.82 6602.92
HC-033I 17:07 Wednesday, October 9, 2002 21
Sample SAS Job for Example D
sample print of work.pmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
611680170484 611680170484001 ILETIN REGULAR I (VIAL) 53.82 6602.92
611790100303 611790100303001 HUMULIN 70/30 (VIAL) 40.46 8753.26
611790100303002 HUMULIN 70/30 (VIAL) 40.46 8753.26
611790100303003 HUMULIN 70/30 (VIAL) 40.46 8753.26
612110140440 612110140440001 HUMULIN R 22.98 7635.15
612110140440002 HUMULIN R 22.98 7635.15
612110140440003 HUMULIN R 22.98 7635.15
612110140440004 HUMULIN R 22.98 7635.15
612110140440005 HUMULIN R 22.98 7635.15
612110140440006 HUMULIN R 22.98 7635.15
612110140440007 HUMULIN R 22.98 7635.15
612110140440008 HUMULIN R 22.98 7635.15
612110140440009 HUMULIN R 22.98 7635.15
612110140440010 HUMULIN R 22.98 7635.15
612110140635 612110140635001 HUMULIN R 22.98 7635.15
612110140635002 HUMULIN R 22.98 7635.15
612110140635003 HUMULIN R 22.98 7635.15
612160300653 612160300653001 HUMULIN R (VIAL) 43.25 16747.88
612160300653002 HUMULIN R (VIAL) 20.99 16747.88
612160300653003 HUMULIN R (VIAL) 43.25 16747.88
612160300906 612160300906001 HUMALOG PEN (PREFILLED DISPOSABLE) 82.80 16747.88
612160300906002 HUMALOG PEN (PREFILLED DISPOSABLE) 82.80 16747.88
612340260353 612340260353001 ILETIN REGULAR I (VIAL) 51.66 7074.42
612870250694 612870250694001 ILETIN REGULAR I (VIAL) 27.08 30516.34
612870250694002 ILETIN REGULAR I (VIAL) 53.82 30516.34
612870250694003 ILETIN REGULAR I (VIAL) 53.82 30516.34
612870250694004 ILETIN REGULAR I (VIAL) 27.08 30516.34
612870250694005 ILETIN REGULAR I (VIAL) 53.82 30516.34
612870250694006 ILETIN REGULAR I (VIAL) 27.08 30516.34
612870250896 612870250896001 ILETIN REGULAR I (VIAL) 27.08 30516.34
612870250896002 ILETIN REGULAR I (VIAL) 27.08 30516.34
612870250896003 ILETIN REGULAR I (VIAL) 27.08 30516.34
612870250896004 ILETIN REGULAR I (VIAL) 53.82 30516.34
613880131106 613880131106001 ILETIN REGULAR I (VIAL) 53.82 6720.33
613880131106002 ILETIN REGULAR I (VIAL) 27.08 6720.33
613910370268 613910370268001 ILETIN REGULAR I (VIAL) 53.82 17393.95
613910370268002 ILETIN REGULAR I (VIAL) 27.08 17393.95
613910370333 613910370333001 ILETIN REGULAR I (VIAL) 24.97 17393.95
HC-033I 17:07 Wednesday, October 9, 2002 22
Sample SAS Job for Example D
sample print of work.pmeds
PMED (HC-033A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP99X PERWT99F
613910540183 613910540183001 HUMULIN R (VIAL) 22.46 19188.83
613910540183002 HUMULIN R (VIAL) 22.46 19188.83
613930290217 613930290217001 NOVOLIN N (VIAL) 5.00 11528.92
613950130270 613950130270001 NOVOLIN 70/30 119.76 8434.81
614500180064 614500180064001 ILETIN REGULAR I (VIAL) 27.08 17045.29
614500180064002 ILETIN REGULAR I (VIAL) 27.08 17045.29
614500180064003 ILETIN REGULAR I (VIAL) 27.08 17045.29
614500180064004 ILETIN REGULAR I (VIAL) 27.08 17045.29
HC-033I 17:07 Wednesday, October 9, 2002 23
Sample SAS Job for Example D
Total Rx expenditures associated with other medical expenses for insulin
The MEANS Procedure
Analysis Variable : RXXP99X SUM OF PAYMENTS RXSF99X-RXOU99X(IMPUTED)
N Sum
--------------------
1323 51993.92
--------------------
HC-033I 17:07 Wednesday, October 9, 2002 24
Sample SAS Job for Example D
Total Rx expenditures associated with other medical expenses for insulin
Weighted
The MEANS Procedure
Analysis Variable : RXXP99X SUM OF PAYMENTS RXSF99X-RXOU99X(IMPUTED)
N Sum
--------------------
1323 559002126
--------------------
<< previous page