MEPS HC-160I: 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: SAS initialization used:
real time 1.33 seconds
cpu time 0.18 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\sampleA.rtf'
1 ! 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-160I";
8 TITLE2 "Sample SAS Job for Example A";
9
10 LIBNAME IN "C:\Data";
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.00 seconds
cpu time 0.00 seconds


28

29
30 Get condition records coded as asthma.
31

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

NOTE: There were 123875 observations read from the data set IN.H162.
NOTE: The data set WORK.ASCONDS has 2469 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 80.00 percent.
Compressed is 18 pages; un-compressed would require 10 pages.
NOTE: DATA statement used (Total process time):
real time 0.99 seconds
cpu time 0.04 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 2469 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2469 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 80.00 percent.
Compressed is 18 pages; un-compressed would require 10 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds


42
43 proc print data=asconds (obs=50);
44 title3 "sample print of work.asconds - sorted by condidx";
45 title4 "COND (H162) 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.04 seconds
cpu time 0.04 seconds


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

NOTE: There were 357551 observations read from the data set IN.H160IF1.


NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 357551 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.90 percent.
Compressed is 6763 pages; un-compressed would require 6386 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.75 seconds
cpu time 0.64 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 357551 observations read from the data set WORK.CLNK.
NOTE: There were 2469 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7471 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 26.67 percent.
Compressed is 76 pages; un-compressed would require 60 pages.
NOTE: DATA statement used (Total process time):
real time 0.21 seconds
cpu time 0.21 seconds


56
57 proc print data=asclnks (obs=75);
58 by condidx;
59 id condidx;
60 format eventype eventype.;
61 title3 "sample print of work.asclnks - sorted by condidx";
62 title4 "events linked to asthma condition records";
63 run;

NOTE: There were 75 observations read from the data set WORK.ASCLNKS.
NOTE: The PROCEDURE PRINT printed pages 2-4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.09 seconds
cpu time 0.03 seconds


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

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


66



67 proc print data=asclnks (obs=50);
68 format eventype eventype.;
69 title3 "sample print of work.asclnks - sorted by evntidx";
70 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


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

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


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

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


82

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

86 DATA MVIS;
87 SET IN.H160G (KEEP=EVNTIDX PERWT13F SEETLKPV);
88 IF PERWT13F > 0 & SEETLKPV NE 2;
89 RUN;

NOTE: There were 165764 observations read from the data set IN.H160G.
NOTE: The data set WORK.MVIS has 160755 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 12.84 percent.
Compressed is 1441 pages; un-compressed would require 1277 pages.
NOTE: DATA statement used (Total process time):
real time 3.20 seconds
cpu time 0.28 seconds



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

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


92

93
94 Identify MVIS events which were for asthma.
95

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

NOTE: There were 7459 observations read from the data set WORK.ASCLNKS.
NOTE: There were 160755 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 2101 observations and 2 variables.
NOTE: Compressing data set WORK.ASMVIS increased size by 23.08 percent.
Compressed is 16 pages; un-compressed would require 13 pages.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds


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

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


108

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

112 PROC SORT DATA=IN.H160IF2 OUT=RXLK; BY EVNTIDX; RUN;

NOTE: There were 65314 observations read from the data set IN.H160IF2.



NOTE: SAS sort was used.
NOTE: The data set WORK.RXLK has 65314 observations and 6 variables.
NOTE: Compressing data set WORK.RXLK increased size by 6.08 percent.
Compressed is 1238 pages; un-compressed would require 1167 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.37 seconds
cpu time 0.17 seconds


113
114 proc print data=rxlk (obs=140);
115 by evntidx;
116 id evntidx;
117 var linkidx eventype;
118 format eventype eventype.;
119 title3 "sample print of work.rxlk - sorted by evntidx";
120 title4 "Rx+event link file records (HC-160IF2)";
121 run;

NOTE: There were 140 observations read from the data set WORK.RXLK.
NOTE: The PROCEDURE PRINT printed pages 8-14.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds


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

NOTE: There were 65314 observations read from the data set WORK.RXLK.
NOTE: There were 2101 observations read from the data set WORK.ASMVIS.
NOTE: The data set WORK.PMEDIDS has 2142 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.04 seconds


129
130 proc print data=pmedids (obs=50);
131 by evntidx;
132 id evntidx;
133 format eventype eventype.;
134 title3 "sample print of work.pmedids - sorted by evntidx";
135 title4 "work.rxlk records for evntidxs in work.asmvis";
136 run;

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


137
138 PROC SORT DATA=PMEDIDS; BY LINKIDX; RUN;

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


139
140 proc print data=pmedids (obs=50);
141 format eventype eventype.;
142 title3 "sample print of work.pmedids - sorted by linkidx";
143 run;

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


144
145 DATA PMEDIDS;
146 SET PMEDIDS (KEEP=LINKIDX);
147 BY LINKIDX;
148 IF FIRST.LINKIDX;
149 RUN;

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


150
151 proc print data=pmedids (obs=50);
152 title3 "sample print of unique linkidxs in work.pmedids";
153 run;

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



154

155
156 Get PMED records linked to MVIS events which were for asthma.
157

158 PROC SORT DATA=IN.H160A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 327557 observations read from the data set IN.H160A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 327557 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 19.98 percent.
Compressed is 5699 pages; un-compressed would require 7122 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 7.90 seconds
cpu time 1.60 seconds


159
160 DATA MVPMEDS;
161 MERGE PMED (KEEP=LINKIDX RXRECIDX RXXP13X PERWT13F RXNAME)
162 PMEDIDS (IN=A);
163 BY LINKIDX;
164 IF A;
165 RUN;

NOTE: There were 327557 observations read from the data set WORK.PMED.
NOTE: There were 2022 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.MVPMEDS has 5640 observations and 5 variables.
NOTE: Compressing data set WORK.MVPMEDS decreased size by 29.41 percent.
Compressed is 48 pages; un-compressed would require 68 pages.
NOTE: DATA statement used (Total process time):
real time 0.24 seconds
cpu time 0.23 seconds


166
167 proc print data=mvpmeds (obs=200);
168 var rxrecidx rxname RXXP13X PERWT13F;
169 by linkidx;
170 id linkidx;
171 title3 "sample print of work.mvpmeds";
172 title4 "PMED (HC-160A) records for unique linkidxs in work.pmedids";
173 run;

NOTE: There were 200 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE PRINT printed pages 19-25.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds


174
175 PROC MEANS DATA=MVPMEDS N SUM;
176 VAR RXXP13X;
177 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
178 RUN;

NOTE: Multiple concurrent threads will be used to summarize data.
NOTE: There were 5640 observations read from the data set WORK.MVPMEDS.

NOTE: The PROCEDURE MEANS printed page 26.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.13 seconds
cpu time 0.01 seconds


179
180 PROC MEANS DATA=MVPMEDS N SUM;
181 VAR RXXP13X;
182 WEIGHT PERWT13F;
183 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
184 TITLE5 "Weighted";
185 RUN;

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


186
187 ods rtf close;
188

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



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


Obs CONDIDX CCCODEX
1 200321020011 128
2 200331040011 128
3 200331080011 128
4 200341010041 128
5 200411050011 128
6 200461030011 128
7 200591010021 128
8 200591020021 128
9 200591030011 128
10 200891020081 128
11 200941010021 128
12 200941020051 128
13 200961010081 128
14 200961020021 128
15 200961030011 128
16 201091060011 128
17 201391010061 128
18 201501020021 128
19 201731020021 128
20 201751010042 128
21 201751010062 128
22 201781010031 128
23 201791020011 128
24 201921020051 128
25 202221010031 128
26 202301020021 128
27 202301030011 128
28 202301050061 128
29 202541010021 128
30 202551030021 128
31 202571010021 128
32 202621020042 128
33 202621060012 128
34 202641010041 128
35 202641010061 128
36 202781020011 128
37 202831040011 128
38 202831040021 128
39 202851040011 128
40 202971030011 128
41 203141030011 128
42 203341010051 128
43 203411010021 128
44 203451020021 128
45 203451030011 128
46 203591010041 128
47 203661020011 128
48 203921010051 128
49 203951020021 128
50 204191040061 128


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


CONDIDX EVNTIDX EVENTYPE
200331040011 200331040011 8 PMED
200331080011 200331080011 1 MVIS
200331080011 200331080021 8 PMED
200331080011 200331080031 8 PMED
200341010041 200341010771 1 MVIS
200411050011 200411050151 8 PMED
200411050011 200411050161 8 PMED
200411050011 200411050171 8 PMED
200461030011 200461030031 8 PMED
200591010021 200591010531 8 PMED
200591030011 200591030151 8 PMED
200591030011 200591030181 8 PMED
200941010021 200941010271 8 PMED
200941010021 200941010431 8 PMED
200941020051 200941020231 7 HVIS
200941020051 200941020381 7 HVIS
200961010081 200961010441 1 MVIS
200961010081 200961011161 1 MVIS
200961010081 200961011171 1 MVIS
200961010081 200961011181 1 MVIS
200961020021 200961020071 1 MVIS
200961020021 200961020101 8 PMED
200961020021 200961020111 8 PMED
201391010061 201391010681 1 MVIS
201391010061 201391010691 1 MVIS
201391010061 201391010701 1 MVIS
201391010061 201391010721 1 MVIS
201391010061 201391010731 1 MVIS
201391010061 201391010741 1 MVIS
201391010061 201391010751 1 MVIS
201391010061 201391010991 8 PMED
201391010061 201391011101 8 PMED
201501020021 201501020391 8 PMED
201501020021 201501020401 8 PMED
201731020021 201731020261 8 PMED
201731020021 201731020381 1 MVIS
201731020021 201731020431 8 PMED
201731020021 201731020461 8 PMED
201731020021 201731020491 1 MVIS
201731020021 201731020521 8 PMED
201731020021 201731020531 8 PMED
201751010042 201751010142 8 PMED
201751010062 201751010132 1 MVIS
201781010031 201781010611 8 PMED
201791020011 201791020041 8 PMED
201791020011 201791020061 8 PMED
201791020011 201791020101 8 PMED
201921020051 201921020091 1 MVIS
201921020051 201921020661 8 PMED
201921020051 201921020781 8 PMED
202301020021 202301020021 1 MVIS
202301020021 202301020031 8 PMED
202301020021 202301020041 8 PMED
202301030011 202301030021 1 MVIS
202301030011 202301030041 8 PMED
202301030011 202301030051 8 PMED
202301030011 202301030061 1 MVIS
202301030011 202301030081 8 PMED
202301030011 202301030091 8 PMED
202301030011 202301030101 8 PMED
202301030011 202301030111 8 PMED
202301030011 202301030121 8 PMED
202301030011 202301030131 8 PMED
202301050061 202301050131 1 MVIS
202301050061 202301050141 1 MVIS
202301050061 202301050151 1 MVIS
202301050061 202301050181 8 PMED
202301050061 202301050251 8 PMED
202541010021 202541010381 1 MVIS
202541010021 202541010391 1 MVIS
202541010021 202541010411 8 PMED
202541010021 202541010461 8 PMED
202551030021 202551030051 8 PMED
202621020042 202621020192 7 HVIS
202621020042 202621020222 1 MVIS


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


Obs CONDIDX EVNTIDX EVENTYPE
1 200331040011 200331040011 8 PMED
2 200331080011 200331080011 1 MVIS
3 200331080011 200331080021 8 PMED
4 200331080011 200331080031 8 PMED
5 200341010041 200341010771 1 MVIS
6 200411050011 200411050151 8 PMED
7 200411050011 200411050161 8 PMED
8 200411050011 200411050171 8 PMED
9 200461030011 200461030031 8 PMED
10 200591010021 200591010531 8 PMED
11 200591030011 200591030151 8 PMED
12 200591030011 200591030181 8 PMED
13 200941010021 200941010271 8 PMED
14 200941010021 200941010431 8 PMED
15 200941020051 200941020231 7 HVIS
16 200941020051 200941020381 7 HVIS
17 200961010081 200961010441 1 MVIS
18 200961010081 200961011161 1 MVIS
19 200961010081 200961011171 1 MVIS
20 200961010081 200961011181 1 MVIS
21 200961020021 200961020071 1 MVIS
22 200961020021 200961020101 8 PMED
23 200961020021 200961020111 8 PMED
24 201391010061 201391010681 1 MVIS
25 201391010061 201391010691 1 MVIS
26 201391010061 201391010701 1 MVIS
27 201391010061 201391010721 1 MVIS
28 201391010061 201391010731 1 MVIS
29 201391010061 201391010741 1 MVIS
30 201391010061 201391010751 1 MVIS
31 201391010061 201391010991 8 PMED
32 201391010061 201391011101 8 PMED
33 201501020021 201501020391 8 PMED
34 201501020021 201501020401 8 PMED
35 201731020021 201731020261 8 PMED
36 201731020021 201731020381 1 MVIS
37 201731020021 201731020431 8 PMED
38 201731020021 201731020461 8 PMED
39 201731020021 201731020491 1 MVIS
40 201731020021 201731020521 8 PMED
41 201731020021 201731020531 8 PMED
42 201751010062 201751010132 1 MVIS
43 201751010042 201751010142 8 PMED
44 201781010031 201781010611 8 PMED
45 201791020011 201791020041 8 PMED
46 201791020011 201791020061 8 PMED
47 201791020011 201791020101 8 PMED
48 201921020051 201921020091 1 MVIS
49 201921020051 201921020661 8 PMED
50 201921020051 201921020781 8 PMED


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


Obs EVNTIDX EVENTYPE
1 200331040011 8 PMED
2 200331080011 1 MVIS
3 200331080021 8 PMED
4 200331080031 8 PMED
5 200341010771 1 MVIS
6 200411050151 8 PMED
7 200411050161 8 PMED
8 200411050171 8 PMED
9 200461030031 8 PMED
10 200591010531 8 PMED
11 200591030151 8 PMED
12 200591030181 8 PMED
13 200941010271 8 PMED
14 200941010431 8 PMED
15 200941020231 7 HVIS
16 200941020381 7 HVIS
17 200961010441 1 MVIS
18 200961011161 1 MVIS
19 200961011171 1 MVIS
20 200961011181 1 MVIS
21 200961020071 1 MVIS
22 200961020101 8 PMED
23 200961020111 8 PMED
24 201391010681 1 MVIS
25 201391010691 1 MVIS
26 201391010701 1 MVIS
27 201391010721 1 MVIS
28 201391010731 1 MVIS
29 201391010741 1 MVIS
30 201391010751 1 MVIS
31 201391010991 8 PMED
32 201391011101 8 PMED
33 201501020391 8 PMED
34 201501020401 8 PMED
35 201731020261 8 PMED
36 201731020381 1 MVIS
37 201731020431 8 PMED
38 201731020461 8 PMED
39 201731020491 1 MVIS
40 201731020521 8 PMED
41 201731020531 8 PMED
42 201751010132 1 MVIS
43 201751010142 8 PMED
44 201781010611 8 PMED
45 201791020041 8 PMED
46 201791020061 8 PMED
47 201791020101 8 PMED
48 201921020091 1 MVIS
49 201921020661 8 PMED
50 201921020781 8 PMED


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


Obs EVNTIDX EVENTYPE
1 200331080011 1 MVIS
2 200341010771 1 MVIS
3 200961010441 1 MVIS
4 200961011161 1 MVIS
5 200961011171 1 MVIS
6 200961011181 1 MVIS
7 200961020071 1 MVIS
8 201391010681 1 MVIS
9 201391010691 1 MVIS
10 201391010701 1 MVIS
11 201391010721 1 MVIS
12 201391010731 1 MVIS
13 201391010741 1 MVIS
14 201391010751 1 MVIS
15 201731020381 1 MVIS
16 201731020491 1 MVIS
17 201751010132 1 MVIS
18 201921020091 1 MVIS
19 202301020021 1 MVIS
20 202301030021 1 MVIS
21 202301030061 1 MVIS
22 202301050131 1 MVIS
23 202301050141 1 MVIS
24 202301050151 1 MVIS
25 202541010381 1 MVIS
26 202541010391 1 MVIS
27 202621020222 1 MVIS
28 202621020252 1 MVIS
29 202641010321 1 MVIS
30 202831040061 1 MVIS
31 203411010331 1 MVIS
32 203411010421 1 MVIS
33 203451020141 1 MVIS
34 203451030091 1 MVIS
35 203591010341 1 MVIS
36 203591010351 1 MVIS
37 203591010361 1 MVIS
38 203591010371 1 MVIS
39 203591010381 1 MVIS
40 203591010481 1 MVIS
41 203591010491 1 MVIS
42 203591010501 1 MVIS
43 203591010511 1 MVIS
44 203661020211 1 MVIS
45 203921010831 1 MVIS
46 203921011071 1 MVIS
47 203921011081 1 MVIS
48 204881010361 1 MVIS
49 204881010541 1 MVIS
50 204881010551 1 MVIS


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


EVNTIDX LINKIDX EVENTYPE
200041030021 200041030041 2 OPAT
200041030031 200041030041 2 OPAT
200051010201 200051010211 1 MVIS
200051010251 200051010271 1 MVIS
200051010251 200051010281 1 MVIS
200051010251 200051010291 1 MVIS
200051010251 200051010301 1 MVIS
200121010011 200121010021 3 EROM
200121010011 200121010031 3 EROM
200151010011 200151010021 1 MVIS
200151020051 200151020061 1 MVIS
200161010201 200161010311 5 DVIS
200161010241 200161010321 1 MVIS
200171040041 200171040051 1 MVIS
200171040041 200171040061 1 MVIS
200171050061 200171050071 1 MVIS
200171050081 200171050091 1 MVIS
200171060071 200171060081 1 MVIS
200201010311 200201010451 1 MVIS
200201020211 200201020291 1 MVIS
200201020251 200201020301 1 MVIS
200201020631 200201020691 1 MVIS
200201020651 200201020691 1 MVIS
200201020661 200201020691 1 MVIS
200201020741 200201020761 1 MVIS
200231010011 200231010021 3 EROM
200241010261 200241010271 1 MVIS
200241010261 200241010281 1 MVIS
200241010341 200241010421 1 MVIS
200241010341 200241010431 1 MVIS
200241020161 200241020201 1 MVIS
200241020191 200241020221 1 MVIS
200241020251 200241020311 1 MVIS
200241020351 200241020381 2 OPAT
200271010921 200271011111 1 MVIS
200271010921 200271011121 1 MVIS
200271010921 200271011131 1 MVIS
200271010921 200271011141 1 MVIS
200271010921 200271011151 1 MVIS
200271010921 200271011161 1 MVIS
200271010921 200271011171 1 MVIS
200271010921 200271011181 1 MVIS
200271010921 200271011191 1 MVIS
200271010921 200271011201 1 MVIS
200271010991 200271011211 1 MVIS
200271011011 200271011221 1 MVIS
200271020811 200271020901 5 DVIS
200271020811 200271020921 5 DVIS
200271020961 200271020971 1 MVIS
200271020961 200271020981 1 MVIS
200271020961 200271020991 1 MVIS
200271021131 200271021691 1 MVIS
200271021131 200271021701 1 MVIS
200271021131 200271021711 1 MVIS
200271021131 200271021721 1 MVIS
200271021131 200271021731 1 MVIS
200271021231 200271021741 1 MVIS
200271021231 200271021751 1 MVIS
200271021231 200271021761 1 MVIS
200271021601 200271021771 1 MVIS
200301010121 200301010141 1 MVIS
200301010121 200301010151 1 MVIS
200301010121 200301010161 1 MVIS
200311010291 200311010391 1 MVIS
200311010291 200311010401 1 MVIS
200311010291 200311010411 1 MVIS
200311010361 200311010421 1 MVIS
200311020341 200311020471 1 MVIS
200311020371 200311020511 1 MVIS
200311020521 200311020601 1 MVIS
200311020541 200311020611 1 MVIS
200321010071 200321010081 1 MVIS
200321030061 200321030081 1 MVIS
200321030111 200321030121 1 MVIS
200331080011 200331080021 1 MVIS
200341010251 200341010321 1 MVIS
200341010391 200341010591 3 EROM
200341010581 200341010611 1 MVIS
200341010581 200341010621 1 MVIS
200341010581 200341010631 1 MVIS
200341010581 200341010641 1 MVIS
200341010681 200341010931 2 OPAT
200341010681 200341010941 2 OPAT
200341010721 200341010951 2 OPAT
200341010841 200341010951 2 OPAT
200381030041 200381030071 1 MVIS
200381030041 200381030081 1 MVIS
200381030041 200381030091 1 MVIS
200411020062 200411020072 3 EROM
200411030011 200411030041 1 MVIS
200411030021 200411030051 1 MVIS
200411030061 200411030111 5 DVIS
200411030061 200411030121 5 DVIS
200411030071 200411030131 5 DVIS
200411030091 200411030111 1 MVIS
200411030101 200411030141 1 MVIS
200411040061 200411040091 5 DVIS
200411040061 200411040101 5 DVIS
200411040061 200411040111 5 DVIS
200411050051 200411050061 1 MVIS
200411050051 200411050071 1 MVIS
200411050121 200411050131 1 MVIS
200411050121 200411050141 1 MVIS
200421010251 200421010281 2 OPAT
200421010251 200421010291 2 OPAT
200421010251 200421010301 2 OPAT
200421010261 200421010331 1 MVIS
200421010261 200421010371 1 MVIS
200421010271 200421010371 1 MVIS
200421010391 200421010471 1 MVIS
200421010421 200421010481 1 MVIS
200421010491 200421010481 2 OPAT
200441030031 200441030051 1 MVIS
200441040061 200441040071 1 MVIS
200441040061 200441040081 1 MVIS
200461010101 200461010121 2 OPAT
200461010101 200461010131 2 OPAT
200461010101 200461010141 2 OPAT
200461010151 200461010171 1 MVIS
200461010151 200461010181 1 MVIS
200461010151 200461010191 1 MVIS
200461020081 200461020101 1 MVIS
200461020081 200461020111 1 MVIS
200461020081 200461020121 1 MVIS
200461020081 200461020131 1 MVIS
200461020091 200461020141 3 EROM
200461020091 200461020151 3 EROM
200461020171 200461020221 2 OPAT
200461060101 200461060131 1 MVIS
200461060111 200461060141 1 MVIS
200461060111 200461060151 1 MVIS
200461060241 200461060251 1 MVIS
200461060241 200461060261 1 MVIS
200461060241 200461060271 1 MVIS
200461060241 200461060281 1 MVIS
200461060241 200461060291 1 MVIS
200461060241 200461060301 1 MVIS
200471010291 200471010301 3 EROM
200471010291 200471010311 3 EROM
200471020021 200471020031 3 EROM


HC-160I
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
200331080011 200331080021 1 MVIS
200961011161 200961011451 1 MVIS
200961011161 200961011461 1 MVIS
200961011161 200961011471 1 MVIS
200961020071 200961020101 1 MVIS
200961020071 200961020111 1 MVIS
200961020071 200961020121 1 MVIS
200961020071 200961020131 1 MVIS
201391010681 201391010891 1 MVIS
201391010681 201391010901 1 MVIS
201391010681 201391010911 1 MVIS
201391010681 201391010921 1 MVIS
201391010681 201391010931 1 MVIS
201391010681 201391010941 1 MVIS
201391010681 201391010951 1 MVIS
201391010681 201391010961 1 MVIS
201391010681 201391010971 1 MVIS
201391010681 201391010981 1 MVIS
201391010681 201391010991 1 MVIS
201391010681 201391011001 1 MVIS
201391010681 201391011011 1 MVIS
201391010681 201391011021 1 MVIS
201391010681 201391011031 1 MVIS
201391010681 201391011041 1 MVIS
201391010681 201391011051 1 MVIS
201731020381 201731020431 1 MVIS
201731020491 201731020511 1 MVIS
201731020491 201731020521 1 MVIS
201751010132 201751010142 1 MVIS
202301020021 202301020031 1 MVIS
202301020021 202301020041 1 MVIS
202301030021 202301030041 1 MVIS
202301030061 202301030081 1 MVIS
202301030061 202301030091 1 MVIS
202301030061 202301030101 1 MVIS
202541010381 202541010411 1 MVIS
202621020222 202621020362 1 MVIS
202641010321 202641010331 1 MVIS
202641010321 202641010341 1 MVIS
202641010321 202641010351 1 MVIS
202641010321 202641010361 1 MVIS
202641010321 202641010371 1 MVIS
202641010321 202641010381 1 MVIS
202641010321 202641010391 1 MVIS
202641010321 202641010401 1 MVIS
202641010321 202641010411 1 MVIS
202831040061 202831040081 1 MVIS
203411010331 203411010441 1 MVIS
203451020141 203451020151 1 MVIS
203451020141 203451020161 1 MVIS


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


Obs EVNTIDX LINKIDX EVENTYPE
1 200331080011 200331080021 1 MVIS
2 200961011161 200961011451 1 MVIS
3 200961011161 200961011461 1 MVIS
4 200961011161 200961011471 1 MVIS
5 200961020071 200961020101 1 MVIS
6 200961020071 200961020111 1 MVIS
7 200961020071 200961020121 1 MVIS
8 200961020071 200961020131 1 MVIS
9 201391010681 201391010891 1 MVIS
10 201391010681 201391010901 1 MVIS
11 201391010681 201391010911 1 MVIS
12 201391010681 201391010921 1 MVIS
13 201391010681 201391010931 1 MVIS
14 201391010681 201391010941 1 MVIS
15 201391010681 201391010951 1 MVIS
16 201391010681 201391010961 1 MVIS
17 201391010681 201391010971 1 MVIS
18 201391010681 201391010981 1 MVIS
19 201391010681 201391010991 1 MVIS
20 201391010681 201391011001 1 MVIS
21 201391010681 201391011011 1 MVIS
22 201391010681 201391011021 1 MVIS
23 201391010681 201391011031 1 MVIS
24 201391010681 201391011041 1 MVIS
25 201391010681 201391011051 1 MVIS
26 201731020381 201731020431 1 MVIS
27 201731020491 201731020511 1 MVIS
28 201731020491 201731020521 1 MVIS
29 201751010132 201751010142 1 MVIS
30 202301020021 202301020031 1 MVIS
31 202301020021 202301020041 1 MVIS
32 202301030021 202301030041 1 MVIS
33 202301030061 202301030081 1 MVIS
34 202301030061 202301030091 1 MVIS
35 202301030061 202301030101 1 MVIS
36 202541010381 202541010411 1 MVIS
37 202621020222 202621020362 1 MVIS
38 202641010321 202641010331 1 MVIS
39 202641010321 202641010341 1 MVIS
40 202641010321 202641010351 1 MVIS
41 202641010321 202641010361 1 MVIS
42 202641010321 202641010371 1 MVIS
43 202641010321 202641010381 1 MVIS
44 202641010321 202641010391 1 MVIS
45 202641010321 202641010401 1 MVIS
46 202641010321 202641010411 1 MVIS
47 202831040061 202831040081 1 MVIS
48 203411010331 203411010441 1 MVIS
49 203451020141 203451020151 1 MVIS
50 203451020141 203451020161 1 MVIS


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


Obs LINKIDX
1 200331080021
2 200961011451
3 200961011461
4 200961011471
5 200961020101
6 200961020111
7 200961020121
8 200961020131
9 201391010891
10 201391010901
11 201391010911
12 201391010921
13 201391010931
14 201391010941
15 201391010951
16 201391010961
17 201391010971
18 201391010981
19 201391010991
20 201391011001
21 201391011011
22 201391011021
23 201391011031
24 201391011041
25 201391011051
26 201731020431
27 201731020511
28 201731020521
29 201751010142
30 202301020031
31 202301020041
32 202301030041
33 202301030081
34 202301030091
35 202301030101
36 202541010411
37 202621020362
38 202641010331
39 202641010341
40 202641010351
41 202641010361
42 202641010371
43 202641010381
44 202641010391
45 202641010401
46 202641010411
47 202831040081
48 203411010441
49 203451020151
50 203451020161


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


LINKIDX RXRECIDX RXNAME RXXP13X PERWT13F
200331080021 200331080021001 ALBUTEROL 10.08 6343.158235
200331080021 200331080021002 ALBUTEROL 10.08 6343.158235
200961011451 200961011451001 METOPROL TAR 3.69 2494.907426
200961011451 200961011451002 METOPROL TAR 3.69 2494.907426
200961011451 200961011451003 METOPROL TAR 3.69 2494.907426
200961011451 200961011451004 METOPROL TAR 3.69 2494.907426
200961011451 200961011451005 METOPROL TAR 3.69 2494.907426
200961011461 200961011461001 AGGRENOX 271.98 2494.907426
200961011461 200961011461002 AGGRENOX 271.98 2494.907426
200961011461 200961011461003 AGGRENOX 271.98 2494.907426
200961011461 200961011461004 AGGRENOX 271.98 2494.907426
200961011461 200961011461005 AGGRENOX 271.98 2494.907426
200961011471 200961011471001 LEVEMIR 171.49 2494.907426
200961011471 200961011471002 LEVEMIR 171.49 2494.907426
200961011471 200961011471003 LEVEMIR 171.49 2494.907426
200961011471 200961011471004 LEVEMIR 171.49 2494.907426
200961011471 200961011471005 LEVEMIR 171.49 2494.907426
200961011471 200961011471006 LEVEMIR 171.49 2494.907426
200961011471 200961011471007 LEVEMIR 171.49 2494.907426
200961011471 200961011471008 LEVEMIR 196.92 2494.907426
200961011471 200961011471009 LEVEMIR 196.92 2494.907426
200961011471 200961011471010 LEVEMIR 196.92 2494.907426
200961020101 200961020101001 ADVAIR DISKU 73.27 1891.106308
200961020111 200961020111001 PROAIR HFA 65.99 1891.106308
200961020121 200961020121001 MUCINEX 10.03 1891.106308
200961020131 200961020131001 CIPRO (5%) 208.55 1891.106308
201391010891 201391010891001 PRAMIPEXOLE 44.60 8890.828987
201391010891 201391010891002 PRAMIPEXOLE 44.60 8890.828987
201391010891 201391010891003 PRAMIPEXOLE 44.60 8890.828987
201391010891 201391010891004 PRAMIPEXOLE 44.60 8890.828987
201391010891 201391010891005 PRAMIPEXOLE 44.60 8890.828987
201391010891 201391010891006 PRAMIPEXOLE 44.60 8890.828987
201391010891 201391010891007 PRAMIPEXOLE 44.60 8890.828987
201391010901 201391010901001 LANTUS 235.08 8890.828987
201391010901 201391010901002 LANTUS 258.13 8890.828987
201391010901 201391010901003 LANTUS 258.13 8890.828987
201391010901 201391010901004 LANTUS 283.47 8890.828987
201391010911 201391010911001 POT CL MICRO 16.00 8890.828987
201391010911 201391010911002 POT CL MICRO 16.00 8890.828987
201391010911 201391010911003 POT CL MICRO 29.74 8890.828987
201391010911 201391010911004 POT CL MICRO 29.74 8890.828987
201391010911 201391010911005 POT CL MICRO 29.74 8890.828987
201391010911 201391010911006 POT CL MICRO 29.74 8890.828987
201391010911 201391010911007 POT CL MICRO 29.74 8890.828987
201391010921 201391010921001 FEXOFENADINE 25.00 8890.828987
201391010921 201391010921002 FEXOFENADINE 25.00 8890.828987
201391010921 201391010921003 FEXOFENADINE 25.00 8890.828987
201391010921 201391010921004 FEXOFENADINE 25.00 8890.828987
201391010921 201391010921005 FEXOFENADINE 25.00 8890.828987
201391010921 201391010921006 FEXOFENADINE 25.00 8890.828987
201391010921 201391010921007 FEXOFENADINE 25.00 8890.828987
201391010931 201391010931001 CYMBALTA 224.26 8890.828987
201391010931 201391010931002 CYMBALTA 204.67 8890.828987
201391010931 201391010931003 CYMBALTA 204.67 8890.828987
201391010931 201391010931004 CYMBALTA 204.67 8890.828987
201391010931 201391010931005 CYMBALTA 204.67 8890.828987
201391010931 201391010931006 CYMBALTA 224.71 8890.828987
201391010931 201391010931007 CYMBALTA 224.71 8890.828987
201391010941 201391010941001 NAMENDA 251.79 8890.828987
201391010941 201391010941002 NAMENDA 251.79 8890.828987
201391010941 201391010941003 NAMENDA 273.01 8890.828987
201391010941 201391010941004 NAMENDA 273.01 8890.828987
201391010941 201391010941005 NAMENDA 273.01 8890.828987
201391010941 201391010941006 NAMENDA 273.01 8890.828987
201391010941 201391010941007 NAMENDA 273.01 8890.828987
201391010951 201391010951001 FUROSEMIDE 2.54 8890.828987
201391010951 201391010951002 FUROSEMIDE 2.54 8890.828987
201391010951 201391010951003 FUROSEMIDE 5.01 8890.828987
201391010951 201391010951004 FUROSEMIDE 5.01 8890.828987
201391010951 201391010951005 FUROSEMIDE 5.01 8890.828987
201391010951 201391010951006 FUROSEMIDE 5.01 8890.828987
201391010951 201391010951007 FUROSEMIDE 5.01 8890.828987
201391010961 201391010961001 AMLODIPINE 5.11 8890.828987
201391010961 201391010961002 AMLODIPINE 5.11 8890.828987
201391010961 201391010961003 AMLODIPINE 5.11 8890.828987
201391010961 201391010961004 AMLODIPINE 5.11 8890.828987
201391010961 201391010961005 AMLODIPINE 5.11 8890.828987
201391010961 201391010961006 AMLODIPINE 5.11 8890.828987
201391010961 201391010961007 AMLODIPINE 5.11 8890.828987
201391010971 201391010971001 CLORAZ DIPOT 22.13 8890.828987
201391010971 201391010971002 CLORAZ DIPOT 22.13 8890.828987
201391010971 201391010971003 CLORAZ DIPOT 22.13 8890.828987
201391010971 201391010971004 CLORAZ DIPOT 22.13 8890.828987
201391010971 201391010971005 CLORAZ DIPOT 22.13 8890.828987
201391010971 201391010971006 CLORAZ DIPOT 22.13 8890.828987
201391010971 201391010971007 CLORAZ DIPOT 22.13 8890.828987
201391010981 201391010981001 LISINOPRIL 5.00 8890.828987
201391010981 201391010981002 LISINOPRIL 5.00 8890.828987
201391010981 201391010981003 LISINOPRIL 5.00 8890.828987
201391010981 201391010981004 LISINOPRIL 5.00 8890.828987
201391010981 201391010981005 LISINOPRIL 5.00 8890.828987
201391010981 201391010981006 LISINOPRIL 5.00 8890.828987
201391010981 201391010981007 LISINOPRIL 5.00 8890.828987
201391010991 201391010991001 MONTELUKAST 27.63 8890.828987
201391010991 201391010991002 MONTELUKAST 27.63 8890.828987
201391010991 201391010991003 MONTELUKAST 27.63 8890.828987
201391010991 201391010991004 MONTELUKAST 27.63 8890.828987
201391010991 201391010991005 MONTELUKAST 27.63 8890.828987
201391010991 201391010991006 MONTELUKAST 27.63 8890.828987
201391010991 201391010991007 MONTELUKAST 27.63 8890.828987
201391011001 201391011001001 HUMULIN R 234.81 8890.828987
201391011001 201391011001002 HUMULIN R 234.81 8890.828987
201391011001 201391011001003 HUMULIN R 234.81 8890.828987
201391011001 201391011001004 HUMULIN R 234.81 8890.828987
201391011001 201391011001005 HUMULIN R 254.70 8890.828987
201391011001 201391011001006 HUMULIN R 254.70 8890.828987
201391011001 201391011001007 HUMULIN R 254.70 8890.828987
201391011011 201391011011001 HYDRALAZINE 21.95 8890.828987
201391011011 201391011011002 HYDRALAZINE 21.95 8890.828987
201391011011 201391011011003 HYDRALAZINE 21.95 8890.828987
201391011011 201391011011004 HYDRALAZINE 21.95 8890.828987
201391011011 201391011011005 HYDRALAZINE 21.95 8890.828987
201391011011 201391011011006 HYDRALAZINE 21.95 8890.828987
201391011011 201391011011007 HYDRALAZINE 21.95 8890.828987
201391011021 201391011021001 FERROUS SULF 10.00 8890.828987
201391011021 201391011021002 FERROUS SULF 10.00 8890.828987
201391011021 201391011021003 FERROUS SULF 10.00 8890.828987
201391011021 201391011021004 FERROUS SULF 10.00 8890.828987
201391011021 201391011021005 FERROUS SULF 10.00 8890.828987
201391011021 201391011021006 FERROUS SULF 10.00 8890.828987
201391011021 201391011021007 FERROUS SULF 10.00 8890.828987
201391011031 201391011031001 MAGOX 400 17.65 8890.828987
201391011031 201391011031002 MAGOX 400 17.65 8890.828987
201391011031 201391011031003 MAGOX 400 17.65 8890.828987
201391011031 201391011031004 MAGOX 400 17.65 8890.828987
201391011031 201391011031005 MAGOX 400 17.65 8890.828987
201391011031 201391011031006 MAGOX 400 17.65 8890.828987
201391011031 201391011031007 MAGOX 400 17.65 8890.828987
201391011041 201391011041001 OMEPRAZOLE 7.19 8890.828987
201391011041 201391011041002 OMEPRAZOLE 7.19 8890.828987
201391011041 201391011041003 OMEPRAZOLE 7.19 8890.828987
201391011041 201391011041004 OMEPRAZOLE 7.19 8890.828987
201391011041 201391011041005 OMEPRAZOLE 7.19 8890.828987
201391011051 201391011051001 OXCARBAZEPIN 82.52 8890.828987
201391011051 201391011051002 OXCARBAZEPIN 48.52 8890.828987
201391011051 201391011051003 OXCARBAZEPIN 48.52 8890.828987
201391011051 201391011051004 OXCARBAZEPIN 48.52 8890.828987
201391011051 201391011051005 OXCARBAZEPIN 48.52 8890.828987
201391011051 201391011051006 OXCARBAZEPIN 48.52 8890.828987
201391011051 201391011051007 OXCARBAZEPIN 48.52 8890.828987
201731020431 201731020431001 ADVAIR HFA 276.42 11122.533252
201731020511 201731020511001 BUT/APAP/CAF 4.10 11122.533252
201731020511 201731020511002 BUT/APAP/CAF 4.10 11122.533252
201731020521 201731020521001 ADVAIR HFA 284.66 11122.533252
201731020521 201731020521002 ADVAIR HFA 284.66 11122.533252
201731020521 201731020521003 ADVAIR HFA 284.66 11122.533252
201751010142 201751010142001 PREDNISONE 2.74 5544.853057
202301020031 202301020031001 PROAIR HFA 53.14 2849.505704
202301020041 202301020041001 MONTELUKAST 15.00 2849.505704
202301030041 202301030041001 PROAIR HFA 53.14 3066.926265
202301030081 202301030081001 PROAIR HFA 53.14 3066.926265
202301030091 202301030091001 MONTELUKAST 63.90 3066.926265
202301030101 202301030101001 NEBULIZER MASK ADULT 2.01 3066.926265
202541010411 202541010411001 QVAR 163.91 43833.688905
202621020362 202621020362001 PREDNISONE 2.37 2745.028438
202641010331 202641010331001 PROAIR HFA 46.39 7838.109009
202641010331 202641010331002 PROAIR HFA 45.87 7838.109009
202641010331 202641010331003 PROAIR HFA 45.87 7838.109009
202641010341 202641010341001 QVAR 4163.94 7838.109009
202641010341 202641010341002 QVAR 713.76 7838.109009
202641010341 202641010341003 QVAR 713.76 7838.109009
202641010351 202641010351001 ADVAIR DISKU 233.88 7838.109009
202641010361 202641010361001 AMLODIPINE 43.59 7838.109009
202641010361 202641010361002 AMLODIPINE 43.59 7838.109009
202641010361 202641010361003 AMLODIPINE 43.59 7838.109009
202641010371 202641010371001 THEOPHYLLINE 20.07 7838.109009
202641010371 202641010371002 THEOPHYLLINE 20.07 7838.109009
202641010371 202641010371003 THEOPHYLLINE 20.07 7838.109009
202641010381 202641010381001 SPIRIVA 267.90 7838.109009
202641010381 202641010381002 SPIRIVA 267.90 7838.109009
202641010381 202641010381003 SPIRIVA 267.90 7838.109009
202641010391 202641010391001 LEVOFLOXACIN 6.07 7838.109009
202641010401 202641010401001 NEXIUM 690.51 7838.109009
202641010401 202641010401002 NEXIUM 690.51 7838.109009
202641010401 202641010401003 NEXIUM 588.43 7838.109009
202641010411 202641010411001 IBUPROFEN 110.97 7838.109009
202641010411 202641010411002 IBUPROFEN 110.97 7838.109009
202641010411 202641010411003 IBUPROFEN 110.97 7838.109009
202831040081 202831040081001 VENTOLIN HFA 62.99 2352.240154
203411010441 203411010441001 DULERA 223.67 8976.320877
203411010441 203411010441002 DULERA 223.67 8976.320877
203411010441 203411010441003 DULERA 223.67 8976.320877
203411010441 203411010441004 DULERA 223.67 8976.320877
203451020151 203451020151001 SERTRALINE 134.99 14832.750240
203451020161 203451020161001 ADVAIR HFA 342.99 14832.750240
203451020161 203451020161002 ADVAIR HFA 342.99 14832.750240
203451020161 203451020161003 ADVAIR HFA 342.99 14832.750240
203451020161 203451020161004 ADVAIR HFA 342.99 14832.750240
203451030101 203451030101001 Advair 253.37 9445.971672
203451030101 203451030101002 Advair 253.37 9445.971672
203451030101 203451030101003 Advair 253.37 9445.971672
203451030101 203451030101004 Advair 253.37 9445.971672
203451030111 203451030111001 ALBUTEROL 76.99 9445.971672
203451030111 203451030111002 ALBUTEROL 76.99 9445.971672
203591010401 203591010401001 SIMVASTATIN 125.99 5767.614461
203591010401 203591010401002 SIMVASTATIN 125.99 5767.614461
203591010401 203591010401003 SIMVASTATIN 125.99 5767.614461
203591010411 203591010411001 DULERA 699.30 5767.614461
203591010411 203591010411002 DULERA 699.30 5767.614461
203591010411 203591010411003 DULERA 699.30 5767.614461


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

Analysis Variable : RXXP13X SUM OF PAYMENTS RXSF13X-RXOU13X(IMPUTED)


N Sum
5640 529582.49


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

Weighted

Analysis Variable : RXXP13X SUM OF PAYMENTS RXSF13X-RXOU13X(IMPUTED)


N Sum
5640 4843260307


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: SAS initialization used:
real time 1.58 seconds
cpu time 0.20 seconds


NOTE: AUTOEXEC processing beginning; file is C:\Program Files\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'
1 ! 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-160I";
8 TITLE2 "Sample SAS Job for Example B";
9
10 LIBNAME IN "C:\Data";
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.00 seconds

cpu time 0.00 seconds


26

27
28 Get condition records coded as asthma.
29

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

NOTE: There were 123875 observations read from the data set IN.H162.
NOTE: The data set WORK.ASCONDS has 2469 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 80.00 percent.
Compressed is 18 pages; un-compressed would require 10 pages.
NOTE: DATA statement used (Total process time):
real time 1.19 seconds
cpu time 0.09 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 2469 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2469 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 80.00 percent.
Compressed is 18 pages; un-compressed would require 10 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 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 (H162) 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.05 seconds
cpu time 0.03 seconds


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

NOTE: There were 357551 observations read from the data set IN.H160IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 357551 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.90 percent.


Compressed is 6763 pages; un-compressed would require 6386 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.93 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 357551 observations read from the data set WORK.CLNK.
NOTE: There were 2469 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7471 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 26.67 percent.
Compressed is 76 pages; un-compressed would require 60 pages.
NOTE: DATA statement used (Total process time):
real time 0.22 seconds
cpu time 0.21 seconds


53
54 proc print data=asclnks (obs=75);
55 by condidx;
56 id condidx;
57 format eventype eventype.;
58 title3 "sample print of work.asclnks - sorted by condidx";
59 title4 "events linked to asthma condition records";
60 run;

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


61
62 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

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


63
64 proc print data=asclnks (obs=50);
65 format eventype eventype.;
66 title3 "sample print of work.asclnks - sorted by evntidx";
67 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


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

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


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

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


79

80
81 Get PMED records linked to asthma condition records.
82

83 PROC SORT DATA=IN.H160A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 327557 observations read from the data set IN.H160A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 327557 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 19.98 percent.
Compressed is 5699 pages; un-compressed would require 7122 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 9.50 seconds
cpu time 1.48 seconds


84
85 DATA ASPMEDS;
86 MERGE PMED (KEEP=LINKIDX RXRECIDX RXNAME RXXP13X PERWT13F)
87 ASCLNKS (IN=INASCLNK KEEP=EVNTIDX RENAME=(EVNTIDX=LINKIDX));
88 BY LINKIDX;
89 IF INASCLNK & PERWT13F>0;
90 RUN;

NOTE: There were 327557 observations read from the data set WORK.PMED.
NOTE: There were 7459 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASPMEDS has 10533 observations and 5 variables.
NOTE: Compressing data set WORK.ASPMEDS decreased size by 28.57 percent.
Compressed is 90 pages; un-compressed would require 126 pages.
NOTE: DATA statement used (Total process time):
real time 0.25 seconds
cpu time 0.24 seconds


91
92 proc print data=aspmeds (obs=300);
93 by linkidx;
94 id linkidx;
95 var rxrecidx rxname RXXP13X PERWT13F;
96 title3 "sample print of work.aspmeds";
97 title4 "PMED (HC-160A) records which link to condition records coded as asthma";
98 run;

NOTE: There were 300 observations read from the data set WORK.ASPMEDS.
NOTE: The PROCEDURE PRINT printed pages 7-19.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.11 seconds
cpu time 0.10 seconds


99
100 PROC MEANS DATA=ASPMEDS N SUM;
101 VAR RXXP13X;
102 TITLE3 "Total Rx expenditures associated with asthma";
103 RUN;

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


104
105 PROC MEANS DATA=ASPMEDS N SUM;
106 VAR RXXP13X;
107 WEIGHT PERWT13F;
108 TITLE3 "Total Rx expenditures associated with asthma";
109 TITLE5 "Weighted";
110 RUN;

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


111
112 ods rtf close;
113

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



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


Obs CONDIDX CCCODEX
1 200321020011 128
2 200331040011 128
3 200331080011 128
4 200341010041 128
5 200411050011 128
6 200461030011 128
7 200591010021 128
8 200591020021 128
9 200591030011 128
10 200891020081 128
11 200941010021 128
12 200941020051 128
13 200961010081 128
14 200961020021 128
15 200961030011 128
16 201091060011 128
17 201391010061 128
18 201501020021 128
19 201731020021 128
20 201751010042 128
21 201751010062 128
22 201781010031 128
23 201791020011 128
24 201921020051 128
25 202221010031 128
26 202301020021 128
27 202301030011 128
28 202301050061 128
29 202541010021 128
30 202551030021 128
31 202571010021 128
32 202621020042 128
33 202621060012 128
34 202641010041 128
35 202641010061 128
36 202781020011 128
37 202831040011 128
38 202831040021 128
39 202851040011 128
40 202971030011 128
41 203141030011 128
42 203341010051 128
43 203411010021 128
44 203451020021 128
45 203451030011 128
46 203591010041 128
47 203661020011 128
48 203921010051 128
49 203951020021 128
50 204191040061 128


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


CONDIDX EVNTIDX EVENTYPE
200331040011 200331040011 8 PMED
200331080011 200331080011 1 MVIS
200331080011 200331080021 8 PMED
200331080011 200331080031 8 PMED
200341010041 200341010771 1 MVIS
200411050011 200411050151 8 PMED
200411050011 200411050161 8 PMED
200411050011 200411050171 8 PMED
200461030011 200461030031 8 PMED
200591010021 200591010531 8 PMED
200591030011 200591030151 8 PMED
200591030011 200591030181 8 PMED
200941010021 200941010271 8 PMED
200941010021 200941010431 8 PMED
200941020051 200941020231 7 HVIS
200941020051 200941020381 7 HVIS
200961010081 200961010441 1 MVIS
200961010081 200961011161 1 MVIS
200961010081 200961011171 1 MVIS
200961010081 200961011181 1 MVIS
200961020021 200961020071 1 MVIS
200961020021 200961020101 8 PMED
200961020021 200961020111 8 PMED
201391010061 201391010681 1 MVIS
201391010061 201391010691 1 MVIS
201391010061 201391010701 1 MVIS
201391010061 201391010721 1 MVIS
201391010061 201391010731 1 MVIS
201391010061 201391010741 1 MVIS
201391010061 201391010751 1 MVIS
201391010061 201391010991 8 PMED
201391010061 201391011101 8 PMED
201501020021 201501020391 8 PMED
201501020021 201501020401 8 PMED
201731020021 201731020261 8 PMED
201731020021 201731020381 1 MVIS
201731020021 201731020431 8 PMED
201731020021 201731020461 8 PMED
201731020021 201731020491 1 MVIS
201731020021 201731020521 8 PMED
201731020021 201731020531 8 PMED
201751010042 201751010142 8 PMED
201751010062 201751010132 1 MVIS
201781010031 201781010611 8 PMED
201791020011 201791020041 8 PMED
201791020011 201791020061 8 PMED
201791020011 201791020101 8 PMED
201921020051 201921020091 1 MVIS
201921020051 201921020661 8 PMED
201921020051 201921020781 8 PMED
202301020021 202301020021 1 MVIS
202301020021 202301020031 8 PMED
202301020021 202301020041 8 PMED
202301030011 202301030021 1 MVIS
202301030011 202301030041 8 PMED
202301030011 202301030051 8 PMED
202301030011 202301030061 1 MVIS
202301030011 202301030081 8 PMED
202301030011 202301030091 8 PMED
202301030011 202301030101 8 PMED
202301030011 202301030111 8 PMED
202301030011 202301030121 8 PMED
202301030011 202301030131 8 PMED
202301050061 202301050131 1 MVIS
202301050061 202301050141 1 MVIS
202301050061 202301050151 1 MVIS
202301050061 202301050181 8 PMED
202301050061 202301050251 8 PMED
202541010021 202541010381 1 MVIS
202541010021 202541010391 1 MVIS
202541010021 202541010411 8 PMED
202541010021 202541010461 8 PMED
202551030021 202551030051 8 PMED
202621020042 202621020192 7 HVIS
202621020042 202621020222 1 MVIS


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


Obs CONDIDX EVNTIDX EVENTYPE
1 200331040011 200331040011 8 PMED
2 200331080011 200331080011 1 MVIS
3 200331080011 200331080021 8 PMED
4 200331080011 200331080031 8 PMED
5 200341010041 200341010771 1 MVIS
6 200411050011 200411050151 8 PMED
7 200411050011 200411050161 8 PMED
8 200411050011 200411050171 8 PMED
9 200461030011 200461030031 8 PMED
10 200591010021 200591010531 8 PMED
11 200591030011 200591030151 8 PMED
12 200591030011 200591030181 8 PMED
13 200941010021 200941010271 8 PMED
14 200941010021 200941010431 8 PMED
15 200941020051 200941020231 7 HVIS
16 200941020051 200941020381 7 HVIS
17 200961010081 200961010441 1 MVIS
18 200961010081 200961011161 1 MVIS
19 200961010081 200961011171 1 MVIS
20 200961010081 200961011181 1 MVIS
21 200961020021 200961020071 1 MVIS
22 200961020021 200961020101 8 PMED
23 200961020021 200961020111 8 PMED
24 201391010061 201391010681 1 MVIS
25 201391010061 201391010691 1 MVIS
26 201391010061 201391010701 1 MVIS
27 201391010061 201391010721 1 MVIS
28 201391010061 201391010731 1 MVIS
29 201391010061 201391010741 1 MVIS
30 201391010061 201391010751 1 MVIS
31 201391010061 201391010991 8 PMED
32 201391010061 201391011101 8 PMED
33 201501020021 201501020391 8 PMED
34 201501020021 201501020401 8 PMED
35 201731020021 201731020261 8 PMED
36 201731020021 201731020381 1 MVIS
37 201731020021 201731020431 8 PMED
38 201731020021 201731020461 8 PMED
39 201731020021 201731020491 1 MVIS
40 201731020021 201731020521 8 PMED
41 201731020021 201731020531 8 PMED
42 201751010062 201751010132 1 MVIS
43 201751010042 201751010142 8 PMED
44 201781010031 201781010611 8 PMED
45 201791020011 201791020041 8 PMED
46 201791020011 201791020061 8 PMED
47 201791020011 201791020101 8 PMED
48 201921020051 201921020091 1 MVIS
49 201921020051 201921020661 8 PMED
50 201921020051 201921020781 8 PMED


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


ObsEVNTIDX EVENTYPE
1 200331040011 8 PMED
2 200331080011 1 MVIS
3 200331080021 8 PMED
4 200331080031 8 PMED
5 200341010771 1 MVIS
6 200411050151 8 PMED
7 200411050161 8 PMED
8 200411050171 8 PMED
9 200461030031 8 PMED
10 200591010531 8 PMED
11 200591030151 8 PMED
12 200591030181 8 PMED
13 200941010271 8 PMED
14 200941010431 8 PMED
15 200941020231 7 HVIS
16 200941020381 7 HVIS
17 200961010441 1 MVIS
18 200961011161 1 MVIS
19 200961011171 1 MVIS
20 200961011181 1 MVIS
21 200961020071 1 MVIS
22 200961020101 8 PMED
23 200961020111 8 PMED
24 201391010681 1 MVIS
25 201391010691 1 MVIS
26 201391010701 1 MVIS
27 201391010721 1 MVIS
28 201391010731 1 MVIS
29 201391010741 1 MVIS
30 201391010751 1 MVIS
31 201391010991 8 PMED
32 201391011101 8 PMED
33 201501020391 8 PMED
34 201501020401 8 PMED
35 201731020261 8 PMED
36 201731020381 1 MVIS
37 201731020431 8 PMED
38 201731020461 8 PMED
39 201731020491 1 MVIS
40 201731020521 8 PMED
41 201731020531 8 PMED
42 201751010132 1 MVIS
43 201751010142 8 PMED
44 201781010611 8 PMED
45 201791020041 8 PMED
46 201791020061 8 PMED
47 201791020101 8 PMED
48 201921020091 1 MVIS
49 201921020661 8 PMED
50 201921020781 8 PMED


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


LINKIDX RXRECIDX RXNAME RXXP13X PERWT13F
200331040011 200331040011001 PROVENTIL 60.05 6634.169309
200331080021 200331080021001 ALBUTEROL 10.08 6343.158235
200331080021 200331080021002 ALBUTEROL 10.08 6343.158235
200331080031 200331080031001 ALBUTEROL 10.08 6343.158235
200411050151 200411050151001 NASONEX 168.99 8698.715936
200411050161 200411050161001 ALBUTEROL 4.78 8698.715936
200411050171 200411050171001 PULMICORT 647.06 8698.715936
200461030031 200461030031001 ALBUTEROL 39.99 7582.691309
200591010531 200591010531001 PROAIR HFA 68.85 5395.994678
200591030151 200591030151001 FLOVENT HFA 165.34 7826.271268
200591030181 200591030181001 FLOVENT HFA 204.99 7826.271268
200941010271 200941010271001 ALBUTEROL 37.38 4542.465027
200941010431 200941010431001 ALBUTEROL 25.10 4542.465027
200961020101 200961020101001 ADVAIR DISKU 73.27 1891.106308
200961020111 200961020111001 PROAIR HFA 65.99 1891.106308
201391010991 201391010991001 MONTELUKAST 27.63 8890.828987
201391010991 201391010991002 MONTELUKAST 27.63 8890.828987
201391010991 201391010991003 MONTELUKAST 27.63 8890.828987
201391010991 201391010991004 MONTELUKAST 27.63 8890.828987
201391010991 201391010991005 MONTELUKAST 27.63 8890.828987
201391010991 201391010991006 MONTELUKAST 27.63 8890.828987
201391010991 201391010991007 MONTELUKAST 27.63 8890.828987
201391011101 201391011101001 PROAIR HFA 47.66 8890.828987
201501020391 201501020391001 ADVAIR DISKU 347.84 20731.426824
201501020391 201501020391002 ADVAIR DISKU 347.84 20731.426824
201501020401 201501020401001 TRIAMCINOLON 95.72 20731.426824
201731020261 201731020261001 VENTOLIN HFA 41.59 11122.533252
201731020431 201731020431001 ADVAIR HFA 276.42 11122.533252
201731020461 201731020461001 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461002 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461003 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461004 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461005 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461006 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461007 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461008 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461009 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461010 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461011 VENTOLIN HFA 41.59 11122.533252
201731020461 201731020461012 VENTOLIN HFA 41.59 11122.533252
201731020521 201731020521001 ADVAIR HFA 284.66 11122.533252
201731020521 201731020521002 ADVAIR HFA 284.66 11122.533252
201731020521 201731020521003 ADVAIR HFA 284.66 11122.533252
201731020531 201731020531001 VENTOLIN HFA 41.59 11122.533252
201731020531 201731020531002 VENTOLIN HFA 41.59 11122.533252
201731020531 201731020531003 VENTOLIN HFA 41.59 11122.533252
201751010142 201751010142001 PREDNISONE 2.74 5544.853057
201781010611 201781010611001 PROAIR HFA 45.74 2773.839722
201781010611 201781010611002 PROAIR HFA 45.74 2773.839722
201791020041 201791020041001 PROAIR HFA 47.94 18693.965426
201791020061 201791020061001 PROAIR HFA 65.99 18693.965426
201791020061 201791020061002 PROAIR HFA 65.99 18693.965426
201791020061 201791020061003 PROAIR HFA 65.99 18693.965426
201791020061 201791020061004 PROAIR HFA 53.51 18693.965426
201791020061 201791020061005 PROAIR HFA 53.51 18693.965426
201791020101 201791020101001 PROAIR HFA 47.94 18693.965426
201791020101 201791020101002 PROAIR HFA 35.00 18693.965426
201791020101 201791020101003 PROAIR HFA 53.51 18693.965426
201791020101 201791020101004 PROAIR HFA 41.00 18693.965426
201921020661 201921020661001 FLUTICASONE 70.59 17007.191579
201921020661 201921020661002 FLUTICASONE 70.59 17007.191579
201921020781 201921020781001 PROAIR HFA 62.56 17007.191579
202301020031 202301020031001 PROAIR HFA 53.14 2849.505704
202301020041 202301020041001 MONTELUKAST 15.00 2849.505704
202301030041 202301030041001 PROAIR HFA 53.14 3066.926265
202301030051 202301030051001 AZITHROMYCIN 44.99 3066.926265
202301030081 202301030081001 PROAIR HFA 53.14 3066.926265
202301030091 202301030091001 MONTELUKAST 63.90 3066.926265
202301030101 202301030101001 NEBULIZER MASK ADULT 2.01 3066.926265
202301030111 202301030111001 PROAIR HFA 53.14 3066.926265
202301030121 202301030121001 MONTELUKAST 63.90 3066.926265
202301030121 202301030121002 MONTELUKAST 50.94 3066.926265
202301030131 202301030131001 BUDESONIDE 239.98 3066.926265
202301050181 202301050181001 ALBUTEROL 5.01 2229.862126
202301050181 202301050181002 ALBUTEROL 5.01 2229.862126
202301050181 202301050181003 ALBUTEROL 5.01 2229.862126
202301050181 202301050181004 ALBUTEROL 5.01 2229.862126
202301050181 202301050181005 ALBUTEROL 5.01 2229.862126
202301050251 202301050251001 LORATADINE 9.59 2229.862126
202541010411 202541010411001 QVAR 163.91 43833.688905
202541010461 202541010461001 VENTOLIN HFA 47.12 43833.688905
202551030051 202551030051001 ALBUTEROL 76.99 6409.590319
202621020362 202621020362001 PREDNISONE 2.37 2745.028438
202621020612 202621020612001 ADVAIR DISKU 272.76 2745.028438
202621020612 202621020612002 ADVAIR DISKU 272.76 2745.028438
202621060072 202621060072001 ADVAIR HFA 342.99 2844.768922
202621060072 202621060072002 ADVAIR HFA 342.99 2844.768922
202621060072 202621060072003 ADVAIR HFA 342.99 2844.768922
202641010211 202641010211001 PROAIR HFA 46.39 7838.109009
202641010221 202641010221001 QVAR 237.92 7838.109009
202641010231 202641010231001 PROAIR HFA 45.87 7838.109009
202641010251 202641010251001 THEOPHYLLINE 20.07 7838.109009
202641010261 202641010261001 ADVAIR DISKU 233.88 7838.109009
202641010271 202641010271001 IPRATROPIUM 5.67 7838.109009
202641010281 202641010281001 SPIRIVA 267.90 7838.109009
202641010291 202641010291001 LEVOFLOXACIN 6.07 7838.109009
202641010331 202641010331001 PROAIR HFA 46.39 7838.109009
202641010331 202641010331002 PROAIR HFA 45.87 7838.109009
202641010331 202641010331003 PROAIR HFA 45.87 7838.109009
202641010341 202641010341001 QVAR 4163.94 7838.109009
202641010341 202641010341002 QVAR 713.76 7838.109009
202641010341 202641010341003 QVAR 713.76 7838.109009
202641010351 202641010351001 ADVAIR DISKU 233.88 7838.109009
202641010371 202641010371001 THEOPHYLLINE 20.07 7838.109009
202641010371 202641010371002 THEOPHYLLINE 20.07 7838.109009
202641010371 202641010371003 THEOPHYLLINE 20.07 7838.109009
202641010381 202641010381001 SPIRIVA 267.90 7838.109009
202641010381 202641010381002 SPIRIVA 267.90 7838.109009
202641010381 202641010381003 SPIRIVA 267.90 7838.109009
202641010411 202641010411001 IBUPROFEN 110.97 7838.109009
202641010411 202641010411002 IBUPROFEN 110.97 7838.109009
202641010411 202641010411003 IBUPROFEN 110.97 7838.109009
202641010441 202641010441001 PROAIR HFA 45.87 7838.109009
202641010441 202641010441002 PROAIR HFA 45.87 7838.109009
202641010471 202641010471001 PROAIR HFA 45.87 7838.109009
202641010471 202641010471002 VENTOLIN HFA 43.87 7838.109009
202641010481 202641010481001 ADVAIR DISKU 233.88 7838.109009
202641010481 202641010481002 ADVAIR DISKU 233.88 7838.109009
202781020134 202781020134001 ADVAIR DISKU 396.99 2768.490490
202781020144 202781020144001 IPRATROPIUM/ 126.00 2768.490490
202781020174 202781020174001 PREDNISONE 1.15 2768.490490
202781020214 202781020214001 ADVAIR DISKU 396.99 2768.490490
202781020224 202781020224001 PROAIR HFA 45.87 2768.490490
202831040081 202831040081001 VENTOLIN HFA 62.99 2352.240154
202831040101 202831040101001 ALBUTEROL 76.99 2352.240154
202831040101 202831040101002 ALBUTEROL 76.99 2352.240154
202831040111 202831040111001 VENTOLIN HFA 62.99 2352.240154
202831040121 202831040121001 ALBUTEROL 76.99 2352.240154
202831040121 202831040121002 ALBUTEROL 76.99 2352.240154
202831040131 202831040131001 PREDNISOLONE 36.99 2352.240154
202831040141 202831040141001 VENTOLIN HFA 62.99 2352.240154
202851040101 202851040101001 MONTELUKAST 105.60 22229.558338
202851040191 202851040191001 PROAIR HFA 34.69 22229.558338
202851040201 202851040201001 MONTELUKAST 29.74 22229.558338
202851040201 202851040201002 MONTELUKAST 29.74 22229.558338
202971030121 202971030121001 XOPENEX HFA 51.15 4333.030621
202971030131 202971030131001 ALBUTEROL 72.57 4333.030621
203141030041 203141030041001 PROVENTIL 54.58 2914.415455
203411010441 203411010441001 DULERA 223.67 8976.320877
203411010441 203411010441002 DULERA 223.67 8976.320877
203411010441 203411010441003 DULERA 223.67 8976.320877
203411010441 203411010441004 DULERA 223.67 8976.320877
203451020121 203451020121001 ADVAIR HFA 326.99 14832.750240
203451020121 203451020121002 ADVAIR HFA 326.99 14832.750240
203451020121 203451020121003 ADVAIR HFA 326.99 14832.750240
203451020161 203451020161001 ADVAIR HFA 342.99 14832.750240
203451020161 203451020161002 ADVAIR HFA 342.99 14832.750240
203451020161 203451020161003 ADVAIR HFA 342.99 14832.750240
203451020161 203451020161004 ADVAIR HFA 342.99 14832.750240
203451020241 203451020241001 PREDNISONE 27.98 14832.750240
203451020251 203451020251001 AZITHROMYCIN 44.99 14832.750240
203451020271 203451020271001 ADVAIR HFA 353.99 14832.750240
203451020271 203451020271002 ADVAIR HFA 353.99 14832.750240
203451020271 203451020271003 ADVAIR HFA 353.99 14832.750240
203451020271 203451020271004 ADVAIR HFA 353.99 14832.750240
203451020271 203451020271005 ADVAIR HFA 353.99 14832.750240
203451030051 203451030051001 Advair 253.37 9445.971672
203451030051 203451030051002 Advair 253.37 9445.971672
203451030051 203451030051003 Advair 253.37 9445.971672
203451030061 203451030061001 ALBUTEROL 76.99 9445.971672
203451030101 203451030101001 Advair 253.37 9445.971672
203451030101 203451030101002 Advair 253.37 9445.971672
203451030101 203451030101003 Advair 253.37 9445.971672
203451030101 203451030101004 Advair 253.37 9445.971672
203451030111 203451030111001 ALBUTEROL 76.99 9445.971672
203451030111 203451030111002 ALBUTEROL 76.99 9445.971672
203451030141 203451030141001 Advair 253.37 9445.971672
203451030141 203451030141002 Advair 253.37 9445.971672
203451030141 203451030141003 Advair 253.37 9445.971672
203451030141 203451030141004 Advair 253.37 9445.971672
203451030141 203451030141005 Advair 253.37 9445.971672
203451030151 203451030151001 ALBUTEROL 76.99 9445.971672
203451030151 203451030151002 ALBUTEROL 76.99 9445.971672
203451030151 203451030151003 ALBUTEROL 76.99 9445.971672
203451030151 203451030151004 ALBUTEROL 76.99 9445.971672
203451030151 203451030151005 ALBUTEROL 76.99 9445.971672
203591010251 203591010251001 DULERA 699.30 5767.614461
203591010411 203591010411001 DULERA 699.30 5767.614461
203591010411 203591010411002 DULERA 699.30 5767.614461
203591010411 203591010411003 DULERA 699.30 5767.614461
203591010411 203591010411004 DULERA 699.30 5767.614461
203591010411 203591010411005 DULERA 699.30 5767.614461
203591010411 203591010411006 DULERA 699.30 5767.614461
203591010411 203591010411007 DULERA 699.30 5767.614461
203591010541 203591010541001 DULERA 699.30 5767.614461
203661020121 203661020121001 MONTELUKAST 26.95 5151.081659
203661020131 203661020131001 SYMBICORT 741.26 5151.081659
203661020131 203661020131002 SYMBICORT 741.26 5151.081659
203661020131 203661020131003 SYMBICORT 741.26 5151.081659
203661020181 203661020181001 MONTELUKAST 26.95 5151.081659
203661020181 203661020181002 MONTELUKAST 26.95 5151.081659
203661020191 203661020191001 DULERA 228.42 5151.081659
203661020191 203661020191002 DULERA 228.42 5151.081659
203661020231 203661020231001 MONTELUKAST 26.95 5151.081659
203661020231 203661020231002 MONTELUKAST 26.95 5151.081659
203661020231 203661020231003 MONTELUKAST 26.95 5151.081659
203661020231 203661020231004 MONTELUKAST 26.95 5151.081659
203661020241 203661020241001 ALBUTEROL 4.00 5151.081659
203661020241 203661020241002 ALBUTEROL 4.00 5151.081659
203921011171 203921011171001 PROAIR HFA 67.99 5277.489496
203921011171 203921011171002 PROAIR HFA 67.99 5277.489496
203921011171 203921011171003 PROAIR HFA 67.99 5277.489496
203921011171 203921011171004 PROAIR HFA 67.99 5277.489496
203921011171 203921011171005 PROAIR HFA 67.99 5277.489496
203921011171 203921011171006 PROAIR HFA 67.99 5277.489496
203951020061 203951020061001 PROAIR HFA 47.33 3943.009041
203951020111 203951020111001 ALBUTEROL 9.60 3943.009041
204191050101 204191050101001 PROVENTIL 53.22 3846.072238
204191050101 204191050101002 PROVENTIL 53.22 3846.072238
204191050101 204191050101003 PROVENTIL 53.22 3846.072238
204191050101 204191050101004 PROVENTIL 53.22 3846.072238
204191050101 204191050101005 PROVENTIL 53.22 3846.072238
204191050101 204191050101006 PROVENTIL 53.22 3846.072238
204191050111 204191050111001 EPIPEN-JR 275.05 3846.072238
204191050111 204191050111002 EPIPEN-JR 275.05 3846.072238
204191050111 204191050111003 EPIPEN-JR 275.05 3846.072238
204191050111 204191050111004 EPIPEN-JR 275.05 3846.072238
204191050111 204191050111005 EPIPEN-JR 275.05 3846.072238
204191050111 204191050111006 EPIPEN-JR 24.00 3846.072238
204191060131 204191060131001 OXYBUTYNIN 7.91 4131.221457
204191060131 204191060131002 OXYBUTYNIN 7.91 4131.221457
204191060131 204191060131003 OXYBUTYNIN 7.91 4131.221457
204191060131 204191060131004 OXYBUTYNIN 7.91 4131.221457
204241050121 204241050121001 VENTOLIN HFA 41.59 2505.087343
204241050131 204241050131001 VENTOLIN HFA 41.59 2505.087343
204251010801 204251010801001 ADVAIR HFA 342.99 5253.340977
204271040121 204271040121001 Fluticas NAS SPR 24.61 3216.392861
204551040011 204551040011001 Advair 274.08 3302.729717
204551040021 204551040021001 FLUTICASONE 10.63 3302.729717
204551040031 204551040031001 ALBUTEROL 15.00 3302.729717
204551040041 204551040041001 ALLEGRA ALRG 30.00 3302.729717
204621010031 204621010031001 ALBUTEROL 3.33 940.353341
204621030061 204621030061001 Azithromycin 7.58 596.439882
204621030071 204621030071001 ALBUTEROL 48.99 596.439882
205331010431 205331010431001 LEVOCETIRIZI 59.49 8668.564218
205331011051 205331011051001 SYMBICORT 288.23 8668.564218
205331011051 205331011051002 SYMBICORT 288.23 8668.564218
205411010581 205411010581001 COMBIVENT 225.11 2608.865536
205411010581 205411010581002 COMBIVENT 225.11 2608.865536
205411010581 205411010581003 COMBIVENT 225.11 2608.865536
205411010991 205411010991001 COMBIVENT 223.86 2608.865536
205411010991 205411010991002 COMBIVENT 223.86 2608.865536
205531020091 205531020091001 VENTOLIN HFA 17.21 1449.146217
205531020091 205531020091002 VENTOLIN HFA 17.21 1449.146217
205531020091 205531020091003 VENTOLIN HFA 17.21 1449.146217
205531020091 205531020091004 VENTOLIN HFA 17.21 1449.146217
205531020091 205531020091005 VENTOLIN HFA 17.21 1449.146217
205531040031 205531040031001 SINGULAIR 177.14 1527.195611
205651010421 205651010421001 DULERA 235.72 13298.281573
205691020051 205691020051001 PROAIR HFA 34.69 3231.750452
205691020061 205691020061001 Zyflo CR 704.80 3231.750452
205691020061 205691020061002 Zyflo CR 766.48 3231.750452
205691020081 205691020081001 Advair Diskus 789.54 3231.750452
205691020081 205691020081002 ADVAIR DISKU 1028.97 3231.750452
205691020091 205691020091001 VENTOLIN HFA 35.00 3231.750452
205691020091 205691020091002 VENTOLIN HFA 42.41 3231.750452
205691020101 205691020101001 Zyflo CR 766.48 3231.750452
205691020101 205691020101002 Zyflo CR 766.48 3231.750452
205871020071 205871020071001 VENTOLIN HFA 42.96 6424.650124
205871020121 205871020121001 VENTOLIN HFA 42.96 6424.650124
205871020121 205871020121002 VENTOLIN HFA 42.96 6424.650124
205871020121 205871020121003 VENTOLIN HFA 42.96 6424.650124
205871020121 205871020121004 VENTOLIN HFA 42.96 6424.650124
205871020121 205871020121005 VENTOLIN HFA 42.96 6424.650124
205871020121 205871020121006 VENTOLIN HFA 42.96 6424.650124
205871020131 205871020131001 QVAR 110.72 6424.650124
205871020131 205871020131002 QVAR 110.72 6424.650124
205871020131 205871020131003 QVAR 110.72 6424.650124
205871020131 205871020131004 QVAR 110.72 6424.650124
205871020131 205871020131005 QVAR 110.72 6424.650124
205871020131 205871020131006 QVAR 110.72 6424.650124
205951010531 205951010531001 SPIRIVA 310.99 24095.119856
205951010531 205951010531002 SPIRIVA 335.99 24095.119856
205951010541 205951010541001 ADVAIR DISKU 741.60 24095.119856
205951010541 205951010541002 ADVAIR DISKU 741.60 24095.119856
205951010771 205951010771001 SPIRIVA 939.60 24095.119856
205951010771 205951010771002 SPIRIVA 939.60 24095.119856
205951010771 205951010771003 SPIRIVA 310.99 24095.119856
205951010771 205951010771004 SPIRIVA 310.99 24095.119856
205951010771 205951010771005 SPIRIVA 310.99 24095.119856
205951010781 205951010781001 ADVAIR DISKU 264.99 24095.119856
205951010781 205951010781002 ADVAIR DISKU 264.99 24095.119856
205951010781 205951010781003 ADVAIR DISKU 755.19 24095.119856
205951010781 205951010781004 ADVAIR DISKU 755.19 24095.119856
205951010781 205951010781005 ADVAIR DISKU 755.19 24095.119856
206161040101 206161040101001 PREDNISOLONE 5.45 10173.920992
206161040111 206161040111001 BUDESONIDE 239.99 10173.920992
206161040171 206161040171001 BUDESONIDE 479.98 10173.920992
206161040201 206161040201001 ALBUTEROL 6.05 10173.920992
206161040211 206161040211001 BUDESONIDE 239.99 10173.920992
206261010681 206261010681001 PULMICORT 163.98 5511.110065
206261010681 206261010681002 PULMICORT 163.98 5511.110065
206311010021 206311010021001 Nasal Spray B-Camphor/Menthol/Eucalyptol/Light Min 12.00 4438.564378
206421010171 206421010171001 PROAIR HFA 206.99 2255.219630
206421010171 206421010171002 PROAIR HFA 206.99 2255.219630
206421010171 206421010171003 PROAIR HFA 206.99 2255.219630
206421010171 206421010171004 PROAIR HFA 206.99 2255.219630
206421010181 206421010181001 ADVAIR 274.77 2255.219630
206421010181 206421010181002 ADVAIR 274.77 2255.219630
206421010181 206421010181003 ADVAIR 274.77 2255.219630


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

Analysis Variable : RXXP13X SUM OF PAYMENTS RXSF13X-RXOU13X(IMPUTED)


N Sum
10533 1433974.52


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

Weighted

Analysis Variable : RXXP13X SUM OF PAYMENTS RXSF13X-RXOU13X(IMPUTED)


N Sum
10533 14697980784


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: SAS initialization used:
real time 1.44 seconds
cpu time 0.15 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\sampleC.rtf'
1 ! 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-160I";
8 TITLE2 "Sample SAS Job for Example C";
9
10 LIBNAME IN "C:\Data";
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.00 seconds

cpu time 0.00 seconds


26

27
28 Get conditions records coded as asthma.
29

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

NOTE: There were 123875 observations read from the data set IN.H162.
NOTE: The data set WORK.ASCONDS has 2469 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 80.00 percent.
Compressed is 18 pages; un-compressed would require 10 pages.
NOTE: DATA statement used (Total process time):
real time 1.37 seconds
cpu time 0.07 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 2469 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2469 observations and 2 variables.
NOTE: Compressing data set WORK.ASCONDS increased size by 80.00 percent.
Compressed is 18 pages; un-compressed would require 10 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 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 (H162) 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.H160IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 357551 observations read from the data set IN.H160IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 357551 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.90 percent.

Compressed is 6763 pages; un-compressed would require 6386 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.75 seconds
cpu time 0.60 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 357551 observations read from the data set WORK.CLNK.
NOTE: There were 2469 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 7471 observations and 3 variables.
NOTE: Compressing data set WORK.ASCLNKS increased size by 26.67 percent.
Compressed is 76 pages; un-compressed would require 60 pages.
NOTE: DATA statement used (Total process time):
real time 0.21 seconds
cpu time 0.21 seconds


53
54 proc print data=asclnks (obs=75);
55 by condidx;
56 id condidx;
57 format eventype eventype.;
58 title3 "sample print of work.asclnks - sorted by condidx";
59 title4 "events linked to asthma condition records";
60 run;

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


61
62 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

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


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

67 run;

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


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

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


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

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


79

80
81 Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
82

83 DATA MVIS;
84 SET IN.H160G (KEEP=EVNTIDX PERWT13F SEETLKPV OBXP13X);
85 IF PERWT13F > 0 & SEETLKPV NE 2;
86 RUN;

NOTE: There were 165764 observations read from the data set IN.H160G.
NOTE: The data set WORK.MVIS has 160755 observations and 4 variables.
NOTE: Compressing data set WORK.MVIS increased size by 6.28 percent.
Compressed is 1693 pages; un-compressed would require 1593 pages.
NOTE: DATA statement used (Total process time):
real time 3.87 seconds
cpu time 0.32 seconds


87

88 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;

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


89

90
91 Identify MVIS events which were for asthma.
92

93 DATA ASMVIS;
94 MERGE ASCLNKS (IN=INASCLNK)
95 MVIS (IN=INMVIS);
96 BY EVNTIDX;
97 IF INASCLNK & INMVIS;
98 RUN;

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


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

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


105
106 PROC MEANS DATA=ASMVIS N SUM;
107 VAR OBXP13X;
108 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
109 RUN;

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


110
111 PROC MEANS DATA=ASMVIS N SUM;
112 VAR OBXP13X;
113 WEIGHT PERWT13F;
114 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
115 TITLE5 "Weighted";
116 RUN;

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


117
118 ods rtf close;
119
120

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


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


Obs CONDIDX CCCODEX
1 200321020011 128
2 200331040011 128
3 200331080011 128
4 200341010041 128
5 200411050011 128
6 200461030011 128
7 200591010021 128
8 200591020021 128
9 200591030011 128
10 200891020081 128
11 200941010021 128
12 200941020051 128
13 200961010081 128
14 200961020021 128
15 200961030011 128
16 201091060011 128
17 201391010061 128
18 201501020021 128
19 201731020021 128
20 201751010042 128
21 201751010062 128
22 201781010031 128
23 201791020011 128
24 201921020051 128
25 202221010031 128
26 202301020021 128
27 202301030011 128
28 202301050061 128
29 202541010021 128
30 202551030021 128
31 202571010021 128
32 202621020042 128
33 202621060012 128
34 202641010041 128
35 202641010061 128
36 202781020011 128
37 202831040011 128
38 202831040021 128
39 202851040011 128
40 202971030011 128
41 203141030011 128
42 203341010051 128
43 203411010021 128
44 203451020021 128
45 203451030011 128
46 203591010041 128
47 203661020011 128
48 203921010051 128
49 203951020021 128
50 204191040061 128


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


CONDIDX EVNTIDX EVENTYPE
200331040011 200331040011 8 PMED
200331080011 200331080011 1 MVIS
200331080011 200331080021 8 PMED
200331080011 200331080031 8 PMED
200341010041 200341010771 1 MVIS
200411050011 200411050151 8 PMED
200411050011 200411050161 8 PMED
200411050011 200411050171 8 PMED
200461030011 200461030031 8 PMED
200591010021 200591010531 8 PMED
200591030011 200591030151 8 PMED
200591030011 200591030181 8 PMED
200941010021 200941010271 8 PMED
200941010021 200941010431 8 PMED
200941020051 200941020231 7 HVIS
200941020051 200941020381 7 HVIS
200961010081 200961010441 1 MVIS
200961010081 200961011161 1 MVIS
200961010081 200961011171 1 MVIS
200961010081 200961011181 1 MVIS
200961020021 200961020071 1 MVIS
200961020021 200961020101 8 PMED
200961020021 200961020111 8 PMED
201391010061 201391010681 1 MVIS
201391010061 201391010691 1 MVIS
201391010061 201391010701 1 MVIS
201391010061 201391010721 1 MVIS
201391010061 201391010731 1 MVIS
201391010061 201391010741 1 MVIS
201391010061 201391010751 1 MVIS
201391010061 201391010991 8 PMED
201391010061 201391011101 8 PMED
201501020021 201501020391 8 PMED
201501020021 201501020401 8 PMED
201731020021 201731020261 8 PMED
201731020021 201731020381 1 MVIS
201731020021 201731020431 8 PMED
201731020021 201731020461 8 PMED
201731020021 201731020491 1 MVIS
201731020021 201731020521 8 PMED
201731020021 201731020531 8 PMED
201751010042 201751010142 8 PMED
201751010062 201751010132 1 MVIS
201781010031 201781010611 8 PMED
201791020011 201791020041 8 PMED
201791020011 201791020061 8 PMED
201791020011 201791020101 8 PMED
201921020051 201921020091 1 MVIS
201921020051 201921020661 8 PMED
201921020051 201921020781 8 PMED
202301020021 202301020021 1 MVIS
202301020021 202301020031 8 PMED
202301020021 202301020041 8 PMED
202301030011 202301030021 1 MVIS
202301030011 202301030041 8 PMED
202301030011 202301030051 8 PMED
202301030011 202301030061 1 MVIS
202301030011 202301030081 8 PMED
202301030011 202301030091 8 PMED
202301030011 202301030101 8 PMED
202301030011 202301030111 8 PMED
202301030011 202301030121 8 PMED
202301030011 202301030131 8 PMED
202301050061 202301050131 1 MVIS
202301050061 202301050141 1 MVIS
202301050061 202301050151 1 MVIS
202301050061 202301050181 8 PMED
202301050061 202301050251 8 PMED
202541010021 202541010381 1 MVIS
202541010021 202541010391 1 MVIS
202541010021 202541010411 8 PMED
202541010021 202541010461 8 PMED
202551030021 202551030051 8 PMED
202621020042 202621020192 7 HVIS
202621020042 202621020222 1 MVIS


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


Obs CONDIDX EVNTIDX EVENTYPE
1 200331040011 200331040011 8 PMED
2 200331080011 200331080011 1 MVIS
3 200331080011 200331080021 8 PMED
4 200331080011 200331080031 8 PMED
5 200341010041 200341010771 1 MVIS
6 200411050011 200411050151 8 PMED
7 200411050011 200411050161 8 PMED
8 200411050011 200411050171 8 PMED
9 200461030011 200461030031 8 PMED
10 200591010021 200591010531 8 PMED
11 200591030011 200591030151 8 PMED
12 200591030011 200591030181 8 PMED
13 200941010021 200941010271 8 PMED
14 200941010021 200941010431 8 PMED
15 200941020051 200941020231 7 HVIS
16 200941020051 200941020381 7 HVIS
17 200961010081 200961010441 1 MVIS
18 200961010081 200961011161 1 MVIS
19 200961010081 200961011171 1 MVIS
20 200961010081 200961011181 1 MVIS
21 200961020021 200961020071 1 MVIS
22 200961020021 200961020101 8 PMED
23 200961020021 200961020111 8 PMED
24 201391010061 201391010681 1 MVIS
25 201391010061 201391010691 1 MVIS
26 201391010061 201391010701 1 MVIS
27 201391010061 201391010721 1 MVIS
28 201391010061 201391010731 1 MVIS
29 201391010061 201391010741 1 MVIS
30 201391010061 201391010751 1 MVIS
31 201391010061 201391010991 8 PMED
32 201391010061 201391011101 8 PMED
33 201501020021 201501020391 8 PMED
34 201501020021 201501020401 8 PMED
35 201731020021 201731020261 8 PMED
36 201731020021 201731020381 1 MVIS
37 201731020021 201731020431 8 PMED
38 201731020021 201731020461 8 PMED
39 201731020021 201731020491 1 MVIS
40 201731020021 201731020521 8 PMED
41 201731020021 201731020531 8 PMED
42 201751010062 201751010132 1 MVIS
43 201751010042 201751010142 8 PMED
44 201781010031 201781010611 8 PMED
45 201791020011 201791020041 8 PMED
46 201791020011 201791020061 8 PMED
47 201791020011 201791020101 8 PMED
48 201921020051 201921020091 1 MVIS
49 201921020051 201921020661 8 PMED
50 201921020051 201921020781 8 PMED


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


Obs EVNTIDX EVENTYPE
1 200331040011 8 PMED
2 200331080011 1 MVIS
3 200331080021 8 PMED
4 200331080031 8 PMED
5 200341010771 1 MVIS
6 200411050151 8 PMED
7 200411050161 8 PMED
8 200411050171 8 PMED
9 200461030031 8 PMED
10 200591010531 8 PMED
11 200591030151 8 PMED
12 200591030181 8 PMED
13 200941010271 8 PMED
14 200941010431 8 PMED
15 200941020231 7 HVIS
16 200941020381 7 HVIS
17 200961010441 1 MVIS
18 200961011161 1 MVIS
19 200961011171 1 MVIS
20 200961011181 1 MVIS
21 200961020071 1 MVIS
22 200961020101 8 PMED
23 200961020111 8 PMED
24 201391010681 1 MVIS
25 201391010691 1 MVIS
26 201391010701 1 MVIS
27 201391010721 1 MVIS
28 201391010731 1 MVIS
29 201391010741 1 MVIS
30 201391010751 1 MVIS
31 201391010991 8 PMED
32 201391011101 8 PMED
33 201501020391 8 PMED
34 201501020401 8 PMED
35 201731020261 8 PMED
36 201731020381 1 MVIS
37 201731020431 8 PMED
38 201731020461 8 PMED
39 201731020491 1 MVIS
40 201731020521 8 PMED
41 201731020531 8 PMED
42 201751010132 1 MVIS
43 201751010142 8 PMED
44 201781010611 8 PMED
45 201791020041 8 PMED
46 201791020061 8 PMED
47 201791020101 8 PMED
48 201921020091 1 MVIS
49 201921020661 8 PMED
50 201921020781 8 PMED


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


Obs EVNTIDX EVENTYPE SEETLKPV OBXP13X PERWT13F
1 200331080011 1 MVIS 1 71.74 6343.16
2 200341010771 1 MVIS 1 39.89 3445.84
3 200961010441 1 MVIS 1 25.00 2494.91
4 200961011161 1 MVIS 1 130.50 2494.91
5 200961011171 1 MVIS 1 13.81 2494.91
6 200961011181 1 MVIS 1 13.81 2494.91
7 200961020071 1 MVIS 1 122.00 1891.11
8 201391010681 1 MVIS 1 76.15 8890.83
9 201391010691 1 MVIS 1 0.00 8890.83
10 201391010701 1 MVIS 1 671.68 8890.83
11 201391010721 1 MVIS 1 97.42 8890.83
12 201391010731 1 MVIS 1 103.49 8890.83
13 201391010741 1 MVIS 1 66.15 8890.83
14 201391010751 1 MVIS 1 66.15 8890.83
15 201731020381 1 MVIS 1 216.06 11122.53
16 201731020491 1 MVIS 1 78.35 11122.53
17 201751010132 1 MVIS 1 77.80 5544.85
18 201921020091 1 MVIS 1 73.00 17007.19
19 202301020021 1 MVIS 1 116.00 2849.51
20 202301030021 1 MVIS 1 62.99 3066.93
21 202301030061 1 MVIS 1 69.78 3066.93
22 202301050131 1 MVIS 1 70.63 2229.86
23 202301050141 1 MVIS 1 70.63 2229.86
24 202301050151 1 MVIS 1 70.63 2229.86
25 202541010381 1 MVIS 1 190.85 43833.69
26 202541010391 1 MVIS 1 129.10 43833.69
27 202621020222 1 MVIS 1 1064.44 2745.03
28 202621020252 1 MVIS 1 602.42 2745.03
29 202641010321 1 MVIS 1 101.05 7838.11
30 202831040061 1 MVIS 1 84.10 2352.24
31 203411010331 1 MVIS 1 0.00 8976.32
32 203411010421 1 MVIS 1 241.45 8976.32
33 203451020141 1 MVIS 1 50.92 14832.75
34 203451030091 1 MVIS 1 116.89 9445.97
35 203591010341 1 MVIS 1 307.70 5767.61
36 203591010351 1 MVIS 1 307.70 5767.61
37 203591010361 1 MVIS 1 78.28 5767.61
38 203591010371 1 MVIS 1 307.70 5767.61
39 203591010381 1 MVIS 1 232.98 5767.61
40 203591010481 1 MVIS 1 97.84 5767.61
41 203591010491 1 MVIS 1 97.84 5767.61
42 203591010501 1 MVIS 1 159.76 5767.61
43 203591010511 1 MVIS 1 97.84 5767.61
44 203661020211 1 MVIS 1 317.57 5151.08
45 203921010831 1 MVIS 1 159.44 5277.49
46 203921011071 1 MVIS 1 324.00 5277.49
47 203921011081 1 MVIS 1 155.21 5277.49
48 204881010361 1 MVIS 1 114.42 7872.58
49 204881010541 1 MVIS 1 75.24 7872.58
50 204881010551 1 MVIS 1 68.74 7872.58


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

Analysis Variable : OBXP13X SUM OF OBSF13X - OBOT13X (IMPUTED)


N Sum
2101 312120.14


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

Weighted

Analysis Variable : OBXP13X SUM OF OBSF13X - OBOT13X (IMPUTED)


N Sum
2101 2756698227

Return To Top