MEPS HC-152I: Attachment 2
Sample SAS Jobs for Linking Example


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

NOTE: Enhanced analytical products:

SAS/STAT 12.1, SAS/ETS 12.1, SAS/OR 12.1, SAS/IML 12.1, SAS/QC 12.1

NOTE: SAS initialization used:
real time 4.64 seconds
cpu time 0.32 seconds

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

NOTE: DATA statement used (Total process time):
real time 0.56 seconds
cpu time 0.04 seconds

NOTE: AUTOEXEC processing completed.

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

12
13 Calculate the expenditures for prescribed medicines associated with medical visits for asthma.
14

15
16 PROC FORMAT;
17 VALUE EVENTYPE
18 1 = "1 MVIS"
19 2 = "2 OPAT"
20 3 = "3 EROM"
21 4 = "4 STAZ"
22 5 = "5 DVIS"
23 6 = "6 OMED"
24 7 = "7 HVIS"
25 8 = "8 PMED";

NOTE: Format EVENTYPE has been output.
26
27 RUN;

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

28

29
30 Get condition records coded as asthma.
31

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

NOTE: There were 118850 observations read from the data set IN.H154.
NOTE: The data set WORK.ASCONDS has 2515 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 90.00 percent.
Compressed is 19 pages; un-compressed would require 10 pages.
NOTE: DATA statement used (Total process time):
real time 1.59 seconds
cpu time 0.03 seconds

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

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

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

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

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

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

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

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

NOTE: There were 329484 observations read from the data set WORK.CLNK.
NOTE: There were 2515 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7010 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 26.79 percent.
Compressed is 71 pages; un-compressed would require 56 pages.
NOTE: DATA statement used (Total process time):
real time 0.20 seconds
cpu time 0.20 seconds

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

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

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

NOTE: There were 7010 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 7010 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 26.79 percent.

Compressed is 71 pages; un-compressed would require 56 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

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

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

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

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

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

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

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

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


NOTE: There were 144755 observations read from the data set IN.H152G.
NOTE: The data set WORK.MVIS has 140703 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 12.88 percent.
Compressed is 1262 pages; un-compressed would require 1118 pages.
NOTE: DATA statement used (Total process time):
real time 4.03 seconds
cpu time 0.21 seconds

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

NOTE: There were 140703 observations read from the data set WORK.MVIS.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.MVIS has 140703 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 12.88 percent.
Compressed is 1262 pages; un-compressed would require 1118 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.19 seconds
cpu time 0.20 seconds

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

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

NOTE: There were 6999 observations read from the data set WORK.ASCLNKS.
NOTE: There were 140703 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 1926 observations and 2 variables.
NOTE: Compressing data set WORK.ASMVIS increased size by 25.00 percent.
Compressed is 15 pages; un-compressed would require 12 pages.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds

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

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

110
111
112 Get PMED IDs linked to the MVIS events which were for asthma.
113

114 PROC SORT DATA=IN.H152IF2 OUT=RXLK; BY EVNTIDX; RUN;

NOTE: There were 59677 observations read from the data set IN.H152IF2.
NOTE: SAS sort was used.
NOTE: The data set WORK.RXLK has 59677 observations and 6 variables.
NOTE: Compressing data set WORK.RXLK increased size by 6.00 percent.
Compressed is 1131 pages; un-compressed would require 1067 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.28 seconds
cpu time 0.07 seconds

115
116 proc report data=rxlk (obs=140 keep=evntidx linkidx eventype) nowd headskip;
117 define evntidx /'EVNTIDX' order;
118 define linkidx /'LINKIDX';
119 define eventype /'EVENTYPE';
120 break after evntidx / skip;
121 format eventype eventype.;
122 title3 "sample print of work.rxlk - sorted by evntidx";
123 title4 "Rx+event link file records (HC-152IF2)";
124 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.03 seconds
cpu time 0.04 seconds

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

NOTE: There were 59677 observations read from the data set WORK.RXLK.
NOTE: There were 1926 observations read from the data set WORK.ASMVIS.
NOTE: The data set WORK.PMEDIDS has 2114 observations and 3 variables.
NOTE: Compressing data set WORK.PMEDIDS increased size by 27.78 percent.
Compressed is 23 pages; un-compressed would require 18 pages.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.03 seconds

132
133 proc report data=pmedids (obs=50) nowd headskip;
134 define evntidx /'EVNTIDX' order;
135 define linkidx /'LINKIDX';

136 define eventype /'EVENTYPE';
137 break after evntidx / skip;
138 format eventype eventype.;
139 title3 "sample print of work.pmedids - sorted by evntidx";
140 title4 "work.rxlk records for evntidxs in work.asmvis";
141 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.02 seconds
cpu time 0.03 seconds

142
143 PROC SORT DATA=PMEDIDS; BY LINKIDX; RUN;

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

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

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

149
150 DATA PMEDIDS;
151 SET PMEDIDS (KEEP=LINKIDX);
152 BY LINKIDX;
153 IF FIRST.LINKIDX;
154 RUN;

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

155
156 proc print data=pmedids (obs=50);
157 title3 "sample print of unique linkidxs in work.pmedids";
158 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

159
160
161 Get PMED records linked to MVIS events which were for asthma.
162

163 PROC SORT DATA=IN.H152A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 324744 observations read from the data set IN.H152A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 324744 observations and 74 variables.
NOTE: Compressing data set WORK.PMED decreased size by 50.18 percent.
Compressed is 6472 pages; un-compressed would require 12991 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 12.63 seconds
cpu time 2.26 seconds

164
165 DATA MVPMEDS;
166 MERGE PMED (KEEP=LINKIDX RXRECIDX RXXP12X PERWT12F RXNAME)
167 PMEDIDS (IN=A);
168 BY LINKIDX;
169 IF A;
170 RUN;

NOTE: There were 324744 observations read from the data set WORK.PMED.
NOTE: There were 2009 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.MVPMEDS has 5534 observations and 5 variables.
NOTE: Compressing data set WORK.MVPMEDS decreased size by 29.85 percent.
Compressed is 47 pages; un-compressed would require 67 pages.
NOTE: DATA statement used (Total process time):
real time 0.90 seconds
cpu time 0.64 seconds

171
172 proc report data=mvpmeds (obs=200) nowd;
173 column LINKIDX RXRECIDX RXNAME RXXP12X PERWT12F;
174 define linkidx /'LINKIDX' order;
175 define rxrecidx /'RXRECIDX';
176 define rxname /'RXNAME';
177 define rxxp12x /'RXXP12X' display format=8.2;
178 define PERWT12F /'PERWT12F' display format=8.2;
179 break after linkidx / skip;
180 title3 "sample print of work.mvpmeds";
181 title4 "PMED (HC-152A) records for unique linkidxs in work.pmedids";
182 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.06 seconds
cpu time 0.06 seconds

183
184 PROC MEANS DATA=MVPMEDS N SUM;
185 VAR RXXP12X;
186 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
187 RUN;

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

188
189 PROC MEANS DATA=MVPMEDS N SUM;
190 VAR RXXP12X;
191 WEIGHT PERWT12F;
192 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
193 TITLE5 "Weighted";
194 RUN;

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

195
196 ods rtf close;
197

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

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of work.asconds - sorted by condidx
COND (H154) records where cccodex=128
Obs CONDIDX CCCODEX
1 200111010041 128
2 200321020011 128
3 200331080011 128
4 200411050011 128
5 200461030011 128
6 200461060011 128
7 200481050011 128
8 200591010021 128
9 200591030011 128
10 200841020051 128
11 200941010021 128
12 200941020051 128
13 200961010081 128
14 200961030011 128
15 201091010021 128
16 201391010061 128
17 201501020021 128
18 201701040011 128
19 201731020021 128
20 201751010042 128
21 201791020011 128
22 201921020051 128
23 201991030011 128
24 202301020021 128
25 202301030011 128
26 202301050061 128
27 202541010021 128
28 202571010021 128
29 202621020042 128
30 202621060012 128
31 202631020011 128
32 202641010041 128
33 202641010061 128
34 202701050011 128
35 202781020011 128
36 202831040011 128
37 202831040021 128
38 202851010021 128
39 202851030012 128
40 202851040011 128
41 202941030011 128
42 202941040011 128
43 202971030011 128
44 203341010051 128
45 203411010021 128
46 203451020021 128
47 203451030011 128
48 203591010041 128
49 203661020011 128
50 203791010011 128

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
200111010041 200111010011 1 MVIS
200111010041 200111010031 7 HVIS
200111010041 200111010041 7 HVIS
200111010041 200111010051 7 HVIS
200331080011 200331080021 8 PMED
200111010041 200411050011 1 MVIS
200111010041 200411050021 8 PMED
200111010041 200411050031 1 MVIS
200111010041 200411050041 8 PMED
200111010041 200411050081 8 PMED
200461030011 200461030021 8 PMED
200591010021 200591010131 8 PMED
200591030011 200591030041 8 PMED
200591030011 200591030051 8 PMED
200591030011 200591030151 8 PMED
200591030011 200591030161 8 PMED
200941010021 200941010021 8 PMED
200941010021 200941010031 8 PMED
200941010021 200941010271 8 PMED
200941020051 200941020171 1 MVIS
200941020051 200941020201 1 MVIS
200961010081 200961010401 1 MVIS
200961010081 200961010411 1 MVIS
200961010081 200961010421 1 MVIS
200961010081 200961010431 1 MVIS
200961030011 200961030041 8 PMED
201091010021 201091010011 1 MVIS
201091010021 201091010021 1 MVIS
201091010021 201091010031 1 MVIS
201091010021 201091010041 8 PMED
201391010061 201391010061 1 MVIS
201391010061 201391010071 1 MVIS
201391010061 201391010081 1 MVIS
201391010061 201391010091 2 OPAT
201391010061 201391010101 2 OPAT
201391010061 201391010141 8 PMED
201391010061 201391010211 8 PMED
201391010061 201391010251 8 PMED
201391010061 201391010321 8 PMED
201501020021 201501020111 1 MVIS
201501020021 201501020121 1 MVIS
201501020021 201501020131 1 MVIS
201501020021 201501020141 1 MVIS
201501020021 201501020151 1 MVIS
201501020021 201501020161 1 MVIS
201501020021 201501020171 1 MVIS
201501020021 201501020181 1 MVIS
201501020021 201501020221 8 PMED
201701040011 201701040011 3 EROM
201731020021 201731020151 8 PMED
201731020021 201731020261 8 PMED
201751010042 201751010072 8 PMED
201751010042 201751010092 1 MVIS
201751010042 201751010112 8 PMED
201791020011 201791020031 1 MVIS
201791020011 201791020041 8 PMED
201921020051 201921020081 1 MVIS
201991030011 201991030011 1 MVIS
201991030011 201991030031 8 PMED
202301050061 202301050111 1 MVIS
202301050061 202301050121 1 MVIS
202301050061 202301050181 8 PMED
202541010021 202541010101 8 PMED
202541010021 202541010111 8 PMED
202621020042 202621020042 8 PMED
202621020042 202621020052 8 PMED
202621020042 202621020082 8 PMED
202621020042 202621020102 3 EROM
202621020042 202621020112 4 STAZ
202621020042 202621020142 1 MVIS
202621020042 202621020152 1 MVIS
202621020042 202621020212 8 PMED
202641010041 202641010041 4 STAZ
202641010041 202641010051 2 OPAT
202641010041 202641010061 2 OPAT

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 200111010041 200111010011 1 MVIS
2 200111010041 200111010031 7 HVIS
3 200111010041 200111010041 7 HVIS
4 200111010041 200111010051 7 HVIS
5 200331080011 200331080021 8 PMED
6 200411050011 200411050011 1 MVIS
7 200411050011 200411050021 8 PMED
8 200411050011 200411050031 1 MVIS
9 200411050011 200411050041 8 PMED
10 200411050011 200411050081 8 PMED
11 200461030011 200461030021 8 PMED
12 200591010021 200591010131 8 PMED
13 200591030011 200591030041 8 PMED
14 200591030011 200591030051 8 PMED
15 200591030011 200591030151 8 PMED
16 200591030011 200591030161 8 PMED
17 200941010021 200941010021 8 PMED
18 200941010021 200941010031 8 PMED
19 200941010021 200941010271 8 PMED
20 200941020051 200941020171 1 MVIS
21 200941020051 200941020201 1 MVIS
22 200961010081 200961010401 1 MVIS
23 200961010081 200961010411 1 MVIS
24 200961010081 200961010421 1 MVIS
25 200961010081 200961010431 1 MVIS
26 200961030011 200961030041 8 PMED
27 201091010021 201091010011 1 MVIS
28 201091010021 201091010021 1 MVIS
29 201091010021 201091010031 1 MVIS
30 201091010021 201091010041 8 PMED
31 201391010061 201391010061 1 MVIS
32 201391010061 201391010071 1 MVIS
33 201391010061 201391010081 1 MVIS
34 201391010061 201391010091 2 OPAT
35 201391010061 201391010101 2 OPAT
36 201391010061 201391010141 8 PMED
37 201391010061 201391010211 8 PMED
38 201391010061 201391010251 8 PMED
39 201391010061 201391010321 8 PMED
40 201501020021 201501020111 1 MVIS
41 201501020021 201501020121 1 MVIS
42 201501020021 201501020131 1 MVIS
43 201501020021 201501020141 1 MVIS
44 201501020021 201501020151 1 MVIS
45 201501020021 201501020161 1 MVIS
46 201501020021 201501020171 1 MVIS
47 201501020021 201501020181 1 MVIS
48 201501020021 201501020221 8 PMED
49 201701040011 201701040011 3 EROM
50 201731020021 201731020151 8 PMED

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 200111010011 1 MVIS
2 200111010031 7 HVIS
3 200111010041 7 HVIS
4 200111010051 7 HVIS
5 200331080021 8 PMED
6 200411050011 1 MVIS
7 200411050021 8 PMED
8 200411050031 1 MVIS
9 200411050041 8 PMED
10 200411050081 8 PMED
11 200461030021 8 PMED
12 200591010131 8 PMED
13 200591030041 8 PMED
14 200591030051 8 PMED
15 200591030151 8 PMED
16 200591030161 8 PMED
17 200941010021 8 PMED
18 200941010031 8 PMED
19 200941010271 8 PMED
20 200941020171 1 MVIS
21 200941020201 1 MVIS
22 200961010401 1 MVIS
23 200961010411 1 MVIS
24 200961010421 1 MVIS
25 200961010431 1 MVIS
26 200961030041 8 PMED
27 201091010011 1 MVIS
28 201091010021 1 MVIS
29 201091010031 1 MVIS
30 201091010041 8 PMED
31 201391010061 1 MVIS
32 201391010071 1 MVIS
33 201391010081 1 MVIS
34 201391010091 2 OPAT
35 201391010101 2 OPAT
36 201391010141 8 PMED
37 201391010211 8 PMED
38 201391010251 8 PMED
39 201391010321 8 PMED
40 201501020111 1 MVIS
41 201501020121 1 MVIS
42 201501020131 1 MVIS
43 201501020141 1 MVIS
44 201501020151 1 MVIS
45 201501020161 1 MVIS
46 201501020171 1 MVIS
47 201501020181 1 MVIS
48 201501020221 8 PMED
49 201701040011 3 EROM
50 201731020151 8 PMED

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-152G) events
Obs EVNTIDX EVENTYPE
1 200111010011 1 MVIS
2 200411050011 1 MVIS
3 200411050031 1 MVIS
4 200941020171 1 MVIS
5 200941020201 1 MVIS
6 200961010401 1 MVIS
7 200961010411 1 MVIS
8 200961010421 1 MVIS
9 200961010431 1 MVIS
10 201091010011 1 MVIS
11 201091010021 1 MVIS
12 201091010031 1 MVIS
13 201391010061 1 MVIS
14 201391010071 1 MVIS
15 201391010081 1 MVIS
16 201501020111 1 MVIS
17 201501020121 1 MVIS
18 201501020131 1 MVIS
19 201501020141 1 MVIS
20 201501020151 1 MVIS
21 201501020161 1 MVIS
22 201501020171 1 MVIS
23 201501020181 1 MVIS
24 201751010092 1 MVIS
25 201791020031 1 MVIS
26 201921020081 1 MVIS
27 201991030011 1 MVIS
28 202301050111 1 MVIS
29 202301050121 1 MVIS
30 202621020142 1 MVIS
31 202621020152 1 MVIS
32 202831040011 1 MVIS
33 202831040021 1 MVIS
34 202851040081 1 MVIS
35 203341010011 1 MVIS
36 203341010021 1 MVIS
37 203341010261 1 MVIS
38 203411010121 1 MVIS
39 203451020101 1 MVIS
40 203661020101 1 MVIS
41 203951020051 1 MVIS
42 204621050011 1 MVIS
43 205071010011 1 MVIS
44 205081010061 1 MVIS
45 205331010011 1 MVIS
46 205411010041 1 MVIS
47 205411010051 1 MVIS
48 205411010061 1 MVIS
49 205411010071 1 MVIS
50 205411010081 1 MVIS

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of work.rxlk - sorted by evntidx
Rx+event link file records (HC-152IF2)
EVNTIDX LINKIDX EVENTYPE
200051010011 200051010031 1 MVIS
200051010011 200051010041 1 MVIS
200051010021 200051010051 1 MVIS
200051010021 200051010061 1 MVIS
200051010021 200051010071 1 MVIS
200051010081 200051010111 1 MVIS
200051010081 200051010121 1 MVIS
200051010081 200051010131 1 MVIS
200101020011 200101020031 1 MVIS
200101040031 200101040041 1 MVIS
200151020021 200151020041 1 MVIS
200161010091 200161010111 5 DVIS
200161010091 200161010121 5 DVIS
200161010101 200161010131 5 DVIS
200161010101 200161010141 5 DVIS
200171030011 200171030021 1 MVIS
200201010021 200201010041 1 MVIS
200201010021 200201010051 1 MVIS
200201010091 200201010211 1 MVIS
200201010191 200201010221 4 STAZ
200201020011 200201020031 1 MVIS
200201020021 200201020041 1 MVIS
200201020061 200201020131 1 MVIS
200201020081 200201020141 1 MVIS
200201020081 200201020151 1 MVIS
200201020091 200201020161 1 MVIS
200201020121 200201020171 3 EROM
200201020121 200201020181 3 EROM
200201020191 200201020281 1 MVIS
200202010012 200202010032 3 EROM
200202010022 200202010042 3 EROM
200202010022 200202010052 3 EROM
200241010011 200241010031 1 MVIS
200241010061 200241010081 2 OPAT
200241020021 200241020051 1 MVIS
200241020111 200241020121 1 MVIS
200241030022 200241030042 1 MVIS
200241030022 200241030052 1 MVIS
200241030032 200241030042 1 MVIS
200241030082 200241030112 1 MVIS
200241030102 200241030122 1 MVIS
200251010011 200251010021 1 MVIS
200271010031 200271010051 1 MVIS
200271010031 200271010061 1 MVIS
200271010041 200271010071 1 MVIS
200271010161 200271010421 1 MVIS
200271010161 200271010431 1 MVIS
200271010351 200271010441 1 MVIS
200271010351 200271010451 1 MVIS
200271010561 200271010751 1 MVIS
200271010621 200271010761 1 MVIS
200271010621 200271010771 1 MVIS
200271020051 200271020561 1 MVIS
200271020181 200271020581 4 STAZ
200271020181 200271020591 4 STAZ
200271020271 200271020601 5 DVIS
200271020781 200271020891 1 MVIS
200301010041 200301010031 2 OPAT
200301010051 200301010061 1 MVIS
200301010051 200301010071 1 MVIS
200311020021 200311020031 1 MVIS
200311020211 200311020441 2 OPAT
200311020301 200311020451 1 MVIS
200311020311 200311020461 1 MVIS
200311020311 200311020471 1 MVIS
200311020321 200311020471 1 MVIS
200311020321 200311020481 1 MVIS
200311020321 200311020491 1 MVIS
200311020321 200311020501 1 MVIS
200321030021 200321030031 1 MVIS
200341010011 200341010051 5 DVIS
200341010031 200341010061 1 MVIS
200341010031 200341010071 1 MVIS
200341010031 200341010081 1 MVIS
200341010031 200341010091 1 MVIS
200341010031 200341010101 1 MVIS
200341010141 200341010171 1 MVIS
200341010141 200341010181 1 MVIS
200341010141 200341010191 1 MVIS
200341010141 200341010201 1 MVIS
200341010141 200341010211 1 MVIS
200341010141 200341010221 1 MVIS
200341030011 200341030031 5 DVIS
200341030021 200341030041 1 MVIS
200341030051 200341030061 1 MVIS
200341030051 200341030071 1 MVIS
200341030051 200341030081 1 MVIS
200381010011 200381010021 1 MVIS
200401010041 200401010081 1 MVIS
200401010041 200401010091 1 MVIS
200401010061 200401010101 2 OPAT
200401010111 200401010271 1 MVIS
200401020021 200401020061 1 MVIS
200411020012 200411020022 1 MVIS
200411020012 200411020032 1 MVIS
200411040011 200411040021 1 MVIS
200411050011 200411050021 1 MVIS
200411050031 200411050041 1 MVIS
200421010011 200421010021 1 MVIS
200421010121 200421010181 1 MVIS
200421010121 200421010191 1 MVIS
200421010121 200421010201 1 MVIS
200421010121 200421010211 1 MVIS
200421010121 200421010221 1 MVIS
200421010131 200421010171 1 MVIS
200421010131 200421010231 1 MVIS
200441020081 200441020101 4 STAZ
200461020021 200461020031 1 MVIS
200461020051 200461020071 1 MVIS
200461030011 200461030021 1 MVIS
200461050021 200461050031 1 MVIS
200461060041 200461060061 1 MVIS
200461060041 200461060071 1 MVIS
200461060041 200461060081 1 MVIS
200461060041 200461060091 1 MVIS
200471010021 200471010081 1 MVIS
200471010061 200471010091 1 MVIS
200471010101 200471010301 5 DVIS
200481020011 200481020071 1 MVIS
200481020011 200481020081 1 MVIS
200493020083 200493020143 3 EROM
200493020103 200493020153 1 MVIS
200493020103 200493020163 1 MVIS
200501010021 200501010031 1 MVIS
200501020011 200501020151 1 MVIS
200511010011 200511010031 1 MVIS
200511010011 200511010041 1 MVIS
200531010011 200531010061 1 MVIS
200531010091 200531010131 1 MVIS
200531010101 200531010141 2 OPAT
200531010101 200531010151 2 OPAT
200541020051 200541020091 1 MVIS
200541020051 200541020101 1 MVIS
200541020051 200541020111 1 MVIS
200551030011 200551030021 1 MVIS
200551030011 200551030031 1 MVIS
200591010141 200591010231 3 EROM
200591030021 200591030031 1 MVIS
200591030121 200591030141 1 MVIS
200591040021 200591040041 1 MVIS

Return to Top

HC-152I
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
200411050011 200411050021 1 MVIS
200411050031 200411050041 1 MVIS
200941020171 200941020261 1 MVIS
200941020201 200941020261 1 MVIS
200961010401 200961010541 1 MVIS
200961010401 200961010551 1 MVIS
200961010401 200961010561 1 MVIS
200961010401 200961010571 1 MVIS
200961010401 200961010581 1 MVIS
200961010401 200961010591 1 MVIS
201091010011 201091010041 1 MVIS
201391010061 201391010121 1 MVIS
201751010092 201751010112 1 MVIS
201791020031 201791020041 1 MVIS
201791020031 201791020051 1 MVIS
201991030011 201991030031 1 MVIS
201991030011 201991030041 1 MVIS
202301050111 202301050181 1 MVIS
202621020142 202621020212 1 MVIS
202831040011 202831040041 1 MVIS
202851040081 202851040101 1 MVIS
202851040081 202851040111 1 MVIS
203411010121 203411010261 1 MVIS
203451020101 203451020111 1 MVIS
203451020101 203451020121 1 MVIS
203661020101 203661020121 1 MVIS
203661020101 203661020131 1 MVIS
203951020051 203951020061 1 MVIS
204621050011 204621050021 1 MVIS
205071010011 205071010071 1 MVIS
205071010011 205071010081 1 MVIS
205071010011 205071010091 1 MVIS
205331010011 205331010021 1 MVIS
205331010011 205331010031 1 MVIS
205331010011 205331010041 1 MVIS
205411010041 205411010181 1 MVIS
205411010041 205411010191 1 MVIS
205411010041 205411010201 1 MVIS
205411010041 205411010211 1 MVIS
205411010041 205411010221 1 MVIS
205411010041 205411010231 1 MVIS
205411010041 205411010241 1 MVIS
205411010041 205411010251 1 MVIS
205411010041 205411010261 1 MVIS
205411010041 205411010271 1 MVIS
205411010041 205411010281 1 MVIS
205411010041 205411010291 1 MVIS
205411010041 205411010301 1 MVIS
205411010041 205411010311 1 MVIS
205411010041 205411010321 1 MVIS

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of work.pmedids - sorted by linkidx
Obs EVNTIDX LINKIDX EVENTYPE
1 200411050011 200411050021 1 MVIS
2 200411050031 200411050041 1 MVIS
3 200941020171 200941020261 1 MVIS
4 200941020201 200941020261 1 MVIS
5 200961010401 200961010541 1 MVIS
6 200961010401 200961010551 1 MVIS
7 200961010401 200961010561 1 MVIS
8 200961010401 200961010571 1 MVIS
9 200961010401 200961010581 1 MVIS
10 200961010401 200961010591 1 MVIS
11 201091010011 201091010041 1 MVIS
12 201391010061 201391010121 1 MVIS
13 201751010092 201751010112 1 MVIS
14 201791020031 201791020041 1 MVIS
15 201791020031 201791020051 1 MVIS
16 201991030011 201991030031 1 MVIS
17 201991030011 201991030041 1 MVIS
18 202301050111 202301050181 1 MVIS
19 202621020142 202621020212 1 MVIS
20 202831040011 202831040041 1 MVIS
21 202851040081 202851040101 1 MVIS
22 202851040081 202851040111 1 MVIS
23 203411010121 203411010261 1 MVIS
24 203451020101 203451020111 1 MVIS
25 203451020101 203451020121 1 MVIS
26 203661020101 203661020121 1 MVIS
27 203661020101 203661020131 1 MVIS
28 203951020051 203951020061 1 MVIS
29 204621050011 204621050021 1 MVIS
30 205071010011 205071010071 1 MVIS
31 205071010011 205071010081 1 MVIS
32 205071010011 205071010091 1 MVIS
33 205331010011 205331010021 1 MVIS
34 205331010011 205331010031 1 MVIS
35 205331010011 205331010041 1 MVIS
36 205411010041 205411010181 1 MVIS
37 205411010051 205411010181 1 MVIS
38 205411010041 205411010191 1 MVIS
39 205411010051 205411010191 1 MVIS
40 205411010041 205411010201 1 MVIS
41 205411010051 205411010201 1 MVIS
42 205411010041 205411010211 1 MVIS
43 205411010051 205411010211 1 MVIS
44 205411010041 205411010221 1 MVIS
45 205411010051 205411010221 1 MVIS
46 205411010041 205411010231 1 MVIS
47 205411010051 205411010231 1 MVIS
48 205411010041 205411010241 1 MVIS
49 205411010051 205411010241 1 MVIS
50 205411010041 205411010251 1 MVIS

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of unique linkidxs in work.pmedids
Obs LINKIDX
1 200411050021
2 200411050041
3 200941020261
4 200961010541
5 200961010551
6 200961010561
7 200961010571
8 200961010581
9 200961010591
10 201091010041
11 201391010121
12 201751010112
13 201791020041
14 201791020051
15 201991030031
16 201991030041
17 202301050181
18 202621020212
19 202831040041
20 202851040101
21 202851040111
22 203411010261
23 203451020111
24 203451020121
25 203661020121
26 203661020131
27 203951020061
28 204621050021
29 205071010071
30 205071010081
31 205071010091
32 205331010021
33 205331010031
34 205331010041
35 205411010181
36 205411010191
37 205411010201
38 205411010211
39 205411010221
40 205411010231
41 205411010241
42 205411010251
43 205411010261
44 205411010271
45 205411010281
46 205411010291
47 205411010301
48 205411010311
49 205411010321
50 205411010451

Return to Top

HC-152I
Sample SAS Job for Example A
sample print of work.mvpmeds
PMED (HC-152A) records for unique linkidxs in work.pmedids
LINKIDX RXRECIDX RXNAME RXXP12X PERWT12F
200411050021 200411050021001 NEBILIZER 127.89 8127.03
200411050041 200411050041001 ALBUTEROL 2.67 8127.03
200941020261 200941020261001 AMLODIPINE 9.64 6166.62
200941020261 200941020261002 AMLODIPINE 9.64 6166.62
200941020261 200941020261003 AMLODIPINE 9.64 6166.62
200941020261 200941020261004 AMLODIPINE 9.64 6166.62
200961010541 200961010541001 METOPROLOL 21.78 2297.49
200961010541 200961010541002 METOPROLOL 21.78 2297.49
200961010541 200961010541003 METOPROLOL 21.78 2297.49
200961010541 200961010541004 METOPROLOL 21.78 2297.49
200961010551 200961010551001 ENALAPRIL 4.88 2297.49
200961010551 200961010551002 ENALAPRIL 4.88 2297.49
200961010551 200961010551003 ENALAPRIL 4.88 2297.49
200961010551 200961010551004 ENALAPRIL 4.88 2297.49
200961010561 200961010561001 AGGRENOX 253.45 2297.49
200961010561 200961010561002 AGGRENOX 253.45 2297.49
200961010561 200961010561003 AGGRENOX 253.45 2297.49
200961010561 200961010561004 AGGRENOX 253.45 2297.49
200961010571 200961010571001 FENOFIBRATE 45.86 2297.49
200961010581 200961010581001 GEMFIBROZIL 13.66 2297.49
200961010591 200961010591001 METFORMIN 17.39 2297.49
200961010591 200961010591002 METFORMIN 17.39 2297.49
200961010591 200961010591003 METFORMIN 17.39 2297.49
200961010591 200961010591004 METFORMIN 17.39 2297.49
201091010041 201091010041001 VENTOLIN HFA 43.26 5956.03
201091010041 201091010041002 VENTOLIN HFA 43.26 5956.03
201091010041 201091010041003 VENTOLIN HFA 43.26 5956.03
201391010121 201391010121001 AZITHROMYCIN 5.01 8966.52
201751010112 201751010112001 AZITHROMYCIN 26.98 4636.78
201751010112 201751010112002 AZITHROMYCIN 26.98 4636.78
201791020041 201791020041001 PROAIR INHALER 41.82 18436.16
201791020051 201791020051001 CHANTIX 181.28 18436.16
201991030031 201991030031001 ADVAIR DISKUS 182.02 3526.80
201991030041 201991030041001 FLONASE 29.78 3526.80
202301050181 202301050181001 ALBUTEROL 0.00 2460.35
202301050181 202301050181002 ALBUTEROL 0.00 2460.35
202301050181 202301050181003 ALBUTEROL 0.00 2460.35
202301050181 202301050181004 ALBUTEROL 0.00 2460.35
202301050181 202301050181005 ALBUTEROL 0.00 2460.35
202301050181 202301050181006 ALBUTEROL 0.00 2460.35
202301050181 202301050181007 ALBUTEROL 0.00 2460.35
202301050181 202301050181008 ALBUTEROL 0.00 2460.35
202301050181 202301050181009 ALBUTEROL 0.00 2460.35
202301050181 202301050181010 ALBUTEROL 0.00 2460.35
202301050181 202301050181011 ALBUTEROL 0.00 2460.35
202301050181 202301050181012 ALBUTEROL 0.00 2460.35
202301050181 202301050181013 ALBUTEROL 0.00 2460.35
202301050181 202301050181014 ALBUTEROL 0.00 2460.35
202301050181 202301050181015 ALBUTEROL 0.00 2460.35
202621020212 202621020212001 ADVAIR 149.86 3241.64
202831040041 202831040041001 ALBUTEROL 61.41 2317.84
202851040101 202851040101001 MONTELUKAST 244.68 19783.69
202851040111 202851040111001 PROAIR HFA 43.74 19783.69
203411010261 203411010261001 ALBUTEROL 11.00 9581.70
203451020111 203451020111001 SERTRALINE 48.99 11600.60
203451020121 203451020121001 ADVAIR HFA 326.99 11600.60
203451020121 203451020121002 ADVAIR HFA 326.99 11600.60
203451020121 203451020121003 ADVAIR HFA 326.99 11600.60
203661020121 203661020121001 MONTELUKAST 10.00 4796.82
203661020131 203661020131001 SYMBICORT 249.24 4796.82
203661020131 203661020131002 SYMBICORT 249.24 4796.82
203661020131 203661020131003 SYMBICORT 249.24 4796.82
203661020131 203661020131004 SYMBICORT 249.24 4796.82
203951020061 203951020061001 ALBUTEROL SULFATE 19.75 4373.85
204621050021 204621050021001 PREDNISOLONE 5.00 2160.24
205071010071 205071010071001 ALBUTEROL INHALER 53.10 11747.34
205071010081 205071010081001 COUGH 2.25 11747.34
205071010091 205071010091001 MICROGESTIN 16.66 11747.34
205331010021 205331010021001 HYDROCHLOROT 4.00 8084.80
205331010031 205331010031001 AMLODIPINE 16.32 8084.80
205331010041 205331010041001 HYDROCO/APAP 70.70 8084.80
205411010181 205411010181001 ONETOUCH 79.36 3051.60
205411010181 205411010181002 ONETOUCH 79.36 3051.60
205411010181 205411010181003 ONETOUCH 79.36 3051.60
205411010181 205411010181004 ONETOUCH 79.36 3051.60
205411010181 205411010181005 ONETOUCH 79.36 3051.60
205411010181 205411010181006 ONETOUCH 79.36 3051.60
205411010181 205411010181007 ONETOUCH 79.36 3051.60
205411010191 205411010191001 METOCLOPRAMIDE 24.24 3051.60
205411010191 205411010191002 METOCLOPRAMIDE 24.24 3051.60
205411010191 205411010191003 METOCLOPRAMIDE 24.24 3051.60
205411010191 205411010191004 METOCLOPRAMIDE 24.24 3051.60
205411010191 205411010191005 METOCLOPRAMIDE 24.24 3051.60
205411010191 205411010191006 METOCLOPRAMIDE 24.24 3051.60
205411010191 205411010191007 METOCLOPRAMIDE 24.24 3051.60
205411010201 205411010201001 ISOSORBIDE MONO 35.90 3051.60
205411010201 205411010201002 ISOSORBIDE MONO 35.90 3051.60
205411010201 205411010201003 ISOSORBIDE MONO 35.90 3051.60
205411010201 205411010201004 ISOSORBIDE MONO 35.90 3051.60
205411010201 205411010201005 ISOSORBIDE MONO 35.90 3051.60
205411010201 205411010201006 ISOSORBIDE MONO 35.90 3051.60
205411010201 205411010201007 ISOSORBIDE MONO 35.90 3051.60
205411010211 205411010211001 VITAMIN D 4.76 3051.60
205411010211 205411010211002 VITAMIN D 4.76 3051.60
205411010211 205411010211003 VITAMIN D 4.94 3051.60
205411010211 205411010211004 VITAMIN D 4.94 3051.60
205411010211 205411010211005 VITAMIN D 4.91 3051.60
205411010211 205411010211006 VITAMIN D 4.94 3051.60
205411010211 205411010211007 VITAMIN D 4.94 3051.60
205411010221 205411010221001 CARVEDILOL 119.99 3051.60
205411010221 205411010221002 CARVEDILOL 119.99 3051.60
205411010221 205411010221003 CARVEDILOL 119.99 3051.60
205411010221 205411010221004 CARVEDILOL 119.99 3051.60
205411010221 205411010221005 CARVEDILOL 119.99 3051.60
205411010221 205411010221006 CARVEDILOL 119.99 3051.60
205411010221 205411010221007 CARVEDILOL 119.99 3051.60
205411010231 205411010231001 COREG CR 168.36 3051.60
205411010231 205411010231002 COREG CR 168.36 3051.60
205411010231 205411010231003 COREG CR 168.36 3051.60
205411010231 205411010231004 COREG CR 168.36 3051.60
205411010231 205411010231005 COREG CR 168.36 3051.60
205411010231 205411010231006 COREG CR 168.36 3051.60
205411010231 205411010231007 COREG CR 168.36 3051.60
205411010241 205411010241001 STORE IRON 2.40 3051.60
205411010241 205411010241002 STORE IRON 2.40 3051.60
205411010241 205411010241003 STORE IRON 2.40 3051.60
205411010241 205411010241004 STORE IRON 2.40 3051.60
205411010241 205411010241005 STORE IRON 2.40 3051.60
205411010241 205411010241006 STORE IRON 2.40 3051.60
205411010241 205411010241007 STORE IRON 2.40 3051.60
205411010251 205411010251001 SPIRONOLACT 13.58 3051.60
205411010251 205411010251002 SPIRONOLACT 13.58 3051.60
205411010251 205411010251003 SPIRONOLACT 13.58 3051.60
205411010251 205411010251004 SPIRONOLACT 13.58 3051.60
205411010251 205411010251005 SPIRONOLACT 13.58 3051.60
205411010251 205411010251006 SPIRONOLACT 13.58 3051.60
205411010251 205411010251007 SPIRONOLACT 13.58 3051.60
205411010261 205411010261001 ALLOPURINOL 10.79 3051.60
205411010261 205411010261002 ALLOPURINOL 10.79 3051.60
205411010261 205411010261003 ALLOPURINOL 10.79 3051.60
205411010261 205411010261004 ALLOPURINOL 10.79 3051.60
205411010261 205411010261005 ALLOPURINOL 4.91 3051.60
205411010261 205411010261006 ALLOPURINOL 4.91 3051.60
205411010261 205411010261007 ALLOPURINOL 4.91 3051.60
205411010271 205411010271001 SIMVASTATIN 18.29 3051.60
205411010271 205411010271002 SIMVASTATIN 18.29 3051.60
205411010271 205411010271003 SIMVASTATIN 18.29 3051.60
205411010271 205411010271004 SIMVASTATIN 18.29 3051.60
205411010271 205411010271005 SIMVASTATIN 18.29 3051.60
205411010271 205411010271006 SIMVASTATIN 18.29 3051.60
205411010271 205411010271007 SIMVASTATIN 18.29 3051.60
205411010281 205411010281001 ACIDOPHILUS 6.19 3051.60
205411010281 205411010281002 ACIDOPHILUS 6.19 3051.60
205411010281 205411010281003 ACIDOPHILUS 6.19 3051.60
205411010281 205411010281004 ACIDOPHILUS 6.19 3051.60
205411010281 205411010281005 ACIDOPHILUS 6.19 3051.60
205411010281 205411010281006 ACIDOPHILUS 6.19 3051.60
205411010281 205411010281007 ACIDOPHILUS 6.19 3051.60
205411010291 205411010291001 JANUVIA 233.71 3051.60
205411010291 205411010291002 JANUVIA 233.71 3051.60
205411010291 205411010291003 JANUVIA 233.71 3051.60
205411010291 205411010291004 JANUVIA 233.71 3051.60
205411010291 205411010291005 JANUVIA 233.71 3051.60
205411010291 205411010291006 JANUVIA 233.71 3051.60
205411010291 205411010291007 JANUVIA 233.71 3051.60
205411010301 205411010301001 METOLAZONE 20.85 3051.60
205411010301 205411010301002 METOLAZONE 20.85 3051.60
205411010301 205411010301003 METOLAZONE 20.85 3051.60
205411010301 205411010301004 METOLAZONE 20.85 3051.60
205411010301 205411010301005 METOLAZONE 20.85 3051.60
205411010301 205411010301006 METOLAZONE 20.85 3051.60
205411010301 205411010301007 METOLAZONE 20.85 3051.60
205411010311 205411010311001 COMBIVENT 274.99 3051.60
205411010311 205411010311002 COMBIVENT 274.99 3051.60
205411010311 205411010311003 COMBIVENT 274.99 3051.60
205411010311 205411010311004 COMBIVENT 274.99 3051.60
205411010311 205411010311005 COMBIVENT 274.99 3051.60
205411010311 205411010311006 COMBIVENT 274.99 3051.60
205411010311 205411010311007 COMBIVENT 274.99 3051.60
205411010321 205411010321001 FLUTICASONE 21.70 3051.60
205411010321 205411010321002 FLUTICASONE 21.70 3051.60
205411010321 205411010321003 FLUTICASONE 21.70 3051.60
205411010321 205411010321004 FLUTICASONE 21.70 3051.60
205411010321 205411010321005 FLUTICASONE 21.70 3051.60
205411010321 205411010321006 FLUTICASONE 21.70 3051.60
205411010321 205411010321007 FLUTICASONE 21.70 3051.60
205411010451 205411010451001 NOVOFINE 37.83 3051.60
205411010451 205411010451002 NOVOFINE 37.83 3051.60
205411010451 205411010451003 FREESTYLE 101.64 3051.60
205411010451 205411010451004 FREESTYLE 101.64 3051.60
205411010451 205411010451005 NOVOFINE 37.83 3051.60
205411010461 205411010461001 METOCLOPRAMIDE 14.99 3051.60
205411010461 205411010461002 METOCLOPRAMIDE 14.99 3051.60
205411010461 205411010461003 METOCLOPRAMIDE 14.99 3051.60
205411010461 205411010461004 METOCLOPRAMIDE 14.99 3051.60
205411010461 205411010461005 METOCLOPRAMIDE 14.99 3051.60
205411010471 205411010471001 JANUVIA 659.82 3051.60
205411010471 205411010471002 JANUVIA 659.82 3051.60
205411010471 205411010471003 JANUVIA 659.82 3051.60
205411010471 205411010471004 JANUVIA 659.82 3051.60
205411010471 205411010471005 JANUVIA 659.82 3051.60
205411010481 205411010481001 FERROUS SULF 15.75 3051.60
205411010481 205411010481002 FERROUS SULF 15.75 3051.60
205411010491 205411010491001 ISOSORBIDE MN 10.67 3051.60
205411010491 205411010491002 ISOSORBIDE MN 10.67 3051.60
205411010491 205411010491003 ISOSORBIDE MN 10.67 3051.60
205411010491 205411010491004 ISOSORBIDE MN 10.67 3051.60
205411010491 205411010491005 ISOSORBIDE MN 10.67 3051.60
205411010501 205411010501001 VITAMIN D 4.76 3051.60
205411010501 205411010501002 VITAMIN D 4.76 3051.60

Return to Top

HC-152I
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma
Analysis Variable: RXXP12X SUM OF PAYMENTS RXSF12X-RXOU12X(IMPUTED)
N Sum
5534 515610.96

Return to Top

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

Weighted
Analysis Variable: RXXP12X SUM OF PAYMENTS RXSF12X-RXOU12X(IMPUTED)
N Sum
5534 4982195102

Return to Top

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

NOTE: Enhanced analytical products:

SAS/STAT 12.1, SAS/ETS 12.1, SAS/OR 12.1, SAS/IML 12.1, SAS/QC 12.1

NOTE: SAS initialization used:
real time 2.39 seconds
cpu time 0.26 seconds

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

NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds

NOTE: AUTOEXEC processing completed.

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

12
13 Calculate the expenditures for prescribed medicines associated with asthma.
14

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

25 RUN;

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

26
27
28 Get condition records coded as asthma.
29

30 DATA ASCONDS;
31 SET IN.H154 (KEEP=CONDIDX CCCODEX);
32 IF CCCODEX="128";
33 RUN;

NOTE: There were 118850 observations read from the data set IN.H154.
NOTE: The data set WORK.ASCONDS has 2515 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 90.00 percent.
Compressed is 19 pages; un-compressed would require 10 pages.
NOTE: DATA statement used (Total process time):
real time 1.93 seconds
cpu time 0.04 seconds

34
35
36 Get the events linked to each of the asthma condition records.
37

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

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

39
40 proc print data=asconds (obs=50);
41 title3 "sample print of work.asconds - sorted by condidx";
42 title4 "COND (H154) records where cccodex=128";
43 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.04 seconds
cpu time 0.04 seconds

44
45 PROC SORT DATA=IN.H152IF1 OUT=CLNK; BY CONDIDX; RUN;


NOTE: There were 329484 observations read from the data set IN.H152IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 329484 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.91 percent.
Compressed is 6233 pages; un-compressed would require 5885 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.91 seconds
cpu time 0.65 seconds


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

NOTE: There were 329484 observations read from the data set WORK.CLNK.
NOTE: There were 2515 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7010 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 26.79 percent.
Compressed is 71 pages; un-compressed would require 56 pages.
NOTE: DATA statement used (Total process time):
real time 0.22 seconds
cpu time 0.20 seconds

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

63
64 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

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

cpu time 0.01 seconds

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

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

70
71 DATA ASCLNKS;
72 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
73 BY EVNTIDX;
74 IF FIRST.EVNTIDX;
75 RUN;

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

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

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

81
82
83 Get PMED records linked to asthma condition records.
84

85 PROC SORT DATA=IN.H152A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 324744 observations read from the data set IN.H152A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 324744 observations and 74 variables.
NOTE: Compressing data set WORK.PMED decreased size by 50.18 percent.
Compressed is 6472 pages; un-compressed would require 12991 pages.
NOTE: PROCEDURE SORT used (Total process time):

real time 15.82 seconds
cpu time 2.59 seconds

86
87 DATA ASPMEDS;
88 MERGE PMED (KEEP=LINKIDX RXRECIDX RXNAME RXXP12X PERWT12F)
89 ASCLNKS (IN=INASCLNK KEEP=EVNTIDX RENAME=(EVNTIDX=LINKIDX));
90 BY LINKIDX;
91 IF INASCLNK & PERWT12F>0;
92 RUN;

NOTE: There were 324744 observations read from the data set WORK.PMED.
NOTE: There were 6999 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASPMEDS has 10318 observations and 5 variables.
NOTE: Compressing data set WORK.ASPMEDS decreased size by 29.84 percent.
Compressed is 87 pages; un-compressed would require 124 pages.
NOTE: DATA statement used (Total process time):
real time 0.66 seconds
cpu time 0.67 seconds

93
94 proc report data=aspmeds (obs=300) nowd headskip;
95 column LINKIDX RXRECIDX RXNAME RXXP12X PERWT12F;
96 define linkidx / 'LINKIDX' order;
97 define rxrecidx / 'RXRECIDX';
98 define rxname / 'RXNAME';
99 define rxxp12x / 'RXXP12X' display format=8.2;
100 define perwt12f / 'PERWT12F' display format=8.2;
101 break after linkidx / skip;
102 title3 "sample print of work.aspmeds";
103 title4 "PMED (HC-152A) records which link to condition records coded as asthma";
104 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.07 seconds
cpu time 0.07 seconds

105
106 PROC MEANS DATA=ASPMEDS N SUM;
107 VAR RXXP12X;
108 TITLE3 "Total Rx expenditures associated with asthma";
109 RUN;

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

110
111 PROC MEANS DATA=ASPMEDS N SUM;
112 VAR RXXP12X;
113 WEIGHT PERWT12F;
114 TITLE3 "Total Rx expenditures associated with asthma";
115 TITLE5 "Weighted";
116 RUN;

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

117
118 ods rtf close;
119

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

Return to Top

HC-152I
Sample SAS Job for Example B
sample print of work.asconds - sorted by condidx
COND (H154) records where cccodex=128
Obs CONDIDX CCCODEX
1 200111010041 128
2 200321020011 128
3 200331080011 128
4 200411050011 128
5 200461030011 128
6 200461060011 128
7 200481050011 128
8 200591010021 128
9 200591030011 128
10 200841020051 128
11 200941010021 128
12 200941020051 128
13 200961010081 128
14 200961030011 128
15 201091010021 128
16 201391010061 128
17 201501020021 128
18 201701040011 128
19 201731020021 128
20 201751010042 128
21 201791020011 128
22 201921020051 128
23 201991030011 128
24 202301020021 128
25 202301030011 128
26 202301050061 128
27 202541010021 128
28 202571010021 128
29 202621020042 128
30 202621060012 128
31 202631020011 128
32 202641010041 128
33 202641010061 128
34 202701050011 128
35 202781020011 128
36 202831040011 128
37 202831040021 128
38 202851010021 128
39 202851030012 128
40 202851040011 128
41 202941030011 128
42 202941040011 128
43 202971030011 128
44 203341010051 128
45 203411010021 128
46 203451020021 128
47 203451030011 128
48 203591010041 128
49 203661020011 128
50 203791010011 128

Return to Top

HC-152I
Sample SAS Job for Example B
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
200111010041 200111010011 1 MVIS
200111010041 200111010031 7 HVIS
200111010041 200111010041 7 HVIS
200111010041 200111010051 7 HVIS
200331080011 200331080021 8 PMED
200411050011 200411050011 1 MVIS
200411050011 200411050021 8 PMED
200411050011 200411050031 1 MVIS
200411050011 200411050041 8 PMED
200411050011 200411050081 8 PMED
200461030011 200461030021 8 PMED
200591010021 200591010131 8 PMED
200591030011 200591030041 8 PMED
200591030011 200591030051 8 PMED
200591030011 200591030151 8 PMED
200591030011 200591030161 8 PMED
200941010021 200941010021 8 PMED
200941010021 200941010031 8 PMED
200941010021 200941010271 8 PMED
200941020051 200941020171 1 MVIS
200941020051 200941020201 1 MVIS
200961010081 200961010401 1 MVIS
200961010081 200961010411 1 MVIS
200961010081 200961010421 1 MVIS
200961010081 200961010431 1 MVIS
200961030011 200961030041 8 PMED
201091010021 201091010011 1 MVIS
201091010021 201091010021 1 MVIS
201091010021 201091010031 1 MVIS
201091010021 201091010041 8 PMED
201391010061 201391010061 1 MVIS
201391010061 201391010071 1 MVIS
201391010061 201391010081 1 MVIS
201391010061 201391010091 2 OPAT
201391010061 201391010101 2 OPAT
201391010061 201391010141 8 PMED
201391010061 201391010211 8 PMED
201391010061 201391010251 8 PMED
201391010061 201391010321 8 PMED
201501020021 201501020111 1 MVIS
201501020021 201501020121 1 MVIS
201501020021 201501020131 1 MVIS
201501020021 201501020141 1 MVIS
201501020021 201501020151 1 MVIS
201501020021 201501020161 1 MVIS
201501020021 201501020171 1 MVIS
201501020021 201501020181 1 MVIS
201501020021 201501020221 8 PMED
201701040011 201701040011 3 EROM
201731020021 201731020151 8 PMED
201731020021 201731020261 8 PMED
201751010042 201751010072 8 PMED
201751010042 201751010092 1 MVIS
201751010042 201751010112 8 PMED
201791020011 201791020031 1 MVIS
201791020011 201791020041 8 PMED
201921020051 201921020081 1 MVIS
201991030011 201991030011 1 MVIS
201991030011 201991030031 8 PMED
202301050061 202301050111 1 MVIS
202301050061 202301050121 1 MVIS
202301050061 202301050181 8 PMED
202541010021 202541010101 8 PMED
202541010021 202541010111 8 PMED
202621020042 202621020042 8 PMED
202621020042 202621020052 8 PMED
202621020042 202621020082 8 PMED
202621020042 202621020102 3 EROM
202621020042 202621020112 4 STAZ
202621020042 202621020142 1 MVIS
202621020042 202621020152 1 MVIS
202621020042 202621020212 8 PMED
202641010041 202641010041 4 STAZ
202641010041 202641010051 2 OPAT
202641010041 202641010061 2 OPAT

Return to Top

HC-152I
Sample SAS Job for Example B
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 200111010041 200111010011 1 MVIS
2 200111010041 200111010031 7 HVIS
3 200111010041 200111010041 7 HVIS
4 200111010041 200111010051 7 HVIS
5 200331080011 200331080021 8 PMED
6 200411050011 200411050011 1 MVIS
7 200411050011 200411050021 8 PMED
8 200411050011 200411050031 1 MVIS
9 200411050011 200411050041 8 PMED
10 200411050011 200411050081 8 PMED
11 200461030011 200461030021 8 PMED
12 200591010021 200591010131 8 PMED
13 200591030011 200591030041 8 PMED
14 200591030011 200591030051 8 PMED
15 200591030011 200591030151 8 PMED
16 200591030011 200591030161 8 PMED
17 200941010021 200941010021 8 PMED
18 200941010021 200941010031 8 PMED
19 200941010021 200941010271 8 PMED
20 200941020051 200941020171 1 MVIS
21 200941020051 200941020201 1 MVIS
22 200961010081 200961010401 1 MVIS
23 200961010081 200961010411 1 MVIS
24 200961010081 200961010421 1 MVIS
25 200961010081 200961010431 1 MVIS
26 200961030011 200961030041 8 PMED
27 201091010021 201091010011 1 MVIS
28 201091010021 201091010021 1 MVIS
29 201091010021 201091010031 1 MVIS
30 201091010021 201091010041 8 PMED
31 201391010061 201391010061 1 MVIS
32 201391010061 201391010071 1 MVIS
33 201391010061 201391010081 1 MVIS
34 201391010061 201391010091 2 OPAT
35 201391010061 201391010101 2 OPAT
36 201391010061 201391010141 8 PMED
37 201391010061 201391010211 8 PMED
38 201391010061 201391010251 8 PMED
39 201391010061 201391010321 8 PMED
40 201501020021 201501020111 1 MVIS
41 201501020021 201501020121 1 MVIS
42 201501020021 201501020131 1 MVIS
43 201501020021 201501020141 1 MVIS
44 201501020021 201501020151 1 MVIS
45 201501020021 201501020161 1 MVIS
46 201501020021 201501020171 1 MVIS
47 201501020021 201501020181 1 MVIS
48 201501020021 201501020221 8 PMED
49 201701040011 201701040011 3 EROM
50 201731020021 201731020151 8 PMED

Return to Top

HC-152I
Sample SAS Job for Example B
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 200111010011 1 MVIS
2 200111010031 7 HVIS
3 200111010041 7 HVIS
4 200111010051 7 HVIS
5 200331080021 8 PMED
6 200411050011 1 MVIS
7 200411050021 8 PMED
8 200411050031 1 MVIS
9 200411050041 8 PMED
10 200411050081 8 PMED
11 200461030021 8 PMED
12 200591010131 8 PMED
13 200591030041 8 PMED
14 200591030051 8 PMED
15 200591030151 8 PMED
16 200591030161 8 PMED
17 200941010021 8 PMED
18 200941010031 8 PMED
19 200941010271 8 PMED
20 200941020171 1 MVIS
21 200941020201 1 MVIS
22 200961010401 1 MVIS
23 200961010411 1 MVIS
24 200961010421 1 MVIS
25 200961010431 1 MVIS
26 200961030041 8 PMED
27 201091010011 1 MVIS
28 201091010021 1 MVIS
29 201091010031 1 MVIS
30 201091010041 8 PMED
31 201391010061 1 MVIS
32 201391010071 1 MVIS
33 201391010081 1 MVIS
34 201391010091 2 OPAT
35 201391010101 2 OPAT
36 201391010141 8 PMED
37 201391010211 8 PMED
38 201391010251 8 PMED
39 201391010321 8 PMED
40 201501020111 1 MVIS
41 201501020121 1 MVIS
42 201501020131 1 MVIS
43 201501020141 1 MVIS
44 201501020151 1 MVIS
45 201501020161 1 MVIS
46 201501020171 1 MVIS
47 201501020181 1 MVIS
48 201501020221 8 PMED
49 201701040011 3 EROM
50 201731020151 8 PMED

Return to Top

HC-152I
Sample SAS Job for Example B
sample print of work.aspmeds
PMED (HC-152A) records which link to condition records coded as asthma
LINKIDX RXRECIDX RXNAME RXXP12X PERWT12F
200331080021 200331080021001 PROAIR HFA 84.50 6465.89
200331080021 200331080021002 PROAIR HFA 84.50 6465.89
200331080021 200331080021003 PROAIR HFA 84.50 6465.89
200411050021 200411050021001 NEBILIZER 127.89 8127.03
200411050041 200411050041001 ALBUTEROL 2.67 8127.03
200411050081 200411050081001 Q-PAP 5.82 8127.03
200461030021 200461030021001 ALBUTEROL 11.00 7657.12
200461030021 200461030021002 ALBUTEROL 11.00 7657.12
200591010131 200591010131001 PROAIR HFA 49.25 5515.79
200591010131 200591010131002 PROAIR HFA 49.25 5515.79
200591030041 200591030041001 FLOVENT HFA 153.32 8947.34
200591030051 200591030051001 PROAIR HFA 43.74 8947.34
200591030151 200591030151001 FLOVENT HFA 153.32 8947.34
200591030161 200591030161001 PROAIR HFA 43.74 8947.34
200941010021 200941010021001 ALBUTEROL 165.97 5054.55
200941010031 200941010031001 SYMBICORT 153.37 5054.55
200941010031 200941010031002 SYMBICORT 153.37 5054.55
200941010031 200941010031003 SYMBICORT 153.37 5054.55
200941010271 200941010271001 ALBUTEROL 61.41 5054.55
200961030041 200961030041001 PREDNISOLONE 36.99 2052.99
201091010041 201091010041001 VENTOLIN HFA 43.26 5956.03
201091010041 201091010041002 VENTOLIN HFA 43.26 5956.03
201091010041 201091010041003 VENTOLIN HFA 43.26 5956.03
201391010141 201391010141001 NASONEX 134.34 8966.52
201391010141 201391010141002 NASONEX 134.34 8966.52
201391010141 201391010141003 NASONEX 134.34 8966.52
201391010141 201391010141004 NASONEX 134.34 8966.52
201391010141 201391010141005 NASONEX 134.34 8966.52
201391010141 201391010141006 NASONEX 134.34 8966.52
201391010211 201391010211001 FEXOFENADINE 17.55 8966.52
201391010211 201391010211002 FEXOFENADINE 17.55 8966.52
201391010211 201391010211003 FEXOFENADINE 17.55 8966.52
201391010211 201391010211004 FEXOFENADINE 17.55 8966.52
201391010211 201391010211005 FEXOFENADINE 17.55 8966.52
201391010211 201391010211006 FEXOFENADINE 17.55 8966.52
201391010251 201391010251001 PROAIR HFA 383.18 8966.52
201391010251 201391010251002 PROAIR HFA 383.18 8966.52
201391010251 201391010251003 PROAIR HFA 383.18 8966.52
201391010251 201391010251004 PROAIR HFA 383.18 8966.52
201391010251 201391010251005 PROAIR HFA 383.18 8966.52
201391010251 201391010251006 PROAIR HFA 383.18 8966.52
201391010321 201391010321001 MONTELUKAST 30.35 8966.52
201391010321 201391010321002 MONTELUKAST 30.35 8966.52
201391010321 201391010321003 MONTELUKAST 30.35 8966.52
201391010321 201391010321004 MONTELUKAST 43.55 8966.52
201391010321 201391010321005 MONTELUKAST 43.55 8966.52
201391010321 201391010321006 MONTELUKAST 43.55 8966.52
201501020221 201501020221001 ADVAIR DISKUS 195.49 21334.65
201501020221 201501020221002 ADVAIR DISKUS 195.49 21334.65
201731020151 201731020151001 VENTOLIN HFA 35.00 11470.59
201731020151 201731020151002 VENTOLIN HFA 35.00 11470.59
201731020151 201731020151003 VENTOLIN HFA 35.00 11470.59
201731020151 201731020151004 VENTOLIN HFA 35.00 11470.59
201731020151 201731020151005 VENTOLIN HFA 35.00 11470.59
201731020151 201731020151006 VENTOLIN HFA 35.00 11470.59
201731020261 201731020261001 VENTOLIN HFA 35.00 11470.59
201731020261 201731020261002 VENTOLIN HFA 35.00 11470.59
201731020261 201731020261003 VENTOLIN HFA 35.00 11470.59
201751010072 201751010072001 FLOVENT HFA 221.68 4636.78
201751010072 201751010072002 FLOVENT HFA 221.68 4636.78
201751010112 201751010112001 AZITHROMYCIN 26.98 4636.78
201751010112 201751010112002 AZITHROMYCIN 26.98 4636.78
201791020041 201791020041001 PROAIR INHALER 41.82 18436.16
201991030031 201991030031001 ADVAIR DISKUS 182.02 3526.80
202301050181 202301050181001 ALBUTEROL 0.00 2460.35
202301050181 202301050181002 ALBUTEROL 0.00 2460.35
202301050181 202301050181003 ALBUTEROL 0.00 2460.35
202301050181 202301050181004 ALBUTEROL 0.00 2460.35
202301050181 202301050181005 ALBUTEROL 0.00 2460.35
202301050181 202301050181006 ALBUTEROL 0.00 2460.35
202301050181 202301050181007 ALBUTEROL 0.00 2460.35
202301050181 202301050181008 ALBUTEROL 0.00 2460.35
202301050181 202301050181009 ALBUTEROL 0.00 2460.35
202301050181 202301050181010 ALBUTEROL 0.00 2460.35
202301050181 202301050181011 ALBUTEROL 0.00 2460.35
202301050181 202301050181012 ALBUTEROL 0.00 2460.35
202301050181 202301050181013 ALBUTEROL 0.00 2460.35
202301050181 202301050181014 ALBUTEROL 0.00 2460.35
202301050181 202301050181015 ALBUTEROL 0.00 2460.35
202541010101 202541010101001 QVAR 155.35 44344.95
202541010111 202541010111001 FLUTICASONE 26.85 44344.95
202621020042 202621020042001 ADVAIR 149.86 3241.64
202621020052 202621020052001 ALBUTEROL 11.00 3241.64
202621020082 202621020082001 SPIRIVA 250.56 3241.64
202621020212 202621020212001 ADVAIR 149.86 3241.64
202641010091 202641010091001 DEBILVISS NEBULIZER 12.98 8409.92
202641010101 202641010101001 PROAIR HFA 42.44 8409.92
202641010101 202641010101002 PROAIR HFA 119.34 8409.92
202641010101 202641010101003 PROAIR HFA 119.34 8409.92
202641010101 202641010101004 PROAIR HFA 42.44 8409.92
202641010101 202641010101005 PROAIR HFA 44.52 8409.92
202641010111 202641010111001 QVAR 150.40 8409.92
202641010111 202641010111002 QVAR 150.40 8409.92
202641010111 202641010111003 QVAR 150.40 8409.92
202641010111 202641010111004 QVAR 150.40 8409.92
202641010111 202641010111005 QVAR 156.08 8409.92
202641010131 202641010131001 ALBUTEROL 7.81 8409.92
202641010131 202641010131002 ALBUTEROL 7.81 8409.92
202641010131 202641010131003 ALBUTEROL 7.81 8409.92
202641010131 202641010131004 ALBUTEROL 40.69 8409.92
202641010131 202641010131005 ALBUTEROL 40.69 8409.92
202641010131 202641010131006 ALBUTEROL 40.69 8409.92
202641010151 202641010151001 THEOPHYLLINE 59.27 8409.92
202641010151 202641010151002 THEOPHYLLINE 59.27 8409.92
202641010151 202641010151003 THEOPHYLLINE 10.71 8409.92
202641010151 202641010151004 THEOPHYLLINE 10.71 8409.92
202641010151 202641010151005 THEOPHYLLINE 10.71 8409.92
202641010161 202641010161001 ADVAIR DISKU 242.96 8409.92
202641010161 202641010161002 ADVAIR DISKU 242.96 8409.92
202641010161 202641010161003 ADVAIR DISKU 242.96 8409.92
202641010161 202641010161004 ADVAIR DISKU 242.96 8409.92
202641010161 202641010161005 ADVAIR DISKU 242.96 8409.92
202641010161 202641010161006 ADVAIR DISKU 242.96 8409.92
202641010171 202641010171001 IPRATROPIUM 13.40 8409.92
202641010171 202641010171002 IPRATROPIUM 13.40 8409.92
202641010171 202641010171003 IPRATROPIUM 13.40 8409.92
202641010171 202641010171004 IPRATROPIUM 13.40 8409.92
202641010171 202641010171005 IPRATROPIUM 13.40 8409.92
202641010181 202641010181001 PREDNISONE 2.52 8409.92
202641010191 202641010191001 SPIRIVA 250.56 8409.92
202641010191 202641010191002 SPIRIVA 250.56 8409.92
202641010191 202641010191003 SPIRIVA 250.56 8409.92
202641010191 202641010191004 SPIRIVA 250.56 8409.92
202641010191 202641010191005 SPIRIVA 250.56 8409.92
202641010201 202641010201001 LEVOFLOXACIN 70.30 8409.92
202641010201 202641010201002 LEVOFLOXACIN 70.30 8409.92
202641010201 202641010201003 LEVOFLOXACIN 70.30 8409.92
202641010201 202641010201004 LEVOFLOXACIN 70.30 8409.92
202641010201 202641010201005 LEVOFLOXACIN 70.30 8409.92
202641010201 202641010201006 LEVOFLOXACIN 70.30 8409.92
202641010211 202641010211001 PROAIR HFA 44.52 8409.92
202641010211 202641010211002 PROAIR HFA 44.52 8409.92
202641010211 202641010211003 PROAIR HFA 44.52 8409.92
202641010211 202641010211004 PROAIR HFA 44.52 8409.92
202641010221 202641010221001 QVAR 150.40 8409.92
202641010221 202641010221002 QVAR 150.40 8409.92
202641010221 202641010221003 QVAR 150.40 8409.92
202641010221 202641010221004 QVAR 156.08 8409.92
202641010231 202641010231001 ALBUTEROL 7.81 8409.92
202641010231 202641010231002 ALBUTEROL 7.81 8409.92
202641010231 202641010231003 ALBUTEROL 40.69 8409.92
202641010231 202641010231004 ALBUTEROL 40.69 8409.92
202641010251 202641010251001 THEOPHYLLINE 30.13 8409.92
202641010251 202641010251002 THEOPHYLLINE 30.13 8409.92
202641010251 202641010251003 THEOPHYLLINE 30.13 8409.92
202641010261 202641010261001 ADVAIR DISKU 252.63 8409.92
202641010261 202641010261002 ADVAIR DISKU 252.63 8409.92
202641010261 202641010261003 ADVAIR DISKU 252.63 8409.92
202641010261 202641010261004 ADVAIR DISKU 252.63 8409.92
202641010271 202641010271001 IPRATROPIUM 13.40 8409.92
202641010271 202641010271002 IPRATROPIUM 13.40 8409.92
202641010271 202641010271003 IPRATROPIUM 13.40 8409.92
202641010271 202641010271004 IPRATROPIUM 13.40 8409.92
202641010281 202641010281001 SPIRIVA 250.56 8409.92
202641010281 202641010281002 SPIRIVA 250.56 8409.92
202641010281 202641010281003 SPIRIVA 250.56 8409.92
202641010281 202641010281004 SPIRIVA 250.56 8409.92
202641010291 202641010291001 LEVOFLOXACIN 70.30 8409.92
202641010291 202641010291002 LEVOFLOXACIN 70.30 8409.92
202641010291 202641010291003 LEVOFLOXACIN 70.30 8409.92
202641010291 202641010291004 LEVOFLOXACIN 70.30 8409.92
202781020084 202781020084001 VENTOLIN HFA 40.07 3540.28
202781020084 202781020084002 VENTOLIN HFA 40.07 3540.28
202781020104 202781020104001 ADVAIR DISKU 242.96 3540.28
202831040041 202831040041001 ALBUTEROL 61.41 2317.84
202831040051 202831040051001 PREDNISOLONE 21.99 2317.84
202831040081 202831040081001 ALBUTEROL 61.41 2317.84
202851010021 202851010021001 FLOVENT HFA 257.56 20324.94
202851010071 202851010071001 FLOVENT HFA 280.71 20324.94
202851030042 202851030042001 SYMBICORT 227.22 22420.36
202851040011 202851040011001 SINGULAIR 401.98 19783.69
202851040041 202851040041001 SINGULAIR 441.72 19783.69
202851040101 202851040101001 MONTELUKAST 244.68 19783.69
202851040111 202851040111001 PROAIR HFA 43.74 19783.69
202941030011 202941030011001 FLOVENT HFA 149.99 3608.99
202941030011 202941030011002 FLOVENT HFA 149.99 3608.99
202941030011 202941030011003 FLOVENT HFA 149.99 3608.99
202941030011 202941030011004 FLOVENT HFA 149.99 3608.99
202941030011 202941030011005 FLOVENT HFA 149.99 3608.99
202941030011 202941030011006 FLOVENT HFA 149.99 3608.99
202941030011 202941030011007 FLOVENT HFA 149.99 3608.99
202941040011 202941040011001 FLOVENT HFA 149.99 4787.43
202941040011 202941040011002 FLOVENT HFA 149.99 4787.43
202941040011 202941040011003 FLOVENT HFA 149.99 4787.43
202941040011 202941040011004 FLOVENT HFA 149.99 4787.43
202941040011 202941040011005 FLOVENT HFA 149.99 4787.43
202941040011 202941040011006 FLOVENT HFA 149.99 4787.43
202941040011 202941040011007 FLOVENT HFA 149.99 4787.43
202941040021 202941040021001 FLUTICASONE 78.99 4787.43
202941040021 202941040021002 FLUTICASONE 78.99 4787.43
202941040021 202941040021003 FLUTICASONE 78.99 4787.43
202941040021 202941040021004 FLUTICASONE 78.99 4787.43
202941040021 202941040021005 FLUTICASONE 78.99 4787.43
202941040021 202941040021006 FLUTICASONE 78.99 4787.43
202941040021 202941040021007 FLUTICASONE 78.99 4787.43
202941040031 202941040031001 SINGULAIR 208.99 4787.43
202941040031 202941040031002 SINGULAIR 208.99 4787.43
202941040031 202941040031003 SINGULAIR 208.99 4787.43
202941040031 202941040031004 SINGULAIR 208.99 4787.43
202941040031 202941040031005 SINGULAIR 208.99 4787.43
202941040031 202941040031006 SINGULAIR 208.99 4787.43
202941040031 202941040031007 SINGULAIR 208.99 4787.43
202971030061 202971030061001 XOPENEX HFA 98.92 2689.56
202971030061 202971030061002 XOPENEX HFA 98.92 2689.56
203341010041 203341010041001 SPIRIVA 754.35 3559.46
203341010041 203341010041002 SPIRIVA 754.35 3559.46
203341010041 203341010041003 SPIRIVA 493.86 3559.46
203341010041 203341010041004 SPIRIVA 493.86 3559.46
203341010041 203341010041005 SPIRIVA 474.72 3559.46
203341010041 203341010041006 SPIRIVA 474.72 3559.46
203341010051 203341010051001 PROAIR HFA 45.09 3559.46
203341010061 203341010061001 PROAIR HFA 38.47 3559.46
203341010101 203341010101001 DULERA 74.55 3559.46
203341010101 203341010101002 DULERA 74.55 3559.46
203341010101 203341010101003 DULERA 78.86 3559.46
203341010101 203341010101004 DULERA 78.86 3559.46
203341010101 203341010101005 DULERA 78.86 3559.46
203341010101 203341010101006 DULERA 78.86 3559.46
203341010111 203341010111001 PROAIR HFA 45.08 3559.46
203411010261 203411010261001 ALBUTEROL 11.00 9581.70
203451020041 203451020041001 ADVAIR HFA 294.99 11600.60
203451020041 203451020041002 ADVAIR HFA 315.99 11600.60
203451020041 203451020041003 ADVAIR HFA 315.99 11600.60
203451020051 203451020051001 PROAIR HFA 59.99 11600.60
203451020081 203451020081001 ADVAIR HFA 315.99 11600.60
203451020081 203451020081002 ADVAIR HFA 315.99 11600.60
203451020121 203451020121001 ADVAIR HFA 326.99 11600.60
203451020121 203451020121002 ADVAIR HFA 326.99 11600.60
203451020121 203451020121003 ADVAIR HFA 326.99 11600.60
203451030011 203451030011001 ADVAIR 242.23 9080.73
203451030011 203451030011002 ADVAIR 242.23 9080.73
203451030011 203451030011003 ADVAIR 242.23 9080.73
203451030021 203451030021001 ALBUTEROL 61.41 9080.73
203451030021 203451030021002 ALBUTEROL 61.41 9080.73
203451030031 203451030031001 ADVAIR 242.23 9080.73
203451030031 203451030031002 ADVAIR 242.23 9080.73
203451030041 203451030041001 ALBUTEROL 61.42 9080.73
203451030041 203451030041002 ALBUTEROL 61.42 9080.73
203451030051 203451030051001 ADVAIR 242.23 9080.73
203451030051 203451030051002 ADVAIR 242.23 9080.73
203451030051 203451030051003 ADVAIR 242.23 9080.73
203451030061 203451030061001 ALBUTEROL 61.41 9080.73
203451030061 203451030061002 ALBUTEROL 61.41 9080.73
203591010081 203591010081001 DULERA 214.09 5155.32
203591010251 203591010251001 DULERA 214.09 5155.32
203591010251 203591010251002 DULERA 214.09 5155.32
203591010251 203591010251003 DULERA 214.09 5155.32
203591010251 203591010251004 DULERA 214.09 5155.32
203661020021 203661020021001 SINGULAIR 165.12 4796.82
203661020031 203661020031001 SYMBICORT 153.37 4796.82
203661020041 203661020041001 ALBUTEROL 4.00 4796.82
203661020051 203661020051001 SINGULAIR 165.12 4796.82
203661020061 203661020061001 SYMBICORT 249.24 4796.82
203661020071 203661020071001 ALBUTEROL 4.00 4796.82
203661020121 203661020121001 MONTELUKAST 10.00 4796.82
203661020131 203661020131001 SYMBICORT 249.24 4796.82
203661020131 203661020131002 SYMBICORT 249.24 4796.82
203661020131 203661020131003 SYMBICORT 249.24 4796.82
203661020131 203661020131004 SYMBICORT 249.24 4796.82
203791010011 203791010011001 ADVAIR DISKU 242.25 23446.28
203921010131 203921010131001 ALBUTEROL SULFATE HFA 40.36 8804.91
203921010501 203921010501001 ALBUTEROL SULFATE HFA 40.36 8804.91
203921010501 203921010501002 ALBUTEROL SULFATE HFA 40.36 8804.91
203921010501 203921010501003 ALBUTEROL SULFATE HFA 40.36 8804.91
203951020021 203951020021001 ALBUTEROL SULFATE 19.75 4373.85
203951020061 203951020061001 ALBUTEROL SULFATE 19.75 4373.85
204151030041 204151030041001 BENADRYL 5.00 3683.94
204151030051 204151030051001 SOD CHLORIDE 15.60 3683.94
204191050011 204191050011001 VENTOLIN HFA 53.99 4652.90
204191050011 204191050011002 VENTOLIN HFA 53.99 4652.90
204191050041 204191050041001 PROVENTIL 45.00 4652.90
204191050041 204191050041002 PROVENTIL 45.00 4652.90
204191050041 204191050041003 PROVENTIL 45.00 4652.90
204251010061 204251010061001 ADVAIR 313.23 4810.15
204251010091 204251010091001 ADVAIR 149.86 4810.15
204321010041 204321010041001 SINGULAIR 165.12 13822.69
204621010011 204621010011001 ALBUTEROL 4.00 1660.96
204621030011 204621030011001 ALBUTEROL 8.00 1369.80
204621030071 204621030071001 ALBUTEROL 16.67 1369.80
204621030071 204621030071002 ALBUTEROL 16.67 1369.80
204621050021 204621050021001 PREDNISOLONE 5.00 2160.24
204621050041 204621050041001 PREDNISONE 1.28 2160.24
204621050051 204621050051001 ALBUTEROL 11.00 2160.24
204721030021 204721030021001 VENTOLIN HFA 45.72 5625.01
204721030021 204721030021002 VENTOLIN HFA 45.72 5625.01
204721030031 204721030031001 FLOVENT HFA 149.99 5625.01
204721030031 204721030031002 FLOVENT HFA 149.99 5625.01
204881010491 204881010491001 ALBUTERAL SULFATE 53.10 8893.53
204921010371 204921010371001 PROAIR HFA 42.44 9558.82
204921010371 204921010371002 PROAIR HFA 42.44 9558.82
204921010371 204921010371003 PROAIR HFA 42.44 9558.82
204921010371 204921010371004 PROAIR HFA 42.44 9558.82
204921010371 204921010371005 PROAIR HFA 42.44 9558.82
204921010371 204921010371006 PROAIR HFA 42.44 9558.82
205071010071 205071010071001 ALBUTEROL INHALER 53.10 11747.34
205081010111 205081010111001 SOD CHLORIDE 33.31 4638.35
205081010111 205081010111002 SOD CHLORIDE 33.31 4638.35
205331010431 205331010431001 LEVOCETIRIZI 59.49 8084.80
205401020091 205401020091001 VENTOLIN HFA INH W/DOS CTR 50.40 21172.29
205531040011 205531040011001 SINGULAIR 208.99 1415.16

Return to Top

HC-152I
Sample SAS Job for Example B
Total Rx expenditures associated with asthma
Analysis Variable: RXXP12X SUM OF PAYMENTS RXSF12X-RXOU12X(IMPUTED)
N Sum
10318 1359058.13

Return to Top

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

Weighted
Analysis Variable: RXXP12X SUM OF PAYMENTS RXSF12X-RXOU12X(IMPUTED)
N Sum
10318 13018352615

Return to Top

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

NOTE: Enhanced analytical products:

SAS/STAT 12.1, SAS/ETS 12.1, SAS/OR 12.1, SAS/IML 12.1, SAS/QC 12.1

NOTE: SAS initialization used:
real time 3.77 seconds
cpu time 0.37 seconds

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

NOTE: DATA statement used (Total process time):
real time 0.21 seconds
cpu time 0.06 seconds

NOTE: AUTOEXEC processing completed.

1 ods rtf file = 'C:\Data\sampleC.rtf' bodytitle;
NOTE: Writing RTF Body file: C:\Data\sampleC.rtf
2
3 ods noproctitle;
4
5 OPTIONS LS=132 PS=59;
6
7 TITLE1 "HC-152I";
8 TITLE2 "Sample SAS Job for Example C";
9
10 LIBNAME IN "C:\Data";
NOTE: Directory for library IN contains files of mixed engine types.
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
11

12
13 Calculate the expenditures for medical visits associated with asthma.
14
15 PROC FORMAT;
16 VALUE EVENTYPE
17 1 = "1 MVIS"
18 2 = "2 OPAT"
19 3 = "3 EROM"
20 4 = "4 STAZ"
21 5 = "5 DVIS"
22 6 = "6 OMED"
23 7 = "7 HVIS"
24 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.


25 RUN;

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

26

27
28 Get conditions records coded as asthma.
29
30 DATA ASCONDS;
31 SET IN.H154 (KEEP=CONDIDX CCCODEX);
32 IF CCCODEX="128";
33 RUN;

NOTE: There were 118850 observations read from the data set IN.H154.
NOTE: The data set WORK.ASCONDS has 2515 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 90.00 percent.
Compressed is 19 pages; un-compressed would require 10 pages.
NOTE: DATA statement used (Total process time):
real time 1.62 seconds
cpu time 0.03 seconds

34
35
36 Get the events linked to each of the asthma condition records.
37
38 PROC SORT DATA=ASCONDS; BY CONDIDX; RUN;

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

39
40 proc print data=asconds (obs=50);
41 title3 "sample print of work.asconds - sorted by condidx";
42 title4 "COND (H154) records where cccodex=128";
43 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.03 seconds

44
45 PROC SORT DATA=IN.H152IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 329484 observations read from the data set IN.H152IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 329484 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.91 percent.
Compressed is 6233 pages; un-compressed would require 5885 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.88 seconds
cpu time 0.53 seconds

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

NOTE: There were 329484 observations read from the data set WORK.CLNK.
NOTE: There were 2515 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7010 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 26.79 percent.
Compressed is 71 pages; un-compressed would require 56 pages.
NOTE: DATA statement used (Total process time):
real time 0.21 seconds
cpu time 0.21 seconds

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

63
64 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

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

4 The SAS System 22:45 Sunday, August 24, 2014

cpu time 0.01 seconds

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

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

70
71 DATA ASCLNKS;
72 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
73 BY EVNTIDX;
74 IF FIRST.EVNTIDX;
75 RUN;

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

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

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

81

82
83 Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
84
85 DATA MVIS;
86 SET IN.H152G (KEEP=EVNTIDX PERWT12F SEETLKPV OBXP12X);
87 IF PERWT12F > 0 & SEETLKPV NE 2;
88 RUN;

NOTE: There were 144755 observations read from the data set IN.H152G.
NOTE: The data set WORK.MVIS has 140703 observations and 4 variables.
NOTE: Compressing data set WORK.MVIS increased size by 6.46 percent.


Compressed is 1484 pages; un-compressed would require 1394 pages.
NOTE: DATA statement used (Total process time):
real time 4.89 seconds
cpu time 0.37 seconds

89
90 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;

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

91

92
93 Identify MVIS events which were for asthma.
94
95 DATA ASMVIS;
96 MERGE ASCLNKS (IN=INASCLNK)
97 MVIS (IN=INMVIS);
98 BY EVNTIDX;
99 IF INASCLNK & INMVIS;
100 RUN;

NOTE: There were 6999 observations read from the data set WORK.ASCLNKS.
NOTE: There were 140703 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 1926 observations and 5 variables.
NOTE: Compressing data set WORK.ASMVIS decreased size by 0.00 percent.
Compressed is 24 pages; un-compressed would require 24 pages.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds

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

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

107
108 PROC MEANS DATA=ASMVIS N SUM;
109 VAR OBXP12X;


110 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
111 RUN;

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

112
113 PROC MEANS DATA=ASMVIS N SUM;
114 VAR OBXP12X;
115 WEIGHT PERWT12F;
116 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
117 TITLE5 "Weighted";
118 RUN;

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

119
120 ods rtf close;
121
122

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


Return to Top

HC-152I
Sample SAS Job for Example C
sample print of work.asconds - sorted by condidx
COND (H154) records where cccodex=128
Obs CONDIDX CCCODEX
1 200111010041 128
2 200321020011 128
3 200331080011 128
4 200411050011 128
5 200461030011 128
6 200461060011 128
7 200481050011 128
8 200591010021 128
9 200591030011 128
10 200841020051 128
11 200941010021 128
12 200941020051 128
13 200961010081 128
14 200961030011 128
15 201091010021 128
16 201391010061 128
17 201501020021 128
18 201701040011 128
19 201731020021 128
20 201751010042 128
21 201791020011 128
22 201921020051 128
23 201991030011 128
24 202301020021 128
25 202301030011 128
26 202301050061 128
27 202541010021 128
28 202571010021 128
29 202621020042 128
30 202621060012 128
31 202631020011 128
32 202641010041 128
33 202641010061 128
34 202701050011 128
35 202781020011 128
36 202831040011 128
37 202831040021 128
38 202851010021 128
39 202851030012 128
40 202851040011 128
41 202941030011 128
42 202941040011 128
43 202971030011 128
44 203341010051 128
45 203411010021 128
46 203451020021 128
47 203451030011 128
48 203591010041 128
49 203661020011 128
50 203791010011 128

Return to Top

HC-152I
Sample SAS Job for Example C
sample print of work.asclnks - sorted by condidx
events linked to asthma condition records
CONDIDX EVNTIDX EVENTYPE
200111010041 200111010011 1 MVIS
200111010041 200111010031 7 HVIS
200111010041 200111010041 7 HVIS
200111010041 200111010051 7 HVIS
200331080011 200331080021 8 PMED
200411050011 200411050011 1 MVIS
200411050011 200411050021 8 PMED
200411050011 200411050031 1 MVIS
200411050011 200411050041 8 PMED
200411050011 200411050081 8 PMED
200461030011 200461030021 8 PMED
200591010021 200591010131 8 PMED
200591030011 200591030041 8 PMED
200591030011 200591030051 8 PMED
200591030011 200591030151 8 PMED
200591030011 200591030161 8 PMED
200941010021 200941010021 8 PMED
200941010021 200941010031 8 PMED
200941010021 200941010271 8 PMED
200941020051 200941020171 1 MVIS
200941020051 200941020201 1 MVIS
200961010081 200961010401 1 MVIS
200961010081 200961010411 1 MVIS
200961010081 200961010421 1 MVIS
200961010081 200961010431 1 MVIS
200961030011 200961030041 8 PMED
201091010021 201091010011 1 MVIS
201091010021 201091010021 1 MVIS
201091010021 201091010031 1 MVIS
201091010021 201091010041 8 PMED
201391010061 201391010061 1 MVIS
201391010061 201391010071 1 MVIS
201391010061 201391010081 1 MVIS
201391010061 201391010091 2 OPAT
201391010061 201391010101 2 OPAT
201391010061 201391010141 8 PMED
201391010061 201391010211 8 PMED
201391010061 201391010251 8 PMED
201391010061 201391010321 8 PMED
201501020021 201501020111 1 MVIS
201501020021 201501020121 1 MVIS
201501020021 201501020131 1 MVIS
201501020021 201501020141 1 MVIS
201501020021 201501020151 1 MVIS
201501020021 201501020161 1 MVIS
201501020021 201501020171 1 MVIS
201501020021 201501020181 1 MVIS
201501020021 201501020221 8 PMED
201701040011 201701040011 3 EROM
201731020021 201731020151 8 PMED
201731020021 201731020261 8 PMED
201751010042 201751010072 8 PMED
201751010042 201751010092 1 MVIS
201751010042 201751010112 8 PMED
201791020011 201791020031 1 MVIS
201791020011 201791020041 8 PMED
201921020051 201921020081 1 MVIS
201991030011 201991030011 1 MVIS
201991030011 201991030031 8 PMED
202301050061 202301050111 1 MVIS
202301050061 202301050121 1 MVIS
202301050061 202301050181 8 PMED
202541010021 202541010101 8 PMED
202541010021 202541010111 8 PMED
202621020042 202621020042 8 PMED
202621020042 202621020052 8 PMED
202621020042 202621020082 8 PMED
202621020042 202621020102 3 EROM
202621020042 202621020112 4 STAZ
202621020042 202621020142 1 MVIS
202621020042 202621020152 1 MVIS
202621020042 202621020212 8 PMED
202641010041 202641010041 4 STAZ
202641010041 202641010051 2 OPAT
202641010041 202641010061 2 OPAT

Return to Top

HC-152I
Sample SAS Job for Example C
sample print of work.asclnks - sorted by evntidx
Obs CONDIDX EVNTIDX EVENTYPE
1 200111010041 200111010011 1 MVIS
2 200111010041 200111010031 7 HVIS
3 200111010041 200111010041 7 HVIS
4 200111010041 200111010051 7 HVIS
5 200331080011 200331080021 8 PMED
6 200411050011 200411050011 1 MVIS
7 200411050011 200411050021 8 PMED
8 200411050011 200411050031 1 MVIS
9 200411050011 200411050041 8 PMED
10 200411050011 200411050081 8 PMED
11 200461030011 200461030021 8 PMED
12 200591010021 200591010131 8 PMED
13 200591030011 200591030041 8 PMED
14 200591030011 200591030051 8 PMED
15 200591030011 200591030151 8 PMED
16 200591030011 200591030161 8 PMED
17 200941010021 200941010021 8 PMED
18 200941010021 200941010031 8 PMED
19 200941010021 200941010271 8 PMED
20 200941020051 200941020171 1 MVIS
21 200941020051 200941020201 1 MVIS
22 200961010081 200961010401 1 MVIS
23 200961010081 200961010411 1 MVIS
24 200961010081 200961010421 1 MVIS
25 200961010081 200961010431 1 MVIS
26 200961030011 200961030041 8 PMED
27 201091010021 201091010011 1 MVIS
28 201091010021 201091010021 1 MVIS
29 201091010021 201091010031 1 MVIS
30 201091010021 201091010041 8 PMED
31 201391010061 201391010061 1 MVIS
32 201391010061 201391010071 1 MVIS
33 201391010061 201391010081 1 MVIS
34 201391010061 201391010091 2 OPAT
35 201391010061 201391010101 2 OPAT
36 201391010061 201391010141 8 PMED
37 201391010061 201391010211 8 PMED
38 201391010061 201391010251 8 PMED
39 201391010061 201391010321 8 PMED
40 201501020021 201501020111 1 MVIS
41 201501020021 201501020121 1 MVIS
42 201501020021 201501020131 1 MVIS
43 201501020021 201501020141 1 MVIS
44 201501020021 201501020151 1 MVIS
45 201501020021 201501020161 1 MVIS
46 201501020021 201501020171 1 MVIS
47 201501020021 201501020181 1 MVIS
48 201501020021 201501020221 8 PMED
49 201701040011 201701040011 3 EROM
50 201731020021 201731020151 8 PMED

Return to Top

HC-152I
Sample SAS Job for Example C
sample print of unique evntidxs from work.asclnks
Obs EVNTIDX EVENTYPE
1 200111010011 1 MVIS
2 200111010031 7 HVIS
3 200111010041 7 HVIS
4 200111010051 7 HVIS
5 200331080021 8 PMED
6 200411050011 1 MVIS
7 200411050021 8 PMED
8 200411050031 1 MVIS
9 200411050041 8 PMED
10 200411050081 8 PMED
11 200461030021 8 PMED
12 200591010131 8 PMED
13 200591030041 8 PMED
14 200591030051 8 PMED
15 200591030151 8 PMED
16 200591030161 8 PMED
17 200941010021 8 PMED
18 200941010031 8 PMED
19 200941010271 8 PMED
20 200941020171 1 MVIS
21 200941020201 1 MVIS
22 200961010401 1 MVIS
23 200961010411 1 MVIS
24 200961010421 1 MVIS
25 200961010431 1 MVIS
26 200961030041 8 PMED
27 201091010011 1 MVIS
28 201091010021 1 MVIS
29 201091010031 1 MVIS
30 201091010041 8 PMED
31 201391010061 1 MVIS
32 201391010071 1 MVIS
33 201391010081 1 MVIS
34 201391010091 2 OPAT
35 201391010101 2 OPAT
36 201391010141 8 PMED
37 201391010211 8 PMED
38 201391010251 8 PMED
39 201391010321 8 PMED
40 201501020111 1 MVIS
41 201501020121 1 MVIS
42 201501020131 1 MVIS
43 201501020141 1 MVIS
44 201501020151 1 MVIS
45 201501020161 1 MVIS
46 201501020171 1 MVIS
47 201501020181 1 MVIS
48 201501020221 8 PMED
49 201701040011 3 EROM
50 201731020151 8 PMED

Return to Top

HC-152I
Sample SAS Job for Example C
sample print of work.asmvis
unique evntidxs from work.asclnks that are non-telephone MVIS (HC-152G) events
Obs EVNTIDX EVENTYPE SEETLKPV OBXP12X PERWT12F
1 200111010011 1 MVIS 1 26.18 13725.41
2 200411050011 1 MVIS 1 87.83 8127.03
3 200411050031 1 MVIS 1 98.76 8127.03
4 200941020171 1 MVIS 1 27.74 6166.62
5 200941020201 1 MVIS 1 29.00 6166.62
6 200961010401 1 MVIS 1 40.74 2297.49
7 200961010411 1 MVIS 1 40.74 2297.49
8 200961010421 1 MVIS 1 40.74 2297.49
9 200961010431 1 MVIS 1 110.85 2297.49
10 201091010011 1 MVIS 1 78.95 5956.03
11 201091010021 1 MVIS 1 154.42 5956.03
12 201091010031 1 MVIS 1 41.53 5956.03
13 201391010061 1 MVIS 1 110.79 8966.52
14 201391010071 1 MVIS 1 110.79 8966.52
15 201391010081 1 MVIS 1 110.79 8966.52
16 201501020111 1 MVIS 1 57.19 21334.65
17 201501020121 1 MVIS 1 57.19 21334.65
18 201501020131 1 MVIS 1 99.63 21334.65
19 201501020141 1 MVIS 1 99.63 21334.65
20 201501020151 1 MVIS 1 67.28 21334.65
21 201501020161 1 MVIS 1 67.28 21334.65
22 201501020171 1 MVIS 1 99.63 21334.65
23 201501020181 1 MVIS 1 57.19 21334.65
24 201751010092 1 MVIS 1 54.54 4636.78
25 201791020031 1 MVIS 1 102.15 18436.16
26 201921020081 1 MVIS 1 67.66 17925.45
27 201991030011 1 MVIS 1 48.27 3526.80
28 202301050111 1 MVIS 1 32.56 2460.35
29 202301050121 1 MVIS 1 32.56 2460.35
30 202621020142 1 MVIS 1 103.16 3241.64
31 202621020152 1 MVIS 1 118.98 3241.64
32 202831040011 1 MVIS 1 248.56 2317.84
33 202831040021 1 MVIS 1 51.00 2317.84
34 202851040081 1 MVIS 1 214.00 19783.69
35 203341010011 1 MVIS 1 42.91 3559.46
36 203341010021 1 MVIS 1 136.21 3559.46
37 203341010261 1 MVIS 1 121.38 3559.46
38 203411010121 1 MVIS 1 72.45 9581.70
39 203451020101 1 MVIS 1 57.50 11600.60
40 203661020101 1 MVIS 1 249.00 4796.82
41 203951020051 1 MVIS 1 128.00 4373.85
42 204621050011 1 MVIS 1 5.96 2160.24
43 205071010011 1 MVIS 1 68.20 11747.34
44 205081010061 1 MVIS 1 421.94 4638.35
45 205331010011 1 MVIS 1 115.43 8084.80
46 205411010041 1 MVIS 1 105.28 3051.60
47 205411010051 1 MVIS 1 105.28 3051.60
48 205411010061 1 MVIS 1 167.39 3051.60
49 205411010071 1 MVIS 1 167.39 3051.60
50 205411010081 1 MVIS 1 69.01 3051.60

Return to Top

HC-152I
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma
Analysis Variable: OBXP12X SUM OF OBSF12X - OBOT12X (IMPUTED)
N Sum
1926 261456.21

Return to Top

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

Weighted
Analysis Variable: OBXP12X SUM OF OBSF12X - OBOT12X (IMPUTED)
N Sum
1926 2978371515

Return to Top