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.85 seconds
cpu time 0.12 seconds

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

NOTE: AUTOEXEC processing completed.

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

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

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

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

32

33
34 * Get condition records coded as asthma.
35

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

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

41

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

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

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

46
47 proc print data=asconds (obs=50);
48 title3 "sample print of work.asconds - sorted by condidx";
49 title4 "COND (H180) records where cccodex=128";
50 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.14 seconds
cpu time 0.01 seconds

51
52 PROC SORT DATA=IN.H178IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 377736 observations read from the data set IN.H178IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 377736 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.52 percent.
Compressed is 440 pages; un-compressed would require 417 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.93 seconds
cpu time 0.29 seconds

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

NOTE: There were 377736 observations read from the data set WORK.CLNK.
NOTE: There were 2422 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7037 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.09 seconds

60
61 proc report data=asclnks(obs=75) nowd headskip;
62 define condidx /'CONDIDX' order;
63 define evntidx /'EVNTIDX';
64 define eventype /'EVENTYPE';
65 break after condidx / skip;
66 format eventype eventype.;
67 title3 "sample print of work.asclnks - sorted by condidx";
68 title4 "events linked to asthma condition records";
69 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.39 seconds
cpu time 0.03 seconds

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

NOTE: There were 7037 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 7037 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.01 seconds

72
73 proc print data=asclnks (obs=50);
74 format eventype eventype.;
75 title3 "sample print of work.asclnks - sorted by evntidx";
76 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.00 seconds
cpu time 0.00 seconds

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

NOTE: There were 7037 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7026 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.01 seconds

83
84 proc print data=asclnks (obs=50);
85 title3 "sample print of unique evntidxs from work.asclnks";
86 format eventype eventype.;
87 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.01 seconds

88

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

92 DATA MVIS;
93 SET IN.H178G (KEEP=EVNTIDX PERWT15F SEETLKPV);
94 IF PERWT15F > 0 & SEETLKPV NE 2;
95 RUN;

NOTE: There were 172388 observations read from the data set IN.H178G.
NOTE: The data set WORK.MVIS has 167884 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 13.25 percent.
Compressed is 94 pages; un-compressed would require 83 pages.
NOTE: DATA statement used (Total process time):
real time 2.05 seconds
cpu time 0.06 seconds

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

NOTE: There were 167884 observations read from the data set WORK.MVIS.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.MVIS has 167884 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 13.25 percent.
Compressed is 94 pages; un-compressed would require 83 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.08 seconds
cpu time 0.12 seconds

98

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

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

NOTE: There were 7026 observations read from the data set WORK.ASCLNKS.
NOTE: There were 167884 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 2048 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

108
109 proc print data=asmvis (obs=50);
110 format eventype eventype.;
111 title3 "sample print of work.asmvis";
112 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-178G) events";
113 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

114

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

118 PROC SORT DATA=IN.H178IF2 OUT=RXLK; BY EVNTIDX; RUN;

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

119
120 proc report data=rxlk (obs=140 keep=evntidx linkidx eventype) nowd headskip;
121 define evntidx /'EVNTIDX' order;
122 define linkidx /'LINKIDX';
123 define eventype /'EVENTYPE';
124 break after evntidx / skip;
125 format eventype eventype.;
126 title3 "sample print of work.rxlk - sorted by evntidx";
127 title4 "Rx+event link file records (HC-178IF2)";
128 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-11.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.02 seconds
cpu time 0.04 seconds

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

NOTE: There were 63302 observations read from the data set WORK.RXLK.
NOTE: There were 2048 observations read from the data set WORK.ASMVIS.
NOTE: The data set WORK.PMEDIDS has 2160 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.03 seconds
cpu time 0.03 seconds

136
137 proc report data=pmedids (obs=50) nowd headskip;
138 define evntidx /'EVNTIDX' order;
139 define linkidx /'LINKIDX';
140 define eventype /'EVENTYPE';
141 break after evntidx / skip;
142 format eventype eventype.;
143 title3 "sample print of work.pmedids - sorted by evntidx";
144 title4 "work.rxlk records for evntidxs in work.asmvis";
145 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 12-13.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

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

NOTE: There were 2160 observations read from the data set WORK.PMEDIDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.PMEDIDS has 2160 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.03 seconds
cpu time 0.00 seconds

148
149 proc print data=pmedids (obs=50);
150 format eventype eventype.;
151 title3 "sample print of work.pmedids - sorted by linkidx";
152 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.00 seconds
cpu time 0.01 seconds

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

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

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

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

163

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

167 PROC SORT DATA=IN.H178A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 330453 observations read from the data set IN.H178A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 330453 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 20.31 percent.
Compressed is 710 pages; un-compressed would require 891 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 3.34 seconds
cpu time 0.63 seconds

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

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

175
176 proc report data=mvpmeds (obs=200) nowd;
177 column LINKIDX RXRECIDX RXNAME RXXP15X PERWT15F;
178 define linkidx /'LINKIDX' order;
179 define rxrecidx /'RXRECIDX';
180 define rxname /'RXNAME';
181 define rxxp15x /'RXXP15X' display format=8.2;
182 define PERWT15F /'PERWT15F' /*display format=8.2*/;
183 break after linkidx / skip;
184 title3 "sample print of work.mvpmeds";
185 title4 "PMED (HC-178A) records for unique linkidxs in work.pmedids";
186 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 16-20.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

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

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 5623 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.05 seconds
cpu time 0.04 seconds

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

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 5623 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.02 seconds
cpu time 0.00 seconds

199
200 ods rtf close;
201

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

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

Obs CONDIDX CCCODEX
1 600011010231 128
2 600011020121 128
3 600031030011 128
4 600211010061 128
5 600331010131 128
6 600341010031 128
7 600561060021 128
8 600632010052 128
9 601081010041 128
10 601081030011 128
11 601181020021 128
12 601201010011 128
13 601381010011 128
14 601381040021 128
15 601461010051 128
16 601481020051 128
17 601661020061 128
18 601711020011 128
19 601811020021 128
20 601921030011 128
21 601941020061 128
22 601941040011 128
23 602201010031 128
24 602201040011 128
25 602221020071 128
26 602321020011 128
27 602421030021 128
28 602581020032 128
29 602701010031 128
30 602851030061 128
31 602851030101 128
32 603031010021 128
33 603101010161 128
34 603121010061 128
35 603151010041 128
36 603431030011 128
37 603811010141 128
38 603881010061 128
39 603981010031 128
40 604081040011 128
41 604261020051 128
42 604301010041 128
43 604301020011 128
44 604321010041 128
45 604321020011 128
46 604321040011 128
47 604331010031 128
48 604361010041 128
49 604421010031 128
50 604661020051 128


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

CONDIDX EVNTIDX EVENTYPE
600011010231 600011012191 8 PMED
600011020121 600011020521 1 MVIS
600011020121 600011020811 8 PMED
600211010061 600211010191 1 MVIS
600211010061 600211010211 3 EROM
600211010061 600211010311 8 PMED
600211010061 600211010331 1 MVIS
600211010061 600211010341 1 MVIS
600211010061 600211010351 1 MVIS
600211010061 600211010461 8 PMED
600211010061 600211010471 8 PMED
600211010061 600211010481 8 PMED
600211010061 600211010491 8 PMED
600211010061 600211010501 8 PMED
600211010061 600211010511 8 PMED
600211010061 600211010521 1 MVIS
600211010061 600211010601 8 PMED
600211010061 600211010611 8 PMED
600211010061 600211010621 8 PMED
600211010061 600211010631 8 PMED
600331010131 600331010631 8 PMED
600341010031 600341010421 8 PMED
600341010031 600341010561 1 MVIS
600341010031 600341010571 1 MVIS
600341010031 600341010581 1 MVIS
600341010031 600341010591 1 MVIS
600341010031 600341010601 1 MVIS
600341010031 600341010621 1 MVIS
600341010031 600341010631 1 MVIS
600341010031 600341010641 1 MVIS
600341010031 600341010671 8 PMED
600561060021 600561060101 1 MVIS
600561060021 600561060111 1 MVIS
600561060021 600561060121 1 MVIS
600561060021 600561060131 8 PMED
600632010052 600632010012 3 EROM
601201010011 601201010081 8 PMED
601201010011 601201010091 8 PMED
601201010011 601201010111 1 MVIS
601201010011 601201010121 1 MVIS
601201010011 601201010131 1 MVIS
601201010011 601201010251 1 MVIS
601201010011 601201010261 1 MVIS
601201010011 601201010271 1 MVIS
601201010011 601201010281 1 MVIS
601201010011 601201010351 8 PMED
601381010011 601381010091 2 OPAT
601381010011 601381010101 8 PMED
601381010011 601381010111 8 PMED
601381040021 601381040051 8 PMED
601481020051 601481020461 8 PMED
601481020051 601481020591 1 MVIS
601481020051 601481020601 8 PMED
601661020061 601661020381 8 PMED
601661020061 601661020391 8 PMED
601811020021 601811020491 8 PMED
601941020061 601941020461 8 PMED
601941020061 601941020471 8 PMED
601941020061 601941020821 8 PMED
601941020061 601941020831 8 PMED
601941020061 601941021181 8 PMED
601941020061 601941021191 8 PMED
601941040011 601941040201 8 PMED
602221020071 602221020192 1 MVIS
602421030021 602421030031 3 EROM
602421030021 602421030041 4 STAZ
602421030021 602421030051 8 PMED
602581020032 602581021412 8 PMED
602851030061 602851030281 8 PMED
602851030061 602851030301 8 PMED
602851030101 602851030311 1 MVIS
602851030101 602851030321 1 MVIS
602851030101 602851030351 1 MVIS
602851030101 602851030441 8 PMED
602851030101 602851030451 8 PMED


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

Obs CONDIDX EVNTIDX EVENTYPE
1 600011010231 600011012191 8 PMED
2 600011020121 600011020521 1 MVIS
3 600011020121 600011020811 8 PMED
4 600211010061 600211010191 1 MVIS
5 600211010061 600211010211 3 EROM
6 600211010061 600211010311 8 PMED
7 600211010061 600211010331 1 MVIS
8 600211010061 600211010341 1 MVIS
9 600211010061 600211010351 1 MVIS
10 600211010061 600211010461 8 PMED
11 600211010061 600211010471 8 PMED
12 600211010061 600211010481 8 PMED
13 600211010061 600211010491 8 PMED
14 600211010061 600211010501 8 PMED
15 600211010061 600211010511 8 PMED
16 600211010061 600211010521 1 MVIS
17 600211010061 600211010601 8 PMED
18 600211010061 600211010611 8 PMED
19 600211010061 600211010621 8 PMED
20 600211010061 600211010631 8 PMED
21 600331010131 600331010631 8 PMED
22 600341010031 600341010421 8 PMED
23 600341010031 600341010561 1 MVIS
24 600341010031 600341010571 1 MVIS
25 600341010031 600341010581 1 MVIS
26 600341010031 600341010591 1 MVIS
27 600341010031 600341010601 1 MVIS
28 600341010031 600341010621 1 MVIS
29 600341010031 600341010631 1 MVIS
30 600341010031 600341010641 1 MVIS
31 600341010031 600341010671 8 PMED
32 600561060021 600561060101 1 MVIS
33 600561060021 600561060111 1 MVIS
34 600561060021 600561060121 1 MVIS
35 600561060021 600561060131 8 PMED
36 600632010052 600632010012 3 EROM
37 601201010011 601201010081 8 PMED
38 601201010011 601201010091 8 PMED
39 601201010011 601201010111 1 MVIS
40 601201010011 601201010121 1 MVIS
41 601201010011 601201010131 1 MVIS
42 601201010011 601201010251 1 MVIS
43 601201010011 601201010261 1 MVIS
44 601201010011 601201010271 1 MVIS
45 601201010011 601201010281 1 MVIS
46 601201010011 601201010351 8 PMED
47 601381010011 601381010091 2 OPAT
48 601381010011 601381010101 8 PMED
49 601381010011 601381010111 8 PMED
50 601381040021 601381040051 8 PMED


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

Obs EVNTIDX EVENTYPE
1 600011012191 8 PMED
2 600011020521 1 MVIS
3 600011020811 8 PMED
4 600211010191 1 MVIS
5 600211010211 3 EROM
6 600211010311 8 PMED
7 600211010331 1 MVIS
8 600211010341 1 MVIS
9 600211010351 1 MVIS
10 600211010461 8 PMED
11 600211010471 8 PMED
12 600211010481 8 PMED
13 600211010491 8 PMED
14 600211010501 8 PMED
15 600211010511 8 PMED
16 600211010521 1 MVIS
17 600211010601 8 PMED
18 600211010611 8 PMED
19 600211010621 8 PMED
20 600211010631 8 PMED
21 600331010631 8 PMED
22 600341010421 8 PMED
23 600341010561 1 MVIS
24 600341010571 1 MVIS
25 600341010581 1 MVIS
26 600341010591 1 MVIS
27 600341010601 1 MVIS
28 600341010621 1 MVIS
29 600341010631 1 MVIS
30 600341010641 1 MVIS
31 600341010671 8 PMED
32 600561060101 1 MVIS
33 600561060111 1 MVIS
34 600561060121 1 MVIS
35 600561060131 8 PMED
36 600632010012 3 EROM
37 601201010081 8 PMED
38 601201010091 8 PMED
39 601201010111 1 MVIS
40 601201010121 1 MVIS
41 601201010131 1 MVIS
42 601201010251 1 MVIS
43 601201010261 1 MVIS
44 601201010271 1 MVIS
45 601201010281 1 MVIS
46 601201010351 8 PMED
47 601381010091 2 OPAT
48 601381010101 8 PMED
49 601381010111 8 PMED
50 601381040051 8 PMED


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

Obs EVNTIDX EVENTYPE
1 600011020521 1 MVIS
2 600211010191 1 MVIS
3 600211010331 1 MVIS
4 600211010341 1 MVIS
5 600211010351 1 MVIS
6 600211010521 1 MVIS
7 600341010561 1 MVIS
8 600341010571 1 MVIS
9 600341010581 1 MVIS
10 600341010591 1 MVIS
11 600341010601 1 MVIS
12 600341010621 1 MVIS
13 600341010631 1 MVIS
14 600341010641 1 MVIS
15 600561060101 1 MVIS
16 600561060111 1 MVIS
17 600561060121 1 MVIS
18 601201010111 1 MVIS
19 601201010121 1 MVIS
20 601201010131 1 MVIS
21 601201010251 1 MVIS
22 601201010261 1 MVIS
23 601201010271 1 MVIS
24 601201010281 1 MVIS
25 601481020591 1 MVIS
26 602221020192 1 MVIS
27 602851030311 1 MVIS
28 602851030321 1 MVIS
29 602851030351 1 MVIS
30 603811010661 1 MVIS
31 603811010981 1 MVIS
32 603881010701 1 MVIS
33 603881010861 1 MVIS
34 603881010891 1 MVIS
35 604301020981 1 MVIS
36 604301020991 1 MVIS
37 604301021001 1 MVIS
38 604301021011 1 MVIS
39 604301021021 1 MVIS
40 604301021071 1 MVIS
41 604301021081 1 MVIS
42 604301021091 1 MVIS
43 604301021101 1 MVIS
44 604301021121 1 MVIS
45 604301021131 1 MVIS
46 604301021421 1 MVIS
47 604301021431 1 MVIS
48 604301021441 1 MVIS
49 604301021451 1 MVIS
50 604301021521 1 MVIS


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

EVNTIDX LINKIDX EVENTYPE
600011020441 600011020551 1 MVIS
600011020521 600011020561 1 MVIS
600011020521 600011020571 1 MVIS
600011020521 600011020581 1 MVIS
600011020521 600011020591 1 MVIS
600011020521 600011020601 1 MVIS
600011020521 600011020611 1 MVIS
600011020521 600011020621 1 MVIS
600011020521 600011020631 1 MVIS
600011020521 600011020641 1 MVIS
600011020521 600011020651 1 MVIS
600011020521 600011020661 1 MVIS
600011020521 600011020671 1 MVIS
600011020521 600011020681 1 MVIS
600021030411 600021030551 3 EROM
600101060051 600101060101 4 STAZ
600111010151 600111010161 1 MVIS
600111020081 600111020391 1 MVIS
600111030101 600111030111 1 MVIS
600111040081 600111040091 3 EROM
600111040081 600111040101 3 EROM
600131010471 600131010491 1 MVIS
600131010481 600131010491 1 MVIS
600131010551 600131010571 1 MVIS
600131030021 600131030031 5 DVIS
600151010181 600151010211 1 MVIS
600151010181 600151010221 1 MVIS
600151010181 600151010231 1 MVIS
600151010531 600151010561 1 MVIS
600151010531 600151010571 1 MVIS
600151010531 600151010581 1 MVIS
600191050031 600191050041 1 MVIS
600201010031 600201010071 4 STAZ
600201010041 600201010081 1 MVIS
600201020041 600201020051 1 MVIS
600211010321 600211010391 1 MVIS
600211010321 600211010401 1 MVIS
600211010321 600211010411 1 MVIS
600211010321 600211010421 1 MVIS
600211010321 600211010431 1 MVIS
600211010321 600211010441 1 MVIS
600211010321 600211010451 1 MVIS
600211010321 600211010461 1 MVIS
600211010321 600211010471 1 MVIS
600211010321 600211010481 1 MVIS
600211010331 600211010491 1 MVIS
600211010331 600211010501 1 MVIS
600211010331 600211010511 1 MVIS
600211010531 600211010541 1 MVIS
600221010111 600221010161 1 MVIS
600301010411 600301010441 1 MVIS
600301010581 600301010681 1 MVIS
600301010581 600301010691 1 MVIS
600301010611 600301010701 1 MVIS
600301010651 600301010711 1 MVIS
600301010651 600301010721 1 MVIS
600301010651 600301010731 1 MVIS
600311010011 600311010021 1 MVIS
600331010461 600331010601 1 MVIS
600331010531 600331010631 1 MVIS
600331010711 600331010931 1 MVIS
600331010731 600331010941 1 MVIS
600331010961 600331011091 2 OPAT
600331011061 600331011101 1 MVIS
600331020231 600331020251 1 MVIS
600331020231 600331020261 1 MVIS
600331020311 600331020331 1 MVIS
600331020381 600331020431 1 MVIS
600341010451 600341010471 1 MVIS
600341010451 600341010481 1 MVIS
600341010451 600341010491 1 MVIS
600341010451 600341010501 1 MVIS
600341010641 600341010671 1 MVIS
600351010601 600351010691 1 MVIS
600351010671 600351010701 1 MVIS
600361010361 600361010461 1 MVIS
600361010361 600361010471 1 MVIS
600361010411 600361010481 5 DVIS
600361010521 600361010601 1 MVIS
600381020091 600381020161 1 MVIS
600381020171 600381020221 1 MVIS
600431010131 600431010151 1 MVIS
600431010131 600431010171 1 MVIS
600431010131 600431010181 1 MVIS
600451010101 600451010111 1 MVIS
600451010131 600451010141 1 MVIS
600451010131 600451010151 1 MVIS
600451010131 600451010161 1 MVIS
600451010131 600451010171 1 MVIS
600451010181 600451010201 1 MVIS
600451010181 600451010211 1 MVIS
600451010181 600451010221 1 MVIS
600451010181 600451010231 1 MVIS
600451010181 600451010241 1 MVIS
600461020291 600461020321 1 MVIS
600461020291 600461020331 1 MVIS
600461020291 600461020341 1 MVIS
600461020311 600461020351 1 MVIS
600461020311 600461020361 1 MVIS
600471010301 600471010371 1 MVIS
600471010301 600471010381 1 MVIS
600471010611 600471010341 1 MVIS
600471010611 600471010351 1 MVIS
600471010611 600471010361 1 MVIS
600471010611 600471010601 1 MVIS
600471010631 600471010721 1 MVIS
600471010631 600471010731 1 MVIS
600471010631 600471010741 1 MVIS
600471010631 600471010751 1 MVIS
600471010631 600471010761 1 MVIS
600471010631 600471010771 1 MVIS
600471010631 600471010781 1 MVIS
600471010631 600471010791 1 MVIS
600471010681 600471010721 1 MVIS
600471010681 600471010731 1 MVIS
600471010681 600471010741 1 MVIS
600471010801 600471010841 1 MVIS
600471010801 600471010851 1 MVIS
600471010801 600471010861 1 MVIS
600471010801 600471010871 1 MVIS
600471010801 600471010881 1 MVIS
600471010811 600471010841 1 MVIS
600471010811 600471010851 1 MVIS
600471010811 600471010861 1 MVIS
600471010811 600471010871 1 MVIS
600471010811 600471010881 1 MVIS
600491010471 600491010721 5 DVIS
600501010031 600501010041 3 EROM
600501020011 600501020021 3 EROM
600511030201 600511030221 1 MVIS
600521010091 600521010101 1 MVIS
600521010091 600521010111 1 MVIS
600541010111 600541010151 3 EROM
600541010111 600541010161 3 EROM
600541010111 600541010171 3 EROM
600541020111 600541020131 3 EROM
600561060081 600561060131 4 STAZ
600601020291 600601020351 1 MVIS
600601020311 600601020361 1 MVIS
600601020321 600601020371 3 EROM


HC-178I
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
600011020521 600011020561 1 MVIS
600011020521 600011020571 1 MVIS
600011020521 600011020581 1 MVIS
600011020521 600011020591 1 MVIS
600011020521 600011020601 1 MVIS
600011020521 600011020611 1 MVIS
600011020521 600011020621 1 MVIS
600011020521 600011020631 1 MVIS
600011020521 600011020641 1 MVIS
600011020521 600011020651 1 MVIS
600011020521 600011020661 1 MVIS
600011020521 600011020671 1 MVIS
600011020521 600011020681 1 MVIS
600211010331 600211010491 1 MVIS
600211010331 600211010501 1 MVIS
600211010331 600211010511 1 MVIS
600341010641 600341010671 1 MVIS
601201010111 601201010211 1 MVIS
602851030351 602851030431 1 MVIS
602851030351 602851030441 1 MVIS
602851030351 602851030451 1 MVIS
602851030351 602851030461 1 MVIS
603811010661 603811010941 1 MVIS
603811010661 603811010951 1 MVIS
603811010661 603811010961 1 MVIS
603811010661 603811010971 1 MVIS
603881010861 603881011311 1 MVIS
603881010861 603881011321 1 MVIS
603881010861 603881011331 1 MVIS
603881010861 603881011341 1 MVIS
603881010861 603881011351 1 MVIS
603881010861 603881011361 1 MVIS
604301020981 604301021311 1 MVIS
604301020981 604301021321 1 MVIS
604301020981 604301021331 1 MVIS
604301021071 604301021321 1 MVIS
604301021421 604301021551 1 MVIS
604301021421 604301021561 1 MVIS
604421010381 604421010391 1 MVIS
604421010381 604421010401 1 MVIS
604421010381 604421010411 1 MVIS
604421010381 604421010421 1 MVIS
604421010381 604421010431 1 MVIS
604421010381 604421010441 1 MVIS
604421010381 604421010451 1 MVIS
604421010381 604421010461 1 MVIS
604421010381 604421010471 1 MVIS
604841010111 604841010171 1 MVIS
605351010731 605351010781 1 MVIS
605351010731 605351010791 1 MVIS


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

Obs EVNTIDX LINKIDX EVENTYPE
1 600011020521 600011020561 1 MVIS
2 600011020521 600011020571 1 MVIS
3 600011020521 600011020581 1 MVIS
4 600011020521 600011020591 1 MVIS
5 600011020521 600011020601 1 MVIS
6 600011020521 600011020611 1 MVIS
7 600011020521 600011020621 1 MVIS
8 600011020521 600011020631 1 MVIS
9 600011020521 600011020641 1 MVIS
10 600011020521 600011020651 1 MVIS
11 600011020521 600011020661 1 MVIS
12 600011020521 600011020671 1 MVIS
13 600011020521 600011020681 1 MVIS
14 600211010331 600211010491 1 MVIS
15 600211010331 600211010501 1 MVIS
16 600211010331 600211010511 1 MVIS
17 600341010641 600341010671 1 MVIS
18 601201010111 601201010211 1 MVIS
19 602851030351 602851030431 1 MVIS
20 602851030351 602851030441 1 MVIS
21 602851030351 602851030451 1 MVIS
22 602851030351 602851030461 1 MVIS
23 603811010661 603811010941 1 MVIS
24 603811010661 603811010951 1 MVIS
25 603811010661 603811010961 1 MVIS
26 603811010661 603811010971 1 MVIS
27 603881010861 603881011311 1 MVIS
28 603881010861 603881011321 1 MVIS
29 603881010861 603881011331 1 MVIS
30 603881010861 603881011341 1 MVIS
31 603881010861 603881011351 1 MVIS
32 603881010861 603881011361 1 MVIS
33 604301020981 604301021311 1 MVIS
34 604301020981 604301021321 1 MVIS
35 604301021071 604301021321 1 MVIS
36 604301020981 604301021331 1 MVIS
37 604301021421 604301021551 1 MVIS
38 604301021421 604301021561 1 MVIS
39 604421010381 604421010391 1 MVIS
40 604421010381 604421010401 1 MVIS
41 604421010381 604421010411 1 MVIS
42 604421010381 604421010421 1 MVIS
43 604421010381 604421010431 1 MVIS
44 604421010381 604421010441 1 MVIS
45 604421010381 604421010451 1 MVIS
46 604421010381 604421010461 1 MVIS
47 604421010381 604421010471 1 MVIS
48 604841010111 604841010171 1 MVIS
49 605351010731 605351010781 1 MVIS
50 605351010731 605351010791 1 MVIS


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

Obs LINKIDX
1 600011020561
2 600011020571
3 600011020581
4 600011020591
5 600011020601
6 600011020611
7 600011020621
8 600011020631
9 600011020641
10 600011020651
11 600011020661
12 600011020671
13 600011020681
14 600211010491
15 600211010501
16 600211010511
17 600341010671
18 601201010211
19 602851030431
20 602851030441
21 602851030451
22 602851030461
23 603811010941
24 603811010951
25 603811010961
26 603811010971
27 603881011311
28 603881011321
29 603881011331
30 603881011341
31 603881011351
32 603881011361
33 604301021311
34 604301021321
35 604301021331
36 604301021551
37 604301021561
38 604421010391
39 604421010401
40 604421010411
41 604421010421
42 604421010431
43 604421010441
44 604421010451
45 604421010461
46 604421010471
47 604841010171
48 605351010781
49 605351010791
50 605351010801


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

LINKIDX RXRECIDX RXNAME RXXP15X PERWT15F
600011020561 600011020561001 LISINOPRIL 2.53 18169.604822
600011020561 600011020561002 LISINOPRIL 2.53 18169.604822
600011020561 600011020561003 LISINOPRIL 2.53 18169.604822
600011020561 600011020561004 LISINOPRIL 2.53 18169.604822
600011020561 600011020561005 LISINOPRIL 2.53 18169.604822
600011020561 600011020561006 LISINOPRIL 2.53 18169.604822
600011020561 600011020561007 LISINOPRIL 2.53 18169.604822
600011020571 600011020571001 OMEPRAZOLE 89.99 18169.604822
600011020571 600011020571002 OMEPRAZOLE 89.99 18169.604822
600011020571 600011020571003 OMEPRAZOLE 8.77 18169.604822
600011020571 600011020571004 OMEPRAZOLE 8.77 18169.604822
600011020571 600011020571005 OMEPRAZOLE 7.54 18169.604822
600011020571 600011020571006 OMEPRAZOLE 8.77 18169.604822
600011020571 600011020571007 OMEPRAZOLE 89.99 18169.604822
600011020581 600011020581001 METFORMIN 4.96 18169.604822
600011020581 600011020581002 METFORMIN 4.96 18169.604822
600011020581 600011020581003 METFORMIN 4.96 18169.604822
600011020581 600011020581004 METFORMIN 4.96 18169.604822
600011020581 600011020581005 METFORMIN 4.96 18169.604822
600011020581 600011020581006 METFORMIN 4.96 18169.604822
600011020581 600011020581007 METFORMIN 2.53 18169.604822
600011020591 600011020591001 FUROSEMIDE 6.50 18169.604822
600011020591 600011020591002 FUROSEMIDE 6.50 18169.604822
600011020591 600011020591003 FUROSEMIDE 4.10 18169.604822
600011020591 600011020591004 FUROSEMIDE 3.50 18169.604822
600011020591 600011020591005 FUROSEMIDE 3.50 18169.604822
600011020591 600011020591006 FUROSEMIDE 3.50 18169.604822
600011020591 600011020591007 FUROSEMIDE 3.50 18169.604822
600011020601 600011020601001 QUETIAPINE 10.00 18169.604822
600011020601 600011020601002 QUETIAPINE 10.00 18169.604822
600011020601 600011020601003 QUETIAPINE 10.00 18169.604822
600011020601 600011020601004 QUETIAPINE 10.00 18169.604822
600011020601 600011020601005 QUETIAPINE 10.00 18169.604822
600011020601 600011020601006 QUETIAPINE 10.00 18169.604822
600011020601 600011020601007 QUETIAPINE 10.00 18169.604822
600011020611 600011020611001 METOPROL TAR 3.33 18169.604822
600011020611 600011020611002 METOPROL TAR 1.46 18169.604822
600011020611 600011020611003 METOPROL TAR 3.33 18169.604822
600011020611 600011020611004 METOPROL TAR 3.33 18169.604822
600011020611 600011020611005 METOPROL TAR 3.33 18169.604822
600011020611 600011020611006 METOPROL TAR 3.33 18169.604822
600011020611 600011020611007 METOPROL TAR 3.33 18169.604822
600011020621 600011020621001 SERTRALINE 52.49 18169.604822
600011020621 600011020621002 SERTRALINE 9.83 18169.604822
600011020621 600011020621003 SERTRALINE 9.83 18169.604822
600011020621 600011020621004 SERTRALINE 64.49 18169.604822
600011020621 600011020621005 SERTRALINE 52.49 18169.604822
600011020621 600011020621006 SERTRALINE 52.49 18169.604822
600011020621 600011020621007 SERTRALINE 104.98 18169.604822
600011020631 600011020631001 HYDROXYZ HCL 20.70 18169.604822
600011020631 600011020631002 HYDROXYZ HCL 20.70 18169.604822
600011020631 600011020631003 HYDROXYZ HCL 20.70 18169.604822
600011020631 600011020631004 HYDROXYZ HCL 20.70 18169.604822
600011020631 600011020631005 HYDROXYZ HCL 20.70 18169.604822
600011020631 600011020631006 HYDROXYZ HCL 74.99 18169.604822
600011020631 600011020631007 HYDROXYZ HCL 74.99 18169.604822
600011020641 600011020641001 TRAZODONE 5.43 18169.604822
600011020641 600011020641002 TRAZODONE 5.43 18169.604822
600011020641 600011020641003 TRAZODONE 6.17 18169.604822
600011020641 600011020641004 TRAZODONE 9.42 18169.604822
600011020641 600011020641005 TRAZODONE 6.17 18169.604822
600011020641 600011020641006 TRAZODONE 5.43 18169.604822
600011020641 600011020641007 TRAZODONE 5.43 18169.604822
600011020651 600011020651001 SIMVASTATIN 7.17 18169.604822
600011020651 600011020651002 SIMVASTATIN 7.17 18169.604822
600011020651 600011020651003 SIMVASTATIN 7.17 18169.604822
600011020651 600011020651004 SIMVASTATIN 4.27 18169.604822
600011020651 600011020651005 SIMVASTATIN 4.27 18169.604822
600011020651 600011020651006 SIMVASTATIN 7.17 18169.604822
600011020651 600011020651007 SIMVASTATIN 7.17 18169.604822
600011020661 600011020661001 PROAIR HFA 48.56 18169.604822
600011020661 600011020661002 PROAIR HFA 48.56 18169.604822
600011020661 600011020661003 PROAIR HFA 48.56 18169.604822
600011020661 600011020661004 PROAIR HFA 48.56 18169.604822
600011020661 600011020661005 PROAIR HFA 48.56 18169.604822
600011020661 600011020661006 PROAIR HFA 48.56 18169.604822
600011020661 600011020661007 PROAIR HFA 48.56 18169.604822
600011020671 600011020671001 FLOVENT HFA 303.18 18169.604822
600011020671 600011020671002 FLOVENT HFA 303.18 18169.604822
600011020671 600011020671003 FLOVENT HFA 315.28 18169.604822
600011020671 600011020671004 FLOVENT HFA 315.28 18169.604822
600011020671 600011020671005 FLOVENT HFA 303.18 18169.604822
600011020671 600011020671006 FLOVENT HFA 303.18 18169.604822
600011020671 600011020671007 FLOVENT HFA 303.18 18169.604822
600011020681 600011020681001 METOPROL TAR 7.73 18169.604822
600011020681 600011020681002 METOPROL TAR 7.73 18169.604822
600011020681 600011020681003 METOPROL TAR 7.73 18169.604822
600011020681 600011020681004 METOPROL TAR 7.73 18169.604822
600011020681 600011020681005 METOPROL TAR 7.73 18169.604822
600011020681 600011020681006 METOPROL TAR 7.73 18169.604822
600011020681 600011020681007 METOPROL TAR 7.73 18169.604822
600211010491 600211010491001 BUDESONIDE 361.56 28438.732334
600211010491 600211010491002 BUDESONIDE 361.56 28438.732334
600211010491 600211010491003 BUDESONIDE 339.24 28438.732334
600211010491 600211010491004 BUDESONIDE 339.24 28438.732334
600211010491 600211010491005 BUDESONIDE 339.24 28438.732334
600211010491 600211010491006 BUDESONIDE 350.46 28438.732334
600211010501 600211010501001 BUDESONIDE 361.56 28438.732334
600211010511 600211010511001 PERFOROMIST 474.56 28438.732334
600211010511 600211010511002 PERFOROMIST 474.56 28438.732334
600211010511 600211010511003 PERFOROMIST 500.48 28438.732334
600211010511 600211010511004 PERFOROMIST 500.48 28438.732334
600211010511 600211010511005 PERFOROMIST 500.48 28438.732334
600211010511 600211010511006 PERFOROMIST 524.04 28438.732334
600341010671 600341010671001 SYMBICORT 40.00 11855.691664
601201010211 601201010211001 NAPROXEN 4.59 9079.736909
602851030431 602851030431001 RANITIDINE 2.84 23855.163106
602851030431 602851030431002 RANITIDINE 2.50 23855.163106
602851030431 602851030431003 RANITIDINE 2.50 23855.163106
602851030431 602851030431004 RANITIDINE 2.50 23855.163106
602851030441 602851030441001 ALBUTEROL 56.78 23855.163106
602851030441 602851030441002 ALBUTEROL 56.78 23855.163106
602851030451 602851030451001 BUDESONIDE 466.32 23855.163106
602851030451 602851030451002 BUDESONIDE 466.72 23855.163106
602851030451 602851030451003 BUDESONIDE 466.72 23855.163106
602851030461 602851030461001 VENTOLIN HFA 47.86 23855.163106
603811010941 603811010941001 FLUTICASONE 39.74 7749.464929
603811010941 603811010941002 FLUTICASONE 14.25 7749.464929
603811010941 603811010941003 FLUTICASONE 14.25 7749.464929
603811010951 603811010951001 MONTELUKAST 64.51 7749.464929
603811010951 603811010951002 MONTELUKAST 64.51 7749.464929
603811010951 603811010951003 MONTELUKAST 64.51 7749.464929
603811010951 603811010951004 MONTELUKAST 64.51 7749.464929
603811010951 603811010951005 MONTELUKAST 64.51 7749.464929
603811010961 603811010961001 ADVAIR HFA 630.15 7749.464929
603811010971 603811010971001 LEVOCETIRIZI 16.50 7749.464929
603811010971 603811010971002 LEVOCETIRIZI 16.50 7749.464929
603811010971 603811010971003 LEVOCETIRIZI 32.70 7749.464929
603881011311 603881011311001 LISINOPRIL 1.76 23353.084117
603881011311 603881011311002 LISINOPRIL 1.76 23353.084117
603881011321 603881011321001 ATORVASTATIN 90.00 23353.084117
603881011321 603881011321002 ATORVASTATIN 90.00 23353.084117
603881011331 603881011331001 ADVAIR DISKU 306.21 23353.084117
603881011331 603881011331002 ADVAIR DISKU 306.21 23353.084117
603881011341 603881011341001 ESCITALOPRAM 50.19 23353.084117
603881011341 603881011341002 ESCITALOPRAM 17.00 23353.084117
603881011351 603881011351001 CELECOXIB 69.77 23353.084117
603881011351 603881011351002 CELECOXIB 68.10 23353.084117
603881011361 603881011361001 ALBUTEROL 15.36 23353.084117
603881011361 603881011361002 ALBUTEROL 15.36 23353.084117
604301021311 604301021311001 Q-PAP 5.99 2800.728053
604301021321 604301021321001 PROVENTIL 64.27 2800.728053
604301021321 604301021321002 PROVENTIL 64.27 2800.728053
604301021321 604301021321003 PROVENTIL 64.27 2800.728053
604301021321 604301021321004 PROVENTIL 69.72 2800.728053
604301021321 604301021321005 PROVENTIL 69.72 2800.728053
604301021321 604301021321006 PROVENTIL 67.15 2800.728053
604301021321 604301021321007 PROVENTIL 67.15 2800.728053
604301021321 604301021321008 PROVENTIL 67.15 2800.728053
604301021331 604301021331001 PREDNISONE 12.78 2800.728053
604301021331 604301021331002 PREDNISONE 12.78 2800.728053
604301021551 604301021551001 PROVENTIL 64.27 2800.728053
604301021551 604301021551002 PROVENTIL 64.27 2800.728053
604301021551 604301021551003 PROVENTIL 64.27 2800.728053
604301021551 604301021551004 PROVENTIL 69.72 2800.728053
604301021551 604301021551005 PROVENTIL 69.72 2800.728053
604301021551 604301021551006 PROVENTIL 67.15 2800.728053
604301021551 604301021551007 PROVENTIL 67.15 2800.728053
604301021561 604301021561001 VIOS 55.96 2800.728053
604421010391 604421010391001 MELOXICAM 3.25 5481.874652
604421010401 604421010401001 LISINOP/HCTZ 4.96 5481.874652
604421010411 604421010411001 ATENOLOL 2.03 5481.874652
604421010421 604421010421001 AMLODIPINE 2.47 5481.874652
604421010431 604421010431001 CYCLOBENZAPR 9.12 5481.874652
604421010441 604421010441001 AMOX/K CLAV 11.10 5481.874652
604421010451 604421010451001 ESTRADIOL 3.08 5481.874652
604421010461 604421010461001 GABAPENTIN 9.22 5481.874652
604421010461 604421010461002 GABAPENTIN 9.22 5481.874652
604421010471 604421010471001 CHANTIX 257.91 5481.874652
604841010171 604841010171001 HYDROCHLOROT 2.14 2009.933562
604841010171 604841010171002 HYDROCHLOROT 4.92 2009.933562
605351010781 605351010781001 FAMOTIDINE 10.54 2895.679365
605351010781 605351010781002 FAMOTIDINE 3.79 2895.679365
605351010781 605351010781003 FAMOTIDINE 10.54 2895.679365
605351010781 605351010781004 FAMOTIDINE 8.52 2895.679365
605351010781 605351010781005 FAMOTIDINE 8.52 2895.679365
605351010791 605351010791001 AMITRIPTYLIN 8.42 2895.679365
605351010791 605351010791002 AMITRIPTYLIN 8.42 2895.679365
605351010791 605351010791003 AMITRIPTYLIN 8.42 2895.679365
605351010791 605351010791004 AMITRIPTYLIN 8.42 2895.679365
605351010791 605351010791005 AMITRIPTYLIN 8.42 2895.679365
605351010801 605351010801001 MORPHINE SUL 79.92 2895.679365
605351010801 605351010801002 MORPHINE SUL 82.53 2895.679365
605351010801 605351010801003 MORPHINE SUL 82.53 2895.679365
605351010801 605351010801004 MORPHINE SUL 74.66 2895.679365
605351010801 605351010801005 MORPHINE SUL 74.66 2895.679365
605351010811 605351010811001 VITAMIN D 1.05 2895.679365
605351010811 605351010811002 VITAMIN D 1.05 2895.679365
605351010811 605351010811003 VITAMIN D 1.05 2895.679365
605351010811 605351010811004 VITAMIN D 1.05 2895.679365
605351010811 605351010811005 VITAMIN D 1.05 2895.679365
605351010821 605351010821001 METOPROL TAR 2.49 2895.679365
605351010821 605351010821002 METOPROL TAR 2.49 2895.679365
605351010821 605351010821003 METOPROL TAR 2.49 2895.679365
605351010821 605351010821004 METOPROL TAR 2.49 2895.679365
605351010821 605351010821005 METOPROL TAR 2.49 2895.679365
605351010831 605351010831001 DIPHENHYDRAM 9.50 2895.679365
605351010831 605351010831002 DIPHENHYDRAM 9.50 2895.679365
605351010831 605351010831003 DIPHENHYDRAM 9.50 2895.679365
605351010831 605351010831004 DIPHENHYDRAM 9.50 2895.679365


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

Analysis Variable: RXXP15X SUM OF PAYMENTS RXSF15X-RXOU15X (IMPUTED)

N Sum
5623 527554.76


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

Weighted

Analysis Variable: RXXP15X SUM OF PAYMENTS RXSF15X-RXOU15X (IMPUTED)

N Sum
5623 4943941818

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

16
17 * Calculate the expenditures for prescribed medicines associated with asthma.
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 RUN;

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

30

31
32 * Get condition records coded as asthma.
33

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

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

38

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

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

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


43
44 proc print data=asconds (obs=50);
45 title3 "sample print of work.asconds - sorted by condidx";
46 title4 "COND (H180) records where cccodex=128";
47 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.04 seconds


48
49 PROC SORT DATA=IN.H178IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 377736 observations read from the data set IN.H178IF1.
NOTE: SAS threaded sort was used.


NOTE: The data set WORK.CLNK has 377736 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.52 percent.
Compressed is 440 pages; un-compressed would require 417 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.86 seconds
cpu time 0.32 seconds


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

NOTE: There were 377736 observations read from the data set WORK.CLNK.
NOTE: There were 2422 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7037 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.10 seconds

57
58 proc report data=asclnks (obs=75) nowd headskip;
59 define condidx /'CONDIDX' order;
60 define EVNTIDX /'EVNTIDX';
61 define EVENTYPE /'EVENTYPE';
62 break after condidx / skip;
63 format eventype eventype.;
64 title3 "sample print of work.asclnks - sorted by condidx";
65 title4 "events linked to asthma condition records";
66 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.02 seconds
cpu time 0.01 seconds


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

NOTE: There were 7037 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 7037 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.01 seconds

69
70 proc print data=asclnks (obs=50);
71 format eventype eventype.;
72 title3 "sample print of work.asclnks - sorted by evntidx";
73 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.00 seconds
cpu time 0.00 seconds


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

NOTE: There were 7037 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7026 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

80
81 proc print data=asclnks (obs=50);
82 format eventype eventype.;
83 title3 "sample print of unique evntidxs from work.asclnks";
84 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.01 seconds

85

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

89 PROC SORT DATA=IN.H178A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 330453 observations read from the data set IN.H178A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 330453 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 20.31 percent.
Compressed is 710 pages; un-compressed would require 891 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 3.14 seconds
cpu time 0.57 seconds

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

NOTE: There were 330453 observations read from the data set WORK.PMED.
NOTE: There were 7026 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASPMEDS has 9719 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.13 seconds
cpu time 0.14 seconds

97
98 proc report data=aspmeds (obs=300) nowd headskip;
99 column LINKIDX RXRECIDX RXNAME RXXP15X PERWT15F;
100 define linkidx / 'LINKIDX' order;
101 define rxrecidx / 'RXRECIDX';
102 define rxname / 'RXNAME';
103 define rxxp15x / 'RXXP15X' display format=8.2;
104 define perwt15f / 'PERWT15F' /*display format=8.2*/;
105 break after linkidx / skip;
106 title3 "sample print of work.aspmeds";
107 title4 "PMED (HC-178A) records which link to condition records coded as asthma";
108 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.05 seconds
cpu time 0.04 seconds


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

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 9719 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.01 seconds
cpu time 0.00 seconds


114
115 PROC MEANS DATA=ASPMEDS N SUM;


116 VAR RXXP15X;
117 WEIGHT PERWT15F;
118 TITLE3 "Total Rx expenditures associated with asthma";
119 TITLE5 "Weighted";
120 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 9719 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.00 seconds
cpu time 0.01 seconds


121
122 ods rtf close;
123

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



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

Obs CONDIDX CCCODEX
1 600011010231 128
2 600011020121 128
3 600031030011 128
4 600211010061 128
5 600331010131 128
6 600341010031 128
7 600561060021 128
8 600632010052 128
9 601081010041 128
10 601081030011 128
11 601181020021 128
12 601201010011 128
13 601381010011 128
14 601381040021 128
15 601461010051 128
16 601481020051 128
17 601661020061 128
18 601711020011 128
19 601811020021 128
20 601921030011 128
21 601941020061 128
22 601941040011 128
23 602201010031 128
24 602201040011 128
25 602221020071 128
26 602321020011 128
27 602421030021 128
28 602581020032 128
29 602701010031 128
30 602851030061 128
31 602851030101 128
32 603031010021 128
33 603101010161 128
34 603121010061 128
35 603151010041 128
36 603431030011 128
37 603811010141 128
38 603881010061 128
39 603981010031 128
40 604081040011 128
41 604261020051 128
42 604301010041 128
43 604301020011 128
44 604321010041 128
45 604321020011 128
46 604321040011 128
47 604331010031 128
48 604361010041 128
49 604421010031 128
50 604661020051 128


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

CONDIDX EVNTIDX EVENTYPE
600011010231 600011012191 8 PMED
600011020121 600011020521 1 MVIS
600011020121 600011020811 8 PMED
600211010061 600211010191 1 MVIS
600211010061 600211010211 3 EROM
600211010061 600211010311 8 PMED
600211010061 600211010331 1 MVIS
600211010061 600211010341 1 MVIS
600211010061 600211010351 1 MVIS
600211010061 600211010461 8 PMED
600211010061 600211010471 8 PMED
600211010061 600211010481 8 PMED
600211010061 600211010491 8 PMED
600211010061 600211010501 8 PMED
600211010061 600211010511 8 PMED
600211010061 600211010521 1 MVIS
600211010061 600211010601 8 PMED
600211010061 600211010611 8 PMED
600211010061 600211010621 8 PMED
600211010061 600211010631 8 PMED
600331010131 600331010631 8 PMED
600341010031 600341010421 8 PMED
600341010031 600341010561 1 MVIS
600341010031 600341010571 1 MVIS
600341010031 600341010581 1 MVIS
600341010031 600341010591 1 MVIS
600341010031 600341010601 1 MVIS
600341010031 600341010621 1 MVIS
600341010031 600341010631 1 MVIS
600341010031 600341010641 1 MVIS
600341010031 600341010671 8 PMED
600561060021 600561060101 1 MVIS
600561060021 600561060111 1 MVIS
600561060021 600561060121 1 MVIS
600561060021 600561060131 8 PMED
600632010052 600632010012 3 EROM
601201010011 601201010081 8 PMED
601201010011 601201010091 8 PMED
601201010011 601201010111 1 MVIS
601201010011 601201010121 1 MVIS
601201010011 601201010131 1 MVIS
601201010011 601201010251 1 MVIS
601201010011 601201010261 1 MVIS
601201010011 601201010271 1 MVIS
601201010011 601201010281 1 MVIS
601201010011 601201010351 8 PMED
601381010011 601381010091 2 OPAT
601381010011 601381010101 8 PMED
601381010011 601381010111 8 PMED
601381040021 601381040051 8 PMED
601481020051 601481020461 8 PMED
601481020051 601481020591 1 MVIS
601481020051 601481020601 8 PMED
601661020061 601661020381 8 PMED
601661020061 601661020391 8 PMED
601811020021 601811020491 8 PMED
601941020061 601941020461 8 PMED
601941020061 601941020471 8 PMED
601941020061 601941020821 8 PMED
601941020061 601941020831 8 PMED
601941020061 601941021181 8 PMED
601941020061 601941021191 8 PMED
601941040011 601941040201 8 PMED
602221020071 602221020192 1 MVIS
602421030021 602421030031 3 EROM
602421030021 602421030041 4 STAZ
602421030021 602421030051 8 PMED
602581020032 602581021412 8 PMED
602851030061 602851030281 8 PMED
602851030061 602851030301 8 PMED
602851030101 602851030311 1 MVIS
602851030101 602851030321 1 MVIS
602851030101 602851030351 1 MVIS
602851030101 602851030441 8 PMED
602851030101 602851030451 8 PMED


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

Obs CONDIDX EVNTIDX EVENTYPE
1 600011010231 600011012191 8 PMED
2 600011020121 600011020521 1 MVIS
3 600011020121 600011020811 8 PMED
4 600211010061 600211010191 1 MVIS
5 600211010061 600211010211 3 EROM
6 600211010061 600211010311 8 PMED
7 600211010061 600211010331 1 MVIS
8 600211010061 600211010341 1 MVIS
9 600211010061 600211010351 1 MVIS
10 600211010061 600211010461 8 PMED
11 600211010061 600211010471 8 PMED
12 600211010061 600211010481 8 PMED
13 600211010061 600211010491 8 PMED
14 600211010061 600211010501 8 PMED
15 600211010061 600211010511 8 PMED
16 600211010061 600211010521 1 MVIS
17 600211010061 600211010601 8 PMED
18 600211010061 600211010611 8 PMED
19 600211010061 600211010621 8 PMED
20 600211010061 600211010631 8 PMED
21 600331010131 600331010631 8 PMED
22 600341010031 600341010421 8 PMED
23 600341010031 600341010561 1 MVIS
24 600341010031 600341010571 1 MVIS
25 600341010031 600341010581 1 MVIS
26 600341010031 600341010591 1 MVIS
27 600341010031 600341010601 1 MVIS
28 600341010031 600341010621 1 MVIS
29 600341010031 600341010631 1 MVIS
30 600341010031 600341010641 1 MVIS
31 600341010031 600341010671 8 PMED
32 600561060021 600561060101 1 MVIS
33 600561060021 600561060111 1 MVIS
34 600561060021 600561060121 1 MVIS
35 600561060021 600561060131 8 PMED
36 600632010052 600632010012 3 EROM
37 601201010011 601201010081 8 PMED
38 601201010011 601201010091 8 PMED
39 601201010011 601201010111 1 MVIS
40 601201010011 601201010121 1 MVIS
41 601201010011 601201010131 1 MVIS
42 601201010011 601201010251 1 MVIS
43 601201010011 601201010261 1 MVIS
44 601201010011 601201010271 1 MVIS
45 601201010011 601201010281 1 MVIS
46 601201010011 601201010351 8 PMED
47 601381010011 601381010091 2 OPAT
48 601381010011 601381010101 8 PMED
49 601381010011 601381010111 8 PMED
50 601381040021 601381040051 8 PMED


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

Obs EVNTIDX EVENTYPE
1 600011012191 8 PMED
2 600011020521 1 MVIS
3 600011020811 8 PMED
4 600211010191 1 MVIS
5 600211010211 3 EROM
6 600211010311 8 PMED
7 600211010331 1 MVIS
8 600211010341 1 MVIS
9 600211010351 1 MVIS
10 600211010461 8 PMED
11 600211010471 8 PMED
12 600211010481 8 PMED
13 600211010491 8 PMED
14 600211010501 8 PMED
15 600211010511 8 PMED
16 600211010521 1 MVIS
17 600211010601 8 PMED
18 600211010611 8 PMED
19 600211010621 8 PMED
20 600211010631 8 PMED
21 600331010631 8 PMED
22 600341010421 8 PMED
23 600341010561 1 MVIS
24 600341010571 1 MVIS
25 600341010581 1 MVIS
26 600341010591 1 MVIS
27 600341010601 1 MVIS
28 600341010621 1 MVIS
29 600341010631 1 MVIS
30 600341010641 1 MVIS
31 600341010671 8 PMED
32 600561060101 1 MVIS
33 600561060111 1 MVIS
34 600561060121 1 MVIS
35 600561060131 8 PMED
36 600632010012 3 EROM
37 601201010081 8 PMED
38 601201010091 8 PMED
39 601201010111 1 MVIS
40 601201010121 1 MVIS
41 601201010131 1 MVIS
42 601201010251 1 MVIS
43 601201010261 1 MVIS
44 601201010271 1 MVIS
45 601201010281 1 MVIS
46 601201010351 8 PMED
47 601381010091 2 OPAT
48 601381010101 8 PMED
49 601381010111 8 PMED
50 601381040051 8 PMED


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

LINKIDX RXRECIDX RXNAME RXXP15X PERWT15F
600011012191 600011012191001 COMBIVENT 1106.97 21854.981705
600011020811 600011020811001 PROAIR HFA 48.56 18169.604822
600211010311 600211010311001 SPIRIVA 299.98 28438.732334
600211010311 600211010311002 SPIRIVA 299.98 28438.732334
600211010311 600211010311003 SPIRIVA 299.98 28438.732334
600211010311 600211010311004 SPIRIVA 299.98 28438.732334
600211010461 600211010461001 SPIRIVA 317.95 28438.732334
600211010461 600211010461002 SPIRIVA 287.95 28438.732334
600211010461 600211010461003 SPIRIVA 287.95 28438.732334
600211010461 600211010461004 SPIRIVA 317.95 28438.732334
600211010461 600211010461005 SPIRIVA 317.95 28438.732334
600211010461 600211010461006 SPIRIVA 317.95 28438.732334
600211010471 600211010471001 PROAIR HFA 50.80 28438.732334
600211010471 600211010471002 PROAIR HFA 50.80 28438.732334
600211010471 600211010471003 PROAIR HFA 50.80 28438.732334
600211010471 600211010471004 PROAIR HFA 50.80 28438.732334
600211010471 600211010471005 PROAIR HFA 50.80 28438.732334
600211010471 600211010471006 PROAIR HFA 101.09 28438.732334
600211010481 600211010481001 ALBUTEROL 26.71 28438.732334
600211010481 600211010481002 ALBUTEROL 26.71 28438.732334
600211010481 600211010481003 ALBUTEROL 26.71 28438.732334
600211010481 600211010481004 ALBUTEROL 26.71 28438.732334
600211010491 600211010491001 BUDESONIDE 361.56 28438.732334
600211010491 600211010491002 BUDESONIDE 361.56 28438.732334
600211010491 600211010491003 BUDESONIDE 339.24 28438.732334
600211010491 600211010491004 BUDESONIDE 339.24 28438.732334
600211010491 600211010491005 BUDESONIDE 339.24 28438.732334
600211010491 600211010491006 BUDESONIDE 350.46 28438.732334
600211010501 600211010501001 BUDESONIDE 361.56 28438.732334
600211010511 600211010511001 PERFOROMIST 474.56 28438.732334
600211010511 600211010511002 PERFOROMIST 474.56 28438.732334
600211010511 600211010511003 PERFOROMIST 500.48 28438.732334
600211010511 600211010511004 PERFOROMIST 500.48 28438.732334
600211010511 600211010511005 PERFOROMIST 500.48 28438.732334
600211010511 600211010511006 PERFOROMIST 524.04 28438.732334
600211010601 600211010601001 SPIRIVA 317.95 28438.732334
600211010601 600211010601002 SPIRIVA 317.95 28438.732334
600211010611 600211010611001 PROAIR HFA 101.09 28438.732334
600211010611 600211010611002 PROAIR HFA 101.09 28438.732334
600211010621 600211010621001 BUDESONIDE 350.46 28438.732334
600211010621 600211010621002 BUDESONIDE 350.46 28438.732334
600211010631 600211010631001 PERFOROMIST 524.04 28438.732334
600211010631 600211010631002 PERFOROMIST 524.04 28438.732334
600331010631 600331010631001 ALBUTEROL 39.99 59588.119667
600341010421 600341010421001 MONTELUKAST 24.76 11855.691664
600341010671 600341010671001 SYMBICORT 40.00 11855.691664
600561060131 600561060131001 TIGER BALM 3.67 3693.981722
601201010081 601201010081001 METHYLPRED 6.29 9079.736909
601201010091 601201010091001 PROAIR HFA 51.80 9079.736909
601201010351 601201010351001 ARNUITY ELPT 143.08 9079.736909
601201010351 601201010351002 ARNUITY ELPT 143.08 9079.736909
601381010101 601381010101001 PREDNISONE 7.75 3861.144786
601381010111 601381010111001 PROAIR HFA 31.12 3861.144786
601381040051 601381040051001 SODIUM CHLOR 20.00 3777.122696
601481020461 601481020461001 LORAZEPAM 4.00 18789.806503
601481020461 601481020461002 LORAZEPAM 4.00 18789.806503
601481020461 601481020461003 LORAZEPAM 4.00 18789.806503
601481020461 601481020461004 LORAZEPAM 4.00 18789.806503
601481020461 601481020461005 LORAZEPAM 4.00 18789.806503
601481020461 601481020461006 LORAZEPAM 4.00 18789.806503
601481020601 601481020601001 MometasoneFuroate 124.11 18789.806503
601481020601 601481020601002 MometasoneFuroate 212.76 18789.806503
601481020601 601481020601003 MometasoneFuroate 124.11 18789.806503
601661020381 601661020381001 DULERA 489.43 5065.768222
601661020381 601661020381002 DULERA 489.43 5065.768222
601661020391 601661020391001 PROAIR HFA 51.41 5065.768222
601661020391 601661020391002 PROAIR HFA 51.41 5065.768222
601811020491 601811020491001 ALBUTEROL 17.20 12547.945563
601811020491 601811020491002 ALBUTEROL 17.20 12547.945563
601811020491 601811020491003 ALBUTEROL 14.63 12547.945563
601811020491 601811020491004 ALBUTEROL 14.63 12547.945563
601811020491 601811020491005 ALBUTEROL 14.63 12547.945563
601941020461 601941020461001 PROAIR HFA 71.18 6123.827998
601941020471 601941020471001 DULERA 263.82 6123.827998
601941020821 601941020821001 PROAIR HFA 71.18 6123.827998
601941020821 601941020821002 PROAIR HFA 71.18 6123.827998
601941020821 601941020821003 PROAIR HFA 71.18 6123.827998
601941020821 601941020821004 PROAIR HFA 71.18 6123.827998
601941020821 601941020821005 PROAIR HFA 71.18 6123.827998
601941020821 601941020821006 PROAIR HFA 71.18 6123.827998
601941020831 601941020831001 DULERA 263.82 6123.827998
601941020831 601941020831002 DULERA 263.82 6123.827998
601941020831 601941020831003 DULERA 263.82 6123.827998
601941020831 601941020831004 DULERA 263.82 6123.827998
601941020831 601941020831005 DULERA 263.82 6123.827998
601941020831 601941020831006 DULERA 263.82 6123.827998
601941021181 601941021181001 PROAIR HFA 71.18 6123.827998
601941021181 601941021181002 PROAIR HFA 71.18 6123.827998
601941021181 601941021181003 PROAIR HFA 71.18 6123.827998
601941021181 601941021181004 PROAIR HFA 71.18 6123.827998
601941021181 601941021181005 PROAIR HFA 4.19 6123.827998
601941021181 601941021181006 PROAIR HFA 71.18 6123.827998
601941021191 601941021191001 DULERA 263.82 6123.827998
601941021191 601941021191002 DULERA 263.82 6123.827998
601941021191 601941021191003 DULERA 263.82 6123.827998
601941021191 601941021191004 DULERA 263.82 6123.827998
601941021191 601941021191005 DULERA 263.82 6123.827998
601941021191 601941021191006 DULERA 263.82 6123.827998
601941040201 601941040201001 VENTOLIN HFA 63.99 5658.643381
601941040201 601941040201002 VENTOLIN HFA 63.99 5658.643381
601941040201 601941040201003 VENTOLIN HFA 63.99 5658.643381
601941040201 601941040201004 VENTOLIN HFA 63.99 5658.643381
601941040201 601941040201005 VENTOLIN HFA 63.99 5658.643381
601941040201 601941040201006 VENTOLIN HFA 63.99 5658.643381
602421030051 602421030051001 ALBUTEROL 4.50 5061.333551
602581021412 602581021412001 VENTOLIN HFA 46.36 9548.795401
602851030281 602851030281001 ALBUTEROL 56.78 23855.163106
602851030301 602851030301001 BUDESONIDE 483.29 23855.163106
602851030301 602851030301002 BUDESONIDE 483.29 23855.163106
602851030441 602851030441001 ALBUTEROL 56.78 23855.163106
602851030441 602851030441002 ALBUTEROL 56.78 23855.163106
602851030451 602851030451001 BUDESONIDE 466.32 23855.163106
602851030451 602851030451002 BUDESONIDE 466.72 23855.163106
602851030451 602851030451003 BUDESONIDE 466.72 23855.163106
602851030461 602851030461001 VENTOLIN HFA 47.86 23855.163106
603121010231 603121010231001 ADVAIR DISKU 214.94 5683.005299
603121010411 603121010411001 SYMBICORT 1016.22 5683.005299
603121010551 603121010551001 FLUTICASONE 7.50 5683.005299
603431030531 603431030531001 ADVAIR DISKU 867.24 16990.754700
603431030531 603431030531002 ADVAIR DISKU 867.24 16990.754700
603431030631 603431030631001 ADVAIR DISKU 867.24 16990.754700
603811010941 603811010941001 FLUTICASONE 39.74 7749.464929
603811010941 603811010941002 FLUTICASONE 14.25 7749.464929
603811010941 603811010941003 FLUTICASONE 14.25 7749.464929
603811010961 603811010961001 ADVAIR HFA 630.15 7749.464929
603881010651 603881010651001 ADVAIR DISKU 294.44 23353.084117
603881010651 603881010651002 ADVAIR DISKU 294.44 23353.084117
603881010761 603881010761001 ALBUTEROL 15.36 23353.084117
603881010761 603881010761002 ALBUTEROL 15.36 23353.084117
603881010821 603881010821001 ADVAIR DISKU 294.44 23353.084117
603881010821 603881010821002 ADVAIR DISKU 294.44 23353.084117
603881010821 603881010821003 ADVAIR DISKU 294.44 23353.084117
603881010821 603881010821004 ADVAIR DISKU 294.44 23353.084117
603881010821 603881010821005 ADVAIR DISKU 294.44 23353.084117
603881010821 603881010821006 ADVAIR DISKU 294.44 23353.084117
603881011331 603881011331001 ADVAIR DISKU 306.21 23353.084117
603881011331 603881011331002 ADVAIR DISKU 306.21 23353.084117
603881011361 603881011361001 ALBUTEROL 15.36 23353.084117
603881011361 603881011361002 ALBUTEROL 15.36 23353.084117
604081040101 604081040101001 VENTOLIN HFA 48.32 1448.263088
604081040111 604081040111001 FLOVENT HFA 199.14 1448.263088
604081040121 604081040121001 FLUTICASONE 7.00 1448.263088
604261020551 604261020551001 PROAIR HFA 31.12 2435.005838
604261020561 604261020561001 QVAR 66.12 2435.005838
604261020731 604261020731001 PROAIR HFA 31.12 2435.005838
604301011651 604301011651001 ALBUTEROL 3.32 2850.351905
604301011651 604301011651002 ALBUTEROL 3.32 2850.351905
604301011651 604301011651003 ALBUTEROL 3.32 2850.351905
604301011651 604301011651004 ALBUTEROL 3.32 2850.351905
604301011661 604301011661001 PREDNISONE 2.05 2850.351905
604301021321 604301021321001 PROVENTIL 64.27 2800.728053
604301021321 604301021321002 PROVENTIL 64.27 2800.728053
604301021321 604301021321003 PROVENTIL 64.27 2800.728053
604301021321 604301021321004 PROVENTIL 69.72 2800.728053
604301021321 604301021321005 PROVENTIL 69.72 2800.728053
604301021321 604301021321006 PROVENTIL 67.15 2800.728053
604301021321 604301021321007 PROVENTIL 67.15 2800.728053
604301021321 604301021321008 PROVENTIL 67.15 2800.728053
604301021331 604301021331001 PREDNISONE 12.78 2800.728053
604301021331 604301021331002 PREDNISONE 12.78 2800.728053
604301021351 604301021351001 PROVENTIL 64.27 2800.728053
604301021351 604301021351002 PROVENTIL 64.27 2800.728053
604301021351 604301021351003 PROVENTIL 64.27 2800.728053
604301021351 604301021351004 PROVENTIL 69.72 2800.728053
604301021351 604301021351005 PROVENTIL 69.72 2800.728053
604301021351 604301021351006 PROVENTIL 67.15 2800.728053
604301021351 604301021351007 PROVENTIL 67.15 2800.728053
604301021351 604301021351008 PROVENTIL 67.15 2800.728053
604301021361 604301021361001 VIOS 55.96 2800.728053
604301021551 604301021551001 PROVENTIL 64.27 2800.728053
604301021551 604301021551002 PROVENTIL 64.27 2800.728053
604301021551 604301021551003 PROVENTIL 64.27 2800.728053
604301021551 604301021551004 PROVENTIL 69.72 2800.728053
604301021551 604301021551005 PROVENTIL 69.72 2800.728053
604301021551 604301021551006 PROVENTIL 67.15 2800.728053
604301021551 604301021551007 PROVENTIL 67.15 2800.728053
604301021561 604301021561001 VIOS 55.96 2800.728053
604301021581 604301021581001 PREDNISONE 12.78 2800.728053
604361010261 604361010261001 SYMBICORT 985.26 4002.721680
604361010261 604361010261002 SYMBICORT 985.26 4002.721680
604361010281 604361010281001 ALBUTEROL 41.98 4002.721680
604361010281 604361010281002 ALBUTEROL 41.98 4002.721680
604361010281 604361010281003 ALBUTEROL 41.98 4002.721680
604361010351 604361010351001 ALBUTEROL 25.46 4002.721680
604361010361 604361010361001 SYMBICORT 245.36 4002.721680
604661020381 604661020381001 Fluticasone HFA 150.79 10867.805525
604661020391 604661020391001 Albuterol Sulfate HFA 21.32 10867.805525
604801010421 604801010421001 Albuterol 19.53 9420.546862
604801010431 604801010431001 Fluticasone Prop 33.72 9420.546862
604841010271 604841010271001 SPIRIVA 966.99 2009.933562
604841010291 604841010291001 PROAIR HFA 52.02 2009.933562
604841010331 604841010331001 SPIRIVA 966.99 2009.933562
605111020341 605111020341001 MONTELUKAST 24.76 28712.248076
605111020401 605111020401001 MONTELUKAST 24.76 28712.248076
605111020401 605111020401002 MONTELUKAST 24.76 28712.248076
605111020421 605111020421001 PROVENTIL 215.97 28712.248076
605111020421 605111020421002 PROVENTIL 224.01 28712.248076
605111020541 605111020541001 MONTELUKAST 24.76 28712.248076
605111020541 605111020541002 MONTELUKAST 23.77 28712.248076
605111020551 605111020551001 PROVENTIL 33.39 28712.248076
605111020551 605111020551002 PROVENTIL 194.64 28712.248076
605291010441 605291010441001 MEDROXYPR AC 5.08 12452.720763
605291040041 605291040041001 SYMBICORT 40.00 14340.638797
605351010631 605351010631001 MONTELUKAST 10.16 2895.679365
605351010631 605351010631002 MONTELUKAST 10.16 2895.679365
605351010631 605351010631003 MONTELUKAST 12.10 2895.679365
605351010631 605351010631004 MONTELUKAST 12.10 2895.679365
605351010641 605351010641001 SPIRIVA 301.53 2895.679365
605351010641 605351010641002 SPIRIVA 319.61 2895.679365
605351010641 605351010641003 SPIRIVA 319.61 2895.679365
605351010641 605351010641004 SPIRIVA 319.61 2895.679365
605351010661 605351010661001 VENTOLIN HFA 46.18 2895.679365
605351010661 605351010661002 VENTOLIN HFA 46.18 2895.679365
605351010661 605351010661003 VENTOLIN HFA 46.18 2895.679365
605351010661 605351010661004 VENTOLIN HFA 46.18 2895.679365
605351010671 605351010671001 ADVAIR DISKU 461.99 2895.679365
605351010671 605351010671002 ADVAIR DISKU 461.99 2895.679365
605351010671 605351010671003 ADVAIR DISKU 461.99 2895.679365
605351010671 605351010671004 ADVAIR DISKU 461.99 2895.679365
605351010711 605351010711001 SYMBICORT 278.19 2895.679365
605351010711 605351010711002 SYMBICORT 278.19 2895.679365
605351010711 605351010711003 SYMBICORT 278.19 2895.679365
605351010711 605351010711004 SYMBICORT 278.19 2895.679365
605351010871 605351010871001 MONTELUKAST 6.56 2895.679365
605351010871 605351010871002 MONTELUKAST 6.56 2895.679365
605351010871 605351010871003 MONTELUKAST 6.56 2895.679365
605351010871 605351010871004 MONTELUKAST 10.16 2895.679365
605351010871 605351010871005 MONTELUKAST 10.16 2895.679365
605351010881 605351010881001 SPIRIVA 319.61 2895.679365
605351010881 605351010881002 SPIRIVA 319.61 2895.679365
605351010881 605351010881003 SPIRIVA 319.61 2895.679365
605351010881 605351010881004 SPIRIVA 319.61 2895.679365
605351010881 605351010881005 SPIRIVA 319.61 2895.679365
605351010901 605351010901001 VENTOLIN HFA 46.18 2895.679365
605351010901 605351010901002 VENTOLIN HFA 46.18 2895.679365
605351010901 605351010901003 VENTOLIN HFA 46.18 2895.679365
605351010901 605351010901004 VENTOLIN HFA 46.18 2895.679365
605351010901 605351010901005 VENTOLIN HFA 46.18 2895.679365
605351010911 605351010911001 ADVAIR DISKU 398.33 2895.679365
605351010911 605351010911002 ADVAIR DISKU 398.33 2895.679365
605351010911 605351010911003 ADVAIR DISKU 398.33 2895.679365
605351010911 605351010911004 ADVAIR DISKU 398.33 2895.679365
605351010911 605351010911005 ADVAIR DISKU 398.33 2895.679365
605351010931 605351010931001 SYMBICORT 278.19 2895.679365
605351010931 605351010931002 SYMBICORT 278.19 2895.679365
605351010931 605351010931003 SYMBICORT 278.19 2895.679365
605351010931 605351010931004 SYMBICORT 278.19 2895.679365
605351010931 605351010931005 SYMBICORT 278.19 2895.679365
605381030051 605381030051001 ALBUTEROL 3.46 6546.371039
605421060021 605421060021001 PROAIR HFA 97.90 3971.022504
605441020081 605441020081001 ALBUTEROL 39.98 4484.511401
605441040231 605441040231001 ALBUTEROL 46.99 4486.011406
605501020731 605501020731001 ADVAIR HFA 322.19 2987.663060
605501021011 605501021011001 ADVAIR HFA 423.21 2987.663060
605501021011 605501021011002 ADVAIR HFA 423.21 2987.663060
605571010061 605571010061001 ADVAIR DISKU 311.43 6916.587605
605571010101 605571010101001 ADVAIR DISKU 311.43 6916.587605
605571010101 605571010101002 ADVAIR DISKU 311.43 6916.587605
605571010111 605571010111001 ADVAIR DISKU 311.43 6916.587605
605571010121 605571010121001 PROAIR HFA 46.07 6916.587605
605961010041 605961010041001 ALBUTEROL 10.00 6630.754209
605961010041 605961010041002 ALBUTEROL 10.00 6630.754209
605961010041 605961010041003 ALBUTEROL 9.74 6630.754209
605961020051 605961020051001 PROVENTIL 65.56 5266.410397
606141030031 606141030031001 PROAIR HFA 200.45 7185.966390
606231030081 606231030081001 MONTELUKAST 10.00 5309.571708
606231030081 606231030081002 MONTELUKAST 10.00 5309.571708
606481020531 606481020531001 PREDNISONE 4.29 26841.250359
606481020541 606481020541001 XOPENEX HFA 55.24 26841.250359
606481020541 606481020541002 XOPENEX HFA 60.40 26841.250359
606481020561 606481020561001 FLUTICASONE 9.52 26841.250359
606481020561 606481020561002 FLUTICASONE 9.50 26841.250359
606481020591 606481020591001 XOPENEX HFA 59.81 26841.250359
606621010651 606621010651001 TOPIRAMATE 267.99 2180.253849
606621010651 606621010651002 TOPIRAMATE 267.99 2180.253849
606621010651 606621010651003 TOPIRAMATE 267.99 2180.253849
606621010651 606621010651004 TOPIRAMATE 267.99 2180.253849
606621010651 606621010651005 TOPIRAMATE 267.99 2180.253849
606621010651 606621010651006 TOPIRAMATE 267.99 2180.253849
606621010651 606621010651007 TOPIRAMATE 267.99 2180.253849
606621020221 606621020221001 METFORMIN 12.83 2224.342420
606621020531 606621020531001 PROAIR HFA 48.85 2224.342420
606621020531 606621020531002 PROAIR HFA 48.85 2224.342420
606621020531 606621020531003 PROAIR HFA 51.72 2224.342420
606621020531 606621020531004 PROAIR HFA 51.72 2224.342420
606831010301 606831010301001 FLUTICASONE 36.25 5899.049658
606831010301 606831010301002 FLUTICASONE 36.25 5899.049658
606831010301 606831010301003 FLUTICASONE 36.25 5899.049658
606831010301 606831010301004 FLUTICASONE 36.25 5899.049658
606831010301 606831010301005 FLUTICASONE 36.25 5899.049658
606831010301 606831010301006 FLUTICASONE 36.25 5899.049658
606981012401 606981012401001 PROAIR HFA 31.12 10534.531927
606981012401 606981012401002 PROAIR HFA 31.12 10534.531927
606981012401 606981012401003 PROAIR HFA 31.12 10534.531927
606981012411 606981012411001 QVAR 548.94 10534.531927
606981012411 606981012411002 QVAR 548.94 10534.531927
606981012751 606981012751001 PROAIR HFA 31.12 10534.531927
606981012751 606981012751002 PROAIR HFA 31.12 10534.531927
606981012761 606981012761001 QVAR 548.94 10534.531927
606981012761 606981012761002 QVAR 548.94 10534.531927


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

Analysis Variable: RXXP15X SUM OF PAYMENTS RXSF15X-RXOU15X (IMPUTED)

N Sum
9719 1436300.29


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

Weighted

Analysis Variable: RXXP15X SUM OF PAYMENTS RXSF15X-RXOU15X (IMPUTED)

N Sum
9719 13870833025

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.72 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
5 ods rtf file = 'C:\Data\sampleC.rtf'
5 ! bodytitle;
NOTE: Writing RTF Body file: C:\Data\sampleC.rtf
6
7 ods noproctitle;
8
9 OPTIONS LS=132 PS=59;
10
11 TITLE1 "HC-178I";
12 TITLE2 "Sample SAS Job for Example C";
13
14 LIBNAME IN "C:\Data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
15

16
17 * Calculate the expenditures for medical visits associated with asthma.
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 RUN;

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

30

31
32 * Get conditions records coded as asthma.
33

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

NOTE: There were 123227 observations read from the data set IN.H180.
NOTE: The data set WORK.ASCONDS has 2422 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 200.00 percent.
Compressed is 3 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.46 seconds
cpu time 0.06 seconds

38

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

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

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


43
44 proc print data=asconds (obs=50);
45 title3 "sample print of work.asconds - sorted by condidx";
46 title4 "COND (H180) records where cccodex=128";
47 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.04 seconds


48
49 PROC SORT DATA=IN.H178IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 377736 observations read from the data set IN.H178IF1.
NOTE: SAS threaded sort was used.


NOTE: The data set WORK.CLNK has 377736 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.52 percent.
Compressed is 440 pages; un-compressed would require 417 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.85 seconds
cpu time 0.39 seconds


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

NOTE: There were 377736 observations read from the data set WORK.CLNK.
NOTE: There were 2422 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7037 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.10 seconds

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

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

NOTE: There were 7037 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 7037 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

69
70 proc print data=asclnks (obs=50);
71 format eventype eventype.;
72 title3 "sample print of work.asclnks - sorted by evntidx";
73 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.00 seconds
cpu time 0.01 seconds


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

NOTE: There were 7037 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 7026 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


80
81 proc print data=asclnks (obs=50);
82 format eventype eventype.;
83 title3 "sample print of unique evntidxs from work.asclnks";
84 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

85

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

89 DATA MVIS;
90 SET IN.H178G (KEEP=EVNTIDX PERWT15F SEETLKPV OBXP15X);
91 IF PERWT15F > 0 & SEETLKPV NE 2;
92 RUN;

NOTE: There were 172388 observations read from the data set IN.H178G.
NOTE: The data set WORK.MVIS has 167884 observations and 4 variables.
NOTE: Compressing data set WORK.MVIS increased size by 6.80 percent.
Compressed is 110 pages; un-compressed would require 103 pages.
NOTE: DATA statement used (Total process time):


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

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

95

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

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

NOTE: There were 7026 observations read from the data set WORK.ASCLNKS.
NOTE: There were 167884 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 2048 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.05 seconds
cpu time 0.06 seconds


105
106 proc print data=asmvis (obs=50);
107 format eventype eventype.;
108 title3 "sample print of work.asmvis";
109 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-178G) events";
110 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.00 seconds


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


NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 2048 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


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

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 2048 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.01 seconds


123
124 ods rtf close;
125
126

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



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

Obs CONDIDX CCCODEX
1 600011010231 128
2 600011020121 128
3 600031030011 128
4 600211010061 128
5 600331010131 128
6 600341010031 128
7 600561060021 128
8 600632010052 128
9 601081010041 128
10 601081030011 128
11 601181020021 128
12 601201010011 128
13 601381010011 128
14 601381040021 128
15 601461010051 128
16 601481020051 128
17 601661020061 128
18 601711020011 128
19 601811020021 128
20 601921030011 128
21 601941020061 128
22 601941040011 128
23 602201010031 128
24 602201040011 128
25 602221020071 128
26 602321020011 128
27 602421030021 128
28 602581020032 128
29 602701010031 128
30 602851030061 128
31 602851030101 128
32 603031010021 128
33 603101010161 128
34 603121010061 128
35 603151010041 128
36 603431030011 128
37 603811010141 128
38 603881010061 128
39 603981010031 128
40 604081040011 128
41 604261020051 128
42 604301010041 128
43 604301020011 128
44 604321010041 128
45 604321020011 128
46 604321040011 128
47 604331010031 128
48 604361010041 128
49 604421010031 128
50 604661020051 128


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

CONDIDX EVNTIDX EVENTYPE
600011010231 600011012191 8 PMED
600011020121 600011020521 1 MVIS
600011020121 600011020811 8 PMED
600211010061 600211010191 1 MVIS
600211010061 600211010211 3 EROM
600211010061 600211010311 8 PMED
600211010061 600211010331 1 MVIS
600211010061 600211010341 1 MVIS
600211010061 600211010351 1 MVIS
600211010061 600211010461 8 PMED
600211010061 600211010471 8 PMED
600211010061 600211010481 8 PMED
600211010061 600211010491 8 PMED
600211010061 600211010501 8 PMED
600211010061 600211010511 8 PMED
600211010061 600211010521 1 MVIS
600211010061 600211010601 8 PMED
600211010061 600211010611 8 PMED
600211010061 600211010621 8 PMED
600211010061 600211010631 8 PMED
600331010131 600331010631 8 PMED
600341010031 600341010421 8 PMED
600341010031 600341010561 1 MVIS
600341010031 600341010571 1 MVIS
600341010031 600341010581 1 MVIS
600341010031 600341010591 1 MVIS
600341010031 600341010601 1 MVIS
600341010031 600341010621 1 MVIS
600341010031 600341010631 1 MVIS
600341010031 600341010641 1 MVIS
600341010031 600341010671 8 PMED
600561060021 600561060101 1 MVIS
600561060021 600561060111 1 MVIS
600561060021 600561060121 1 MVIS
600561060021 600561060131 8 PMED
600632010052 600632010012 3 EROM
601201010011 601201010081 8 PMED
601201010011 601201010091 8 PMED
601201010011 601201010111 1 MVIS
601201010011 601201010121 1 MVIS
601201010011 601201010131 1 MVIS
601201010011 601201010251 1 MVIS
601201010011 601201010261 1 MVIS
601201010011 601201010271 1 MVIS
601201010011 601201010281 1 MVIS
601201010011 601201010351 8 PMED
601381010011 601381010091 2 OPAT
601381010011 601381010101 8 PMED
601381010011 601381010111 8 PMED
601381040021 601381040051 8 PMED
601481020051 601481020461 8 PMED
601481020051 601481020591 1 MVIS
601481020051 601481020601 8 PMED
601661020061 601661020381 8 PMED
601661020061 601661020391 8 PMED
601811020021 601811020491 8 PMED
601941020061 601941020461 8 PMED
601941020061 601941020471 8 PMED
601941020061 601941020821 8 PMED
601941020061 601941020831 8 PMED
601941020061 601941021181 8 PMED
601941020061 601941021191 8 PMED
601941040011 601941040201 8 PMED
602221020071 602221020192 1 MVIS
602421030021 602421030031 3 EROM
602421030021 602421030041 4 STAZ
602421030021 602421030051 8 PMED
602581020032 602581021412 8 PMED
602851030061 602851030281 8 PMED
602851030061 602851030301 8 PMED
602851030101 602851030311 1 MVIS
602851030101 602851030321 1 MVIS
602851030101 602851030351 1 MVIS
602851030101 602851030441 8 PMED
602851030101 602851030451 8 PMED


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

Obs CONDIDX EVNTIDX EVENTYPE
1 600011010231 600011012191 8 PMED
2 600011020121 600011020521 1 MVIS
3 600011020121 600011020811 8 PMED
4 600211010061 600211010191 1 MVIS
5 600211010061 600211010211 3 EROM
6 600211010061 600211010311 8 PMED
7 600211010061 600211010331 1 MVIS
8 600211010061 600211010341 1 MVIS
9 600211010061 600211010351 1 MVIS
10 600211010061 600211010461 8 PMED
11 600211010061 600211010471 8 PMED
12 600211010061 600211010481 8 PMED
13 600211010061 600211010491 8 PMED
14 600211010061 600211010501 8 PMED
15 600211010061 600211010511 8 PMED
16 600211010061 600211010521 1 MVIS
17 600211010061 600211010601 8 PMED
18 600211010061 600211010611 8 PMED
19 600211010061 600211010621 8 PMED
20 600211010061 600211010631 8 PMED
21 600331010131 600331010631 8 PMED
22 600341010031 600341010421 8 PMED
23 600341010031 600341010561 1 MVIS
24 600341010031 600341010571 1 MVIS
25 600341010031 600341010581 1 MVIS
26 600341010031 600341010591 1 MVIS
27 600341010031 600341010601 1 MVIS
28 600341010031 600341010621 1 MVIS
29 600341010031 600341010631 1 MVIS
30 600341010031 600341010641 1 MVIS
31 600341010031 600341010671 8 PMED
32 600561060021 600561060101 1 MVIS
33 600561060021 600561060111 1 MVIS
34 600561060021 600561060121 1 MVIS
35 600561060021 600561060131 8 PMED
36 600632010052 600632010012 3 EROM
37 601201010011 601201010081 8 PMED
38 601201010011 601201010091 8 PMED
39 601201010011 601201010111 1 MVIS
40 601201010011 601201010121 1 MVIS
41 601201010011 601201010131 1 MVIS
42 601201010011 601201010251 1 MVIS
43 601201010011 601201010261 1 MVIS
44 601201010011 601201010271 1 MVIS
45 601201010011 601201010281 1 MVIS
46 601201010011 601201010351 8 PMED
47 601381010011 601381010091 2 OPAT
48 601381010011 601381010101 8 PMED
49 601381010011 601381010111 8 PMED
50 601381040021 601381040051 8 PMED


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

Obs EVNTIDX EVENTYPE
1 600011012191 8 PMED
2 600011020521 1 MVIS
3 600011020811 8 PMED
4 600211010191 1 MVIS
5 600211010211 3 EROM
6 600211010311 8 PMED
7 600211010331 1 MVIS
8 600211010341 1 MVIS
9 600211010351 1 MVIS
10 600211010461 8 PMED
11 600211010471 8 PMED
12 600211010481 8 PMED
13 600211010491 8 PMED
14 600211010501 8 PMED
15 600211010511 8 PMED
16 600211010521 1 MVIS
17 600211010601 8 PMED
18 600211010611 8 PMED
19 600211010621 8 PMED
20 600211010631 8 PMED
21 600331010631 8 PMED
22 600341010421 8 PMED
23 600341010561 1 MVIS
24 600341010571 1 MVIS
25 600341010581 1 MVIS
26 600341010591 1 MVIS
27 600341010601 1 MVIS
28 600341010621 1 MVIS
29 600341010631 1 MVIS
30 600341010641 1 MVIS
31 600341010671 8 PMED
32 600561060101 1 MVIS
33 600561060111 1 MVIS
34 600561060121 1 MVIS
35 600561060131 8 PMED
36 600632010012 3 EROM
37 601201010081 8 PMED
38 601201010091 8 PMED
39 601201010111 1 MVIS
40 601201010121 1 MVIS
41 601201010131 1 MVIS
42 601201010251 1 MVIS
43 601201010261 1 MVIS
44 601201010271 1 MVIS
45 601201010281 1 MVIS
46 601201010351 8 PMED
47 601381010091 2 OPAT
48 601381010101 8 PMED
49 601381010111 8 PMED
50 601381040051 8 PMED


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

Obs EVNTIDX EVENTYPE SEETLKPV OBXP15X PERWT15F
1 600011020521 1 MVIS 1 134.29 18169.60
2 600211010191 1 MVIS 1 77.41 28438.73
3 600211010331 1 MVIS 1 141.03 28438.73
4 600211010341 1 MVIS 1 75.16 28438.73
5 600211010351 1 MVIS 1 188.39 28438.73
6 600211010521 1 MVIS 1 45.32 28438.73
7 600341010561 1 MVIS 1 20.00 11855.69
8 600341010571 1 MVIS 1 20.00 11855.69
9 600341010581 1 MVIS 1 20.00 11855.69
10 600341010591 1 MVIS 1 18.95 11855.69
11 600341010601 1 MVIS 1 18.95 11855.69
12 600341010621 1 MVIS 1 20.00 11855.69
13 600341010631 1 MVIS 1 14.76 11855.69
14 600341010641 1 MVIS 1 87.33 11855.69
15 600561060101 1 MVIS 1 127.87 3693.98
16 600561060111 1 MVIS 1 127.87 3693.98
17 600561060121 1 MVIS 1 36.31 3693.98
18 601201010111 1 MVIS 1 105.00 9079.74
19 601201010121 1 MVIS 1 105.00 9079.74
20 601201010131 1 MVIS 1 105.00 9079.74
21 601201010251 1 MVIS 1 166.90 9079.74
22 601201010261 1 MVIS 1 166.90 9079.74
23 601201010271 1 MVIS 1 166.90 9079.74
24 601201010281 1 MVIS 1 166.90 9079.74
25 601481020591 1 MVIS 1 28.51 18789.81
26 602221020192 1 MVIS 1 701.44 7006.52
27 602851030311 1 MVIS 1 380.77 23855.16
28 602851030321 1 MVIS 1 0.00 23855.16
29 602851030351 1 MVIS 1 75.00 23855.16
30 603811010661 1 MVIS 1 536.13 7749.46
31 603811010981 1 MVIS 1 536.13 7749.46
32 603881010701 1 MVIS 1 67.95 23353.08
33 603881010861 1 MVIS 1 56.76 23353.08
34 603881010891 1 MVIS 1 157.59 23353.08
35 604301020981 1 MVIS 1 32.62 2800.73
36 604301020991 1 MVIS 1 32.62 2800.73
37 604301021001 1 MVIS 1 94.18 2800.73
38 604301021011 1 MVIS 1 94.18 2800.73
39 604301021021 1 MVIS 1 32.62 2800.73
40 604301021071 1 MVIS 1 6.65 2800.73
41 604301021081 1 MVIS 1 6.65 2800.73
42 604301021091 1 MVIS 1 55.62 2800.73
43 604301021101 1 MVIS 1 74.00 2800.73
44 604301021121 1 MVIS 1 6.65 2800.73
45 604301021131 1 MVIS 1 6.65 2800.73
46 604301021421 1 MVIS 1 147.49 2800.73
47 604301021431 1 MVIS 1 248.00 2800.73
48 604301021441 1 MVIS 1 147.49 2800.73
49 604301021451 1 MVIS 1 147.49 2800.73
50 604301021521 1 MVIS 1 74.00 2800.73


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

Analysis Variable: OBXP15X SUM OF OBSF15X - OBOT15X (IMPUTED)

N Sum
2048 314571.61


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

Weighted

Analysis Variable: OBXP15X SUM OF OBSF15X - OBOT15X (IMPUTED)

N Sum
2048 2586439015

Return To Top