Attachment 2:
Sample SAS Jobs for Linking Example


NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
NOTE: This session is executing on the W32_7PRO platform.

NOTE: SAS initialization used:
real time 0.63 seconds
cpu time 0.20 seconds

NOTE: AUTOEXEC processing beginning; file is C:\Program Files\SAS\SASMISC\autoexec_9432.sas.

NOTE: AUTOEXEC processing completed.

1
2
3
4 ods rtf file = 'C:\Data\sampleA.rtf'
4 ! bodytitle;
NOTE: Writing RTF Body file: C:\Data\sampleA.rtf
5
6 ods noproctitle;
7
8 OPTIONS LS=132 PS=59;
9
10 TITLE1 "HC-168I";
11 TITLE2 "Sample SAS Job for Example A";
12
13 LIBNAME IN "C:\Data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
14

15
16 * Calculate the expenditures for prescribed medicines associated with medical visits for asthma.
17

18
19 PROC FORMAT;
20 VALUE EVENTYPE
21 1 = "1 MVIS"
22 2 = "2 OPAT"
23 3 = "3 EROM"
24 4 = "4 STAZ"
25 5 = "5 DVIS"
26 6 = "6 OMED"
27 7 = "7 HVIS"
28 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
29
30 RUN;

NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds

31

32
33 * Get condition records coded as asthma.
34

35 DATA ASCONDS;
36 SET IN.H170 (KEEP=CONDIDX CCCODEX);
37 IF CCCODEX="128";
38
39 RUN;


NOTE: There were 116679 observations read from the data set IN.H170.
NOTE: The data set WORK.ASCONDS has 2300 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.48 seconds
cpu time 0.04 seconds


40

41
42 * Get the events linked to each of the asthma condition records.
43

44 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;

NOTE: There were 2300 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2300 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

45
46 proc print data=asconds (obs=50);
47 title3 "sample print of work.asconds - sorted by condidx";
48 title4 "COND (H170) records where cccodex=128";
49 run;

NOTE: There were 50 observations read from the data set WORK.ASCONDS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

50
51 PROC SORT DATA=IN.H168IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 364577 observations read from the data set IN.H168IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 364577 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.47 percent.
Compressed is 424 pages; un-compressed would require 402 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.74 seconds
cpu time 0.31 seconds

52
53 DATA ASCLNKS;
54 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
55 ASCONDS(IN=INASCOND KEEP=CONDIDX);
56 BY CONDIDX;
57 IF INCLNK & INASCOND;
58 RUN;

NOTE: There were 364577 observations read from the data set WORK.CLNK.
NOTE: There were 2300 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7021 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 50.00 percent.
Compressed is 6 pages; un-compressed would require 4 pages.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.09 seconds

59
60 proc report data=asclnks(obs=75) nowd headskip;
61 define condidx /'CONDIDX' order;
62 define evntidx /'EVNTIDX';
63 define eventype /'EVENTYPE';
64 break after condidx / skip;
65 format eventype eventype.;
66 title3 "sample print of work.asclnks - sorted by condidx";
67 title4 "events linked to asthma condition records";
68 run;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE REPORT printed pages 2-3.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

69
70 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

NOTE: There were 7021 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 7021 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 50.00 percent.
Compressed is 6 pages; un-compressed would require 4 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

71
72 proc print data=asclnks (obs=50);
73 format eventype eventype.;
74 title3 "sample print of work.asclnks - sorted by evntidx";
75 run;

NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

76
77 DATA ASCLNKS;
78 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
79 BY EVNTIDX;
80 IF FIRST.EVNTIDX;
81 RUN;

NOTE: There were 7021 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7012 observations and 2 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 66.67 percent.
Compressed is 5 pages; un-compressed would require 3 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

82
83 proc print data=asclnks (obs=50);
84 title3 "sample print of unique evntidxs from work.asclnks";
85 format eventype eventype.;
86 run;

NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

87

88
89 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
90

91 DATA MVIS;
92 SET IN.H168G (KEEP=EVNTIDX PERWT14F SEETLKPV);
93 IF PERWT14F > 0 & SEETLKPV NE 2;
94 RUN;

NOTE: There were 166005 observations read from the data set IN.H168G.
NOTE: The data set WORK.MVIS has 161200 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 12.50 percent.
Compressed is 90 pages; un-compressed would require 80 pages.
NOTE: DATA statement used (Total process time):
real time 1.87 seconds
cpu time 0.10 seconds

95
96 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;

NOTE: There were 161200 observations read from the data set WORK.MVIS.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.MVIS has 161200 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 12.50 percent.
Compressed is 90 pages; un-compressed would require 80 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.07 seconds
cpu time 0.09 seconds



97

98
99 * Identify MVIS events which were for asthma.
100

101 DATA ASMVIS;
102 MERGE ASCLNKS (IN=INASCLNK)
103 MVIS (IN=INMVIS KEEP=EVNTIDX);
104 BY EVNTIDX;
105 IF INASCLNK & INMVIS;
106 RUN;

NOTE: There were 7012 observations read from the data set WORK.ASCLNKS.
NOTE: There were 161200 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 1988 observations and 2 variables.
NOTE: Compressing data set WORK.ASMVIS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds

107
108 proc print data=asmvis (obs=50);
109 format eventype eventype.;
110 title3 "sample print of work.asmvis";
111 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-168G) events";
112 run;

NOTE: There were 50 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE PRINT printed page 6.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

113

114
115 * Get PMED IDs linked to the MVIS events which were for asthma.
116

117 PROC SORT DATA=IN.H168IF2 OUT=RXLK; BY EVNTIDX; RUN;

NOTE: There were 62894 observations read from the data set IN.H168IF2.
NOTE: SAS sort was used.
NOTE: The data set WORK.RXLK has 62894 observations and 6 variables.
NOTE: Compressing data set WORK.RXLK increased size by 5.71 percent.
Compressed is 74 pages; un-compressed would require 70 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.17 seconds
cpu time 0.03 seconds

118
119 proc report data=rxlk (obs=140 keep=evntidx linkidx eventype) nowd headskip;
120 define evntidx /'EVNTIDX' order;
121 define linkidx /'LINKIDX';
122 define eventype /'EVENTYPE';
123 break after evntidx / skip;
124 format eventype eventype.;
125 title3 "sample print of work.rxlk - sorted by evntidx";
126 title4 "Rx+event link file records (HC-168IF2)";
127 run;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 140 observations read from the data set WORK.RXLK.
NOTE: The PROCEDURE REPORT printed pages 7-10.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds

128
129 DATA PMEDIDS;
130 MERGE RXLK (IN=INRXLK KEEP=EVNTIDX LINKIDX EVENTYPE)
131 ASMVIS(IN=INASMVIS KEEP=EVNTIDX);
132 BY EVNTIDX;
133 IF INRXLK & INASMVIS;
134 RUN;

NOTE: There were 62894 observations read from the data set WORK.RXLK.
NOTE: There were 1988 observations read from the data set WORK.ASMVIS.
NOTE: The data set WORK.PMEDIDS has 2051 observations and 3 variables.
NOTE: Compressing data set WORK.PMEDIDS increased size by 50.00 percent.
Compressed is 3 pages; un-compressed would require 2 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

135
136 proc report data=pmedids (obs=50) nowd headskip;
137 define evntidx /'EVNTIDX' order;
138 define linkidx /'LINKIDX';
139 define eventype /'EVENTYPE';
140 break after evntidx / skip;
141 format eventype eventype.;
142 title3 "sample print of work.pmedids - sorted by evntidx";
143 title4 "work.rxlk records for evntidxs in work.asmvis";
144 run;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE REPORT printed pages 11-12.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

145
146 PROC SORT DATA=PMEDIDS; BY LINKIDX; RUN;

NOTE: There were 2051 observations read from the data set WORK.PMEDIDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.PMEDIDS has 2051 observations and 3 variables.
NOTE: Compressing data set WORK.PMEDIDS increased size by 50.00 percent.
Compressed is 3 pages; un-compressed would require 2 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

147
148 proc print data=pmedids (obs=50);
149 format eventype eventype.;
150 title3 "sample print of work.pmedids - sorted by linkidx";
151 run;

NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed page 13.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

152
153 DATA PMEDIDS;
154 SET PMEDIDS (KEEP=LINKIDX);
155 BY LINKIDX;
156 IF FIRST.LINKIDX;
157 RUN;

NOTE: Compression was disabled for data set WORK.PMEDIDS because compression overhead would increase the size of the data set.
NOTE: There were 2051 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 1941 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

158
159 proc print data=pmedids (obs=50);
160 title3 "sample print of unique linkidxs in work.pmedids";
161 run;

NOTE: There were 50 observations read from the data set WORK.PMEDIDS.
NOTE: The PROCEDURE PRINT printed page 14.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

162

163
164 * Get PMED records linked to MVIS events which were for asthma.
165

166 PROC SORT DATA=IN.H168A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 319467 observations read from the data set IN.H168A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 319467 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 20.42 percent.
Compressed is 686 pages; un-compressed would require 862 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 2.95 seconds
cpu time 0.78 seconds

167
168 DATA MVPMEDS;
169 MERGE PMED (KEEP=LINKIDX RXRECIDX RXXP14X PERWT14F RXNAME)
170 PMEDIDS (IN=A);
171 BY LINKIDX;
172 IF A;
173 RUN;

NOTE: There were 319467 observations read from the data set WORK.PMED.
NOTE: There were 1941 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.MVPMEDS has 5018 observations and 5 variables.
NOTE: Compressing data set WORK.MVPMEDS decreased size by 12.50 percent.
Compressed is 7 pages; un-compressed would require 8 pages.
NOTE: DATA statement used (Total process time):
real time 0.14 seconds
cpu time 0.12 seconds

174
175 proc report data=mvpmeds (obs=200) nowd;
176 column LINKIDX RXRECIDX RXNAME RXXP14X PERWT14F;
177 define linkidx /'LINKIDX' order;
178 define rxrecidx /'RXRECIDX';
179 define rxname /'RXNAME';
180 define rxxp14x /'RXXP14X' display format=8.2;
181 define PERWT14F /'PERWT14F' /*display format=8.2*/;
182 break after linkidx / skip;
183 title3 "sample print of work.mvpmeds";
184 title4 "PMED (HC-168A) records for unique linkidxs in work.pmedids";
185 run;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 200 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE REPORT printed pages 15-20.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

186
187 PROC MEANS DATA=MVPMEDS N SUM;
188 VAR RXXP14X;
189 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
190 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 5018 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 21.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

191
192 PROC MEANS DATA=MVPMEDS N SUM;
193 VAR RXXP14X;
194 WEIGHT PERWT14F;
195 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
196 TITLE5 "Weighted";
197 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 5018 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 22.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

198
199 ods rtf close;
200

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 7.81 seconds
cpu time 2.16 seconds


HC-168I
Sample SAS Job for Example A
sample print of work.asconds - sorted by condidx
COND (H170) records where cccodex=128


HC-168I
Sample SAS Job for Example A
sample print of work.asconds - sorted by condidx
COND (H170) records where cccodex=128


Obs CONDIDX CCCODEX
1 400041040011 128
2 400041070011 128
3 400121010021 128
4 400141030031 128
5 400171010021 128
6 400201020011 128
7 400231020011 128
8 400281020011 128
9 400301010051 128
10 400341010051 128
11 400341020041 128
12 400361010061 128
13 400531010191 128
14 400621010051 128
15 400621020041 128
16 400631010011 128
17 400791010021 128
18 400841030011 128
19 400841050011 128
20 400841070041 128
21 400841070051 128
22 401391020021 128
23 401431020051 128
24 401781020051 128
25 401861040011 128
26 401861070011 128
27 402041010061 128
28 402141020021 128
29 402171030011 128
30 402371010011 128
31 402371040011 128
32 402901020021 128
33 402961020011 128
34 402961030041 128
35 402971050021 128
36 402971050031 128
37 403281010071 128
38 403311010021 128
39 404011050011 128
40 404031010061 128
41 404151010021 128
42 404191020031 128
43 404451050041 128
44 404791030081 128
45 404831010102 128
46 404831030011 128
47 404951030011 128
48 405051010051 128
49 405051010071 128
50 405091030011 128


HC-168I
Sample SAS Job for Example A
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records


CONDIDX EVNTIDX EVENTYPE
400041040011 400041040841 8 PMED
400041070011 400041070371 1 MVIS
400041070011 400041070391 1 MVIS
400041070011 400041070411 1 MVIS
400041070011 400041070421 1 MVIS
400041070011 400041070431 1 MVIS
400041070011 400041070441 1 MVIS
400041070011 400041070481 1 MVIS
400041070011 400041070511 1 MVIS
400041070011 400041070621 8 PMED
400231020011 400231020191 8 PMED
400231020011 400231020201 8 PMED
400231020011 400231020211 8 PMED
400231020011 400231020261 8 PMED
400231020011 400231020271 8 PMED
400231020011 400231020291 8 PMED
400231020011 400231020301 8 PMED
400341010051 400341011121 8 PMED
400341010051 400341011331 8 PMED
400341020041 400341020251 8 PMED
400341020041 400341020871 8 PMED
400361010061 400361010391 8 PMED
400361010061 400361010491 1 MVIS
400361010061 400361010501 1 MVIS
400361010061 400361010511 1 MVIS
400361010061 400361010521 1 MVIS
400361010061 400361010631 8 PMED
400531010191 400531010471 1 MVIS
400531010191 400531010511 1 MVIS
400531010191 400531010521 1 MVIS
400531010191 400531010691 8 PMED
400621010051 400621010861 1 MVIS
400621010051 400621011061 1 MVIS
400621010051 400621011141 8 PMED
400621020041 400621021281 1 MVIS
400621020041 400621021381 8 PMED
400621020041 400621021391 8 PMED
400621020041 400621021401 8 PMED
400621020041 400621021461 1 MVIS
400621020041 400621021521 8 PMED
400621020041 400621021531 8 PMED
400631010011 400631010211 1 MVIS
400791010021 400791010041 1 MVIS
400791010021 400791010061 8 PMED
400791010021 400791010071 8 PMED
400841030011 400841030051 4 STAZ
400841030011 400841030061 1 MVIS
400841030011 400841030091 8 PMED
400841030011 400841030131 3 EROM
400841030011 400841030141 1 MVIS
400841030011 400841030181 1 MVIS
400841030011 400841030191 8 PMED
400841030011 400841030201 8 PMED
400841030011 400841030221 8 PMED
400841050011 400841050081 8 PMED
400841050011 400841050181 8 PMED
400841070041 400841070231 8 PMED
400841070041 400841070291 8 PMED
401391020021 401391020371 8 PMED
401391020021 401391020411 1 MVIS
401391020021 401391020441 8 PMED
401391020021 401391020461 8 PMED
401391020021 401391020471 8 PMED
401431020051 401431020291 8 PMED
401431020051 401431020311 8 PMED
401861040011 401861040201 8 PMED
401861040011 401861040221 8 PMED
401861070011 401861070151 8 PMED
401861070011 401861070181 8 PMED
402041010061 402041010711 8 PMED
402041010061 402041010781 1 MVIS
402041010061 402041010871 8 PMED
402041010061 402041010931 8 PMED
402141020021 402141020181 1 MVIS
402141020021 402141020191 1 MVIS


HC-168I
Sample SAS Job for Example A
sample print of work.asclnks - sorted by evntidx


Obs CONDIDX EVNTIDX EVENTYPE
1 400041040011 400041040841 8 PMED
2 400041070011 400041070371 1 MVIS
3 400041070011 400041070391 1 MVIS
4 400041070011 400041070411 1 MVIS
5 400041070011 400041070421 1 MVIS
6 400041070011 400041070431 1 MVIS
7 400041070011 400041070441 1 MVIS
8 400041070011 400041070481 1 MVIS
9 400041070011 400041070511 1 MVIS
10 400041070011 400041070621 8 PMED
11 400231020011 400231020191 8 PMED
12 400231020011 400231020201 8 PMED
13 400231020011 400231020211 8 PMED
14 400231020011 400231020261 8 PMED
15 400231020011 400231020271 8 PMED
16 400231020011 400231020291 8 PMED
17 400231020011 400231020301 8 PMED
18 400341010051 400341011121 8 PMED
19 400341010051 400341011331 8 PMED
20 400341020041 400341020251 8 PMED
21 400341020041 400341020871 8 PMED
22 400361010061 400361010391 8 PMED
23 400361010061 400361010491 1 MVIS
24 400361010061 400361010501 1 MVIS
25 400361010061 400361010511 1 MVIS
26 400361010061 400361010521 1 MVIS
27 400361010061 400361010631 8 PMED
28 400531010191 400531010471 1 MVIS
29 400531010191 400531010511 1 MVIS
30 400531010191 400531010521 1 MVIS
31 400531010191 400531010691 8 PMED
32 400621010051 400621010861 1 MVIS
33 400621010051 400621011061 1 MVIS
34 400621010051 400621011141 8 PMED
35 400621020041 400621021281 1 MVIS
36 400621020041 400621021381 8 PMED
37 400621020041 400621021391 8 PMED
38 400621020041 400621021401 8 PMED
39 400621020041 400621021461 1 MVIS
40 400621020041 400621021521 8 PMED
41 400621020041 400621021531 8 PMED
42 400631010011 400631010211 1 MVIS
43 400791010021 400791010041 1 MVIS
44 400791010021 400791010061 8 PMED
45 400791010021 400791010071 8 PMED
46 400841030011 400841030051 4 STAZ
47 400841030011 400841030061 1 MVIS
48 400841030011 400841030091 8 PMED
49 400841030011 400841030131 3 EROM
50 400841030011 400841030141 1 MVIS


HC-168I
Sample SAS Job for Example A
sample print of unique evntidxs from work.asclnks


Obs EVNTIDX EVENTYPE
1 400041040841 8 PMED
2 400041070371 1 MVIS
3 400041070391 1 MVIS
4 400041070411 1 MVIS
5 400041070421 1 MVIS
6 400041070431 1 MVIS
7 400041070441 1 MVIS
8 400041070481 1 MVIS
9 400041070511 1 MVIS
10 400041070621 8 PMED
11 400231020191 8 PMED
12 400231020201 8 PMED
13 400231020211 8 PMED
14 400231020261 8 PMED
15 400231020271 8 PMED
16 400231020291 8 PMED
17 400231020301 8 PMED
18 400341011121 8 PMED
19 400341011331 8 PMED
20 400341020251 8 PMED
21 400341020871 8 PMED
22 400361010391 8 PMED
23 400361010491 1 MVIS
24 400361010501 1 MVIS
25 400361010511 1 MVIS
26 400361010521 1 MVIS
27 400361010631 8 PMED
28 400531010471 1 MVIS
29 400531010511 1 MVIS
30 400531010521 1 MVIS
31 400531010691 8 PMED
32 400621010861 1 MVIS
33 400621011061 1 MVIS
34 400621011141 8 PMED
35 400621021281 1 MVIS
36 400621021381 8 PMED
37 400621021391 8 PMED
38 400621021401 8 PMED
39 400621021461 1 MVIS
40 400621021521 8 PMED
41 400621021531 8 PMED
42 400631010211 1 MVIS
43 400791010041 1 MVIS
44 400791010061 8 PMED
45 400791010071 8 PMED
46 400841030051 4 STAZ
47 400841030061 1 MVIS
48 400841030091 8 PMED
49 400841030131 3 EROM
50 400841030141 1 MVIS


HC-168I
Sample SAS Job for Example A
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-168G) events


Obs EVNTIDX EVENTYPE
1 400041070371 1 MVIS
2 400041070391 1 MVIS
3 400041070411 1 MVIS
4 400041070421 1 MVIS
5 400041070431 1 MVIS
6 400041070441 1 MVIS
7 400041070481 1 MVIS
8 400041070511 1 MVIS
9 400361010491 1 MVIS
10 400361010501 1 MVIS
11 400361010511 1 MVIS
12 400361010521 1 MVIS
13 400531010471 1 MVIS
14 400531010511 1 MVIS
15 400531010521 1 MVIS
16 400621010861 1 MVIS
17 400621011061 1 MVIS
18 400621021281 1 MVIS
19 400621021461 1 MVIS
20 400631010211 1 MVIS
21 400791010041 1 MVIS
22 400841030061 1 MVIS
23 400841030141 1 MVIS
24 400841030181 1 MVIS
25 401391020411 1 MVIS
26 402041010781 1 MVIS
27 402141020181 1 MVIS
28 402141020191 1 MVIS
29 402371040151 1 MVIS
30 402901020041 1 MVIS
31 404011050831 1 MVIS
32 404011050871 1 MVIS
33 405051010201 1 MVIS
34 405111010291 1 MVIS
35 405111010301 1 MVIS
36 405111010381 1 MVIS
37 405111010481 1 MVIS
38 405621020201 1 MVIS
39 405621020211 1 MVIS
40 406141020591 1 MVIS
41 406141020601 1 MVIS
42 406141020611 1 MVIS
43 406141020621 1 MVIS
44 406141020681 1 MVIS
45 406181020541 1 MVIS
46 406181020551 1 MVIS
47 406181020601 1 MVIS
48 406181020771 1 MVIS
49 407011010251 1 MVIS
50 407011010381 1 MVIS


HC-168I
Sample SAS Job for Example A
sample print of work.rxlk - sorted by evntidx
Rx+event link file records (HC-168IF2)


EVNTIDX LINKIDX EVENTYPE
400011020111 400011020121 1 MVIS
400011020111 400011020131 1 MVIS
400021010081 400021010091 3 EROM
400041020051 400041020081 1 MVIS
400041030011 400041030051 1 MVIS
400041040511 400041040741 1 MVIS
400041040511 400041040751 1 MVIS
400041040511 400041040761 1 MVIS
400041040511 400041040771 1 MVIS
400041040511 400041040781 1 MVIS
400041040511 400041040791 1 MVIS
400041040581 400041040801 1 MVIS
400041040811 400041040841 1 MVIS
400041040811 400041040851 1 MVIS
400041040811 400041040861 1 MVIS
400041040811 400041040871 1 MVIS
400041040811 400041040881 1 MVIS
400041040811 400041040891 1 MVIS
400041040811 400041040901 1 MVIS
400041040811 400041040911 1 MVIS
400041050081 400041050101 1 MVIS
400041050081 400041050111 1 MVIS
400041060101 400041060211 1 MVIS
400041060101 400041060221 1 MVIS
400041060101 400041060231 1 MVIS
400041060101 400041060241 1 MVIS
400041060101 400041060251 1 MVIS
400041060101 400041060261 1 MVIS
400041060101 400041060271 1 MVIS
400041060101 400041060281 1 MVIS
400041060101 400041060291 1 MVIS
400041060301 400041060321 1 MVIS
400041060301 400041060331 1 MVIS
400041060301 400041060341 1 MVIS
400041060301 400041060351 1 MVIS
400041060301 400041060361 1 MVIS
400041060311 400041060361 1 MVIS
400041070371 400041070621 1 MVIS
400041070371 400041070631 1 MVIS
400041070371 400041070641 1 MVIS
400041070371 400041070651 1 MVIS
400041070371 400041070661 1 MVIS
400041070371 400041070671 1 MVIS
400041070371 400041070681 1 MVIS
400041070691 400041070711 1 MVIS
400041070691 400041070721 1 MVIS
400041070691 400041070731 1 MVIS
400041070691 400041070741 1 MVIS
400041070691 400041070751 1 MVIS
400041070701 400041070721 1 MVIS
400051010461 400051010511 1 MVIS
400051010461 400051010521 1 MVIS
400051010501 400051010541 1 MVIS
400051010531 400051010551 1 MVIS
400051010581 400051010641 1 MVIS
400051010581 400051010651 1 MVIS
400141010461 400141010561 1 MVIS
400141010461 400141010571 1 MVIS
400141010461 400141010581 1 MVIS
400141010461 400141010591 1 MVIS
400141010461 400141010601 1 MVIS
400141010461 400141010611 1 MVIS
400141010461 400141010621 1 MVIS
400141010461 400141010631 1 MVIS
400141010461 400141010641 1 MVIS
400141010461 400141010651 1 MVIS
400141010461 400141010661 1 MVIS
400141010461 400141010671 1 MVIS
400141010461 400141010681 1 MVIS
400141010461 400141010691 1 MVIS
400141010461 400141010701 1 MVIS
400141010531 400141010701 3 EROM
400141010711 400141010821 1 MVIS
400141010711 400141010831 1 MVIS
400141010711 400141010841 1 MVIS
400141010711 400141010851 1 MVIS
400141010711 400141010861 1 MVIS
400141010711 400141010871 1 MVIS
400141010711 400141010881 1 MVIS
400141010711 400141010891 1 MVIS
400141030071 400141030111 1 MVIS
400141030131 400141030141 3 EROM
400151020031 400151020131 1 MVIS
400161010041 400161010051 1 MVIS
400161030091 400161030101 1 MVIS
400161030121 400161030131 1 MVIS
400171010041 400171010131 3 EROM
400171010051 400171010131 1 MVIS
400171010171 400171010191 3 EROM
400171010181 400171010191 1 MVIS
400171010201 400171010211 1 MVIS
400171020211 400171020321 1 MVIS
400171020221 400171020321 1 MVIS
400171030071 400171030121 1 MVIS
400171030081 400171030121 1 MVIS
400171030111 400171030121 1 MVIS
400171030131 400171030151 1 MVIS
400191010101 400191010141 1 MVIS
400191030011 400191030071 4 STAZ
400191030091 400191030111 1 MVIS
400191050011 400191050031 3 EROM
400191050011 400191050041 3 EROM
400191050021 400191050031 3 EROM
400191050021 400191050041 3 EROM
400191050061 400191050071 1 MVIS
400201040011 400201040051 1 MVIS
400201040011 400201040061 1 MVIS
400201040011 400201040071 1 MVIS
400201040011 400201040081 1 MVIS
400201040011 400201040091 1 MVIS
400201040011 400201040101 1 MVIS
400201040011 400201040111 1 MVIS
400201040011 400201040121 1 MVIS
400201040011 400201040131 1 MVIS
400201040311 400201040411 1 MVIS
400211010151 400211010161 4 STAZ
400221010012 400221010032 1 MVIS
400221010042 400221010112 1 MVIS
400221010122 400221010202 1 MVIS
400221010182 400221010212 4 STAZ
400231010141 400231010191 1 MVIS
400231010141 400231010201 1 MVIS
400231010141 400231010211 1 MVIS
400231010231 400231010271 1 MVIS
400231010231 400231010281 1 MVIS
400231010301 400231010311 1 MVIS
400231010301 400231010321 1 MVIS
400231030101 400231030161 1 MVIS
400231030191 400231030391 1 MVIS
400261010151 400261010161 1 MVIS
400281010141 400281010161 1 MVIS
400281010141 400281010171 1 MVIS
400281010141 400281010181 1 MVIS
400281010141 400281010191 1 MVIS
400281010141 400281010201 1 MVIS
400281010141 400281010211 1 MVIS
400281010261 400281010271 1 MVIS
400281010261 400281010281 1 MVIS
400281010261 400281010291 1 MVIS
400281010261 400281010301 1 MVIS


HC-168I
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
400041070371 400041070621 1 MVIS
400041070371 400041070631 1 MVIS
400041070371 400041070641 1 MVIS
400041070371 400041070651 1 MVIS
400041070371 400041070661 1 MVIS
400041070371 400041070671 1 MVIS
400041070371 400041070681 1 MVIS
400361010491 400361010561 1 MVIS
400361010491 400361010571 1 MVIS
400361010491 400361010581 1 MVIS
400531010471 400531010631 1 MVIS
400531010471 400531010641 1 MVIS
400531010471 400531010651 1 MVIS
400531010471 400531010661 1 MVIS
400531010471 400531010671 1 MVIS
400531010471 400531010681 1 MVIS
400531010471 400531010691 1 MVIS
400531010471 400531010701 1 MVIS
400531010471 400531010711 1 MVIS
400531010471 400531010721 1 MVIS
400621010861 400621010941 1 MVIS
400621011061 400621011141 1 MVIS
400621021281 400621021381 1 MVIS
400621021281 400621021391 1 MVIS
400621021281 400621021401 1 MVIS
400621021461 400621021521 1 MVIS
400621021461 400621021531 1 MVIS
400621021461 400621021541 1 MVIS
400791010041 400791010061 1 MVIS
400841030141 400841030191 1 MVIS
400841030141 400841030201 1 MVIS
400841030181 400841030191 1 MVIS
400841030181 400841030201 1 MVIS
400841030181 400841030221 1 MVIS
402141020191 402141020201 1 MVIS
402141020191 402141020211 1 MVIS
402901020041 402901020051 1 MVIS
402901020041 402901020061 1 MVIS
405051010201 405051010261 1 MVIS
405051010201 405051010271 1 MVIS
405051010201 405051010281 1 MVIS
405051010201 405051010291 1 MVIS
405051010201 405051010301 1 MVIS
405051010201 405051010311 1 MVIS
405111010291 405111010331 1 MVIS
405111010291 405111010351 1 MVIS
405111010381 405111010401 1 MVIS
405111010381 405111010411 1 MVIS
405111010381 405111010421 1 MVIS
405111010381 405111010431 1 MVIS


HC-168I
Sample SAS Job for Example A
sample print of work.pmedids - sorted by linkidx


Obs EVNTIDX LINKIDX EVENTYPE
1 400041070371 400041070621 1 MVIS
2 400041070371 400041070631 1 MVIS
3 400041070371 400041070641 1 MVIS
4 400041070371 400041070651 1 MVIS
5 400041070371 400041070661 1 MVIS
6 400041070371 400041070671 1 MVIS
7 400041070371 400041070681 1 MVIS
8 400361010491 400361010561 1 MVIS
9 400361010491 400361010571 1 MVIS
10 400361010491 400361010581 1 MVIS
11 400531010471 400531010631 1 MVIS
12 400531010471 400531010641 1 MVIS
13 400531010471 400531010651 1 MVIS
14 400531010471 400531010661 1 MVIS
15 400531010471 400531010671 1 MVIS
16 400531010471 400531010681 1 MVIS
17 400531010471 400531010691 1 MVIS
18 400531010471 400531010701 1 MVIS
19 400531010471 400531010711 1 MVIS
20 400531010471 400531010721 1 MVIS
21 400621010861 400621010941 1 MVIS
22 400621011061 400621011141 1 MVIS
23 400621021281 400621021381 1 MVIS
24 400621021281 400621021391 1 MVIS
25 400621021281 400621021401 1 MVIS
26 400621021461 400621021521 1 MVIS
27 400621021461 400621021531 1 MVIS
28 400621021461 400621021541 1 MVIS
29 400791010041 400791010061 1 MVIS
30 400841030141 400841030191 1 MVIS
31 400841030181 400841030191 1 MVIS
32 400841030141 400841030201 1 MVIS
33 400841030181 400841030201 1 MVIS
34 400841030181 400841030221 1 MVIS
35 402141020191 402141020201 1 MVIS
36 402141020191 402141020211 1 MVIS
37 402901020041 402901020051 1 MVIS
38 402901020041 402901020061 1 MVIS
39 405051010201 405051010261 1 MVIS
40 405051010201 405051010271 1 MVIS
41 405051010201 405051010281 1 MVIS
42 405051010201 405051010291 1 MVIS
43 405051010201 405051010301 1 MVIS
44 405051010201 405051010311 1 MVIS
45 405111010291 405111010331 1 MVIS
46 405111010291 405111010351 1 MVIS
47 405111010381 405111010401 1 MVIS
48 405111010381 405111010411 1 MVIS
49 405111010381 405111010421 1 MVIS
50 405111010381 405111010431 1 MVIS


HC-168I
Sample SAS Job for Example A
sample print of unique linkidxs in work.pmedids


Obs LINKIDX
1 400041070621
2 400041070631
3 400041070641
4 400041070651
5 400041070661
6 400041070671
7 400041070681
8 400361010561
9 400361010571
10 400361010581
11 400531010631
12 400531010641
13 400531010651
14 400531010661
15 400531010671
16 400531010681
17 400531010691
18 400531010701
19 400531010711
20 400531010721
21 400621010941
22 400621011141
23 400621021381
24 400621021391
25 400621021401
26 400621021521
27 400621021531
28 400621021541
29 400791010061
30 400841030191
31 400841030201
32 400841030221
33 402141020201
34 402141020211
35 402901020051
36 402901020061
37 405051010261
38 405051010271
39 405051010281
40 405051010291
41 405051010301
42 405051010311
43 405111010331
44 405111010351
45 405111010401
46 405111010411
47 405111010421
48 405111010431
49 405111010441
50 405111010451


HC-168I
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-168A) records for unique linkidxs in work.pmedids


LINKIDX RXRECIDX RXNAME RXXP14X PERWT14F
400041070621 400041070621001 ALBUTEROL 11.39 3126.381710
400041070631 400041070631001 MAPAP 4.98 3126.381710
400041070641 400041070641001 NASONEX 27.20 3126.381710
400041070641 400041070641002 NASONEX 27.20 3126.381710
400041070641 400041070641003 NASONEX 27.20 3126.381710
400041070651 400041070651001 PROMETHAZINE 5.00 3126.381710
400041070661 400041070661001 LORATADINE 10.35 3126.381710
400041070661 400041070661002 LORATADINE 10.35 3126.381710
400041070671 400041070671001 CEFACLOR 248.43 3126.381710
400041070681 400041070681001 ESCAVITE 20.34 3126.381710
400361010561 400361010561001 SIMVASTATIN 4.06 3169.951131
400361010561 400361010561002 SIMVASTATIN 4.06 3169.951131
400361010561 400361010561003 SIMVASTATIN 4.06 3169.951131
400361010571 400361010571001 METOPROL TAR 41.99 3169.951131
400361010571 400361010571002 METOPROL TAR 41.99 3169.951131
400361010571 400361010571003 METOPROL TAR 41.99 3169.951131
400361010571 400361010571004 METOPROL TAR 41.99 3169.951131
400361010571 400361010571005 METOPROL TAR 41.99 3169.951131
400361010581 400361010581001 LISINOPRIL 5.00 3169.951131
400361010581 400361010581002 LISINOPRIL 5.00 3169.951131
400361010581 400361010581003 LISINOPRIL 5.00 3169.951131
400531010631 400531010631001 LANTUS 227.08 4286.096196
400531010631 400531010631002 LANTUS 227.08 4286.096196
400531010631 400531010631003 LANTUS 253.95 4286.096196
400531010641 400531010641001 EASY COMFORT 15.66 4286.096196
400531010641 400531010641002 INSULIN SYRG 25.73 4286.096196
400531010641 400531010641003 FORA V12 160.13 4286.096196
400531010641 400531010641004 FORA V12 160.13 4286.096196
400531010641 400531010641005 INSULIN SYRG 25.73 4286.096196
400531010641 400531010641006 EASY COMFORT 15.66 4286.096196
400531010641 400531010641007 INSULIN SYRG 25.73 4286.096196
400531010641 400531010641008 EASY COMFORT 15.66 4286.096196
400531010641 400531010641009 FORA V12 160.13 4286.096196
400531010651 400531010651001 FUROSEMIDE 2.49 4286.096196
400531010651 400531010651002 FUROSEMIDE 2.49 4286.096196
400531010661 400531010661001 SERTRALINE 5.30 4286.096196
400531010661 400531010661002 SERTRALINE 5.30 4286.096196
400531010671 400531010671001 BENZONATATE 20.00 4286.096196
400531010671 400531010671002 BENZONATATE 20.00 4286.096196
400531010681 400531010681001 ZOLPIDEM 20.00 4286.096196
400531010681 400531010681002 ZOLPIDEM 20.00 4286.096196
400531010691 400531010691001 MONTELUKAST 61.22 4286.096196
400531010691 400531010691002 MONTELUKAST 64.16 4286.096196
400531010701 400531010701001 CRESTOR 191.47 4286.096196
400531010701 400531010701002 CRESTOR 191.47 4286.096196
400531010711 400531010711001 BUMETANIDE 46.52 4286.096196
400531010711 400531010711002 BUMETANIDE 46.52 4286.096196
400531010721 400531010721001 OMEPRAZOLE 40.69 4286.096196
400531010721 400531010721002 OMEPRAZOLE 40.69 4286.096196
400621010941 400621010941001 MONTELUKAST 16.39 13668.453797
400621010941 400621010941002 MONTELUKAST 26.20 13668.453797
400621011141 400621011141001 SYMBICORT 334.99 13668.453797
400621021381 400621021381001 Montelukast SOD 18.13 9648.404913
400621021381 400621021381002 Montelukast SOD 18.13 9648.404913
400621021391 400621021391001 SYMBICORT 334.99 9648.404913
400621021391 400621021391002 SYMBICORT 334.99 9648.404913
400621021401 400621021401001 Albuterol 46.05 9648.404913
400621021401 400621021401002 Albuterol 46.05 9648.404913
400621021521 400621021521001 SOD CHLORIDE 10.30 9648.404913
400621021521 400621021521002 SOD CHLORIDE 10.30 9648.404913
400621021531 400621021531001 SYMBICORT 334.99 9648.404913
400621021531 400621021531002 SYMBICORT 334.99 9648.404913
400621021541 400621021541001 Prednisone 0.90 9648.404913
400621021541 400621021541002 Prednisone 0.90 9648.404913
400791010061 400791010061001 PROAIR HFA 65.19 32806.772770
400841030191 400841030191001 FLOVENT DISK 138.66 1099.308075
400841030191 400841030191002 FLOVENT DISK 138.66 1099.308075
400841030201 400841030201001 ADVAIR DISKU 288.80 1099.308075
400841030201 400841030201002 ADVAIR DISKU 288.80 1099.308075
400841030221 400841030221001 VENTOLIN HFA 44.07 1099.308075
400841030221 400841030221002 VENTOLIN HFA 44.07 1099.308075
400841030221 400841030221003 VENTOLIN HFA 44.07 1099.308075
402141020201 402141020201001 PREDNISONE 8.87 4935.860124
402141020201 402141020201002 PREDNISONE 11.31 4935.860124
402141020211 402141020211001 FLUTICASONE 259.81 4935.860124
402901020051 402901020051001 ADVAIR HFA 260.47 15302.906053
402901020051 402901020051002 ADVAIR HFA 260.47 15302.906053
402901020061 402901020061001 PROAIR HFA 56.39 15302.906053
405051010261 405051010261001 CLONIDINE 291.38 2631.705391
405051010261 405051010261002 CLONIDINE 291.38 2631.705391
405051010271 405051010271001 VENTOLIN HFA 44.90 2631.705391
405051010271 405051010271002 VENTOLIN HFA 44.90 2631.705391
405051010281 405051010281001 HYDROCHLOROT 26.81 2631.705391
405051010281 405051010281002 HYDROCHLOROT 26.81 2631.705391
405051010291 405051010291001 MINOXIDIL 53.16 2631.705391
405051010291 405051010291002 MINOXIDIL 53.16 2631.705391
405051010301 405051010301001 ENALAPRIL 10.00 2631.705391
405051010301 405051010301002 ENALAPRIL 10.00 2631.705391
405051010311 405051010311001 TRAMADOL HCL 5.12 2631.705391
405111010331 405111010331001 GLYBURIDE 20.00 3873.181726
405111010331 405111010331002 GLYBURIDE 20.00 3873.181726
405111010331 405111010331003 GLYBURIDE 20.00 3873.181726
405111010331 405111010331004 GLYBURIDE 20.00 3873.181726
405111010331 405111010331005 GLYBURIDE 20.00 3873.181726
405111010351 405111010351001 CAPTOPRIL 31.79 3873.181726
405111010351 405111010351002 CAPTOPRIL 31.79 3873.181726
405111010351 405111010351003 CAPTOPRIL 31.79 3873.181726
405111010351 405111010351004 CAPTOPRIL 31.79 3873.181726
405111010351 405111010351005 CAPTOPRIL 31.79 3873.181726
405111010401 405111010401001 HUMULIN N 64.88 3873.181726
405111010411 405111010411001 LANCETS 17.69 3873.181726
405111010411 405111010411002 ONETOUCH 60.57 3873.181726
405111010421 405111010421001 LEVOTHYROXIN 10.00 3873.181726
405111010421 405111010421002 LEVOTHYROXIN 10.00 3873.181726
405111010421 405111010421003 LEVOTHYROXIN 10.00 3873.181726
405111010431 405111010431001 GLYBURIDE 20.00 3873.181726
405111010431 405111010431002 GLYBURIDE 20.00 3873.181726
405111010431 405111010431003 GLYBURIDE 20.00 3873.181726
405111010431 405111010431004 GLYBURIDE 20.00 3873.181726
405111010441 405111010441001 METFORMIN 8.00 3873.181726
405111010441 405111010441002 METFORMIN 8.00 3873.181726
405111010441 405111010441003 METFORMIN 8.00 3873.181726
405111010451 405111010451001 CAPTOPRIL 97.98 3873.181726
405111010451 405111010451002 CAPTOPRIL 97.98 3873.181726
405111010451 405111010451003 CAPTOPRIL 97.98 3873.181726
405111010461 405111010461001 VENTOLIN HFA 48.04 3873.181726
405111010461 405111010461002 VENTOLIN HFA 48.04 3873.181726
405111010461 405111010461003 VENTOLIN HFA 48.04 3873.181726
405111010471 405111010471001 HUMULIN N 18.35 3873.181726
405111010471 405111010471002 HUMULIN N 18.35 3873.181726
405111010471 405111010471003 HUMULIN N 18.35 3873.181726
405111010491 405111010491001 LEVOTHYROXIN 4.00 3873.181726
405111010491 405111010491002 LEVOTHYROXIN 4.00 3873.181726
405111010491 405111010491003 LEVOTHYROXIN 4.00 3873.181726
405111010491 405111010491004 LEVOTHYROXIN 4.00 3873.181726
405111010501 405111010501001 GLYBURIDE 8.00 3873.181726
405111010501 405111010501002 GLYBURIDE 8.00 3873.181726
405111010501 405111010501003 GLYBURIDE 8.00 3873.181726
405111010501 405111010501004 GLYBURIDE 8.00 3873.181726
405111010511 405111010511001 METFORMIN 8.00 3873.181726
405111010511 405111010511002 METFORMIN 8.00 3873.181726
405111010511 405111010511003 METFORMIN 8.00 3873.181726
405111010511 405111010511004 METFORMIN 8.00 3873.181726
405111010521 405111010521001 CAPTOPRIL 119.86 3873.181726
405111010531 405111010531001 VENTOLIN HFA 48.04 3873.181726
405111010531 405111010531002 VENTOLIN HFA 48.04 3873.181726
405111010531 405111010531003 VENTOLIN HFA 48.04 3873.181726
405111010531 405111010531004 VENTOLIN HFA 48.04 3873.181726
406141020641 406141020641001 ALBUTEROL 39.99 4198.359936
406181020651 406181020651001 AZITHROMYCIN 5.68 10419.499141
406181020661 406181020661001 PREDNISONE 3.22 10419.499141
406181020661 406181020661002 PREDNISONE 8.00 10419.499141
406181020661 406181020661003 PREDNISONE 8.00 10419.499141
407011010291 407011010291001 LEVOTHYROXIN 9.79 7859.641490
407011010291 407011010291002 LEVOTHYROXIN 9.79 7859.641490
407011010291 407011010291003 LEVOTHYROXIN 9.79 7859.641490
407011010291 407011010291004 LEVOTHYROXIN 13.38 7859.641490
407011010291 407011010291005 LEVOTHYROXIN 13.38 7859.641490
407011010301 407011010301001 METHYLPRED 19.09 7859.641490
407011010301 407011010301002 METHYLPRED 19.09 7859.641490
407011010301 407011010301003 METHYLPRED 19.09 7859.641490
407011010301 407011010301004 METHYLPRED 19.09 7859.641490
407011010301 407011010301005 METHYLPRED 19.09 7859.641490
407011010311 407011010311001 AMLODIPINE 4.60 7859.641490
407011010311 407011010311002 AMLODIPINE 4.60 7859.641490
407011010311 407011010311003 AMLODIPINE 4.60 7859.641490
407011010311 407011010311004 AMLODIPINE 4.60 7859.641490
407011010311 407011010311005 AMLODIPINE 4.60 7859.641490
407011010321 407011010321001 AZITHROMYCIN 10.01 7859.641490
407011010331 407011010331001 MONTELUKAST 9.67 7859.641490
407011010331 407011010331002 MONTELUKAST 9.67 7859.641490
407011010331 407011010331003 MONTELUKAST 9.67 7859.641490
407011010331 407011010331004 MONTELUKAST 9.67 7859.641490
407011010331 407011010331005 MONTELUKAST 9.67 7859.641490
407011010341 407011010341001 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341002 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341003 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341004 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341005 SIMVASTATIN 5.11 7859.641490
407011010401 407011010401001 LEVOTHYROXIN 13.38 7859.641490
407011010401 407011010401002 LEVOTHYROXIN 30.57 7859.641490
407011010421 407011010421001 AMLODIPINE 4.60 7859.641490
407011010421 407011010421002 AMLODIPINE 139.99 7859.641490
407011010431 407011010431001 MONTELUKAST 8.88 7859.641490
407011010431 407011010431002 MONTELUKAST 72.24 7859.641490
407011010441 407011010441001 SIMVASTATIN 5.11 7859.641490
407011010441 407011010441002 SIMVASTATIN 15.33 7859.641490
407411010101 407411010101001 ASPIRIN 0.50 3537.908345
407411010111 407411010111001 NIFEDIPINE 23.40 3537.908345
407411010111 407411010111002 NIFEDIPINE 23.40 3537.908345
407411010121 407411010121001 LORATADINE 4.00 3537.908345
407411010121 407411010121002 LORATADINE 4.00 3537.908345
407411010131 407411010131001 FUROSEMIDE 1.66 3537.908345
407411010131 407411010131002 FUROSEMIDE 1.66 3537.908345
407411010141 407411010141001 GLUCOSAMINE 13.66 3537.908345
407411010141 407411010141002 GLUCOSAMINE 13.66 3537.908345
407871040061 407871040061001 PENICILLN VK 1.50 7358.732740
407871040071 407871040071001 VENTOLIN HFA 44.14 7358.732740
408261010531 408261010531001 SPIRIVA 371.99 8612.204328
408261010531 408261010531002 SPIRIVA 371.99 8612.204328
408261010531 408261010531003 SPIRIVA 371.99 8612.204328
408261010531 408261010531004 SPIRIVA 371.99 8612.204328
408261010531 408261010531005 SPIRIVA 271.99 8612.204328
408261010541 408261010541001 ADVAIR DISKU 353.99 8612.204328
408261010541 408261010541002 ADVAIR DISKU 373.99 8612.204328
408261010541 408261010541003 ADVAIR DISKU 373.99 8612.204328
408261010541 408261010541004 ADVAIR DISKU 373.99 8612.204328
408261010541 408261010541005 ADVAIR DISKU 373.99 8612.204328
408261010551 408261010551001 PROAIR HFA 73.99 8612.204328
408261010551 408261010551002 PROAIR HFA 73.99 8612.204328


HC-168I
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma

Analysis Variable: RXXP14X SUM OF PAYMENTS RXSF14X-RXOU14X(IMPUTED)


N Sum
5018 496365.44


HC-168I
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma

Weighted

Analysis Variable: RXXP14X SUM OF PAYMENTS RXSF14X-RXOU14X(IMPUTED)


N Sum
5018 4030943995

NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
NOTE: This session is executing on the W32_7PRO platform.

NOTE: SAS initialization used:
real time 0.54 seconds
cpu time 0.15 seconds

NOTE: AUTOEXEC processing beginning; file is C:\Program Files\SAS\SASMISC\autoexec_9432.sas.

NOTE: AUTOEXEC processing completed.

1
2
3
4 ods rtf file = 'C:\Data\sampleB.rtf'
4 ! bodytitle;
NOTE: Writing RTF Body file: C:\Data\sampleB.rtf
5
6 ods noproctitle;
7
8 OPTIONS LS=132 PS=59;
9
10 TITLE1 "HC-168I";
11 TITLE2 "Sample SAS Job for Example B";
12
13 LIBNAME IN "C:\Data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
14

15
16 * Calculate the expenditures for prescribed medicines associated with asthma.
17

18 PROC FORMAT;
19 VALUE EVENTYPE
20 1 = "1 MVIS"
21 2 = "2 OPAT"
22 3 = "3 EROM"
23 4 = "4 STAZ"
24 5 = "5 DVIS"
25 6 = "6 OMED"
26 7 = "7 HVIS"
27 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
28 RUN;

NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds

29

30
31 * Get condition records coded as asthma.
32

33 DATA ASCONDS;
34 SET IN.H170 (KEEP=CONDIDX CCCODEX);
35 IF CCCODEX="128";
36 RUN;

NOTE: There were 116679 observations read from the data set IN.H170.
NOTE: The data set WORK.ASCONDS has 2300 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds


37

38
39 * Get the events linked to each of the asthma condition records.
40

41 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;

NOTE: There were 2300 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2300 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

42
43 proc print data=asconds (obs=50);
44 title3 "sample print of work.asconds - sorted by condidx";
45 title4 "COND (H170) records where cccodex=128";
46 run;

NOTE: There were 50 observations read from the data set WORK.ASCONDS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds

47
48 PROC SORT DATA=IN.H168IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 364577 observations read from the data set IN.H168IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 364577 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.47 percent.
Compressed is 424 pages; un-compressed would require 402 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.17 seconds
cpu time 0.31 seconds

49
50 DATA ASCLNKS;
51 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
52 ASCONDS(IN=INASCOND KEEP=CONDIDX);
53 BY CONDIDX;
54 IF INCLNK & INASCOND;
55 RUN;

NOTE: There were 364577 observations read from the data set WORK.CLNK.
NOTE: There were 2300 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7021 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 50.00 percent.
Compressed is 6 pages; un-compressed would require 4 pages.
NOTE: DATA statement used (Total process time):
real time 0.10 seconds
cpu time 0.11 seconds

56
57 proc report data=asclnks (obs=75) nowd headskip;
58 define condidx /'CONDIDX' order;
59 define EVNTIDX /'EVNTIDX';
60 define EVENTYPE /'EVENTYPE';
61 break after condidx / skip;
62 format eventype eventype.;
63 title3 "sample print of work.asclnks - sorted by condidx";
64 title4 "events linked to asthma condition records";
65 run;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE REPORT printed pages 2-3.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

66
67 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

NOTE: There were 7021 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 7021 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 50.00 percent.
Compressed is 6 pages; un-compressed would require 4 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

68
69 proc print data=asclnks (obs=50);
70 format eventype eventype.;
71 title3 "sample print of work.asclnks - sorted by evntidx";
72 run;

NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

73
74 DATA ASCLNKS;
75 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
76 BY EVNTIDX;
77 IF FIRST.EVNTIDX;
78 RUN;

NOTE: There were 7021 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7012 observations and 2 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 66.67 percent.
Compressed is 5 pages; un-compressed would require 3 pages.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

79
80 proc print data=asclnks (obs=50);
81 format eventype eventype.;
82 title3 "sample print of unique evntidxs from work.asclnks";
83 run;

NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

84

85
86 * Get PMED records linked to asthma condition records.
87

88 PROC SORT DATA=IN.H168A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 319467 observations read from the data set IN.H168A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 319467 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 20.42 percent.
Compressed is 686 pages; un-compressed would require 862 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.32 seconds
cpu time 0.35 seconds

89
90 DATA ASPMEDS;
91 MERGE PMED (KEEP=LINKIDX RXRECIDX RXNAME RXXP14X PERWT14F)
92 ASCLNKS (IN=INASCLNK KEEP=EVNTIDX RENAME=(EVNTIDX=LINKIDX));
93 BY LINKIDX;
94 IF INASCLNK & PERWT14F>0;
95 RUN;

NOTE: There were 319467 observations read from the data set WORK.PMED.
NOTE: There were 7012 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASPMEDS has 9817 observations and 5 variables.
NOTE: Compressing data set WORK.ASPMEDS decreased size by 20.00 percent.
Compressed is 12 pages; un-compressed would require 15 pages.
NOTE: DATA statement used (Total process time):
real time 0.12 seconds
cpu time 0.12 seconds

96
97 proc report data=aspmeds (obs=300) nowd headskip;
98 column LINKIDX RXRECIDX RXNAME RXXP14X PERWT14F;
99 define linkidx / 'LINKIDX' order;
100 define rxrecidx / 'RXRECIDX';
101 define rxname / 'RXNAME';
102 define rxxp14x / 'RXXP14X' display format=8.2;
103 define perwt14f / 'PERWT14F' /*display format=8.2*/;
104 break after linkidx / skip;
105 title3 "sample print of work.aspmeds";
106 title4 "PMED (HC-168A) records which link to condition records coded as asthma";
107 run;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 300 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE REPORT printed pages 6-14.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds

108
109 PROC MEANS DATA=ASPMEDS N SUM;
110 VAR RXXP14X;
111 TITLE3 "Total Rx expenditures associated with asthma";
112 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 9817 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE MEANS printed page 15.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

113
114 PROC MEANS DATA=ASPMEDS N SUM;
115 VAR RXXP14X;
116 WEIGHT PERWT14F;
117 TITLE3 "Total Rx expenditures associated with asthma";
118 TITLE5 "Weighted";
119 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 9817 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE MEANS printed page 16.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

120
121 ods rtf close;
122

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 1.79 seconds
cpu time 1.27 seconds



HC-168I
Sample SAS Job for Example B
sample print of work.asconds - sorted by condidx
COND (H170) records where cccodex=128


Obs CONDIDX CCCODEX
1 400041040011 128
2 400041070011 128
3 400121010021 128
4 400141030031 128
5 400171010021 128
6 400201020011 128
7 400231020011 128
8 400281020011 128
9 400301010051 128
10 400341010051 128
11 400341020041 128
12 400361010061 128
13 400531010191 128
14 400621010051 128
15 400621020041 128
16 400631010011 128
17 400791010021 128
18 400841030011 128
19 400841050011 128
20 400841070041 128
21 400841070051 128
22 401391020021 128
23 401431020051 128
24 401781020051 128
25 401861040011 128
26 401861070011 128
27 402041010061 128
28 402141020021 128
29 402171030011 128
30 402371010011 128
31 402371040011 128
32 402901020021 128
33 402961020011 128
34 402961030041 128
35 402971050021 128
36 402971050031 128
37 403281010071 128
38 403311010021 128
39 404011050011 128
40 404031010061 128
41 404151010021 128
42 404191020031 128
43 404451050041 128
44 404791030081 128
45 404831010102 128
46 404831030011 128
47 404951030011 128
48 405051010051 128
49 405051010071 128
50 405091030011 128


HC-168I
Sample SAS Job for Example B
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records


CONDIDX EVNTIDX EVENTYPE
400041040011 400041040841 8 PMED
400041070011 400041070371 1 MVIS
400041070011 400041070391 1 MVIS
400041070011 400041070411 1 MVIS
400041070011 400041070421 1 MVIS
400041070011 400041070431 1 MVIS
400041070011 400041070441 1 MVIS
400041070011 400041070481 1 MVIS
400041070011 400041070511 1 MVIS
400041070011 400041070621 8 PMED
400231020011 400231020191 8 PMED
400231020011 400231020201 8 PMED
400231020011 400231020211 8 PMED
400231020011 400231020261 8 PMED
400231020011 400231020271 8 PMED
400231020011 400231020291 8 PMED
400231020011 400231020301 8 PMED
400341010051 400341011121 8 PMED
400341010051 400341011331 8 PMED
400341020041 400341020251 8 PMED
400341020041 400341020871 8 PMED
400361010061 400361010391 8 PMED
400361010061 400361010491 1 MVIS
400361010061 400361010501 1 MVIS
400361010061 400361010511 1 MVIS
400361010061 400361010521 1 MVIS
400361010061 400361010631 8 PMED
400531010191 400531010471 1 MVIS
400531010191 400531010511 1 MVIS
400531010191 400531010521 1 MVIS
400531010191 400531010691 8 PMED
400621010051 400621010861 1 MVIS
400621010051 400621011061 1 MVIS
400621010051 400621011141 8 PMED
400621020041 400621021281 1 MVIS
400621020041 400621021381 8 PMED
400621020041 400621021391 8 PMED
400621020041 400621021401 8 PMED
400621020041 400621021461 1 MVIS
400621020041 400621021521 8 PMED
400621020041 400621021531 8 PMED
400631010011 400631010211 1 MVIS
400791010021 400791010041 1 MVIS
400791010021 400791010061 8 PMED
400791010021 400791010071 8 PMED
400841030011 400841030051 4 STAZ
400841030011 400841030061 1 MVIS
400841030011 400841030091 8 PMED
400841030011 400841030131 3 EROM
400841030011 400841030141 1 MVIS
400841030011 400841030181 1 MVIS
400841030011 400841030191 8 PMED
400841030011 400841030201 8 PMED
400841030011 400841030221 8 PMED
400841050011 400841050081 8 PMED
400841050011 400841050181 8 PMED
400841070041 400841070231 8 PMED
400841070041 400841070291 8 PMED
401391020021 401391020371 8 PMED
401391020021 401391020411 1 MVIS
401391020021 401391020441 8 PMED
401391020021 401391020461 8 PMED
401391020021 401391020471 8 PMED
401431020051 401431020291 8 PMED
401431020051 401431020311 8 PMED
401861040011 401861040201 8 PMED
401861040011 401861040221 8 PMED
401861070011 401861070151 8 PMED
401861070011 401861070181 8 PMED
402041010061 402041010711 8 PMED
402041010061 402041010781 1 MVIS
402041010061 402041010871 8 PMED
402041010061 402041010931 8 PMED
402141020021 402141020181 1 MVIS
402141020021 402141020191 1 MVIS


HC-168I
Sample SAS Job for Example B
sample print of work.asclnks - sorted by evntidx


Obs CONDIDX EVNTIDX EVENTYPE
1 400041040011 400041040841 8 PMED
2 400041070011 400041070371 1 MVIS
3 400041070011 400041070391 1 MVIS
4 400041070011 400041070411 1 MVIS
5 400041070011 400041070421 1 MVIS
6 400041070011 400041070431 1 MVIS
7 400041070011 400041070441 1 MVIS
8 400041070011 400041070481 1 MVIS
9 400041070011 400041070511 1 MVIS
10 400041070011 400041070621 8 PMED
11 400231020011 400231020191 8 PMED
12 400231020011 400231020201 8 PMED
13 400231020011 400231020211 8 PMED
14 400231020011 400231020261 8 PMED
15 400231020011 400231020271 8 PMED
16 400231020011 400231020291 8 PMED
17 400231020011 400231020301 8 PMED
18 400341010051 400341011121 8 PMED
19 400341010051 400341011331 8 PMED
20 400341020041 400341020251 8 PMED
21 400341020041 400341020871 8 PMED
22 400361010061 400361010391 8 PMED
23 400361010061 400361010491 1 MVIS
24 400361010061 400361010501 1 MVIS
25 400361010061 400361010511 1 MVIS
26 400361010061 400361010521 1 MVIS
27 400361010061 400361010631 8 PMED
28 400531010191 400531010471 1 MVIS
29 400531010191 400531010511 1 MVIS
30 400531010191 400531010521 1 MVIS
31 400531010191 400531010691 8 PMED
32 400621010051 400621010861 1 MVIS
33 400621010051 400621011061 1 MVIS
34 400621010051 400621011141 8 PMED
35 400621020041 400621021281 1 MVIS
36 400621020041 400621021381 8 PMED
37 400621020041 400621021391 8 PMED
38 400621020041 400621021401 8 PMED
39 400621020041 400621021461 1 MVIS
40 400621020041 400621021521 8 PMED
41 400621020041 400621021531 8 PMED
42 400631010011 400631010211 1 MVIS
43 400791010021 400791010041 1 MVIS
44 400791010021 400791010061 8 PMED
45 400791010021 400791010071 8 PMED
46 400841030011 400841030051 4 STAZ
47 400841030011 400841030061 1 MVIS
48 400841030011 400841030091 8 PMED
49 400841030011 400841030131 3 EROM
50 400841030011 400841030141 1 MVIS


HC-168I
Sample SAS Job for Example B
sample print of unique evntidxs from work.asclnks


Obs EVNTIDX EVENTYPE
1 400041040841 8 PMED
2 400041070371 1 MVIS
3 400041070391 1 MVIS
4 400041070411 1 MVIS
5 400041070421 1 MVIS
6 400041070431 1 MVIS
7 400041070441 1 MVIS
8 400041070481 1 MVIS
9 400041070511 1 MVIS
10 400041070621 8 PMED
11 400231020191 8 PMED
12 400231020201 8 PMED
13 400231020211 8 PMED
14 400231020261 8 PMED
15 400231020271 8 PMED
16 400231020291 8 PMED
17 400231020301 8 PMED
18 400341011121 8 PMED
19 400341011331 8 PMED
20 400341020251 8 PMED
21 400341020871 8 PMED
22 400361010391 8 PMED
23 400361010491 1 MVIS
24 400361010501 1 MVIS
25 400361010511 1 MVIS
26 400361010521 1 MVIS
27 400361010631 8 PMED
28 400531010471 1 MVIS
29 400531010511 1 MVIS
30 400531010521 1 MVIS
31 400531010691 8 PMED
32 400621010861 1 MVIS
33 400621011061 1 MVIS
34 400621011141 8 PMED
35 400621021281 1 MVIS
36 400621021381 8 PMED
37 400621021391 8 PMED
38 400621021401 8 PMED
39 400621021461 1 MVIS
40 400621021521 8 PMED
41 400621021531 8 PMED
42 400631010211 1 MVIS
43 400791010041 1 MVIS
44 400791010061 8 PMED
45 400791010071 8 PMED
46 400841030051 4 STAZ
47 400841030061 1 MVIS
48 400841030091 8 PMED
49 400841030131 3 EROM
50 400841030141 1 MVIS


HC-168I
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-168A) records which link to condition records coded as asthma


LINKIDX RXRECIDX RXNAME RXXP14X PERWT14F
400041040841 400041040841001 PROVENTIL 10.14 3108.652487
400041070621 400041070621001 ALBUTEROL 11.39 3126.381710
400231020191 400231020191001 SYMBICORT 257.90 5511.043992
400231020191 400231020191002 SYMBICORT 257.90 5511.043992
400231020201 400231020201001 PROAIR HFA 49.07 5511.043992
400231020211 400231020211001 PREDNISONE 7.91 5511.043992
400231020261 400231020261001 SYMBICORT 257.90 5511.043992
400231020261 400231020261002 SYMBICORT 257.90 5511.043992
400231020271 400231020271001 PROAIR HFA 49.07 5511.043992
400231020291 400231020291001 SYMBICORT 257.96 5511.043992
400231020291 400231020291002 SYMBICORT 257.93 5511.043992
400231020301 400231020301001 PROAIR HFA 49.07 5511.043992
400341011121 400341011121001 PROAIR HFA 135.98 14487.114734
400341011331 400341011331001 PROAIR HFA 49.64 14487.114734
400341020251 400341020251001 PROAIR HFA 52.55 16242.436536
400341020251 400341020251002 PROAIR HFA 52.55 16242.436536
400341020871 400341020871001 VENTOLIN HFA 45.97 16242.436536
400341020871 400341020871002 VENTOLIN HFA 45.97 16242.436536
400341020871 400341020871003 VENTOLIN HFA 45.97 16242.436536
400361010391 400361010391001 VENTOLIN HFA 66.00 3169.951131
400361010391 400361010391002 VENTOLIN HFA 66.00 3169.951131
400361010631 400361010631001 VENTOLIN HFA 48.95 3169.951131
400531010691 400531010691001 MONTELUKAST 61.22 4286.096196
400531010691 400531010691002 MONTELUKAST 64.16 4286.096196
400621011141 400621011141001 SYMBICORT 334.99 13668.453797
400621021381 400621021381001 Montelukast SOD 18.13 9648.404913
400621021381 400621021381002 Montelukast SOD 18.13 9648.404913
400621021391 400621021391001 SYMBICORT 334.99 9648.404913
400621021391 400621021391002 SYMBICORT 334.99 9648.404913
400621021401 400621021401001 Albuterol 46.05 9648.404913
400621021401 400621021401002 Albuterol 46.05 9648.404913
400621021521 400621021521001 SOD CHLORIDE 10.30 9648.404913
400621021521 400621021521002 SOD CHLORIDE 10.30 9648.404913
400621021531 400621021531001 SYMBICORT 334.99 9648.404913
400621021531 400621021531002 SYMBICORT 334.99 9648.404913
400791010061 400791010061001 PROAIR HFA 65.19 32806.772770
400791010071 400791010071001 PROAIR HFA 65.19 32806.772770
400841030091 400841030091001 VENTOLIN HFA 44.07 1099.308075
400841030091 400841030091002 VENTOLIN HFA 44.07 1099.308075
400841030091 400841030091003 VENTOLIN HFA 44.07 1099.308075
400841030091 400841030091004 VENTOLIN HFA 44.07 1099.308075
400841030091 400841030091005 VENTOLIN HFA 44.07 1099.308075
400841030091 400841030091006 VENTOLIN HFA 44.07 1099.308075
400841030191 400841030191001 FLOVENT DISK 138.66 1099.308075
400841030191 400841030191002 FLOVENT DISK 138.66 1099.308075
400841030201 400841030201001 ADVAIR DISKU 288.80 1099.308075
400841030201 400841030201002 ADVAIR DISKU 288.80 1099.308075
400841030221 400841030221001 VENTOLIN HFA 44.07 1099.308075
400841030221 400841030221002 VENTOLIN HFA 44.07 1099.308075
400841030221 400841030221003 VENTOLIN HFA 44.07 1099.308075
400841050081 400841050081001 EPUMP/JOEY 249.60 1660.928413
400841050081 400841050081002 EPUMP/JOEY 249.60 1660.928413
400841050181 400841050181001 EPUMP/JOEY 249.60 1660.928413
400841070231 400841070231001 ALBUTEROL 4.20 1488.112447
400841070291 400841070291001 ALBUTEROL 17.80 1488.112447
401391020371 401391020371001 ADVAIR DISKU 296.02 9703.103101
401391020441 401391020441001 ADVAIR DISKU 373.99 9703.103101
401391020461 401391020461001 ALBUTEROL 87.75 9703.103101
401391020471 401391020471001 CIPROFLOXACN 4.17 9703.103101
401431020291 401431020291001 MONTELUKAST 46.11 11638.384337
401431020311 401431020311001 DYMISTA 149.31 11638.384337
401431020311 401431020311002 DYMISTA 178.28 11638.384337
401861040201 401861040201001 VENTOLIN HFA 44.97 5553.641011
401861040221 401861040221001 VENTOLIN HFA 44.97 5553.641011
401861070151 401861070151001 FLOVENT HFA 140.23 5665.540292
401861070181 401861070181001 FLOVENT DISK 138.66 5665.540292
402041010711 402041010711001 ADVAIR HFA 267.74 13311.352264
402041010871 402041010871001 Advair 142.66 13311.352264
402041010931 402041010931001 PROAIR HFA 280.21 13311.352264
402141020201 402141020201001 PREDNISONE 8.87 4935.860124
402141020201 402141020201002 PREDNISONE 11.31 4935.860124
402141020211 402141020211001 FLUTICASONE 259.81 4935.860124
402141020221 402141020221001 SPIRIVA 1015.42 4935.860124
402141020231 402141020231001 PROVENTIL 210.46 4935.860124
402141020231 402141020231002 PROVENTIL 210.46 4935.860124
402141020241 402141020241001 SYMBICORT 919.72 4935.860124
402141020311 402141020311001 SPIRIVA 1015.42 4935.860124
402141020311 402141020311002 SPIRIVA 1076.11 4935.860124
402141020321 402141020321001 PROVENTIL 210.46 4935.860124
402141020321 402141020321002 PROVENTIL 210.46 4935.860124
402141020331 402141020331001 SYMBICORT 919.72 4935.860124
402141020331 402141020331002 SYMBICORT 919.72 4935.860124
402141020341 402141020341001 ACCOLATE 413.65 4935.860124
402141020351 402141020351001 LORATADINE 31.06 4935.860124
402141020351 402141020351002 LORATADINE 31.06 4935.860124
402171030081 402171030081001 VENTOLIN HFA 46.62 1898.255039
402371010151 402371010151001 PROVENTIL 64.31 4215.497238
402371010151 402371010151002 VENTOLIN HFA 44.32 4215.497238
402901020051 402901020051001 ADVAIR HFA 260.47 15302.906053
402901020051 402901020051002 ADVAIR HFA 260.47 15302.906053
402901020061 402901020061001 PROAIR HFA 56.39 15302.906053
402901020071 402901020071001 ADVAIR DISKU 296.02 15302.906053
402901020081 402901020081001 ADVAIR DISKU 296.02 15302.906053
402901020091 402901020091001 PROVENTIL 60.22 15302.906053
402961020811 402961020811001 VENTOLIN HFA 65.99 17514.953385
402961021201 402961021201001 VENTOLIN HFA 65.99 17514.953385
402971050101 402971050101001 PROAIR HFA 47.94 4391.500605
402971050101 402971050101002 VENTOLIN HFA 56.22 4391.500605
402971050131 402971050131001 PROAIR HFA 47.94 4391.500605
402971050131 402971050131002 PROAIR HFA 47.94 4391.500605
402971050131 402971050131003 VENTOLIN HFA 56.22 4391.500605
402971050151 402971050151001 PROAIR HFA 47.94 4391.500605
402971050151 402971050151002 VENTOLIN HFA 56.22 4391.500605
402971050161 402971050161001 PREDNISONE 10.89 4391.500605
403281010901 403281010901001 PROVENTIL 71.96 2248.107871
403281011811 403281011811001 PROVENTIL 71.96 2248.107871
403281011811 403281011811002 PROVENTIL 402.00 2248.107871
403311010161 403311010161001 MONTELUKAST 509.97 13923.037473
403311010161 403311010161002 MONTELUKAST 509.97 13923.037473
403311010171 403311010171001 COMBIVENT 222.93 13923.037473
403311010181 403311010181001 ADVAIR DISKU 491.99 13923.037473
403311010271 403311010271001 MONTELUKAST 509.97 13923.037473
403311010271 403311010271002 MONTELUKAST 509.97 13923.037473
403311010311 403311010311001 DILTIAZEM 43.23 13923.037473
403311010311 403311010311002 DILTIAZEM 43.23 13923.037473
403311010321 403311010321001 COMBIVENT 222.93 13923.037473
403311010331 403311010331001 ADVAIR DISKU 491.99 13923.037473
404011050561 404011050561001 Flovent HFA 141.37 9109.174820
404011050561 404011050561002 Flovent HFA 141.37 9109.174820
404011050591 404011050591001 ventolin HPA 45.78 9109.174820
404011050591 404011050591002 mVentolin HPA 45.78 9109.174820
404011050751 404011050751001 Flovent HFA 141.37 9109.174820
404011050751 404011050751002 Flovent HFA 141.37 9109.174820
404011050751 404011050751003 Flovent HFA 141.37 9109.174820
404011050751 404011050751004 Flovent HFA 141.37 9109.174820
404011050751 404011050751005 Flovent HFA 141.37 9109.174820
404011050761 404011050761001 Montelukast 26.40 9109.174820
404011050761 404011050761002 Montelukast 12.00 9109.174820
404011050761 404011050761003 Montelukast 12.00 9109.174820
404011050761 404011050761004 Montelukast 26.40 9109.174820
404011050761 404011050761005 Montelukast 26.40 9109.174820
404011050781 404011050781001 Ventolin HPA 45.78 9109.174820
404011050781 404011050781002 Ventolin HPA 45.78 9109.174820
404011050781 404011050781003 Ventolin HPA 45.78 9109.174820
404011050781 404011050781004 Ventolin HFA 45.78 9109.174820
404011050781 404011050781005 Ventolin HFA 45.78 9109.174820
404011051131 404011051131001 Flovent HFA 141.37 9109.174820
404011051131 404011051131002 Flovent HFA 141.37 9109.174820
404011051131 404011051131003 Flovent HFA 141.37 9109.174820
404011051131 404011051131004 Flovent HFA 141.37 9109.174820
404011051131 404011051131005 Flovent HFA 141.37 9109.174820
404011051131 404011051131006 Flovent HFA 141.37 9109.174820
404011051161 404011051161001 Ventolin HFA 45.78 9109.174820
404011051161 404011051161002 Ventolin HFA 45.78 9109.174820
404011051161 404011051161003 Ventolin HFA 45.78 9109.174820
404011051161 404011051161004 Ventolin HFA 45.78 9109.174820
404011051161 404011051161005 Ventolin HFA 45.78 9109.174820
404011051161 404011051161006 Ventolin HFA 45.78 9109.174820
404031010171 404031010171001 QVAR 4.41 2734.029058
404031010171 404031010171002 QVAR 4.41 2734.029058
404031010171 404031010171003 QVAR 4.41 2734.029058
404031010171 404031010171004 QVAR 4.41 2734.029058
404031010171 404031010171005 QVAR 4.41 2734.029058
404031010171 404031010171006 QVAR 4.41 2734.029058
404031010181 404031010181001 PROVENTIL 4.40 2734.029058
404031010181 404031010181002 PROVENTIL 4.40 2734.029058
404031010181 404031010181003 PROVENTIL 4.40 2734.029058
404031010181 404031010181004 PROVENTIL 4.40 2734.029058
404031010181 404031010181005 PROVENTIL 4.40 2734.029058
404031010181 404031010181006 PROVENTIL 4.40 2734.029058
404191020161 404191020161001 IPRATROPIUM/ 129.99 6851.679697
404451050061 404451050061001 ALBUTEROL 20.99 5432.395522
404451050061 404451050061002 ALBUTEROL 20.99 5432.395522
404451050061 404451050061003 ALBUTEROL 20.99 5432.395522
404451050061 404451050061004 ALBUTEROL 20.99 5432.395522
404451050071 404451050071001 QVAR 131.22 5432.395522
404831010802 404831010802001 SYMBICORT 240.50 5843.873293
404831030351 404831030351001 Q-TAPP 2.40 4324.406967
404831030361 404831030361001 IPRATROPIUM 4.00 4324.406967
404831030451 404831030451001 ALBUTEROL 8.00 4324.406967
404831030451 404831030451002 ALBUTEROL 8.00 4324.406967
404831030451 404831030451003 ALBUTEROL 8.00 4324.406967
404831030491 404831030491001 IPRATROPIUM 4.00 4324.406967
404831030491 404831030491002 IPRATROPIUM 4.00 4324.406967
404831030491 404831030491003 IPRATROPIUM 4.00 4324.406967
404951030011 404951030011001 ALBUTEROL 13.00 4699.466434
405051010271 405051010271001 VENTOLIN HFA 44.90 2631.705391
405051010271 405051010271002 VENTOLIN HFA 44.90 2631.705391
405051010361 405051010361001 VENTOLIN HFA 44.90 2631.705391
405091030071 405091030071001 LORATADINE 12.00 4086.068516
405091030101 405091030101001 ADVAIR HFA 267.74 4086.068516
405091030101 405091030101002 ADVAIR HFA 267.74 4086.068516
405091030101 405091030101003 ADVAIR HFA 267.74 4086.068516
405091030101 405091030101004 ADVAIR HFA 267.74 4086.068516
405091030101 405091030101005 ADVAIR HFA 267.74 4086.068516
405091030101 405091030101006 ADVAIR HFA 267.74 4086.068516
405091030101 405091030101007 ADVAIR HFA 267.74 4086.068516
405091030101 405091030101008 ADVAIR HFA 267.74 4086.068516
405091030111 405091030111001 ALBUTEROL 91.97 4086.068516
405091030111 405091030111002 ALBUTEROL 91.97 4086.068516
405091030111 405091030111003 ALBUTEROL 91.97 4086.068516
405091030111 405091030111004 ALBUTEROL 91.97 4086.068516
405091030111 405091030111005 ALBUTEROL 91.97 4086.068516
405091030111 405091030111006 ALBUTEROL 91.97 4086.068516
405091030111 405091030111007 ALBUTEROL 91.97 4086.068516
405091030111 405091030111008 ALBUTEROL 91.97 4086.068516
405091030121 405091030121001 ALBUTEROL 43.98 4086.068516
405091030121 405091030121002 ALBUTEROL 43.98 4086.068516
405091030121 405091030121003 ALBUTEROL 43.98 4086.068516
405111010461 405111010461001 VENTOLIN HFA 48.04 3873.181726
405111010461 405111010461002 VENTOLIN HFA 48.04 3873.181726
405111010461 405111010461003 VENTOLIN HFA 48.04 3873.181726
405111010531 405111010531001 VENTOLIN HFA 48.04 3873.181726
405111010531 405111010531002 VENTOLIN HFA 48.04 3873.181726
405111010531 405111010531003 VENTOLIN HFA 48.04 3873.181726
405111010531 405111010531004 VENTOLIN HFA 48.04 3873.181726
405251010781 405251010781001 XOPENEX HFA 606.51 21688.532292
405491030341 405491030341001 PROAIR HFA 48.62 8243.006091
405621020301 405621020301001 Albuterol Sulfate 70.26 6065.316961
406021040221 406021040221001 PROAIR HFA 49.55 1602.044045
406051010581 406051010581001 MONTELUKAST 15.09 7891.627086
406051011141 406051011141001 MONTELUKAST 15.34 7891.627086
406051011141 406051011141002 MONTELUKAST 169.99 7891.627086
406051011141 406051011141003 MONTELUKAST 15.34 7891.627086
406051011141 406051011141004 MONTELUKAST 15.34 7891.627086
406051011141 406051011141005 MONTELUKAST 15.34 7891.627086
406051011151 406051011151001 PROAIR HFA 28.99 7891.627086
406051011151 406051011151002 PROAIR HFA 28.99 7891.627086
406051011151 406051011151003 PROAIR HFA 28.99 7891.627086
406141020571 406141020571001 ALBUTEROL 5.00 4198.359936
406141020641 406141020641001 ALBUTEROL 39.99 4198.359936
406141020651 406141020651001 PREDNISONE 4.00 4198.359936
406141020791 406141020791001 SPIRIVA 371.99 4198.359936
406141020801 406141020801001 ALBUTEROL 17.09 4198.359936
406141020801 406141020801002 ALBUTEROL 7.26 4198.359936
406181020421 406181020421001 METHYLPRED 8.00 10419.499141
406181020441 406181020441001 MONTELUKAST 8.08 10419.499141
406181020501 406181020501001 ADVAIR HFA 387.67 10419.499141
406181020531 406181020531001 PROAIR HFA 49.68 10419.499141
406181020661 406181020661001 PREDNISONE 3.22 10419.499141
406181020661 406181020661002 PREDNISONE 8.00 10419.499141
406181020661 406181020661003 PREDNISONE 8.00 10419.499141
406181020751 406181020751001 IPRATROPIUM 17.24 10419.499141
406181020751 406181020751002 IPRATROPIUM 17.24 10419.499141
406181020761 406181020761001 PROAIR HFA 49.68 10419.499141
406181020761 406181020761002 PROAIR HFA 49.68 10419.499141
406181020781 406181020781001 MONTELUKAST 26.65 10419.499141
406181020781 406181020781002 MONTELUKAST 17.77 10419.499141
406181020851 406181020851001 PROAIR HFA 49.68 10419.499141
406271010181 406271010181001 PROAIR HFA 135.98 9641.708096
406271010201 406271010201001 MONTELUKAST 42.19 9641.708096
406271010201 406271010201002 MONTELUKAST 42.19 9641.708096
406271010321 406271010321001 MONTELUKAST 24.63 9641.708096
406271010321 406271010321002 MONTELUKAST 20.33 9641.708096
406271010341 406271010341001 PROAIR HFA 135.98 9641.708096
406271010341 406271010341002 PROAIR HFA 135.98 9641.708096
406411080081 406411080081001 SINGULAIR 181.49 8331.652109
406441010081 406441010081001 VENTOLIN HFA 43.89 4812.908637
406441010091 406441010091001 ADVAIR DISKU 339.99 4812.908637
406471030031 406471030031001 VENTOLIN HFA 65.99 10221.268727
406481030151 406481030151001 MONTELUKAST 137.99 5033.813682
406481030171 406481030171001 ALBUTEROL 9.92 5033.813682
406481050221 406481050221001 IPRATROPIUM/ 60.00 5424.107123
406481050241 406481050241001 MONTELUKAST 26.10 5424.107123
406481050251 406481050251001 ALBUTEROL 38.32 5424.107123
406481050411 406481050411001 MONTELUKAST 17.93 5424.107123
406481050411 406481050411002 MONTELUKAST 17.93 5424.107123
406481050421 406481050421001 ALBUTEROL 21.99 5424.107123
406481050421 406481050421002 ALBUTEROL 48.99 5424.107123
406561020231 406561020231001 ALBUTEROL 12.61 4792.543080
406801020211 406801020211001 PROAIR HFA 55.52 8925.913972
406801020211 406801020211002 PROAIR HFA 55.52 8925.913972
406801020221 406801020221001 FLOVENT DISK 138.66 8925.913972
406801020221 406801020221002 FLOVENT DISK 138.66 8925.913972
407011010201 407011010201001 METHYLPRED 19.09 7859.641490
407011010201 407011010201002 METHYLPRED 19.09 7859.641490
407011010201 407011010201003 METHYLPRED 19.09 7859.641490
407011010231 407011010231001 MONTELUKAST 9.67 7859.641490
407011010231 407011010231002 MONTELUKAST 9.67 7859.641490
407011010231 407011010231003 MONTELUKAST 9.67 7859.641490
407011010301 407011010301001 METHYLPRED 19.09 7859.641490
407011010301 407011010301002 METHYLPRED 19.09 7859.641490
407011010301 407011010301003 METHYLPRED 19.09 7859.641490
407011010301 407011010301004 METHYLPRED 19.09 7859.641490
407011010301 407011010301005 METHYLPRED 19.09 7859.641490
407011010341 407011010341001 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341002 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341003 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341004 SIMVASTATIN 5.11 7859.641490
407011010341 407011010341005 SIMVASTATIN 5.11 7859.641490
407011010431 407011010431001 MONTELUKAST 8.88 7859.641490
407011010431 407011010431002 MONTELUKAST 72.24 7859.641490
407291010421 407291010421001 IPRATROPIUM/ 40.88 23293.343684
407291010431 407291010431001 SYMBICORT 721.50 23293.343684
407291010441 407291010441001 PROAIR HFA 73.99 23293.343684
407291010551 407291010551001 IPRATROPIUM/ 40.88 23293.343684
407291010571 407291010571001 SYMBICORT 697.85 23293.343684
407291010591 407291010591001 PROAIR HFA 73.99 23293.343684
407411010251 407411010251001 FLOVENT HFA 371.99 3537.908345
407411010251 407411010251002 FLOVENT HFA 371.99 3537.908345
407411010251 407411010251003 FLOVENT HFA 371.99 3537.908345
407411010251 407411010251004 FLOVENT HFA 371.99 3537.908345
407411010251 407411010251005 FLOVENT HFA 371.99 3537.908345
407411010251 407411010251006 FLOVENT HFA 371.99 3537.908345
407411010341 407411010341001 FLOVENT HFA 371.99 3537.908345
407411010341 407411010341002 FLOVENT HFA 371.99 3537.908345
407531020091 407531020091001 ALBUTEROL 10.59 6727.590679
407531020091 407531020091002 ALBUTEROL 10.59 6727.590679
407531020101 407531020101001 SEREVENT DIS 211.76 6727.590679
407531020101 407531020101002 SEREVENT DIS 211.76 6727.590679


HC-168I
Sample SAS Job for Example B
Total Rx expenditures associated with asthma

Analysis Variable : RXXP14X SUM OF PAYMENTS RXSF14X-RXOU14X(IMPUTED)


N Sum
9817 1373443.41


HC-168I
Sample SAS Job for Example B
Total Rx expenditures associated with asthma

Weighted

Analysis Variable : RXXP14X SUM OF PAYMENTS RXSF14X-RXOU14X(IMPUTED)


N Sum
9817 13498967848

NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
NOTE: This session is executing on the W32_7PRO platform.


NOTE: SAS initialization used:
real time 0.57 seconds
cpu time 0.09 seconds

NOTE: AUTOEXEC processing beginning; file is C:\Program Files\SAS\SASMISC\autoexec_9432.sas.


NOTE: AUTOEXEC processing completed.

1
2
3
4 ods rtf file = 'C:\Data\sampleC.rtf'
4 ! bodytitle;
NOTE: Writing RTF Body file: C:\Data\sampleC.rtf
programs\sampleC.rtf
5
6 ods noproctitle;
7
8 OPTIONS LS=132 PS=59;
9
10 TITLE1 "HC-168I";
11 TITLE2 "Sample SAS Job for Example C";
12
13 LIBNAME IN "C:\Data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
14

15
16 * Calculate the expenditures for medical visits associated with asthma.
17

18 PROC FORMAT;
19 VALUE EVENTYPE
20 1 = "1 MVIS"
21 2 = "2 OPAT"
22 3 = "3 EROM"
23 4 = "4 STAZ"
24 5 = "5 DVIS"
25 6 = "6 OMED"
26 7 = "7 HVIS"
27 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
28 RUN;

NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.09 seconds
cpu time 0.01 seconds

29

30
31 * Get conditions records coded as asthma.
32

33 DATA ASCONDS;
34 SET IN.H170 (KEEP=CONDIDX CCCODEX);
35 IF CCCODEX="128";
36 RUN;

NOTE: There were 116679 observations read from the data set IN.H170.
NOTE: The data set WORK.ASCONDS has 2300 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

37

38
39 * Get the events linked to each of the asthma condition records.
40

41 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;

NOTE: There were 2300 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2300 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

42
43 proc print data=asconds (obs=50);
44 title3 "sample print of work.asconds - sorted by condidx";
45 title4 "COND (H170) records where cccodex=128";
46 run;

NOTE: There were 50 observations read from the data set WORK.ASCONDS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

47
48 PROC SORT DATA=IN.H168IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 364577 observations read from the data set IN.H168IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 364577 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.47 percent.
Compressed is 424 pages; un-compressed would require 402 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.18 seconds
cpu time 0.32 seconds

49
50 DATA ASCLNKS;
51 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
52 ASCONDS(IN=INASCOND KEEP=CONDIDX);
53 BY CONDIDX;
54 IF INCLNK & INASCOND;
55 RUN;

NOTE: There were 364577 observations read from the data set WORK.CLNK.
NOTE: There were 2300 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7021 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 50.00 percent.
Compressed is 6 pages; un-compressed would require 4 pages.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.09 seconds

56
57 proc report data=asclnks (obs=75)nowd headskip;
58 define condidx / 'CONDIDX' order;
59 define evntidx / 'EVNTIDX';
60 define eventype / 'EVENTYPE';
61 break after condidx / skip;
62 format eventype eventype.;
63 title3 "sample print of work.asclnks - sorted by condidx";
64 title4 "events linked to asthma condition records";
65 run;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE REPORT printed pages 2-3.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds



66
67 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

NOTE: There were 7021 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 7021 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 50.00 percent.
Compressed is 6 pages; un-compressed would require 4 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

68
69 proc print data=asclnks (obs=50);
70 format eventype eventype.;
71 title3 "sample print of work.asclnks - sorted by evntidx";
72 run;

NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

73
74 DATA ASCLNKS;
75 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
76 BY EVNTIDX;
77 IF FIRST.EVNTIDX;
78 RUN;

NOTE: There were 7021 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7012 observations and 2 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 66.67 percent.
Compressed is 5 pages; un-compressed would require 3 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

79
80 proc print data=asclnks (obs=50);
81 format eventype eventype.;
82 title3 "sample print of unique evntidxs from work.asclnks";
83 run;

NOTE: There were 50 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed page 5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

84

85
86 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
87

88 DATA MVIS;
89 SET IN.H168G (KEEP=EVNTIDX PERWT14F SEETLKPV OBXP14X);
90 IF PERWT14F > 0 & SEETLKPV NE 2;
91 RUN;

NOTE: There were 166005 observations read from the data set IN.H168G.
NOTE: The data set WORK.MVIS has 161200 observations and 4 variables.
NOTE: Compressing data set WORK.MVIS increased size by 7.07 percent.
Compressed is 106 pages; un-compressed would require 99 pages.
NOTE: DATA statement used (Total process time):
real time 2.23 seconds
cpu time 0.07 seconds

92
93 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;

NOTE: There were 161200 observations read from the data set WORK.MVIS.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.MVIS has 161200 observations and 4 variables.
NOTE: Compressing data set WORK.MVIS increased size by 7.07 percent.
Compressed is 106 pages; un-compressed would require 99 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds

94

95 96 * Identify MVIS events which were for asthma.
97

98 DATA ASMVIS;
99 MERGE ASCLNKS (IN=INASCLNK)
100 MVIS (IN=INMVIS);
101 BY EVNTIDX;
102 IF INASCLNK & INMVIS;
103 RUN;

NOTE: There were 7012 observations read from the data set WORK.ASCLNKS.
NOTE: There were 161200 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 1988 observations and 5 variables.
NOTE: Compressing data set WORK.ASMVIS increased size by 50.00 percent.
Compressed is 3 pages; un-compressed would require 2 pages.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds

104
105 proc print data=asmvis (obs=50);
106 format eventype eventype.;
107 title3 "sample print of work.asmvis";
108 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-168G) events";
109 run;

NOTE: There were 50 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE PRINT printed page 6.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

110
111 PROC MEANS DATA=ASMVIS N SUM;
112 VAR OBXP14X;
113 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
114 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 1988 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE MEANS printed page 7.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

115
116 PROC MEANS DATA=ASMVIS N SUM;
117 VAR OBXP14X;
118 WEIGHT PERWT14F;
119 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
120 TITLE5 "Weighted";
121 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 1988 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE MEANS printed page 8.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

122
123 ods rtf close;
124
125

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 3.74 seconds
cpu time 0.99 seconds



HC-168I
Sample SAS Job for Example C
sample print of work.asconds - sorted by condidx
COND (H170) records where cccodex=128


Obs CONDIDX CCCODEX
1 400041040011 128
2 400041070011 128
3 400121010021 128
4 400141030031 128
5 400171010021 128
6 400201020011 128
7 400231020011 128
8 400281020011 128
9 400301010051 128
10 400341010051 128
11 400341020041 128
12 400361010061 128
13 400531010191 128
14 400621010051 128
15 400621020041 128
16 400631010011 128
17 400791010021 128
18 400841030011 128
19 400841050011 128
20 400841070041 128
21 400841070051 128
22 401391020021 128
23 401431020051 128
24 401781020051 128
25 401861040011 128
26 401861070011 128
27 402041010061 128
28 402141020021 128
29 402171030011 128
30 402371010011 128
31 402371040011 128
32 402901020021 128
33 402961020011 128
34 402961030041 128
35 402971050021 128
36 402971050031 128
37 403281010071 128
38 403311010021 128
39 404011050011 128
40 404031010061 128
41 404151010021 128
42 404191020031 128
43 404451050041 128
44 404791030081 128
45 404831010102 128
46 404831030011 128
47 404951030011 128
48 405051010051 128
49 405051010071 128
50 405091030011 128


HC-168I
Sample SAS Job for Example C
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records


CONDIDX EVNTIDX EVENTYPE
400041040011 400041040841 8 PMED
400041070011 400041070371 1 MVIS
400041070011 400041070391 1 MVIS
400041070011 400041070411 1 MVIS
400041070011 400041070421 1 MVIS
400041070011 400041070431 1 MVIS
400041070011 400041070441 1 MVIS
400041070011 400041070481 1 MVIS
400041070011 400041070511 1 MVIS
400041070011 400041070621 8 PMED
400231020011 400231020191 8 PMED
400231020011 400231020201 8 PMED
400231020011 400231020211 8 PMED
400231020011 400231020261 8 PMED
400231020011 400231020271 8 PMED
400231020011 400231020291 8 PMED
400231020011 400231020301 8 PMED
400341010051 400341011121 8 PMED
400341010051 400341011331 8 PMED
400341020041 400341020251 8 PMED
400341020041 400341020871 8 PMED
400361010061 400361010391 8 PMED
400361010061 400361010491 1 MVIS
400361010061 400361010501 1 MVIS
400361010061 400361010511 1 MVIS
400361010061 400361010521 1 MVIS
400361010061 400361010631 8 PMED
400531010191 400531010471 1 MVIS
400531010191 400531010511 1 MVIS
400531010191 400531010521 1 MVIS
400531010191 400531010691 8 PMED
400621010051 400621010861 1 MVIS
400621010051 400621011061 1 MVIS
400621010051 400621011141 8 PMED
400621020041 400621021281 1 MVIS
400621020041 400621021381 8 PMED
400621020041 400621021391 8 PMED
400621020041 400621021401 8 PMED
400621020041 400621021461 1 MVIS
400621020041 400621021521 8 PMED
400621020041 400621021531 8 PMED
400631010011 400631010211 1 MVIS
400791010021 400791010041 1 MVIS
400791010021 400791010061 8 PMED
400791010021 400791010071 8 PMED
400841030011 400841030051 4 STAZ
400841030011 400841030061 1 MVIS
400841030011 400841030091 8 PMED
400841030011 400841030131 3 EROM
400841030011 400841030141 1 MVIS
400841030011 400841030181 1 MVIS
400841030011 400841030191 8 PMED
400841030011 400841030201 8 PMED
400841030011 400841030221 8 PMED
400841050011 400841050081 8 PMED
400841050011 400841050181 8 PMED
400841070041 400841070231 8 PMED
400841070041 400841070291 8 PMED
401391020021 401391020371 8 PMED
401391020021 401391020411 1 MVIS
401391020021 401391020441 8 PMED
401391020021 401391020461 8 PMED
401391020021 401391020471 8 PMED
401431020051 401431020291 8 PMED
401431020051 401431020311 8 PMED
401861040011 401861040201 8 PMED
401861040011 401861040221 8 PMED
401861070011 401861070151 8 PMED
401861070011 401861070181 8 PMED
402041010061 402041010711 8 PMED
402041010061 402041010781 1 MVIS
402041010061 402041010871 8 PMED
402041010061 402041010931 8 PMED
402141020021 402141020181 1 MVIS
402141020021 402141020191 1 MVIS


HC-168I
Sample SAS Job for Example C
sample print of work.asclnks - sorted by evntidx


Obs CONDIDX EVNTIDX EVENTYPE
1 400041040011 400041040841 8 PMED
2 400041070011 400041070371 1 MVIS
3 400041070011 400041070391 1 MVIS
4 400041070011 400041070411 1 MVIS
5 400041070011 400041070421 1 MVIS
6 400041070011 400041070431 1 MVIS
7 400041070011 400041070441 1 MVIS
8 400041070011 400041070481 1 MVIS
9 400041070011 400041070511 1 MVIS
10 400041070011 400041070621 8 PMED
11 400231020011 400231020191 8 PMED
12 400231020011 400231020201 8 PMED
13 400231020011 400231020211 8 PMED
14 400231020011 400231020261 8 PMED
15 400231020011 400231020271 8 PMED
16 400231020011 400231020291 8 PMED
17 400231020011 400231020301 8 PMED
18 400341010051 400341011121 8 PMED
19 400341010051 400341011331 8 PMED
20 400341020041 400341020251 8 PMED
21 400341020041 400341020871 8 PMED
22 400361010061 400361010391 8 PMED
23 400361010061 400361010491 1 MVIS
24 400361010061 400361010501 1 MVIS
25 400361010061 400361010511 1 MVIS
26 400361010061 400361010521 1 MVIS
27 400361010061 400361010631 8 PMED
28 400531010191 400531010471 1 MVIS
29 400531010191 400531010511 1 MVIS
30 400531010191 400531010521 1 MVIS
31 400531010191 400531010691 8 PMED
32 400621010051 400621010861 1 MVIS
33 400621010051 400621011061 1 MVIS
34 400621010051 400621011141 8 PMED
35 400621020041 400621021281 1 MVIS
36 400621020041 400621021381 8 PMED
37 400621020041 400621021391 8 PMED
38 400621020041 400621021401 8 PMED
39 400621020041 400621021461 1 MVIS
40 400621020041 400621021521 8 PMED
41 400621020041 400621021531 8 PMED
42 400631010011 400631010211 1 MVIS
43 400791010021 400791010041 1 MVIS
44 400791010021 400791010061 8 PMED
45 400791010021 400791010071 8 PMED
46 400841030011 400841030051 4 STAZ
47 400841030011 400841030061 1 MVIS
48 400841030011 400841030091 8 PMED
49 400841030011 400841030131 3 EROM
50 400841030011 400841030141 1 MVIS


HC-168I
Sample SAS Job for Example C
sample print of unique evntidxs from work.asclnks


Obs EVNTIDX EVENTYPE
1 400041040841 8 PMED
2 400041070371 1 MVIS
3 400041070391 1 MVIS
4 400041070411 1 MVIS
5 400041070421 1 MVIS
6 400041070431 1 MVIS
7 400041070441 1 MVIS
8 400041070481 1 MVIS
9 400041070511 1 MVIS
10 400041070621 8 PMED
11 400231020191 8 PMED
12 400231020201 8 PMED
13 400231020211 8 PMED
14 400231020261 8 PMED
15 400231020271 8 PMED
16 400231020291 8 PMED
17 400231020301 8 PMED
18 400341011121 8 PMED
19 400341011331 8 PMED
20 400341020251 8 PMED
21 400341020871 8 PMED
22 400361010391 8 PMED
23 400361010491 1 MVIS
24 400361010501 1 MVIS
25 400361010511 1 MVIS
26 400361010521 1 MVIS
27 400361010631 8 PMED
28 400531010471 1 MVIS
29 400531010511 1 MVIS
30 400531010521 1 MVIS
31 400531010691 8 PMED
32 400621010861 1 MVIS
33 400621011061 1 MVIS
34 400621011141 8 PMED
35 400621021281 1 MVIS
36 400621021381 8 PMED
37 400621021391 8 PMED
38 400621021401 8 PMED
39 400621021461 1 MVIS
40 400621021521 8 PMED
41 400621021531 8 PMED
42 400631010211 1 MVIS
43 400791010041 1 MVIS
44 400791010061 8 PMED
45 400791010071 8 PMED
46 400841030051 4 STAZ
47 400841030061 1 MVIS
48 400841030091 8 PMED
49 400841030131 3 EROM
50 400841030141 1 MVIS


HC-168I
Sample SAS Job for Example C
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-168G) events


Obs EVNTIDX EVENTYPE SEETLKPV OBXP14X PERWT14F
1 400041070371 1 MVIS 1 36.89 3126.38
2 400041070391 1 MVIS 1 55.70 3126.38
3 400041070411 1 MVIS 1 50.63 3126.38
4 400041070421 1 MVIS 1 72.27 3126.38
5 400041070431 1 MVIS 1 83.03 3126.38
6 400041070441 1 MVIS 1 8.98 3126.38
7 400041070481 1 MVIS 1 8.98 3126.38
8 400041070511 1 MVIS 1 8.98 3126.38
9 400361010491 1 MVIS 1 168.04 3169.95
10 400361010501 1 MVIS 1 20.33 3169.95
11 400361010511 1 MVIS 1 168.04 3169.95
12 400361010521 1 MVIS 1 168.04 3169.95
13 400531010471 1 MVIS 1 71.71 4286.10
14 400531010511 1 MVIS 1 69.39 4286.10
15 400531010521 1 MVIS 1 69.39 4286.10
16 400621010861 1 MVIS 1 105.30 13668.45
17 400621011061 1 MVIS 1 540.27 13668.45
18 400621021281 1 MVIS 1 588.71 9648.40
19 400621021461 1 MVIS 1 278.51 9648.40
20 400631010211 1 MVIS 1 211.32 28093.68
21 400791010041 1 MVIS 1 109.00 32806.77
22 400841030061 1 MVIS 1 60.96 1099.31
23 400841030141 1 MVIS 1 35.52 1099.31
24 400841030181 1 MVIS 1 60.96 1099.31
25 401391020411 1 MVIS 1 16.21 9703.10
26 402041010781 1 MVIS 1 60.00 13311.35
27 402141020181 1 MVIS 1 95.02 4935.86
28 402141020191 1 MVIS 1 36.73 4935.86
29 402371040151 1 MVIS 1 46.93 3417.38
30 402901020041 1 MVIS 1 109.00 15302.91
31 404011050831 1 MVIS 1 65.94 9109.17
32 404011050871 1 MVIS 1 65.94 9109.17
33 405051010201 1 MVIS 1 45.67 2631.71
34 405111010291 1 MVIS 1 444.00 3873.18
35 405111010301 1 MVIS 1 444.00 3873.18
36 405111010381 1 MVIS 1 55.00 3873.18
37 405111010481 1 MVIS 1 65.00 3873.18
38 405621020201 1 MVIS 1 27.55 6065.32
39 405621020211 1 MVIS 1 107.03 6065.32
40 406141020591 1 MVIS 1 86.38 4198.36
41 406141020601 1 MVIS 1 99.60 4198.36
42 406141020611 1 MVIS 1 86.38 4198.36
43 406141020621 1 MVIS 1 99.60 4198.36
44 406141020681 1 MVIS 1 213.20 4198.36
45 406181020541 1 MVIS 1 177.42 10419.50
46 406181020551 1 MVIS 1 177.42 10419.50
47 406181020601 1 MVIS 1 256.19 10419.50
48 406181020771 1 MVIS 1 136.08 10419.50
49 407011010251 1 MVIS 1 166.61 7859.64
50 407011010381 1 MVIS 1 166.61 7859.64


HC-168I
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma

Analysis Variable : OBXP14X SUM OF OBSF14X - OBOT14X (IMPUTED)


N Sum
1988 275599.24


HC-168I
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma

Weighted

Analysis Variable : OBXP14X SUM OF OBSF14X - OBOT14X (IMPUTED)


N Sum
1988 2482495348


Return To Top