Skip to main content
U.S. flag
Health and Human Services Logo

An official website of the Department of Health & Human Services

menu-iconMore mobile-close-icon
mobile-back-btn-icon Back
  • menu-iconMenu
  • mobile-search-icon
AHRQ: Agency for Healthcare Research and Quality
  • Search All AHRQ Sites
  • Careers
  • Contact Us
  • Español
  • FAQs
  • Email Updates
MEPS Home Medical Expenditure Panel Survey
Font Size:
Contact MEPS FAQ Site Map  
S
M
L
XL
 

Back to HC-197I

Attachment 1:
Sample SAS Jobs for Linking Example


NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M6)

NOTE: This session is executing on the X64_10PRO platform.

NOTE: SAS initialization used:
real time 0.60 seconds
cpu time 0.34 seconds

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

NOTE: AUTOEXEC processing completed.

1
2
3
4
5
6
7
8
9 ods rtf file = 'sampleA.rtf' BODYTITLE;
NOTE: Writing RTF Body file: sampleA.rtf
10
11 ods noproctitle;
12
13 OPTIONS LS=132 PS=59;
14
15 %let yr=17;
16 %let evntnum=197; /* BE SURE TO UPDTE FOR CURRENT FY */
17 %let condnum=199; /* BE SURE TO UPDTE FOR CURRENT FY */
18
19 TITLE1 "HC-&evntnum.I";
20 TITLE2 "Sample SAS Job for Example A";
21
22 LIBNAME IN IN "C:\Data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
23
24
25

26
27 * Calculate the expenditures for prescribed medicines associated with medical visits for asthma.
28

29
30 PROC FORMAT;
31 VALUE EVENTYPE
32 1 = "1 MVIS"
33 2 = "2 OPAT"
34 3 = "3 EROM"
35 4 = "4 STAZ"
36 5 = "5 DVIS"
37 6 = "6 OMED"
38 7 = "7 HVIS"
39 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
40
41 RUN;

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

43
44 * Get condition records coded as asthma.
45


46 DATA ASCONDS;
47 SET IN.H&condnum (KEEP=CONDIDX ICD10CDX);
48 IF ICD10CDX = 'J45';
49
50 RUN;

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

51

52
53 * Get the events linked to each of the asthma condition records.
54

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

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

56
57 proc print data=asconds (obs=50);
58 title3 "sample print of work.asconds - sorted by condidx";
59 title4 "COND (H&condnum) records where ICD10CDX = 'J45'";
60 run;

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

61
62 PROC SORT DATA=IN.H&evntnum.IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 375173 observations read from the data set IN.H197IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 375173 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.31 percent.
Compressed is 436 pages; un-compressed would require 414 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.28 seconds
cpu time 0.23 seconds

63
64 DATA ASCLNKS;
65 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
66 ASCONDS(IN=INASCOND KEEP=CONDIDX);
67 BY CONDIDX;
68 IF INCLNK & INASCOND;
69 RUN;

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

70
71 proc report data=asclnks(obs=75) nowd headskip;
72 define condidx /'CONDIDX' order;
73 define evntidx /'EVNTIDX';
74 define eventype /'EVENTYPE';
75 break after condidx / skip;
76 format eventype eventype.;
77 title3 "sample print of work.asclnks - sorted by condidx";
78 title4 "events linked to asthma condition records";
79 run;

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

80
81 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

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

82
83 proc print data=asclnks (obs=50);
84 format eventype eventype.;
85 title3 "sample print of work.asclnks - sorted by evntidx";
86 run;

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

87
88 DATA ASCLNKS;
89 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
90 BY EVNTIDX;
91 IF FIRST.EVNTIDX;
92 RUN;

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

93
94 proc print data=asclnks (obs=50);
95 title3 "sample print of unique evntidxs from work.asclnks";
96 format eventype eventype.;
97 run;

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

98

99
100 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
101

102 DATA MVIS;
103 SET IN.H&evntnum.G (KEEP=EVNTIDX PERWT&yr.F SEETLKPV);
104 IF PERWT&yr.F > 0 & SEETLKPV NE 2;
105 RUN;

NOTE: There were 170491 observations read from the data set IN.H197G.
NOTE: The data set WORK.MVIS has 166896 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 13.41 percent.
Compressed is 93 pages; un-compressed would require 82 pages.
NOTE: DATA statement used (Total process time):
real time 1.02 seconds
cpu time 0.04 seconds

106
107 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;

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

108

109
110 * Identify MVIS events which were for asthma.
111

112 DATA ASMVIS;
113 MERGE ASCLNKS (IN=INASCLNK)
114 MVIS (IN=INMVIS KEEP=EVNTIDX);
115 BY EVNTIDX;
116 IF INASCLNK & INMVIS;
117 RUN;

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

118
119 proc print data=asmvis (obs=50);
120 format eventype eventype.;
121 title3 "sample print of work.asmvis";
122 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-&evntnum.G) events";
123 run;

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

124

125
126 * Get PMED IDs linked to the MVIS events which were for asthma.
127

128 PROC SORT DATA=IN.H&evntnum.IF2 OUT=RXLK; BY EVNTIDX; RUN;

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

129
130 proc report data=rxlk (obs=140 keep=evntidx linkidx eventype) nowd headskip;
131 define evntidx /'EVNTIDX' order;
132 define linkidx /'LINKIDX';
133 define eventype /'EVENTYPE';
134 break after evntidx / skip;
135 format eventype eventype.;
136 title3 "sample print of work.rxlk - sorted by evntidx";
137 title4 "Rx+event link file records (HC-&evntnum.IF2)";
138 run;

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

139
140 DATA PMEDIDS;
141 MERGE RXLK (IN=INRXLK KEEP=EVNTIDX LINKIDX EVENTYPE)
142 ASMVIS(IN=INASMVIS KEEP=EVNTIDX);
143 BY EVNTIDX;
144 IF INRXLK & INASMVIS;
145 RUN;

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

146
147 proc report data=pmedids (obs=50) nowd headskip;
148 define evntidx /'EVNTIDX' order;
149 define linkidx /'LINKIDX';
150 define eventype /'EVENTYPE';
151 break after evntidx / skip;
152 format eventype eventype.;
153 title3 "sample print of work.pmedids - sorted by evntidx";
154 title4 "work.rxlk records for evntidxs in work.asmvis";
155 run;

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

156
157 PROC SORT DATA=PMEDIDS; BY LINKIDX; RUN;

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

158
159 proc print data=pmedids (obs=50);
160 format eventype eventype.;
161 title3 "sample print of work.pmedids - sorted by linkidx";
162 run;

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

163
164 DATA PMEDIDS;
165 SET PMEDIDS (KEEP=LINKIDX);
166 BY LINKIDX;
167 IF FIRST.LINKIDX;
168 RUN;

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

169
170 proc print data=pmedids (obs=50);
171 title3 "sample print of unique linkidxs in work.pmedids";
172 run;

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

173

174
175 * Get PMED records linked to MVIS events which were for asthma.
176

177 PROC SORT DATA=IN.H&evntnum.A OUT=PMED; BY LINKIDX; RUN;

NOTE: There were 310487 observations read from the data set IN.H197A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 310487 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 20.07 percent.
Compressed is 669 pages; un-compressed would require 837 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.03 seconds
cpu time 0.68 seconds

178
179 DATA MVPMEDS;
180 MERGE PMED (KEEP=LINKIDX RXRECIDX RXXP&yr.X PERWT&yr.F RXNAME)
181 PMEDIDS (IN=A);
182 BY LINKIDX;
183 IF A;
184 RUN;

NOTE: There were 310487 observations read from the data set WORK.PMED.
NOTE: There were 1371 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.MVPMEDS has 3534 observations and 5 variables.
NOTE: Compressing data set WORK.MVPMEDS decreased size by 16.67 percent.
Compressed is 5 pages; un-compressed would require 6 pages.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.09 seconds

185
186 proc report data=mvpmeds (obs=200) nowd;
187 column LINKIDX RXRECIDX RXNAME RXXP&yr.X PERWT&yr.F;
188 define linkidx /'LINKIDX' order;
189 define rxrecidx /'RXRECIDX';
190 define rxname /'RXNAME';
191 define rxxp&yr.x /'RXXP17X' display format=8.2; /*Update year*/
192 define PERWT&yr.F /'PERWT17F' /*display format=8.2*/; /*Update year*/
193 break after linkidx / skip;
194 title3 "sample print of work.mvpmeds";
195 title4 "PMED (HC-&evntnum.A) records for unique linkidxs in work.pmedids";
196 run;

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

197
198 PROC MEANS DATA=MVPMEDS N SUM;
199 VAR RXXP&yr.X;
200 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
201 RUN;

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

202
203 PROC MEANS DATA=MVPMEDS N SUM;
204 VAR RXXP&yr.X;
205 WEIGHT PERWT&yr.F;
206 TITLE3 "Total Rx expenditures associated with medical visits (excluding telephone) for asthma";
207 TITLE5 "Weighted";
208 RUN;

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

209
210 ods rtf close;
211

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

HC-197I
Sample SAS Job for Example A
sample print of work.asconds - sorted by condidx
COND (H199) records where ICD10CDX = 'J45'

Obs CONDIDX ICD10CDX
1 100061010021 J45
2 100191020051 J45
3 100291010041 J45
4 100341010121 J45
5 100531020021 J45
6 100791010061 J45
7 100911030031 J45
8 100921020051 J45
9 101071010011 J45
10 101141010031 J45
11 101351010041 J45
12 101491010011 J45
13 101531050021 J45
14 101701050031 J45
15 101841020021 J45
16 101851010121 J45
17 101851030011 J45
18 101922020012 J45
19 102171020081 J45
20 102221030011 J45
21 102251010011 J45
22 102261040011 J45
23 102331010021 J45
24 102431010061 J45
25 102551010031 J45
26 102551020011 J45
27 102581040011 J45
28 102961010051 J45
29 102961030011 J45
30 103101010011 J45
31 103121030021 J45
32 103161010241 J45
33 103181020011 J45
34 103361010041 J45
35 103631010071 J45
36 103911010021 J45
37 103981020041 J45
38 104021010021 J45
39 104131010011 J45
40 104161010041 J45
41 104161050011 J45
42 104511020181 J45
43 104571010101 J45
44 104611030012 J45
45 104751020011 J45
46 104751030011 J45
47 105011010161 J45
48 105051010051 J45
49 105051020021 J45
50 105252010022 J45


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

CONDIDX EVNTIDX EVENTYPE
100191020051 100191020351 1 MVIS
100191020051 100191020361 1 MVIS
100191020051 100191020471 8 PMED
100191020051 100191020591 1 MVIS
100191020051 100191020691 8 PMED
100191020051 100191020741 8 PMED
100191020051 100191029135 8 PMED
100191020051 100191029195 8 PMED
100191020051 100191029205 8 PMED
100191020051 100191029215 8 PMED
100291010041 100291011111 8 PMED
100341010121 100341010321 8 PMED
100341010121 100341010431 8 PMED
100341010121 100341019055 8 PMED
100531020021 100531020541 1 MVIS
100791010061 100791011981 1 MVIS
100791010061 100791019245 8 PMED
100791010061 100791019325 8 PMED
100921020051 100921029015 8 PMED
101071010011 101071010051 1 MVIS
101351010041 101351010621 1 MVIS
101351010041 101351010881 8 PMED
101351010041 101351010891 8 PMED
101351010041 101351011011 1 MVIS
101351010041 101351019075 8 PMED
101351010041 101351019085 8 PMED
101491010011 101491010221 1 MVIS
101491010011 101491010241 8 PMED
101491010011 101491010251 8 PMED
101491010011 101491010271 1 MVIS
101491010011 101491010301 8 PMED
101491010011 101491010311 8 PMED
101491010011 101491010321 8 PMED
101491010011 101491010331 1 MVIS
101491010011 101491019025 8 PMED
101491010011 101491019045 8 PMED
101491010011 101491019085 8 PMED
101491010011 101491019095 8 PMED
101531050021 101531050481 2 OPAT
101701050031 101701050061 1 MVIS
101701050031 101701050071 3 EROM
101701050031 101701050081 3 EROM
101701050031 101701059035 8 PMED
101701050031 101701059045 8 PMED
101841020021 101841029055 8 PMED
101841020021 101841029065 8 PMED
101841020021 101841029075 8 PMED
101841020021 101841029085 8 PMED
101851010121 101851010951 8 PMED
101851010121 101851019145 8 PMED
101922020012 101922029085 8 PMED
102221030011 102221030321 8 PMED
102221030011 102221030481 1 MVIS
102221030011 102221030491 1 MVIS
102221030011 102221039055 8 PMED
102221030011 102221039095 8 PMED
102261040011 102261040071 8 PMED
102331010021 102331010111 8 PMED
102331010021 102331010291 8 PMED
102331010021 102331010301 8 PMED
102331010021 102331010311 8 PMED
102331010021 102331010341 3 EROM
102331010021 102331010351 4 STAZ
102331010021 102331010361 1 MVIS
102331010021 102331019035 8 PMED
102331010021 102331019065 8 PMED
102331010021 102331019085 8 PMED
102331010021 102331019095 8 PMED
102431010061 102431010281 8 PMED
102431010061 102431010301 1 MVIS
102431010061 102431010311 3 EROM
102431010061 102431010341 8 PMED
102431010061 102431010351 8 PMED
102431010061 102431010371 8 PMED
102431010061 102431010391 1 MVIS


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

Obs CONDIDX EVNTIDX EVENTYPE
1 100191020051 100191020351 1 MVIS
2 100191020051 100191020361 1 MVIS
3 100191020051 100191020471 8 PMED
4 100191020051 100191020591 1 MVIS
5 100191020051 100191020691 8 PMED
6 100191020051 100191020741 8 PMED
7 100191020051 100191029135 8 PMED
8 100191020051 100191029195 8 PMED
9 100191020051 100191029205 8 PMED
10 100191020051 100191029215 8 PMED
11 100291010041 100291011111 8 PMED
12 100341010121 100341010321 8 PMED
13 100341010121 100341010431 8 PMED
14 100341010121 100341019055 8 PMED
15 100531020021 100531020541 1 MVIS
16 100791010061 100791011981 1 MVIS
17 100791010061 100791019245 8 PMED
18 100791010061 100791019325 8 PMED
19 100921020051 100921029015 8 PMED
20 101071010011 101071010051 1 MVIS
21 101351010041 101351010621 1 MVIS
22 101351010041 101351010881 8 PMED
23 101351010041 101351010891 8 PMED
24 101351010041 101351011011 1 MVIS
25 101351010041 101351019075 8 PMED
26 101351010041 101351019085 8 PMED
27 101491010011 101491010221 1 MVIS
28 101491010011 101491010241 8 PMED
29 101491010011 101491010251 8 PMED
30 101491010011 101491010271 1 MVIS
31 101491010011 101491010301 8 PMED
32 101491010011 101491010311 8 PMED
33 101491010011 101491010321 8 PMED
34 101491010011 101491010331 1 MVIS
35 101491010011 101491019025 8 PMED
36 101491010011 101491019045 8 PMED
37 101491010011 101491019085 8 PMED
38 101491010011 101491019095 8 PMED
39 101531050021 101531050481 2 OPAT
40 101701050031 101701050061 1 MVIS
41 101701050031 101701050071 3 EROM
42 101701050031 101701050081 3 EROM
43 101701050031 101701059035 8 PMED
44 101701050031 101701059045 8 PMED
45 101841020021 101841029055 8 PMED
46 101841020021 101841029065 8 PMED
47 101841020021 101841029075 8 PMED
48 101841020021 101841029085 8 PMED
49 101851010121 101851010951 8 PMED
50 101851010121 101851019145 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020351 1 MVIS
2 100191020361 1 MVIS
3 100191020471 8 PMED
4 100191020591 1 MVIS
5 100191020691 8 PMED
6 100191020741 8 PMED
7 100191029135 8 PMED
8 100191029195 8 PMED
9 100191029205 8 PMED
10 100191029215 8 PMED
11 100291011111 8 PMED
12 100341010321 8 PMED
13 100341010431 8 PMED
14 100341019055 8 PMED
15 100531020541 1 MVIS
16 100791011981 1 MVIS
17 100791019245 8 PMED
18 100791019325 8 PMED
19 100921029015 8 PMED
20 101071010051 1 MVIS
21 101351010621 1 MVIS
22 101351010881 8 PMED
23 101351010891 8 PMED
24 101351011011 1 MVIS
25 101351019075 8 PMED
26 101351019085 8 PMED
27 101491010221 1 MVIS
28 101491010241 8 PMED
29 101491010251 8 PMED
30 101491010271 1 MVIS
31 101491010301 8 PMED
32 101491010311 8 PMED
33 101491010321 8 PMED
34 101491010331 1 MVIS
35 101491019025 8 PMED
36 101491019045 8 PMED
37 101491019085 8 PMED
38 101491019095 8 PMED
39 101531050481 2 OPAT
40 101701050061 1 MVIS
41 101701050071 3 EROM
42 101701050081 3 EROM
43 101701059035 8 PMED
44 101701059045 8 PMED
45 101841029055 8 PMED
46 101841029065 8 PMED
47 101841029075 8 PMED
48 101841029085 8 PMED
49 101851010951 8 PMED
50 101851019145 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020351 1 MVIS
2 100191020361 1 MVIS
3 100191020591 1 MVIS
4 100531020541 1 MVIS
5 100791011981 1 MVIS
6 101071010051 1 MVIS
7 101351010621 1 MVIS
8 101351011011 1 MVIS
9 101491010221 1 MVIS
10 101491010271 1 MVIS
11 101491010331 1 MVIS
12 101701050061 1 MVIS
13 102221030481 1 MVIS
14 102221030491 1 MVIS
15 102331010361 1 MVIS
16 102431010301 1 MVIS
17 102431010391 1 MVIS
18 103121030061 1 MVIS
19 103121030071 1 MVIS
20 103161011991 1 MVIS
21 103161012001 1 MVIS
22 103161012011 1 MVIS
23 103161012021 1 MVIS
24 103361010141 1 MVIS
25 105581030082 1 MVIS
26 105581030092 1 MVIS
27 105581030102 1 MVIS
28 105581030112 1 MVIS
29 105581030172 1 MVIS
30 105581030182 1 MVIS
31 105681010331 1 MVIS
32 105681010341 1 MVIS
33 105681010351 1 MVIS
34 105711040071 1 MVIS
35 105711040081 1 MVIS
36 105941010021 1 MVIS
37 106041040061 1 MVIS
38 106041040101 1 MVIS
39 106041040111 1 MVIS
40 106511020081 1 MVIS
41 106511020091 1 MVIS
42 106511020101 1 MVIS
43 107011010661 1 MVIS
44 107011010671 1 MVIS
45 107011010681 1 MVIS
46 107011010691 1 MVIS
47 107011010701 1 MVIS
48 107011010711 1 MVIS
49 107011011271 1 MVIS
50 107011011281 1 MVIS


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

EVNTIDX LINKIDX EVENTYPE
100011010191 100011010211 1 MVIS
100011010261 100011019025 1 MVIS
100011010261 100011019035 1 MVIS
100011010261 100011019045 1 MVIS
100011010261 100011019055 1 MVIS
100011010271 100011019025 1 MVIS
100011010271 100011019035 1 MVIS
100011010271 100011019045 1 MVIS
100011010271 100011019055 1 MVIS
100011010341 100011019025 1 MVIS
100011010341 100011019035 1 MVIS
100011010341 100011019045 1 MVIS
100011010341 100011019055 1 MVIS
100011020091 100011020111 1 MVIS
100011030391 100011039015 1 MVIS
100011040201 100011040211 1 MVIS
100021010291 100021010461 1 MVIS
100021010291 100021010471 1 MVIS
100021010291 100021010481 1 MVIS
100021010291 100021010491 1 MVIS
100021010291 100021010511 1 MVIS
100021010301 100021010461 4 STAZ
100021010301 100021010481 4 STAZ
100021010301 100021010491 4 STAZ
100021010301 100021010511 4 STAZ
100021010301 100021010521 4 STAZ
100021010771 100021019015 1 MVIS
100021010771 100021019025 1 MVIS
100021010771 100021019035 1 MVIS
100021010771 100021019055 1 MVIS
100021010771 100021019065 1 MVIS
100021010771 100021019135 1 MVIS
100021010781 100021019015 1 MVIS
100021010781 100021019025 1 MVIS
100021010781 100021019035 1 MVIS
100021010781 100021019055 1 MVIS
100021010781 100021019065 1 MVIS
100021010781 100021019135 1 MVIS
100041010041 100041019015 1 MVIS
100041010041 100041019025 1 MVIS
100051020101 100051020191 5 DVIS
100051020101 100051020201 5 DVIS
100051030031 100051030041 1 MVIS
100051030031 100051030051 1 MVIS
100061010101 100061010181 1 MVIS
100061010151 100061010191 4 STAZ
100081040211 100081040251 1 MVIS
100081040211 100081040261 1 MVIS
100081050251 100081050291 1 MVIS
100081050251 100081050301 1 MVIS
100081050251 100081050311 1 MVIS
100081050251 100081050321 1 MVIS
100081060131 100081060181 1 MVIS
100081060131 100081060191 1 MVIS
100082020022 100082029015 2 OPAT
100082020022 100082029025 2 OPAT
100091020151 100091020191 4 STAZ
100091030091 100091030111 1 MVIS
100091030351 100091039015 1 MVIS
100091030361 100091039025 1 MVIS
100091040421 100091049015 1 MVIS
100091040451 100091049025 1 MVIS
100101010081 100101010101 1 MVIS
100141010301 100141010341 1 MVIS
100141010301 100141010351 1 MVIS
100141010331 100141010361 1 MVIS
100141010411 100141019045 1 MVIS
100191020281 100191020461 4 STAZ
100191020591 100191020661 1 MVIS
100191020811 100191029045 1 MVIS
100191020811 100191029095 1 MVIS
100191020811 100191029105 1 MVIS
100191020841 100191029175 4 STAZ
100191020841 100191029185 4 STAZ
100221010081 100221019025 1 MVIS
100221010081 100221019035 1 MVIS
100221010091 100221019025 1 MVIS
100221010091 100221019035 1 MVIS
100221030061 100221039015 1 MVIS
100231010211 100231010271 1 MVIS
100231010211 100231010281 1 MVIS
100231010211 100231010291 1 MVIS
100231010211 100231010301 1 MVIS
100231010211 100231010311 1 MVIS
100231010221 100231010271 1 MVIS
100231010221 100231010281 1 MVIS
100231010221 100231010291 1 MVIS
100231010221 100231010301 1 MVIS
100231010221 100231010311 1 MVIS
100231010241 100231010311 1 MVIS
100231010241 100231010321 1 MVIS
100231010371 100231019015 1 MVIS
100231010371 100231019025 1 MVIS
100231010371 100231019035 1 MVIS
100231010371 100231019045 1 MVIS
100231010371 100231019065 1 MVIS
100231010371 100231019085 1 MVIS
100231020141 100231020191 1 MVIS
100231020141 100231020201 1 MVIS
100231020211 100231020271 1 MVIS
100231020211 100231020281 1 MVIS
100231020211 100231020291 1 MVIS
100231020211 100231020301 1 MVIS
100231020221 100231020271 1 MVIS
100231020221 100231020281 1 MVIS
100231020221 100231020291 1 MVIS
100231020221 100231020301 1 MVIS
100231020331 100231029015 1 MVIS
100231020331 100231029025 1 MVIS
100231020331 100231029055 1 MVIS
100231020331 100231029065 1 MVIS
100241010071 100241010081 1 MVIS
100241010071 100241010101 1 MVIS
100241010071 100241010111 1 MVIS
100241010071 100241010121 1 MVIS
100241020012 100241020022 4 STAZ
100241040021 100241040051 1 MVIS
100241040131 100241049045 4 STAZ
100241040131 100241049055 4 STAZ
100241040141 100241049025 3 EROM
100241040151 100241049025 3 EROM
100241040151 100241049035 3 EROM
100251010151 100251010161 1 MVIS
100251010151 100251010171 1 MVIS
100251010241 100251019015 1 MVIS
100251010241 100251019045 1 MVIS
100251020171 100251020181 1 MVIS
100251020171 100251020191 1 MVIS
100251020171 100251020201 1 MVIS
100251030121 100251030161 1 MVIS
100251030121 100251030171 1 MVIS
100251030121 100251030181 1 MVIS
100251030201 100251030211 1 MVIS
100251030201 100251030221 1 MVIS
100251030201 100251030231 1 MVIS
100271010441 100271010471 1 MVIS
100271010581 100271010641 1 MVIS
100271010581 100271010651 1 MVIS
100271010581 100271010661 1 MVIS
100271010581 100271010671 1 MVIS


HC-197I
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
100191020591 100191020661 1 MVIS
101701050061 101701059035 1 MVIS
101701050061 101701059045 1 MVIS
102221030491 102221039065 1 MVIS
102221030491 102221039085 1 MVIS
102331010361 102331019085 1 MVIS
102431010301 102431010341 1 MVIS
102431010301 102431010351 1 MVIS
102431010391 102431019125 1 MVIS
103121030061 103121030081 1 MVIS
103121030061 103121030091 1 MVIS
103121030071 103121030081 1 MVIS
103121030071 103121030091 1 MVIS
103161011991 103161012121 1 MVIS
103161011991 103161012161 1 MVIS
103161011991 103161012171 1 MVIS
103161011991 103161012181 1 MVIS
103161011991 103161012191 1 MVIS
103161011991 103161012201 1 MVIS
103161011991 103161012211 1 MVIS
103161011991 103161012221 1 MVIS
103161011991 103161012231 1 MVIS
103161011991 103161012241 1 MVIS
103161011991 103161012251 1 MVIS
103161011991 103161012261 1 MVIS
103161011991 103161012271 1 MVIS
103161011991 103161012281 1 MVIS
103361010141 103361010151 1 MVIS
105581030082 105581030132 1 MVIS
105581030082 105581030142 1 MVIS
105581030092 105581030132 1 MVIS
105581030182 105581039035 1 MVIS
105581030182 105581039045 1 MVIS
105681010331 105681010371 1 MVIS
105681010331 105681010381 1 MVIS
105681010331 105681010391 1 MVIS
105681010331 105681010401 1 MVIS
105681010331 105681010411 1 MVIS
105681010331 105681010421 1 MVIS
105711040071 105711040101 1 MVIS
105711040071 105711040111 1 MVIS
105711040081 105711040121 1 MVIS
105941010021 105941010051 1 MVIS
106041040101 106041040151 1 MVIS
106041040111 106041040151 1 MVIS
107431010671 107431010761 1 MVIS
107431010671 107431010771 1 MVIS
107431010671 107431010781 1 MVIS
107431010671 107431010791 1 MVIS
107491021811 107491029015 1 MVIS


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

Obs EVNTIDX LINKIDX EVENTYPE
1 100191020591 100191020661 1 MVIS
2 101701050061 101701059035 1 MVIS
3 101701050061 101701059045 1 MVIS
4 102221030491 102221039065 1 MVIS
5 102221030491 102221039085 1 MVIS
6 102331010361 102331019085 1 MVIS
7 102431010301 102431010341 1 MVIS
8 102431010301 102431010351 1 MVIS
9 102431010391 102431019125 1 MVIS
10 103121030061 103121030081 1 MVIS
11 103121030071 103121030081 1 MVIS
12 103121030061 103121030091 1 MVIS
13 103121030071 103121030091 1 MVIS
14 103161011991 103161012121 1 MVIS
15 103161011991 103161012161 1 MVIS
16 103161011991 103161012171 1 MVIS
17 103161011991 103161012181 1 MVIS
18 103161011991 103161012191 1 MVIS
19 103161011991 103161012201 1 MVIS
20 103161011991 103161012211 1 MVIS
21 103161011991 103161012221 1 MVIS
22 103161011991 103161012231 1 MVIS
23 103161011991 103161012241 1 MVIS
24 103161011991 103161012251 1 MVIS
25 103161011991 103161012261 1 MVIS
26 103161011991 103161012271 1 MVIS
27 103161011991 103161012281 1 MVIS
28 103361010141 103361010151 1 MVIS
29 105581030082 105581030132 1 MVIS
30 105581030092 105581030132 1 MVIS
31 105581030082 105581030142 1 MVIS
32 105581030182 105581039035 1 MVIS
33 105581030182 105581039045 1 MVIS
34 105681010331 105681010371 1 MVIS
35 105681010331 105681010381 1 MVIS
36 105681010331 105681010391 1 MVIS
37 105681010331 105681010401 1 MVIS
38 105681010331 105681010411 1 MVIS
39 105681010331 105681010421 1 MVIS
40 105711040071 105711040101 1 MVIS
41 105711040071 105711040111 1 MVIS
42 105711040081 105711040121 1 MVIS
43 105941010021 105941010051 1 MVIS
44 106041040101 106041040151 1 MVIS
45 106041040111 106041040151 1 MVIS
46 107431010671 107431010761 1 MVIS
47 107431010671 107431010771 1 MVIS
48 107431010671 107431010781 1 MVIS
49 107431010671 107431010791 1 MVIS
50 107491021811 107491029015 1 MVIS


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

Obs LINKIDX
1 100191020661
2 101701059035
3 101701059045
4 102221039065
5 102221039085
6 102331019085
7 102431010341
8 102431010351
9 102431019125
10 103121030081
11 103121030091
12 103161012121
13 103161012161
14 103161012171
15 103161012181
16 103161012191
17 103161012201
18 103161012211
19 103161012221
20 103161012231
21 103161012241
22 103161012251
23 103161012261
24 103161012271
25 103161012281
26 103361010151
27 105581030132
28 105581030142
29 105581039035
30 105581039045
31 105681010371
32 105681010381
33 105681010391
34 105681010401
35 105681010411
36 105681010421
37 105711040101
38 105711040111
39 105711040121
40 105941010051
41 106041040151
42 107431010761
43 107431010771
44 107431010781
45 107431010791
46 107491029015
47 107491029025
48 107491030371
49 107491030381
50 107491030391


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

LINKIDX RXRECIDX RXNAME RXXP17X PERWT17F
100191020661 100191020661001 SPIRONO/HCTZ 113.56 12610.291787
100191020661 100191020661002 SPIRONO/HCTZ 113.56 12610.291787
101701059035 101701059035001 ALBUTEROL 30.28 10076.456586
101701059035 101701059035002 ALBUTEROL 30.28 10076.456586
101701059045 101701059045001 PREDNISOLONE 4.03 10076.456586
101701059045 101701059045002 PREDNISOLONE 2.42 10076.456586
102221039065 102221039065001 PREDNISOLONE 3.00 1294.754805
102221039065 102221039065002 PREDNISOLONE 3.00 1294.754805
102221039085 102221039085001 SMZ-TMP 61.92 1294.754805
102331019085 102331019085001 ADVAIR DISKU 459.84 12832.244835
102431010341 102431010341001 BENZONATATE 14.35 6949.202328
102431010351 102431010351001 VENTOLIN HFA 40.60 6949.202328
102431019125 102431019125001 DULERA 283.97 6949.202328
103121030081 103121030081001 PROVENTIL 148.40 3449.416528
103121030091 103121030091001 ADVAIR DISKU 363.12 3449.416528
103161012121 103161012121001 NOVOLOG 202.22 9564.297047
103161012121 103161012121002 NOVOLOG 101.11 9564.297047
103161012121 103161012121003 NOVOLOG 202.22 9564.297047
103161012121 103161012121004 NOVOLOG 202.22 9564.297047
103161012121 103161012121005 NOVOLOG 202.22 9564.297047
103161012121 103161012121006 NOVOLOG 505.54 9564.297047
103161012121 103161012121007 NOVOLOG 1516.62 9564.297047
103161012161 103161012161001 BUPROPION 27.07 9564.297047
103161012161 103161012161002 BUPROPION 27.07 9564.297047
103161012161 103161012161003 BUPROPION 27.07 9564.297047
103161012161 103161012161004 BUPROPION 28.00 9564.297047
103161012161 103161012161005 BUPROPION 28.00 9564.297047
103161012161 103161012161006 BUPROPION 28.00 9564.297047
103161012161 103161012161007 BUPROPION 28.00 9564.297047
103161012171 103161012171001 LEVOTHYROXIN 18.14 9564.297047
103161012171 103161012171002 LEVOTHYROXIN 18.14 9564.297047
103161012171 103161012171003 LEVOTHYROXIN 18.14 9564.297047
103161012171 103161012171004 LEVOTHYROXIN 18.14 9564.297047
103161012171 103161012171005 LEVOTHYROXIN 15.00 9564.297047
103161012171 103161012171006 LEVOTHYROXIN 15.00 9564.297047
103161012171 103161012171007 LEVOTHYROXIN 15.00 9564.297047
103161012181 103161012181001 MELOXICAM 4.85 9564.297047
103161012181 103161012181002 MELOXICAM 4.85 9564.297047
103161012181 103161012181003 MELOXICAM 4.85 9564.297047
103161012181 103161012181004 MELOXICAM 4.85 9564.297047
103161012181 103161012181005 MELOXICAM 5.02 9564.297047
103161012181 103161012181006 MELOXICAM 5.02 9564.297047
103161012181 103161012181007 MELOXICAM 5.02 9564.297047
103161012191 103161012191001 METOCLOPRAM 4.74 9564.297047
103161012191 103161012191002 METOCLOPRAM 4.74 9564.297047
103161012191 103161012191003 METOCLOPRAM 4.74 9564.297047
103161012191 103161012191004 METOCLOPRAM 4.78 9564.297047
103161012191 103161012191005 METOCLOPRAM 4.78 9564.297047
103161012191 103161012191006 METOCLOPRAM 4.78 9564.297047
103161012191 103161012191007 METOCLOPRAM 4.78 9564.297047
103161012201 103161012201001 MYRBETRIQ 47.67 9564.297047
103161012201 103161012201002 MYRBETRIQ 47.67 9564.297047
103161012201 103161012201003 MYRBETRIQ 47.67 9564.297047
103161012201 103161012201004 MYRBETRIQ 47.67 9564.297047
103161012201 103161012201005 MYRBETRIQ 42.00 9564.297047
103161012201 103161012201006 MYRBETRIQ 42.00 9564.297047
103161012201 103161012201007 MYRBETRIQ 42.00 9564.297047
103161012211 103161012211001 OMEGA-3 18.80 9564.297047
103161012211 103161012211002 OMEGA-3 18.80 9564.297047
103161012211 103161012211003 OMEGA-3 18.80 9564.297047
103161012211 103161012211004 OMEGA-3 18.80 9564.297047
103161012221 103161012221001 OMEPRAZOLE 7.71 9564.297047
103161012221 103161012221002 OMEPRAZOLE 7.71 9564.297047
103161012221 103161012221003 OMEPRAZOLE 7.71 9564.297047
103161012221 103161012221004 OMEPRAZOLE 7.71 9564.297047
103161012221 103161012221005 OMEPRAZOLE 6.30 9564.297047
103161012221 103161012221006 OMEPRAZOLE 6.30 9564.297047
103161012221 103161012221007 OMEPRAZOLE 6.30 9564.297047
103161012231 103161012231001 PIOGLITAZONE 11.08 9564.297047
103161012231 103161012231002 PIOGLITAZONE 11.08 9564.297047
103161012231 103161012231003 PIOGLITAZONE 11.08 9564.297047
103161012231 103161012231004 PIOGLITAZONE 16.95 9564.297047
103161012231 103161012231005 PIOGLITAZONE 16.95 9564.297047
103161012231 103161012231006 PIOGLITAZONE 16.95 9564.297047
103161012231 103161012231007 PIOGLITAZONE 16.95 9564.297047
103161012241 103161012241001 ROPINIROLE 60.25 9564.297047
103161012241 103161012241002 ROPINIROLE 60.25 9564.297047
103161012241 103161012241003 ROPINIROLE 60.25 9564.297047
103161012241 103161012241004 ROPINIROLE 60.25 9564.297047
103161012241 103161012241005 ROPINIROLE 62.33 9564.297047
103161012241 103161012241006 ROPINIROLE 62.33 9564.297047
103161012241 103161012241007 ROPINIROLE 62.33 9564.297047
103161012251 103161012251001 VALSART/HCTZ 10.59 9564.297047
103161012251 103161012251002 VALSART/HCTZ 10.59 9564.297047
103161012251 103161012251003 VALSART/HCTZ 10.59 9564.297047
103161012251 103161012251004 VALSART/HCTZ 10.96 9564.297047
103161012251 103161012251005 VALSART/HCTZ 10.96 9564.297047
103161012251 103161012251006 VALSART/HCTZ 10.96 9564.297047
103161012251 103161012251007 VALSART/HCTZ 10.96 9564.297047
103161012261 103161012261001 DIAZEPAM 1.80 9564.297047
103161012261 103161012261002 DIAZEPAM 1.80 9564.297047
103161012261 103161012261003 DIAZEPAM 1.74 9564.297047
103161012261 103161012261004 DIAZEPAM 0.86 9564.297047
103161012261 103161012261005 DIAZEPAM 1.83 9564.297047
103161012261 103161012261006 DIAZEPAM 1.83 9564.297047
103161012261 103161012261007 DIAZEPAM 1.80 9564.297047
103161012271 103161012271001 LEVEMIR 80.18 9564.297047
103161012271 103161012271002 LEVEMIR 153.41 9564.297047
103161012271 103161012271003 LEVEMIR 153.41 9564.297047
103161012271 103161012271004 LEVEMIR 160.35 9564.297047
103161012271 103161012271005 LEVEMIR 767.04 9564.297047
103161012271 103161012271006 LEVEMIR 400.88 9564.297047
103161012271 103161012271007 LEVEMIR 1150.56 9564.297047
103161012281 103161012281001 NOVOLOG 202.22 9564.297047
103161012281 103161012281002 NOVOLOG 101.11 9564.297047
103161012281 103161012281003 NOVOLOG 202.22 9564.297047
103161012281 103161012281004 NOVOLOG 202.22 9564.297047
103161012281 103161012281005 NOVOLOG 202.22 9564.297047
103161012281 103161012281006 NOVOLOG 505.54 9564.297047
103161012281 103161012281007 NOVOLOG 1516.62 9564.297047
103361010151 103361010151001 VENTOLIN HFA 73.99 34392.768121
105581030132 105581030132001 ALBUTEROL 7.09 3365.379315
105581030132 105581030132002 ALBUTEROL 7.09 3365.379315
105581030142 105581030142001 ADVAIR DISKU 467.68 3365.379315
105581030142 105581030142002 ADVAIR DISKU 467.68 3365.379315
105581039035 105581039035001 INCRUSE ELPT 427.99 3365.379315
105581039035 105581039035002 INCRUSE ELPT 427.99 3365.379315
105581039035 105581039035003 INCRUSE ELPT 427.99 3365.379315
105581039045 105581039045001 SYMBICORT 280.05 3365.379315
105581039045 105581039045002 SYMBICORT 280.05 3365.379315
105581039045 105581039045003 SYMBICORT 280.05 3365.379315
105681010371 105681010371001 LORAZEPAM 72.24 6034.583354
105681010371 105681010371002 LORAZEPAM 72.24 6034.583354
105681010381 105681010381001 ESCITALOPRAM 21.33 6034.583354
105681010381 105681010381002 ESCITALOPRAM 21.33 6034.583354
105681010391 105681010391001 PANTOPRAZOLE 5.36 6034.583354
105681010391 105681010391002 PANTOPRAZOLE 5.36 6034.583354
105681010401 105681010401001 ROSUVASTATIN 14.34 6034.583354
105681010401 105681010401002 ROSUVASTATIN 14.34 6034.583354
105681010411 105681010411001 CARVEDILOL 29.99 6034.583354
105681010421 105681010421001 AZELASTINE 22.95 6034.583354
105681010421 105681010421002 AZELASTINE 22.95 6034.583354
105711040101 105711040101001 FLUOXETINE 293.97 45787.076167
105711040111 105711040111001 PREDNISONE 2.74 45787.076167
105711040121 105711040121001 AZITHROMYCIN 36.99 45787.076167
105941010051 105941010051001 ALBUTEROL 57.75 5629.258323
105941010051 105941010051002 ALBUTEROL 57.75 5629.258323
106041040151 106041040151001 BUDESONIDE 144.89 5306.708811
107431010761 107431010761001 LISINOPRIL 1.01 2780.991981
107431010761 107431010761002 LISINOPRIL 4.71 2780.991981
107431010771 107431010771001 ATORVASTATIN 16.74 2780.991981
107431010771 107431010771002 ATORVASTATIN 20.28 2780.991981
107431010781 107431010781001 JANUMET 1056.16 2780.991981
107431010781 107431010781002 JANUMET 1056.16 2780.991981
107431010791 107431010791001 LEVOTHYROXIN 4.30 2780.991981
107431010791 107431010791002 LEVOTHYROXIN 4.30 2780.991981
107431010791 107431010791003 LEVOTHYROXIN 4.30 2780.991981
107431010791 107431010791004 LEVOTHYROXIN 4.30 2780.991981
107431010791 107431010791005 LEVOTHYROXIN 4.30 2780.991981
107431010791 107431010791006 LEVOTHYROXIN 12.90 2780.991981
107491029015 107491029015001 SYMBICORT 25.00 4099.072685
107491029015 107491029015002 SYMBICORT 25.00 4099.072685
107491029015 107491029015003 SYMBICORT 25.00 4099.072685
107491029015 107491029015004 SYMBICORT 25.00 4099.072685
107491029015 107491029015005 SYMBICORT 25.00 4099.072685
107491029025 107491029025001 MONTELUKAST 10.29 4099.072685
107491029025 107491029025002 MONTELUKAST 10.29 4099.072685
107491029025 107491029025003 MONTELUKAST 10.29 4099.072685
107491029025 107491029025004 MONTELUKAST 10.29 4099.072685
107491029025 107491029025005 MONTELUKAST 10.29 4099.072685
107491030371 107491030371001 MELOXICAM 0.85 5611.091120
107491030371 107491030371002 MELOXICAM 0.85 5611.091120
107491030371 107491030371003 MELOXICAM 0.85 5611.091120
107491030381 107491030381001 NITROGLYCER 23.02 5611.091120
107491030381 107491030381002 NITROGLYCER 23.02 5611.091120
107491030381 107491030381003 NITROGLYCER 23.02 5611.091120
107491030391 107491030391001 SIMVASTATIN 24.75 5611.091120
107491030391 107491030391002 SIMVASTATIN 24.75 5611.091120
107491030391 107491030391003 SIMVASTATIN 24.75 5611.091120
107491030401 107491030401001 ENALAPRIL 107.67 5611.091120
107491030401 107491030401002 ENALAPRIL 107.67 5611.091120
107491030401 107491030401003 ENALAPRIL 107.67 5611.091120
107491030411 107491030411001 PANTOPRAZOLE 367.20 5611.091120
107491030411 107491030411002 PANTOPRAZOLE 367.20 5611.091120
107491030411 107491030411003 PANTOPRAZOLE 367.20 5611.091120
107491030421 107491030421001 CLOPIDOGREL 15.98 5611.091120
107491030421 107491030421002 CLOPIDOGREL 15.98 5611.091120
107491030421 107491030421003 CLOPIDOGREL 15.98 5611.091120
107491030431 107491030431001 NIFEDIPINE 271.54 5611.091120
107491030431 107491030431002 NIFEDIPINE 271.54 5611.091120
107491030431 107491030431003 NIFEDIPINE 271.54 5611.091120
107491030441 107491030441001 PRED MILD 333.99 5611.091120
107491030441 107491030441002 PRED MILD 333.99 5611.091120
107491030441 107491030441003 PRED MILD 333.99 5611.091120
107491030451 107491030451001 LATANOPROST 17.10 5611.091120
107491030451 107491030451002 LATANOPROST 17.10 5611.091120
107491030451 107491030451003 LATANOPROST 17.10 5611.091120
107491030461 107491030461001 GABAPENTIN 8.20 5611.091120
107491030461 107491030461002 GABAPENTIN 8.20 5611.091120
107491030461 107491030461003 GABAPENTIN 8.20 5611.091120
107521021041 107521021041001 VENTOLIN HFA 79.99 9717.260179
107591019015 107591019015001 MINOCYCLINE 7.35 7769.028462
107591019025 107591019025001 VITAMIN D 16.57 7769.028462
107591019035 107591019035001 LYRICA 421.51 7769.028462
107591019035 107591019035002 LYRICA 421.51 7769.028462
107591019055 107591019055001 SIMVASTATIN 5.76 7769.028462
107591019055 107591019055002 SIMVASTATIN 7.44 7769.028462
107591019075 107591019075001 HYDROXYZ PAM 4.29 7769.028462
107591019075 107591019075002 HYDROXYZ PAM 12.87 7769.028462
107591019085 107591019085001 TOPIRAMATE 7.29 7769.028462


HC-197I
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma
Analysis Variable : RXXP17X SUM OF PAYMENTS RXSF17X-RXOU17X(IMPUTED)

N Sum
3534 444359.67


HC-197I
Sample SAS Job for Example A
Total Rx expenditures associated with medical visits (excluding telephone) for asthma
Weighted
Analysis Variable : RXXP17X SUM OF PAYMENTS RXSF17X-RXOU17X(IMPUTED)

N Sum
3534 3957130138

NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M6)

NOTE: This session is executing on the X64_10PRO platform.

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

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

NOTE: AUTOEXEC processing completed.
1
2
3
4
5
6
7
8
9
10 ods rtf file = 'sampleB.rtf' BODYTITLE;
NOTE: Writing RTF Body file: sampleB.rtf
11
12 ods noproctitle;
13
14 OPTIONS LS=132 PS=59;
15
16 %let yr=17;
17 %let evntnum=197; /* BE SURE TO UPDTE FOR CURRENT FY */
18 %let condnum=199; /* BE SURE TO UPDTE FOR CURRENT FY */
19
20 TITLE1 "HC-&evntnum.I";
21 TITLE2 "Sample SAS Job for Example B";
22
23 LIBNAME IN "C:\Data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
24

25
26 * Calculate the expenditures for prescribed medicines associated with asthma.
27

28 PROC FORMAT;
29 VALUE EVENTYPE
30 1 = "1 MVIS"
31 2 = "2 OPAT"
32 3 = "3 EROM"
33 4 = "4 STAZ"
34 5 = "5 DVIS"
35 6 = "6 OMED"
36 7 = "7 HVIS"
37 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
38 RUN;

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

40
41 * Get condition records coded as asthma.
42

43 DATA ASCONDS;
44 SET IN.H&condnum (KEEP=CONDIDX ICD10CDX);
45 IF ICD10CDX="J45";
46 RUN;

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

47
48
49 * Get the events linked to each of the asthma condition records.
50

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

52
53 proc print data=asconds (obs=50);
54 title3 "sample print of work.asconds - sorted by condidx";
55 title4 "COND (H&condnum) records where ICD10CDX=J45";
56 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.03 seconds

57
58 PROC SORT DATA=IN.H&evntnum.IF1 OUT=CLNK; BY CONDIDX; RUN;

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

59
60 DATA ASCLNKS;
61 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
62 ASCONDS(IN=INASCOND KEEP=CONDIDX);
63 BY CONDIDX;
64 IF INCLNK & INASCOND;
65 RUN;

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

66
67 proc report data=asclnks (obs=75) nowd headskip;
68 define condidx /'CONDIDX' order;
69 define EVNTIDX /'EVNTIDX';
70 define EVENTYPE /'EVENTYPE';
71 break after condidx / skip;
72 format eventype eventype.;
73 title3 "sample print of work.asclnks - sorted by condidx";
74 title4 "events linked to asthma condition records";
75 run;

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

76
77 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

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

78
79 proc print data=asclnks (obs=50);
80 format eventype eventype.;
81 title3 "sample print of work.asclnks - sorted by evntidx";
82 run;

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

83
84 DATA ASCLNKS;
85 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
86 BY EVNTIDX;
87 IF FIRST.EVNTIDX;
88 RUN;

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

89
90 proc print data=asclnks (obs=50);
91 format eventype eventype.;
92 title3 "sample print of unique evntidxs from work.asclnks";
93 run;

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

94
95
96 * Get PMED records linked to asthma condition records.
97

98 PROC SORT DATA=IN.H&evntnum.A OUT=PMED; BY LINKIDX; RUN;

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

99
100 DATA ASPMEDS;
101 MERGE PMED (KEEP=LINKIDX RXRECIDX RXNAME RXXP&yr.X PERWT&yr.F)
102 ASCLNKS (IN=INASCLNK KEEP=EVNTIDX RENAME=(EVNTIDX=LINKIDX));
103 BY LINKIDX;
104 IF INASCLNK & PERWT&yr.F>0;
105 RUN;

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

106
107 proc report data=aspmeds (obs=300) nowd headskip;
108 column LINKIDX RXRECIDX RXNAME RXXP&yr.X PERWT&yr.F;
109 define linkidx / 'LINKIDX' order;
110 define rxrecidx / 'RXRECIDX';
111 define rxname / 'RXNAME';
112 define rxxp&yr.x / 'RXXP17X' display format=8.2; /*update year*/
113 define perwt&yr.f / 'PERWT17F' /*display format=8.2*/; /*update year*/
114 break after linkidx / skip;
115 title3 "sample print of work.aspmeds";
116 title4 "PMED (HC-&evntnum.A) records which link to condition records coded as asthma";
117 run;

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

118
119 PROC MEANS DATA=ASPMEDS N SUM;
120 VAR RXXP&yr.X;
121 TITLE3 "Total Rx expenditures associated with asthma";
122 RUN;

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

123
124 PROC MEANS DATA=ASPMEDS N SUM;
125 VAR RXXP&yr.X;
126 WEIGHT PERWT&yr.F;
127 TITLE3 "Total Rx expenditures associated with asthma";
128 TITLE5 "Weighted";
129 RUN;

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

130
131 ods rtf close;
132

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

HC-197I
Sample SAS Job for Example B
sample print of work.asconds - sorted by condidx
COND (H199) records where ICD10CDX=J45

Obs CONDIDX ICD10CDX
1 100061010021 J45
2 100191020051 J45
3 100291010041 J45
4 100341010121 J45
5 100531020021 J45
6 100791010061 J45
7 100911030031 J45
8 100921020051 J45
9 101071010011 J45
10 101141010031 J45
11 101351010041 J45
12 101491010011 J45
13 101531050021 J45
14 101701050031 J45
15 101841020021 J45
16 101851010121 J45
17 101851030011 J45
18 101922020012 J45
19 102171020081 J45
20 102221030011 J45
21 102251010011 J45
22 102261040011 J45
23 102331010021 J45
24 102431010061 J45
25 102551010031 J45
26 102551020011 J45
27 102581040011 J45
28 102961010051 J45
29 102961030011 J45
30 103101010011 J45
31 103121030021 J45
32 103161010241 J45
33 103181020011 J45
34 103361010041 J45
35 103631010071 J45
36 103911010021 J45
37 103981020041 J45
38 104021010021 J45
39 104131010011 J45
40 104161010041 J45
41 104161050011 J45
42 104511020181 J45
43 104571010101 J45
44 104611030012 J45
45 104751020011 J45
46 104751030011 J45
47 105011010161 J45
48 105051010051 J45
49 105051020021 J45
50 105252010022 J45


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

CONDIDX EVNTIDX EVENTYPE
100191020051 100191020351 1 MVIS
100191020051 100191020361 1 MVIS
100191020051 100191020471 8 PMED
100191020051 100191020591 1 MVIS
100191020051 100191020691 8 PMED
100191020051 100191020741 8 PMED
100191020051 100191029135 8 PMED
100191020051 100191029195 8 PMED
100191020051 100191029205 8 PMED
100191020051 100191029215 8 PMED
100291010041 100291011111 8 PMED
100341010121 100341010321 8 PMED
100341010121 100341010431 8 PMED
100341010121 100341019055 8 PMED
100531020021 100531020541 1 MVIS
100791010061 100791011981 1 MVIS
100791010061 100791019245 8 PMED
100791010061 100791019325 8 PMED
100921020051 100921029015 8 PMED
101071010011 101071010051 1 MVIS
101351010041 101351010621 1 MVIS
101351010041 101351010881 8 PMED
101351010041 101351010891 8 PMED
101351010041 101351011011 1 MVIS
101351010041 101351019075 8 PMED
101351010041 101351019085 8 PMED
101491010011 101491010221 1 MVIS
101491010011 101491010241 8 PMED
101491010011 101491010251 8 PMED
101491010011 101491010271 1 MVIS
101491010011 101491010301 8 PMED
101491010011 101491010311 8 PMED
101491010011 101491010321 8 PMED
101491010011 101491010331 1 MVIS
101491010011 101491019025 8 PMED
101491010011 101491019045 8 PMED
101491010011 101491019085 8 PMED
101491010011 101491019095 8 PMED
101531050021 101531050481 2 OPAT
101701050031 101701050061 1 MVIS
101701050031 101701050071 3 EROM
101701050031 101701050081 3 EROM
101701050031 101701059035 8 PMED
101701050031 101701059045 8 PMED
101841020021 101841029055 8 PMED
101841020021 101841029065 8 PMED
101841020021 101841029075 8 PMED
101841020021 101841029085 8 PMED
101851010121 101851010951 8 PMED
101851010121 101851019145 8 PMED
101922020012 101922029085 8 PMED
102221030011 102221030321 8 PMED
102221030011 102221030481 1 MVIS
102221030011 102221030491 1 MVIS
102221030011 102221039055 8 PMED
102221030011 102221039095 8 PMED
102261040011 102261040071 8 PMED
102331010021 102331010111 8 PMED
102331010021 102331010291 8 PMED
102331010021 102331010301 8 PMED
102331010021 102331010311 8 PMED
102331010021 102331010341 3 EROM
102331010021 102331010351 4 STAZ
102331010021 102331010361 1 MVIS
102331010021 102331019035 8 PMED
102331010021 102331019065 8 PMED
102331010021 102331019085 8 PMED
102331010021 102331019095 8 PMED
102431010061 102431010281 8 PMED
102431010061 102431010301 1 MVIS
102431010061 102431010311 3 EROM
102431010061 102431010341 8 PMED
102431010061 102431010351 8 PMED
102431010061 102431010371 8 PMED
102431010061 102431010391 1 MVIS


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

Obs CONDIDX EVNTIDX EVENTYPE
1 100191020051 100191020351 1 MVIS
2 100191020051 100191020361 1 MVIS
3 100191020051 100191020471 8 PMED
4 100191020051 100191020591 1 MVIS
5 100191020051 100191020691 8 PMED
6 100191020051 100191020741 8 PMED
7 100191020051 100191029135 8 PMED
8 100191020051 100191029195 8 PMED
9 100191020051 100191029205 8 PMED
10 100191020051 100191029215 8 PMED
11 100291010041 100291011111 8 PMED
12 100341010121 100341010321 8 PMED
13 100341010121 100341010431 8 PMED
14 100341010121 100341019055 8 PMED
15 100531020021 100531020541 1 MVIS
16 100791010061 100791011981 1 MVIS
17 100791010061 100791019245 8 PMED
18 100791010061 100791019325 8 PMED
19 100921020051 100921029015 8 PMED
20 101071010011 101071010051 1 MVIS
21 101351010041 101351010621 1 MVIS
22 101351010041 101351010881 8 PMED
23 101351010041 101351010891 8 PMED
24 101351010041 101351011011 1 MVIS
25 101351010041 101351019075 8 PMED
26 101351010041 101351019085 8 PMED
27 101491010011 101491010221 1 MVIS
28 101491010011 101491010241 8 PMED
29 101491010011 101491010251 8 PMED
30 101491010011 101491010271 1 MVIS
31 101491010011 101491010301 8 PMED
32 101491010011 101491010311 8 PMED
33 101491010011 101491010321 8 PMED
34 101491010011 101491010331 1 MVIS
35 101491010011 101491019025 8 PMED
36 101491010011 101491019045 8 PMED
37 101491010011 101491019085 8 PMED
38 101491010011 101491019095 8 PMED
39 101531050021 101531050481 2 OPAT
40 101701050031 101701050061 1 MVIS
41 101701050031 101701050071 3 EROM
42 101701050031 101701050081 3 EROM
43 101701050031 101701059035 8 PMED
44 101701050031 101701059045 8 PMED
45 101841020021 101841029055 8 PMED
46 101841020021 101841029065 8 PMED
47 101841020021 101841029075 8 PMED
48 101841020021 101841029085 8 PMED
49 101851010121 101851010951 8 PMED
50 101851010121 101851019145 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020351 1 MVIS
2 100191020361 1 MVIS
3 100191020471 8 PMED
4 100191020591 1 MVIS
5 100191020691 8 PMED
6 100191020741 8 PMED
7 100191029135 8 PMED
8 100191029195 8 PMED
9 100191029205 8 PMED
10 100191029215 8 PMED
11 100291011111 8 PMED
12 100341010321 8 PMED
13 100341010431 8 PMED
14 100341019055 8 PMED
15 100531020541 1 MVIS
16 100791011981 1 MVIS
17 100791019245 8 PMED
18 100791019325 8 PMED
19 100921029015 8 PMED
20 101071010051 1 MVIS
21 101351010621 1 MVIS
22 101351010881 8 PMED
23 101351010891 8 PMED
24 101351011011 1 MVIS
25 101351019075 8 PMED
26 101351019085 8 PMED
27 101491010221 1 MVIS
28 101491010241 8 PMED
29 101491010251 8 PMED
30 101491010271 1 MVIS
31 101491010301 8 PMED
32 101491010311 8 PMED
33 101491010321 8 PMED
34 101491010331 1 MVIS
35 101491019025 8 PMED
36 101491019045 8 PMED
37 101491019085 8 PMED
38 101491019095 8 PMED
39 101531050481 2 OPAT
40 101701050061 1 MVIS
41 101701050071 3 EROM
42 101701050081 3 EROM
43 101701059035 8 PMED
44 101701059045 8 PMED
45 101841029055 8 PMED
46 101841029065 8 PMED
47 101841029075 8 PMED
48 101841029085 8 PMED
49 101851010951 8 PMED
50 101851019145 8 PMED


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

LINKIDX RXRECIDX RXNAME RXXP17X PERWT17F
100191020471 100191020471001 ADVAIR HFA 67.62 12610.291787
100191020691 100191020691001 PROAIR HFA 22.97 12610.291787
100191020691 100191020691002 PROAIR HFA 22.97 12610.291787
100191020741 100191020741001 ADVAIR HFA 67.62 12610.291787
100191020741 100191020741002 ADVAIR HFA 67.62 12610.291787
100191029135 100191029135001 ADVAIR HFA 67.62 12610.291787
100191029195 100191029195001 SPIRIVA 224.92 12610.291787
100191029205 100191029205001 PANTOPRAZOLE 317.37 12610.291787
100191029215 100191029215001 DIPHEN/ATROP 162.89 12610.291787
100291011111 100291011111001 PROAIR HFA 57.65 9813.275514
100341010321 100341010321001 BENZONATATE 7.31 1637.842933
100341010321 100341010321002 BENZONATATE 7.31 1637.842933
100341010321 100341010321003 BENZONATATE 7.31 1637.842933
100341010321 100341010321004 BENZONATATE 7.31 1637.842933
100341010321 100341010321005 BENZONATATE 7.31 1637.842933
100341010321 100341010321006 BENZONATATE 7.31 1637.842933
100341010321 100341010321007 BENZONATATE 7.31 1637.842933
100341010321 100341010321008 BENZONATATE 7.31 1637.842933
100341010431 100341010431001 BENZONATATE 7.31 1637.842933
100341010431 100341010431002 BENZONATATE 7.31 1637.842933
100341010431 100341010431003 BENZONATATE 7.31 1637.842933
100341019055 100341019055001 BENZONATATE 7.31 1637.842933
100341019055 100341019055002 BENZONATATE 7.31 1637.842933
100341019055 100341019055003 BENZONATATE 7.31 1637.842933
100341019055 100341019055004 BENZONATATE 7.31 1637.842933
100341019055 100341019055005 BENZONATATE 7.31 1637.842933
100791019245 100791019245001 ADVAIR HFA 897.68 13604.919828
100791019245 100791019245002 ADVAIR HFA 359.07 13604.919828
100791019325 100791019325001 VENTOLIN HFA 47.00 13604.919828
100791019325 100791019325002 VENTOLIN HFA 47.00 13604.919828
100791019325 100791019325003 VENTOLIN HFA 47.00 13604.919828
100791019325 100791019325004 VENTOLIN HFA 47.00 13604.919828
100791019325 100791019325005 VENTOLIN HFA 47.00 13604.919828
100921029015 100921029015001 METOPROL SUC 10.00 2938.414024
100921029015 100921029015002 METOPROL SUC 10.00 2938.414024
100921029015 100921029015003 METOPROL SUC 10.00 2938.414024
100921029015 100921029015004 METOPROL SUC 10.00 2938.414024
101351010881 101351010881001 ADVAIR DISKU 1035.18 41447.856666
101351010881 101351010881002 ADVAIR DISKU 1035.18 41447.856666
101351010891 101351010891001 SPIRIVA 1054.64 41447.856666
101351019075 101351019075001 ADVAIR DISKU 1035.18 41447.856666
101351019085 101351019085001 SPIRIVA 1054.64 41447.856666
101491010241 101491010241001 SINGULAIR 235.81 5783.763085
101491010241 101491010241002 SINGULAIR 235.81 5783.763085
101491010251 101491010251001 BREO ELLIPTA 326.07 5783.763085
101491010251 101491010251002 BREO ELLIPTA 326.07 5783.763085
101491010301 101491010301001 THEOPHYLLINE 20.00 5783.763085
101491010311 101491010311001 SINGULAIR 235.81 5783.763085
101491010321 101491010321001 BREO ELLIPTA 326.07 5783.763085
101491019025 101491019025001 ADVAIR HFA 460.69 5783.763085
101491019045 101491019045001 THEOPHYLLINE 20.00 5783.763085
101491019085 101491019085001 SINGULAIR 235.81 5783.763085
101491019095 101491019095001 BREO ELLIPTA 317.87 5783.763085
101701059035 101701059035001 ALBUTEROL 30.28 10076.456586
101701059035 101701059035002 ALBUTEROL 30.28 10076.456586
101701059045 101701059045001 PREDNISOLONE 4.03 10076.456586
101701059045 101701059045002 PREDNISOLONE 2.42 10076.456586
101841029055 101841029055001 RANITIDINE 23.66 2080.266527
101841029065 101841029065001 PREDNISONE 5.97 2080.266527
101841029075 101841029075001 MONTELUKAST 2.92 2080.266527
101841029085 101841029085001 SYMBICORT 266.98 2080.266527
101841029085 101841029085002 SYMBICORT 266.98 2080.266527
101841029085 101841029085003 SYMBICORT 266.98 2080.266527
101851010951 101851010951001 ALBUTEROL 12.07 7701.688713
101851010951 101851010951002 ALBUTEROL 6.04 7701.688713
101851019145 101851019145001 ALBUTEROL 3.08 7701.688713
101851019145 101851019145002 ALBUTEROL 3.08 7701.688713
101851019145 101851019145003 ALBUTEROL 3.08 7701.688713
101922029085 101922029085001 ALBUTEROL 115.49 6006.108476
101922029085 101922029085002 ALBUTEROL 115.49 6006.108476
101922029085 101922029085003 ALBUTEROL 115.49 6006.108476
101922029085 101922029085004 ALBUTEROL 33.70 6006.108476
101922029085 101922029085005 ALBUTEROL 33.70 6006.108476
102221030321 102221030321001 QVAR 197.36 1294.754805
102221030321 102221030321002 QVAR 197.36 1294.754805
102221030321 102221030321003 QVAR 197.36 1294.754805
102221039055 102221039055001 QVAR 197.36 1294.754805
102221039055 102221039055002 QVAR 197.36 1294.754805
102221039095 102221039095001 ALBUTEROL 115.49 1294.754805
102221039095 102221039095002 ALBUTEROL 115.49 1294.754805
102221039095 102221039095003 ALBUTEROL 33.70 1294.754805
102261040071 102261040071001 PROVENTIL 131.10 9589.080589
102331010111 102331010111001 PROAIR HFA 57.82 12832.244835
102331010291 102331010291001 PROAIR HFA 57.82 12832.244835
102331010291 102331010291002 PROAIR HFA 57.82 12832.244835
102331010291 102331010291003 PROAIR HFA 57.82 12832.244835
102331010291 102331010291004 PROAIR HFA 57.82 12832.244835
102331010291 102331010291005 PROAIR HFA 57.82 12832.244835
102331010291 102331010291006 PROAIR HFA 57.82 12832.244835
102331010291 102331010291007 PROAIR HFA 57.82 12832.244835
102331010301 102331010301001 ADVAIR DISKU 459.84 12832.244835
102331010301 102331010301002 ADVAIR DISKU 459.84 12832.244835
102331010301 102331010301003 ADVAIR DISKU 459.84 12832.244835
102331010311 102331010311001 SYMBICORT 281.55 12832.244835
102331010311 102331010311002 SYMBICORT 281.55 12832.244835
102331010311 102331010311003 SYMBICORT 281.55 12832.244835
102331010311 102331010311004 SYMBICORT 281.55 12832.244835
102331010311 102331010311005 SYMBICORT 281.55 12832.244835
102331010311 102331010311006 SYMBICORT 281.55 12832.244835
102331010311 102331010311007 SYMBICORT 281.55 12832.244835
102331019035 102331019035001 PROAIR HFA 57.82 12832.244835
102331019035 102331019035002 PROAIR HFA 57.82 12832.244835
102331019035 102331019035003 PROAIR HFA 57.82 12832.244835
102331019035 102331019035004 PROAIR HFA 57.82 12832.244835
102331019035 102331019035005 PROAIR HFA 57.82 12832.244835
102331019035 102331019035006 PROAIR HFA 159.98 12832.244835
102331019065 102331019065001 SYMBICORT 281.55 12832.244835
102331019065 102331019065002 SYMBICORT 281.55 12832.244835
102331019065 102331019065003 SYMBICORT 281.55 12832.244835
102331019065 102331019065004 SYMBICORT 281.55 12832.244835
102331019065 102331019065005 SYMBICORT 281.55 12832.244835
102331019065 102331019065006 SYMBICORT 281.55 12832.244835
102331019085 102331019085001 ADVAIR DISKU 459.84 12832.244835
102331019095 102331019095001 PREDNISONE 10.00 12832.244835
102431010281 102431010281001 MONTELUKAST 5.76 6949.202328
102431010341 102431010341001 BENZONATATE 14.35 6949.202328
102431010351 102431010351001 VENTOLIN HFA 40.60 6949.202328
102431010371 102431010371001 MONTELUKAST 5.76 6949.202328
102431019125 102431019125001 DULERA 283.97 6949.202328
102551019095 102551019095001 APRI 35.49 7216.640275
102551019095 102551019095002 APRI 35.49 7216.640275
102551020071 102551020071001 PROAIR HFA 59.28 7079.585835
102551020071 102551020071002 PROAIR HFA 43.78 7079.585835
102551029045 102551029045001 PROAIR HFA 43.78 7079.585835
102551029045 102551029045002 PROAIR HFA 43.78 7079.585835
102581049015 102581049015001 ALBUTEROL 7.09 4349.668044
102581049015 102581049015002 ALBUTEROL 32.33 4349.668044
102961010041 102961010041001 ALBUTEROL 5.00 7724.869002
102961010041 102961010041002 ALBUTEROL 5.00 7724.869002
102961010041 102961010041003 ALBUTEROL 5.00 7724.869002
103121030081 103121030081001 PROVENTIL 148.40 3449.416528
103121030091 103121030091001 ADVAIR DISKU 363.12 3449.416528
103161011811 103161011811001 SYMBICORT 31.24 9564.297047
103161011811 103161011811002 SYMBICORT 30.88 9564.297047
103161011821 103161011821001 INCRUSE ELPT 322.11 9564.297047
103161011821 103161011821002 INCRUSE ELPT 322.11 9564.297047
103161019245 103161019245001 SYMBICORT 31.24 9564.297047
103161019245 103161019245002 SYMBICORT 31.24 9564.297047
103361010151 103361010151001 VENTOLIN HFA 73.99 34392.768121
103631010241 103631010241001 PROAIR HFA 56.21 14305.434137
103631019015 103631019015001 PROAIR HFA 56.21 14305.434137
103631019015 103631019015002 PROAIR HFA 56.21 14305.434137
103631019015 103631019015003 PROAIR HFA 56.21 14305.434137
103631019015 103631019015004 PROAIR HFA 56.21 14305.434137
103631019015 103631019015005 PROAIR HFA 56.21 14305.434137
103911019095 103911019095001 PROAIR HFA 41.34 5068.646851
103911019095 103911019095002 PROAIR HFA 41.34 5068.646851
103911019105 103911019105001 MONTELUKAST 2.08 5068.646851
103981029105 103981029105001 FLOVENT DISK 277.18 4361.880498
104021010531 104021010531001 DULERA 583.40 9129.094696
104021010571 104021010571001 VENTOLIN HFA 40.60 9129.094696
104021010581 104021010581001 DULERA 583.40 9129.094696
104021019065 104021019065001 DULERA 583.40 9129.094696
104131019025 104131019025001 VENTOLIN HFA 79.99 6445.718632
104131019025 104131019025002 VENTOLIN HFA 79.99 6445.718632
104161010101 104161010101001 ALBUTEROL 4.55 3454.601780
104161010101 104161010101002 ALBUTEROL 4.55 3454.601780
104161050031 104161050031001 ALBUTEROL 5.00 2582.597458
104511021491 104511021491001 PROAIR HFA 56.01 18621.429058
104511021891 104511021891001 PROAIR HFA 56.01 18621.429058
104511029135 104511029135001 PROAIR HFA 56.03 18621.429058
104511029135 104511029135002 PROAIR HFA 56.03 18621.429058
104511029255 104511029255001 PROAIR HFA 56.03 18621.429058
104511029255 104511029255002 PROAIR HFA 56.03 18621.429058
104571019105 104571019105001 ALBUTEROL 3.93 7269.221224
104571019105 104571019105002 ALBUTEROL 3.93 7269.221224
104571019105 104571019105003 ALBUTEROL 3.93 7269.221224
104571019115 104571019115001 ALBUTEROL 3.93 7269.221224
104571019115 104571019115002 ALBUTEROL 3.93 7269.221224
104571019115 104571019115003 ALBUTEROL 3.93 7269.221224
104751030071 104751030071001 NASONEX 235.81 4832.728831
105011019125 105011019125001 ADVAIR DISKU 383.99 5245.687601
105011019185 105011019185001 MONTELUKAST 169.99 5245.687601
105011019185 105011019185002 MONTELUKAST 169.99 5245.687601
105571010681 105571010681001 BREO ELLIPTA 289.82 14841.220767
105571010761 105571010761001 MONTELUKAST 30.48 14841.220767
105571010851 105571010851001 FLOVENT HFA 351.80 14841.220767
105571019105 105571019105001 MONTELUKAST 30.48 14841.220767
105571019205 105571019205001 FLOVENT HFA 351.80 14841.220767
105581030062 105581030062001 PROAIR HFA 58.39 3365.379315
105581030072 105581030072001 ADVAIR DISKU 459.84 3365.379315
105581030132 105581030132001 ALBUTEROL 7.09 3365.379315
105581030132 105581030132002 ALBUTEROL 7.09 3365.379315
105581030142 105581030142001 ADVAIR DISKU 467.68 3365.379315
105581030142 105581030142002 ADVAIR DISKU 467.68 3365.379315
105581039015 105581039015001 VENTOLIN HFA 54.98 3365.379315
105581039015 105581039015002 VENTOLIN HFA 54.98 3365.379315
105581039015 105581039015003 VENTOLIN HFA 54.98 3365.379315
105581039035 105581039035001 INCRUSE ELPT 427.99 3365.379315
105581039035 105581039035002 INCRUSE ELPT 427.99 3365.379315
105581039035 105581039035003 INCRUSE ELPT 427.99 3365.379315
105581039045 105581039045001 SYMBICORT 280.05 3365.379315
105581039045 105581039045002 SYMBICORT 280.05 3365.379315
105581039045 105581039045003 SYMBICORT 280.05 3365.379315
105681019125 105681019125001 ISOSORB MONO 22.60 6034.583354
105711040101 105711040101001 FLUOXETINE 293.97 45787.076167
105711040111 105711040111001 PREDNISONE 2.74 45787.076167
105711040121 105711040121001 AZITHROMYCIN 36.99 45787.076167
105711049055 105711049055001 PROVENTIL 85.72 45787.076167
105711049065 105711049065001 MONONESSA 89.89 45787.076167
105841020051 105841020051001 ADVAIR DISKU 279.46 4175.361324
105841020071 105841020071001 ADVAIR DISKU 279.46 4175.361324
105841020081 105841020081001 ADVAIR DISKU 279.46 4175.361324
105841020091 105841020091001 VENTOLIN HFA 53.67 4175.361324
105941010051 105941010051001 ALBUTEROL 57.75 5629.258323
105941010051 105941010051002 ALBUTEROL 57.75 5629.258323
106041040151 106041040151001 BUDESONIDE 144.89 5306.708811
106181010381 106181010381001 FLOVENT HFA 262.52 13478.898506
106181010501 106181010501001 FLOVENT HFA 262.52 13478.898506
106181019125 106181019125001 FLOVENT HFA 262.52 13478.898506
106181019125 106181019125002 FLOVENT HFA 262.52 13478.898506
106311040121 106311040121001 VENTOLIN HFA 79.99 8377.716242
106491029075 106491029075001 VENTOLIN HFA 53.02 5072.378670
106491029085 106491029085001 MECLIZINE 11.89 5072.378670
106511020141 106511020141001 SPIRIVA 331.63 14263.107717
106511020181 106511020181001 SYMBICORT 223.29 14263.107717
106511029035 106511029035001 SPIRIVA 331.63 14263.107717
106511029035 106511029035002 SPIRIVA 331.63 14263.107717
106511029035 106511029035003 SPIRIVA 331.63 14263.107717
106511029035 106511029035004 SPIRIVA 331.63 14263.107717
106831010111 106831010111001 PROAIR HFA 59.28 8930.314854
106861010441 106861010441001 Albuterol 3.42 12975.939327
106861010441 106861010441002 Albuterol 3.42 12975.939327
106861010441 106861010441003 Albuterol 3.42 12975.939327
106861010441 106861010441004 Allbuterol 3.42 12975.939327
106861010451 106861010451001 Breo Ellipta 267.74 12975.939327
106861010451 106861010451002 Breo Ellipta 267.74 12975.939327
106861010451 106861010451003 Breo Ellipta 267.74 12975.939327
106861010461 106861010461001 Incruse Ellipta 320.14 12975.939327
106861010461 106861010461002 Incruse Ellipta 320.14 12975.939327
106861010461 106861010461003 Incruse Ellipta 320.14 12975.939327
106861010571 106861010571001 Breo Ellipta 318.87 12975.939327
106861010571 106861010571002 Breo Ellipta 318.87 12975.939327
106861010571 106861010571003 Breo Ellipta 318.87 12975.939327
106861010571 106861010571004 Breo Ellipta 318.87 12975.939327
106861010571 106861010571005 Breo Ellipta 100 318.87 12975.939327
106861010571 106861010571006 Breo Ellipta 318.87 12975.939327
106861019015 106861019015001 Albuterol 76.03 12975.939327
106861019015 106861019015002 Albuterol 76.03 12975.939327
106861019015 106861019015003 Albuterol 76.03 12975.939327
107011029075 107011029075001 PROAIR HFA 59.35 2002.520954
107011029075 107011029075002 PROAIR HFA 59.35 2002.520954
107011029075 107011029075003 PROAIR HFA 59.35 2002.520954
107011029075 107011029075004 PROAIR HFA 59.35 2002.520954
107011029075 107011029075005 PROAIR HFA 59.35 2002.520954
107011029085 107011029085001 FLUTICASONE 3.71 2002.520954
107011029085 107011029085002 FLUTICASONE 3.71 2002.520954
107011029085 107011029085003 FLUTICASONE 3.71 2002.520954
107011029085 107011029085004 FLUTICASONE 3.71 2002.520954
107011029085 107011029085005 FLUTICASONE 3.71 2002.520954
107011029095 107011029095001 FLOVENT HFA 299.99 2002.520954
107011029095 107011029095002 FLOVENT HFA 299.99 2002.520954
107011029095 107011029095003 FLOVENT HFA 299.99 2002.520954
107011029095 107011029095004 FLOVENT HFA 299.99 2002.520954
107011029095 107011029095005 FLOVENT HFA 299.99 2002.520954
107011039045 107011039045001 PROAIR HFA 10.10 1507.078514
107431019165 107431019165001 XOPENEX HFA 70.02 2780.991981
107431019165 107431019165002 XOPENEX HFA 70.02 2780.991981
107431019165 107431019165003 XOPENEX HFA 70.02 2780.991981
107431019165 107431019165004 XOPENEX HFA 70.02 2780.991981
107431019165 107431019165005 XOPENEX HFA 70.02 2780.991981
107431019165 107431019165006 XOPENEX HFA 70.02 2780.991981
107491020041 107491020041001 SYMBICORT 25.00 4099.072685
107491020041 107491020041002 SYMBICORT 25.00 4099.072685
107491020041 107491020041003 SYMBICORT 25.00 4099.072685
107491020041 107491020041004 SYMBICORT 25.00 4099.072685
107491020051 107491020051001 MONTELUKAST 434.99 4099.072685
107491020061 107491020061001 SYMBICORT 323.35 4099.072685
107491020061 107491020061002 SYMBICORT 25.00 4099.072685
107491020061 107491020061003 SYMBICORT 25.00 4099.072685
107491020071 107491020071001 Montelukast 19.35 4099.072685
107491020071 107491020071002 Montelukast 19.35 4099.072685
107491020071 107491020071003 Montelukast 19.35 4099.072685
107491029015 107491029015001 SYMBICORT 25.00 4099.072685
107491029015 107491029015002 SYMBICORT 25.00 4099.072685
107491029015 107491029015003 SYMBICORT 25.00 4099.072685
107491029015 107491029015004 SYMBICORT 25.00 4099.072685
107491029015 107491029015005 SYMBICORT 25.00 4099.072685
107491029025 107491029025001 MONTELUKAST 10.29 4099.072685
107491029025 107491029025002 MONTELUKAST 10.29 4099.072685
107491029025 107491029025003 MONTELUKAST 10.29 4099.072685
107491029025 107491029025004 MONTELUKAST 10.29 4099.072685
107491029025 107491029025005 MONTELUKAST 10.29 4099.072685
107501030081 107501030081001 CARETOUCH 10.48 3099.730268
107501039025 107501039025001 LORATADINE 2.08 3099.730268
107501039045 107501039045001 CARETOUCH 10.48 3099.730268
107521021041 107521021041001 VENTOLIN HFA 79.99 9717.260179
107521029035 107521029035001 MONTELUKAST 21.44 9717.260179
107591019175 107591019175001 VIOS 69.98 7769.028462
107591019185 107591019185001 Bd Pen Needle Nano U/F 32g X 4 Mm 36.48 7769.028462
107861019035 107861019035001 MONTELUKAST 9.00 9570.914515
107861030351 107861030351001 PROAIR HFA 69.88 6798.587260
107861039065 107861039065001 PROAIR HFA 69.88 6798.587260
107861039065 107861039065002 PROAIR HFA 69.88 6798.587260
107861039065 107861039065003 PROAIR HFA 69.88 6798.587260
107861039065 107861039065004 PROAIR HFA 69.88 6798.587260
107932020392 107932020392001 MONTELUKAST 30.48 11959.218173
108381010491 108381010491001 VENTOLIN HFA 52.02 2211.592444
108381010491 108381010491002 VENTOLIN HFA 52.02 2211.592444
108381010511 108381010511001 AMLODIPINE 6.20 2211.592444


HC-197I
Sample SAS Job for Example B
Total Rx expenditures associated with asthma
Analysis Variable : RXXP17X SUM OF PAYMENTS RXSF17X-RXOU17X(IMPUTED)

N Sum
10127 1603861.18


HC-197I
Sample SAS Job for Example B
Total Rx expenditures associated with asthma
Weighted
Analysis Variable : RXXP17X SUM OF PAYMENTS RXSF17X-RXOU17X(IMPUTED)

N Sum
10127 16104142377

NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M6)

NOTE: This session is executing on the X64_10PRO platform.

NOTE: SAS initialization used:
real time 0.55 seconds
cpu time 0.31 seconds

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

NOTE: AUTOEXEC processing completed.
1
2
3
4
5
6
7
8 ods rtf file = 'sampleC.rtf' BODYTITLE;
NOTE: Writing RTF Body file: sampleC.rtf
9
10 ods noproctitle;
11
12 OPTIONS LS=132 PS=59;
13
14 %let yr=17;
15 %let evntnum=197; /* BE SURE TO UPDTE FOR CURRENT FY */
16 %let condnum=199; /* BE SURE TO UPDTE FOR CURRENT FY */
17
18 TITLE1 "HC-&evntnum.I";
19 TITLE2 "Sample SAS Job for Example C";
20
21 LIBNAME IN "C:\Data";
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
22

23
24 * Calculate the expenditures for medical visits associated with asthma.
25

26 PROC FORMAT;
27 VALUE EVENTYPE
28 1 = "1 MVIS"
29 2 = "2 OPAT"
30 3 = "3 EROM"
31 4 = "4 STAZ"
32 5 = "5 DVIS"
33 6 = "6 OMED"
34 7 = "7 HVIS"
35 8 = "8 PMED";
NOTE: Format EVENTYPE has been output.
36 RUN;

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

37
38
39 * Get conditions records coded as asthma.
40

41 DATA ASCONDS;
42 SET IN.H&condnum (KEEP=CONDIDX ICD10CDX);
43 IF ICD10CDX="J45";
44 RUN;

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

45
46
47 * Get the events linked to each of the asthma condition records.
48

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

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

50
51 proc print data=asconds (obs=50);
52 title3 "sample print of work.asconds - sorted by condidx";
53 title4 "COND (H&condnum) records where ICD10CDX=J45";
54 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

55
56 PROC SORT DATA=IN.H&evntnum.IF1 OUT=CLNK; BY CONDIDX; RUN;

NOTE: There were 375173 observations read from the data set IN.H197IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 375173 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.31 percent.
Compressed is 436 pages; un-compressed would require 414 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.20 seconds
cpu time 0.34 seconds

57
58 DATA ASCLNKS;
59 MERGE CLNK (IN=INCLNK KEEP=CONDIDX EVNTIDX EVENTYPE)
60 ASCONDS(IN=INASCOND KEEP=CONDIDX);
61 BY CONDIDX;
62 IF INCLNK & INASCOND;
63 RUN;

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

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

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

74
75 PROC SORT DATA=ASCLNKS; BY EVNTIDX; RUN;

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

76
77 proc print data=asclnks (obs=50);
78 format eventype eventype.;
79 title3 "sample print of work.asclnks - sorted by evntidx";
80 run;

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

81
82 DATA ASCLNKS;
83 SET ASCLNKS (KEEP=EVNTIDX EVENTYPE);
84 BY EVNTIDX;
85 IF FIRST.EVNTIDX;
86 RUN;

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

87
88 proc print data=asclnks (obs=50);
89 format eventype eventype.;
90 title3 "sample print of unique evntidxs from work.asclnks";
91 run;

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

92
93
94 * Get non-telephone office based visits (i.e. MVIS events) for persons with positive weights.
95

96 DATA MVIS;
97 SET IN.H&evntnum.G (KEEP=EVNTIDX PERWT&yr.F SEETLKPV OBXP&yr.X);
98 IF PERWT&yr.F > 0 & SEETLKPV NE 2;
99 RUN;

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

100
101 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;

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

102
103
104 * Identify MVIS events which were for asthma.
105

106 DATA ASMVIS;
107 MERGE ASCLNKS (IN=INASCLNK)
108 MVIS (IN=INMVIS);
109 BY EVNTIDX;
110 IF INASCLNK & INMVIS;
111 RUN;

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

112
113 proc print data=asmvis (obs=50);
114 format eventype eventype.;
115 title3 "sample print of work.asmvis";
116 title4 "unique evntidxs from work.asclnks that are non-telephone MVIS (HC-&evntnum.G) events";
117 run;

NOTE: There were 50 observations read from the data set WORK.ASMVIS.
NOTE: The PROCEDURE PRINT printed page 6.

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

118
119 PROC MEANS DATA=ASMVIS N SUM;
120 VAR OBXP&yr.X;
121 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
122 RUN;

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

123
124 PROC MEANS DATA=ASMVIS N SUM;
125 VAR OBXP&yr.X;
126 WEIGHT PERWT&yr.F;
127 TITLE3 "Total medical visit expenditures (excluding telephone) associated with asthma";
128 TITLE5 "Weighted";
129 RUN;

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

130
131 ods rtf close;
132
133

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

HC-197I
Sample SAS Job for Example C
sample print of work.asconds - sorted by condidx
COND (H199) records where ICD10CDX=J45

Obs CONDIDX ICD10CDX
1 100061010021 J45
2 100191020051 J45
3 100291010041 J45
4 100341010121 J45
5 100531020021 J45
6 100791010061 J45
7 100911030031 J45
8 100921020051 J45
9 101071010011 J45
10 101141010031 J45
11 101351010041 J45
12 101491010011 J45
13 101531050021 J45
14 101701050031 J45
15 101841020021 J45
16 101851010121 J45
17 101851030011 J45
18 101922020012 J45
19 102171020081 J45
20 102221030011 J45
21 102251010011 J45
22 102261040011 J45
23 102331010021 J45
24 102431010061 J45
25 102551010031 J45
26 102551020011 J45
27 102581040011 J45
28 102961010051 J45
29 102961030011 J45
30 103101010011 J45
31 103121030021 J45
32 103161010241 J45
33 103181020011 J45
34 103361010041 J45
35 103631010071 J45
36 103911010021 J45
37 103981020041 J45
38 104021010021 J45
39 104131010011 J45
40 104161010041 J45
41 104161050011 J45
42 104511020181 J45
43 104571010101 J45
44 104611030012 J45
45 104751020011 J45
46 104751030011 J45
47 105011010161 J45
48 105051010051 J45
49 105051020021 J45
50 105252010022 J45


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

CONDIDX EVNTIDX EVENTYPE
100191020051 100191020351 1 MVIS
100191020051 100191020361 1 MVIS
100191020051 100191020471 8 PMED
100191020051 100191020591 1 MVIS
100191020051 100191020691 8 PMED
100191020051 100191020741 8 PMED
100191020051 100191029135 8 PMED
100191020051 100191029195 8 PMED
100191020051 100191029205 8 PMED
100191020051 100191029215 8 PMED
100291010041 100291011111 8 PMED
100341010121 100341010321 8 PMED
100341010121 100341010431 8 PMED
100341010121 100341019055 8 PMED
100531020021 100531020541 1 MVIS
100791010061 100791011981 1 MVIS
100791010061 100791019245 8 PMED
100791010061 100791019325 8 PMED
100921020051 100921029015 8 PMED
101071010011 101071010051 1 MVIS
101351010041 101351010621 1 MVIS
101351010041 101351010881 8 PMED
101351010041 101351010891 8 PMED
101351010041 101351011011 1 MVIS
101351010041 101351019075 8 PMED
101351010041 101351019085 8 PMED
101491010011 101491010221 1 MVIS
101491010011 101491010241 8 PMED
101491010011 101491010251 8 PMED
101491010011 101491010271 1 MVIS
101491010011 101491010301 8 PMED
101491010011 101491010311 8 PMED
101491010011 101491010321 8 PMED
101491010011 101491010331 1 MVIS
101491010011 101491019025 8 PMED
101491010011 101491019045 8 PMED
101491010011 101491019085 8 PMED
101491010011 101491019095 8 PMED
101531050021 101531050481 2 OPAT
101701050031 101701050061 1 MVIS
101701050031 101701050071 3 EROM
101701050031 101701050081 3 EROM
101701050031 101701059035 8 PMED
101701050031 101701059045 8 PMED
101841020021 101841029055 8 PMED
101841020021 101841029065 8 PMED
101841020021 101841029075 8 PMED
101841020021 101841029085 8 PMED
101851010121 101851010951 8 PMED
101851010121 101851019145 8 PMED
101922020012 101922029085 8 PMED
102221030011 102221030321 8 PMED
102221030011 102221030481 1 MVIS
102221030011 102221030491 1 MVIS
102221030011 102221039055 8 PMED
102221030011 102221039095 8 PMED
102261040011 102261040071 8 PMED
102331010021 102331010111 8 PMED
102331010021 102331010291 8 PMED
102331010021 102331010301 8 PMED
102331010021 102331010311 8 PMED
102331010021 102331010341 3 EROM
102331010021 102331010351 4 STAZ
102331010021 102331010361 1 MVIS
102331010021 102331019035 8 PMED
102331010021 102331019065 8 PMED
102331010021 102331019085 8 PMED
102331010021 102331019095 8 PMED
102431010061 102431010281 8 PMED
102431010061 102431010301 1 MVIS
102431010061 102431010311 3 EROM
102431010061 102431010341 8 PMED
102431010061 102431010351 8 PMED
102431010061 102431010371 8 PMED
102431010061 102431010391 1 MVIS


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

Obs CONDIDX EVNTIDX EVENTYPE
1 100191020051 100191020351 1 MVIS
2 100191020051 100191020361 1 MVIS
3 100191020051 100191020471 8 PMED
4 100191020051 100191020591 1 MVIS
5 100191020051 100191020691 8 PMED
6 100191020051 100191020741 8 PMED
7 100191020051 100191029135 8 PMED
8 100191020051 100191029195 8 PMED
9 100191020051 100191029205 8 PMED
10 100191020051 100191029215 8 PMED
11 100291010041 100291011111 8 PMED
12 100341010121 100341010321 8 PMED
13 100341010121 100341010431 8 PMED
14 100341010121 100341019055 8 PMED
15 100531020021 100531020541 1 MVIS
16 100791010061 100791011981 1 MVIS
17 100791010061 100791019245 8 PMED
18 100791010061 100791019325 8 PMED
19 100921020051 100921029015 8 PMED
20 101071010011 101071010051 1 MVIS
21 101351010041 101351010621 1 MVIS
22 101351010041 101351010881 8 PMED
23 101351010041 101351010891 8 PMED
24 101351010041 101351011011 1 MVIS
25 101351010041 101351019075 8 PMED
26 101351010041 101351019085 8 PMED
27 101491010011 101491010221 1 MVIS
28 101491010011 101491010241 8 PMED
29 101491010011 101491010251 8 PMED
30 101491010011 101491010271 1 MVIS
31 101491010011 101491010301 8 PMED
32 101491010011 101491010311 8 PMED
33 101491010011 101491010321 8 PMED
34 101491010011 101491010331 1 MVIS
35 101491010011 101491019025 8 PMED
36 101491010011 101491019045 8 PMED
37 101491010011 101491019085 8 PMED
38 101491010011 101491019095 8 PMED
39 101531050021 101531050481 2 OPAT
40 101701050031 101701050061 1 MVIS
41 101701050031 101701050071 3 EROM
42 101701050031 101701050081 3 EROM
43 101701050031 101701059035 8 PMED
44 101701050031 101701059045 8 PMED
45 101841020021 101841029055 8 PMED
46 101841020021 101841029065 8 PMED
47 101841020021 101841029075 8 PMED
48 101841020021 101841029085 8 PMED
49 101851010121 101851010951 8 PMED
50 101851010121 101851019145 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020351 1 MVIS
2 100191020361 1 MVIS
3 100191020471 8 PMED
4 100191020591 1 MVIS
5 100191020691 8 PMED
6 100191020741 8 PMED
7 100191029135 8 PMED
8 100191029195 8 PMED
9 100191029205 8 PMED
10 100191029215 8 PMED
11 100291011111 8 PMED
12 100341010321 8 PMED
13 100341010431 8 PMED
14 100341019055 8 PMED
15 100531020541 1 MVIS
16 100791011981 1 MVIS
17 100791019245 8 PMED
18 100791019325 8 PMED
19 100921029015 8 PMED
20 101071010051 1 MVIS
21 101351010621 1 MVIS
22 101351010881 8 PMED
23 101351010891 8 PMED
24 101351011011 1 MVIS
25 101351019075 8 PMED
26 101351019085 8 PMED
27 101491010221 1 MVIS
28 101491010241 8 PMED
29 101491010251 8 PMED
30 101491010271 1 MVIS
31 101491010301 8 PMED
32 101491010311 8 PMED
33 101491010321 8 PMED
34 101491010331 1 MVIS
35 101491019025 8 PMED
36 101491019045 8 PMED
37 101491019085 8 PMED
38 101491019095 8 PMED
39 101531050481 2 OPAT
40 101701050061 1 MVIS
41 101701050071 3 EROM
42 101701050081 3 EROM
43 101701059035 8 PMED
44 101701059045 8 PMED
45 101841029055 8 PMED
46 101841029065 8 PMED
47 101841029075 8 PMED
48 101841029085 8 PMED
49 101851010951 8 PMED
50 101851019145 8 PMED


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

Obs EVNTIDX EVENTYPE SEETLKPV OBXP17X PERWT17F
1 100191020351 1 MVIS 1 141.13 12610.29
2 100191020361 1 MVIS 1 102.92 12610.29
3 100191020591 1 MVIS 1 102.92 12610.29
4 100531020541 1 MVIS 1 179.22 41947.37
5 100791011981 1 MVIS 1 135.00 13604.92
6 101071010051 1 MVIS -1 103.58 13532.21
7 101351010621 1 MVIS 1 412.66 41447.86
8 101351011011 1 MVIS -1 232.33 41447.86
9 101491010221 1 MVIS 1 106.00 5783.76
10 101491010271 1 MVIS 1 573.98 5783.76
11 101491010331 1 MVIS -1 573.98 5783.76
12 101701050061 1 MVIS -1 280.53 10076.46
13 102221030481 1 MVIS -1 110.97 1294.75
14 102221030491 1 MVIS -1 646.82 1294.75
15 102331010361 1 MVIS -1 256.10 12832.24
16 102431010301 1 MVIS 1 109.53 6949.20
17 102431010391 1 MVIS -1 189.12 6949.20
18 103121030061 1 MVIS 1 75.93 3449.42
19 103121030071 1 MVIS 1 26.81 3449.42
20 103161011991 1 MVIS 1 69.63 9564.30
21 103161012001 1 MVIS 1 69.63 9564.30
22 103161012011 1 MVIS 1 69.63 9564.30
23 103161012021 1 MVIS 1 69.63 9564.30
24 103361010141 1 MVIS 1 13.39 34392.77
25 105581030082 1 MVIS 1 200.17 3365.38
26 105581030092 1 MVIS 1 195.44 3365.38
27 105581030102 1 MVIS 1 29.99 3365.38
28 105581030112 1 MVIS 1 29.99 3365.38
29 105581030172 1 MVIS -1 161.01 3365.38
30 105581030182 1 MVIS -1 85.71 3365.38
31 105681010331 1 MVIS 1 107.04 6034.58
32 105681010341 1 MVIS 1 214.12 6034.58
33 105681010351 1 MVIS 1 107.04 6034.58
34 105711040071 1 MVIS 1 261.66 45787.08
35 105711040081 1 MVIS 1 261.66 45787.08
36 105941010021 1 MVIS 1 555.22 5629.26
37 106041040061 1 MVIS 1 82.58 5306.71
38 106041040101 1 MVIS 1 126.60 5306.71
39 106041040111 1 MVIS 1 82.58 5306.71
40 106511020081 1 MVIS 1 127.96 14263.11
41 106511020091 1 MVIS 1 127.96 14263.11
42 106511020101 1 MVIS 1 127.96 14263.11
43 107011010661 1 MVIS 1 179.49 1528.91
44 107011010671 1 MVIS 1 184.31 1528.91
45 107011010681 1 MVIS 1 184.31 1528.91
46 107011010691 1 MVIS 1 184.31 1528.91
47 107011010701 1 MVIS 1 16.47 1528.91
48 107011010711 1 MVIS 1 184.31 1528.91
49 107011011271 1 MVIS -1 214.69 1528.91
50 107011011281 1 MVIS -1 1842.45 1528.91


HC-197I
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma
Analysis Variable : OBXP17X SUM OF OBSF17X - OBOT17X (IMPUTED)

N Sum
1680 332895.26


HC-197I
Sample SAS Job for Example C
Total medical visit expenditures (excluding telephone) associated with asthma
Weighted
Analysis Variable : OBXP17X SUM OF OBSF17X - OBOT17X (IMPUTED)

N Sum
1680 3342409949

Back to top

MEPS HOME . CONTACT MEPS . MEPS FAQ . MEPS SITE MAP . MEPS PRIVACY POLICY . ACCESSIBILITY . VIEWERS & PLAYERS . COPYRIGHT
Back to topGo back to top
Back to Top Go back to top

Connect With Us

Facebook Twitter You Tube LinkedIn

Sign up for Email Updates

To sign up for updates or to access your subscriber preferences, please enter your email address below.

Agency for Healthcare Research and Quality

5600 Fishers Lane
Rockville, MD 20857
Telephone: (301) 427-1364

  • Careers
  • Contact Us
  • Español
  • FAQs
  • Accessibility
  • Disclaimers
  • EEO
  • Electronic Policies
  • FOIA
  • HHS Digital Strategy
  • HHS Nondiscrimination Notice
  • Inspector General
  • Plain Writing Act
  • Privacy Policy
  • Viewers & Players
  • U.S. Department of Health & Human Services
  • The White House
  • USA.gov