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

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.50 seconds
cpu time 0.25 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 = ‘sampleA.rtf’ ;
NOTE: Writing RTF Body file: sampleA.rtf
9
10 ods noproctitle;
11
12 OPTIONS LS=132 PS=59;
13
14 %let yr=16;
15 %let evntnum=188; /* BE SURE TO UPDTE FOR CURRENT FY */
16 %let condnum=190; /* BE SURE TO UPDTE FOR CURRENT FY */
17
18 TITLE1 “HC-&evntnum.I”;
19 TITLE2 “Sample SAS Job for Example A”;
20
21 LIBNAME IN “C:\Data”;
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
22
23
24
25
26 * Calculate the expenditures for prescribed medicines associated with medical visits for asthma.
27

28

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

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

41

42
43 * Get condition records coded as asthma.
44

45 DATA ASCONDS;
46 SET IN.H&condnum (KEEP=CONDIDX /*CCCODEX*/ ICD10CDX);
47 IF ICD10CDX = ‘J45’
48 /*CCCODEX=“128”*/;
49
50 RUN;
NOTE: There were 123100 observations read from the data set IN.H190.
NOTE: The data set WORK.ASCONDS has 2288 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 1.01 seconds
cpu time 0.00 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 2288 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2288 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.00 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 363849 observations read from the data set IN.H188IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 363849 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.49 percent.
Compressed is 423 pages; un-compressed would require 401 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.24 seconds
cpu time 0.21 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 363849 observations read from the data set WORK.CLNK.
NOTE: There were 2288 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 6752 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.08 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-4.
NOTE: PROCEDURE REPORT used (Total process time):

real time 0.06 seconds
cpu time 0.01 seconds

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

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

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 5.
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 6752 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 6724 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

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 6.
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 165003 observations read from the data set IN.H188G.
NOTE: The data set WORK.MVIS has 160981 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 13.92 percent.
Compressed is 90 pages; un-compressed would require 79 pages.
NOTE: DATA statement used (Total process time):
real time 1.57 seconds
cpu time 0.07 seconds

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

NOTE: There were 160981 observations read from the data set WORK.MVIS.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.MVIS has 160981 observations and 3 variables.
NOTE: Compressing data set WORK.MVIS increased size by 13.92 percent.
Compressed is 90 pages; un-compressed would require 79 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.06 seconds
cpu time 0.09 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 6724 observations read from the data set WORK.ASCLNKS.
NOTE: There were 160981 observations read from the data set WORK.MVIS.
NOTE: The data set WORK.ASMVIS has 1901 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.05 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 7.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 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 59503 observations read from the data set IN.H188IF2.
NOTE: SAS sort was used.
NOTE: The data set WORK.RXLK has 59503 observations and 6 variables.
NOTE: Compressing data set WORK.RXLK increased size by 6.06 percent.
Compressed is 70 pages; un-compressed would require 66 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.13 seconds
cpu time 0.01 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 8-12.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.03 seconds
cpu time 0.03 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 59503 observations read from the data set WORK.RXLK.
NOTE: There were 1901 observations read from the data set WORK.ASMVIS.
NOTE: The data set WORK.PMEDIDS has 1910 observations and 3 variables.

NOTE: Compressing data set WORK.PMEDIDS increased size by 200.00 percent.
Compressed is 3 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.01 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 13-14.
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 1910 observations read from the data set WORK.PMEDIDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.PMEDIDS has 1910 observations and 3 variables.
NOTE: Compressing data set WORK.PMEDIDS increased size by 200.00 percent.
Compressed is 3 pages; un-compressed would require 1 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

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 15.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 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 1910 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.PMEDIDS has 1837 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 16.
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 319685 observations read from the data set IN.H188A.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.PMED has 319685 observations and 13 variables.
NOTE: Compressing data set WORK.PMED decreased size by 20.19 percent.
Compressed is 688 pages; un-compressed would require 862 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 1.61 seconds
cpu time 0.40 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 319685 observations read from the data set WORK.PMED.
NOTE: There were 1837 observations read from the data set WORK.PMEDIDS.
NOTE: The data set WORK.MVPMEDS has 4853 observations and 5 variables.
NOTE: Compressing data set WORK.MVPMEDS decreased size by 12.50 percent.
Compressed is 7 pages; un-compressed would require 8 pages.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.10 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 /‘RXXP16X’ display format=8.2; /*Update year*/
192 define PERWT&yr.F /‘PERWT16F’ /*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 17-22.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 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 4853 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 23.
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 4853 observations read from the data set WORK.MVPMEDS.
NOTE: The PROCEDURE MEANS printed page 24.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.01 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 7.23 seconds
cpu time 1.56 seconds

HC-188I
Sample SAS Job for Example A
sample print of work.asconds - sorted by condidx
COND (H190) records where ICD10CDX = ‘J45’

Obs CONDIDX ICD10CDX
1 100061010021 J45
2 100081020011 J45
3 100081060011 J45
4 100191020051 J45
5 100341010121 J45
6 100791010061 J45
7 100851010021 J45
8 100851030011 J45
9 100911030031 J45
10 100921020051 J45
11 100921050012 J45
12 101071010011 J45
13 101141010031 J45
14 101161010011 J45
15 101351010041 J45
16 101491010011 J45
17 101701030011 J45
18 102171020081 J45
19 102211050011 J45
20 102221030011 J45
21 102231030011 J45
22 102251010011 J45
23 102261040011 J45
24 102331010021 J45
25 102421010071 J45
26 102431010061 J45
27 102551010031 J45
28 102551020011 J45
29 102841010011 J45
30 102961010051 J45
31 102962020012 J45
32 103101010011 J45
33 103161010241 J45
34 103181020011 J45
35 103361010041 J45
36 103631010071 J45
37 104021010021 J45
38 104131010011 J45
39 104161010041 J45
40 104161050011 J45
41 104511020181 J45
42 104611030012 J45
43 104751020011 J45
44 104751030011 J45
45 105011010161 J45
46 105051010051 J45
47 105051020021 J45
48 105252010022 J45
49 105531020051 J45
50 105571010071 J45


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

CONDIDX EVNTIDX EVENTYPE
100191020051 100191020041 8 PMED
100191020051 100191020191 8 PMED
100191020051 100191020341 1 MVIS
100341010121 100341010321 8 PMED
100791010061 100791010061 2 OPAT
100791010061 100791010071 2 OPAT
100791010061 100791010081 2 OPAT
100791010061 100791010091 1 MVIS
100791010061 100791010301 1 MVIS
100791010061 100791010421 8 PMED
100791010061 100791010521 2 OPAT
100791010061 100791010911 1 MVIS
100791010061 100791010921 1 MVIS
100791010061 100791011671 8 PMED
100921020051 100921020171 8 PMED
100921050012 100921050042 8 PMED
100921050012 100921050062 8 PMED
101071010011 101071010031 8 PMED
101141010031 101141010071 1 MVIS
101141010031 101141010081 1 MVIS
101141010031 101141010261 8 PMED
101351010041 101351010321 8 PMED
101351010041 101351010331 8 PMED
101351010041 101351010411 1 MVIS
101351010041 101351010511 8 PMED
101351010041 101351010521 8 PMED
101351010041 101351010541 8 PMED
101491010011 101491010011 8 PMED
101491010011 101491010021 8 PMED
101491010011 101491010041 8 PMED
101491010011 101491010151 8 PMED
101491010011 101491010161 8 PMED
101701030011 101701030011 3 EROM
102171020081 102171020191 8 PMED
102211050011 102211050011 3 EROM
102211050011 102211050021 8 PMED
102211050011 102211050031 3 EROM
102221030011 102221030221 8 PMED
102231030011 102231030051 8 PMED
102261040011 102261040021 8 PMED
102331010021 102331010071 8 PMED
102331010021 102331010081 8 PMED
102331010021 102331010111 8 PMED
102431010061 102431010021 1 MVIS
102431010061 102431010091 1 MVIS
102431010061 102431010141 8 PMED
102551010031 102551010091 8 PMED
102551010031 102551010161 8 PMED
102551020011 102551020011 8 PMED
102551020011 102551020021 8 PMED
102551020011 102551020031 1 MVIS
102551020011 102551020041 8 PMED
102551020011 102551020051 8 PMED
102961010051 102961010011 8 PMED
102962020012 102962020012 1 MVIS
102962020012 102962020022 1 MVIS
102962020012 102962020042 8 PMED
102962020012 102962020052 8 PMED
102962020012 102962020062 2 OPAT
102962020012 102962020072 8 PMED
102962020012 102962020082 8 PMED
103161010241 103161011811 8 PMED
103161010241 103161011821 8 PMED
103631010071 103631010071 8 PMED
103631010071 103631010241 8 PMED
104021010021 104021010521 8 PMED
104131010011 104131010161 8 PMED
104131010011 104131010791 8 PMED
104161010041 104161010051 8 PMED
104161050011 104161050031 8 PMED
104611030012 104611030012 1 MVIS
104611030012 104611030052 8 PMED
104611030012 104611030062 8 PMED
104751020011 104751020041 8 PMED
104751030011 104751030061 8 PMED


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

Obs CONDIDX EVNTIDX EVENTYPE
1 100191020051 100191020041 8 PMED
2 100191020051 100191020191 8 PMED
3 100191020051 100191020341 1 MVIS
4 100341010121 100341010321 8 PMED
5 100791010061 100791010061 2 OPAT
6 100791010061 100791010071 2 OPAT
7 100791010061 100791010081 2 OPAT
8 100791010061 100791010091 1 MVIS
9 100791010061 100791010301 1 MVIS
10 100791010061 100791010421 8 PMED
11 100791010061 100791010521 2 OPAT
12 100791010061 100791010911 1 MVIS
13 100791010061 100791010921 1 MVIS
14 100791010061 100791011671 8 PMED
15 100921020051 100921020171 8 PMED
16 100921050012 100921050042 8 PMED
17 100921050012 100921050062 8 PMED
18 101071010011 101071010031 8 PMED
19 101141010031 101141010071 1 MVIS
20 101141010031 101141010081 1 MVIS
21 101141010031 101141010261 8 PMED
22 101351010041 101351010321 8 PMED
23 101351010041 101351010331 8 PMED
24 101351010041 101351010411 1 MVIS
25 101351010041 101351010511 8 PMED
26 101351010041 101351010521 8 PMED
27 101351010041 101351010541 8 PMED
28 101491010011 101491010011 8 PMED
29 101491010011 101491010021 8 PMED
30 101491010011 101491010041 8 PMED
31 101491010011 101491010151 8 PMED
32 101491010011 101491010161 8 PMED
33 101701030011 101701030011 3 EROM
34 102171020081 102171020191 8 PMED
35 102211050011 102211050011 3 EROM
36 102211050011 102211050021 8 PMED
37 102211050011 102211050031 3 EROM
38 102221030011 102221030221 8 PMED
39 102231030011 102231030051 8 PMED
40 102261040011 102261040021 8 PMED
41 102331010021 102331010071 8 PMED
42 102331010021 102331010081 8 PMED
43 102331010021 102331010111 8 PMED
44 102431010061 102431010021 1 MVIS
45 102431010061 102431010091 1 MVIS
46 102431010061 102431010141 8 PMED
47 102551010031 102551010091 8 PMED
48 102551010031 102551010161 8 PMED
49 102551020011 102551020011 8 PMED
50 102551020011 102551020021 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020041 8 PMED
2 100191020191 8 PMED
3 100191020341 1 MVIS
4 100341010321 8 PMED
5 100791010061 2 OPAT
6 100791010071 2 OPAT
7 100791010081 2 OPAT
8 100791010091 1 MVIS
9 100791010301 1 MVIS
10 100791010421 8 PMED
11 100791010521 2 OPAT
12 100791010911 1 MVIS
13 100791010921 1 MVIS
14 100791011671 8 PMED
15 100921020171 8 PMED
16 100921050042 8 PMED
17 100921050062 8 PMED
18 101071010031 8 PMED
19 101141010071 1 MVIS
20 101141010081 1 MVIS
21 101141010261 8 PMED
22 101351010321 8 PMED
23 101351010331 8 PMED
24 101351010411 1 MVIS
25 101351010511 8 PMED
26 101351010521 8 PMED
27 101351010541 8 PMED
28 101491010011 8 PMED
29 101491010021 8 PMED
30 101491010041 8 PMED
31 101491010151 8 PMED
32 101491010161 8 PMED
33 101701030011 3 EROM
34 102171020191 8 PMED
35 102211050011 3 EROM
36 102211050021 8 PMED
37 102211050031 3 EROM
38 102221030221 8 PMED
39 102231030051 8 PMED
40 102261040021 8 PMED
41 102331010071 8 PMED
42 102331010081 8 PMED
43 102331010111 8 PMED
44 102431010021 1 MVIS
45 102431010091 1 MVIS
46 102431010141 8 PMED
47 102551010091 8 PMED
48 102551010161 8 PMED
49 102551020011 8 PMED
50 102551020021 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020341 1 MVIS
2 100791010091 1 MVIS
3 100791010301 1 MVIS
4 100791010911 1 MVIS
5 100791010921 1 MVIS
6 101141010071 1 MVIS
7 101141010081 1 MVIS
8 101351010411 1 MVIS
9 102431010021 1 MVIS
10 102431010091 1 MVIS
11 102551020031 1 MVIS
12 102962020012 1 MVIS
13 102962020022 1 MVIS
14 104611030012 1 MVIS
15 105691020011 1 MVIS
16 106041040021 1 MVIS
17 106311040051 1 MVIS
18 106311040081 1 MVIS
19 106311040101 1 MVIS
20 106511020071 1 MVIS
21 106971040131 1 MVIS
22 106971040141 1 MVIS
23 106971040151 1 MVIS
24 106971040171 1 MVIS
25 107011010571 1 MVIS
26 107011010581 1 MVIS
27 107011010591 1 MVIS
28 107011010601 1 MVIS
29 107011010611 1 MVIS
30 107011010621 1 MVIS
31 107011010631 1 MVIS
32 107011010641 1 MVIS
33 107011010651 1 MVIS
34 107011030051 1 MVIS
35 107501030021 1 MVIS
36 107591010021 1 MVIS
37 107591010101 1 MVIS
38 107591010111 1 MVIS
39 107591010121 1 MVIS
40 107591010131 1 MVIS
41 107591010141 1 MVIS
42 107591010251 1 MVIS
43 107591010261 1 MVIS
44 107591010271 1 MVIS
45 107591010281 1 MVIS
46 107591010291 1 MVIS
47 107831030582 1 MVIS
48 107932020012 1 MVIS
49 108501040011 1 MVIS
50 108801010101 1 MVIS


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

EVNTIDX LINKIDX EVENTYPE
100011010161 100011010181 2 OPAT
100011040051 100011040061 1 MVIS
100011040141 100011040151 3 EROM
100021010111 100021010211 1 MVIS
100021010121 100021010221 1 MVIS
100021010131 100021010231 1 MVIS
100021010131 100021010241 1 MVIS
100021010131 100021010251 1 MVIS
100021010131 100021010261 1 MVIS
100021010131 100021010271 1 MVIS
100021010131 100021010281 1 MVIS
100021010141 100021010231 1 MVIS
100021010141 100021010241 1 MVIS
100021010141 100021010251 1 MVIS
100021010141 100021010261 1 MVIS
100021010141 100021010271 1 MVIS
100021010141 100021010281 1 MVIS
100051010011 100051010021 1 MVIS
100051010051 100051010091 5 DVIS
100051010051 100051010101 5 DVIS
100051010081 100051010091 1 MVIS
100051020061 100051020081 1 MVIS
100051020061 100051020091 1 MVIS
100051020111 100051020211 1 MVIS
100051020111 100051020221 1 MVIS
100061010011 100061010021 1 MVIS
100061010011 100061010031 1 MVIS
100061020011 100061020021 1 MVIS
100061020011 100061020031 1 MVIS
100061020081 100061020121 1 MVIS
100061020091 100061020121 1 MVIS
100061020091 100061020131 1 MVIS
100061020101 100061020121 1 MVIS
100061020111 100061020121 1 MVIS
100061020111 100061020131 1 MVIS
100081020011 100081020051 1 MVIS
100081020011 100081020061 1 MVIS
100081020021 100081020071 1 MVIS
100081020101 100081020181 1 MVIS
100081020101 100081020191 1 MVIS
100081030051 100081030061 1 MVIS
100081030051 100081030071 1 MVIS
100081040031 100081040061 1 MVIS
100081040031 100081040071 1 MVIS
100081040101 100081040191 1 MVIS
100081040101 100081040201 1 MVIS
100081050031 100081050061 1 MVIS
100081050031 100081050071 1 MVIS
100081050031 100081050081 1 MVIS
100081050121 100081050211 1 MVIS
100081050121 100081050221 1 MVIS
100081050121 100081050231 1 MVIS
100081050121 100081050241 1 MVIS
100081060021 100081060111 1 MVIS
100081060021 100081060121 1 MVIS
100081070041 100081070081 2 OPAT
100081070041 100081070091 2 OPAT
100091020031 100091020041 1 MVIS
100091020061 100091020181 1 MVIS
100091030101 100091030121 1 MVIS
100101010021 100101010041 1 MVIS
100141010031 100141010041 1 MVIS
100141010081 100141010171 5 DVIS
100141010131 100141010181 1 MVIS
100141010261 100141010271 1 MVIS
100171010011 100171010031 3 EROM
100191020011 100191020021 5 DVIS
100191020081 100191020171 1 MVIS
100221010011 100221010021 1 MVIS
100221030011 100221030031 1 MVIS
100231010051 100231010081 1 MVIS
100231010131 100231010161 1 MVIS
100231010131 100231010171 1 MVIS
100231010131 100231010181 1 MVIS
100231010131 100231010191 1 MVIS
100231010131 100231010201 1 MVIS
100231020011 100231020041 1 MVIS
100231020011 100231020051 1 MVIS
100251010011 100251010021 2 OPAT
100251010011 100251010031 2 OPAT
100251010091 100251010111 2 OPAT
100251010091 100251010121 2 OPAT
100251010091 100251010131 2 OPAT
100251020011 100251020021 1 MVIS
100251020011 100251020031 1 MVIS
100251020011 100251020041 1 MVIS
100251020051 100251020071 5 DVIS
100251020101 100251020121 1 MVIS
100251020101 100251020131 1 MVIS
100251020111 100251020141 1 MVIS
100251020111 100251020151 1 MVIS
100251020111 100251020161 1 MVIS
100251030011 100251030021 1 MVIS
100251030011 100251030031 1 MVIS
100251030011 100251030041 1 MVIS
100251030061 100251030071 1 MVIS
100251030061 100251030081 1 MVIS
100251030061 100251030091 1 MVIS
100251030111 100251030131 1 MVIS
100251030111 100251030141 1 MVIS
100251030111 100251030151 1 MVIS
100281010011 100281010031 5 DVIS
100291010041 100291010111 3 EROM
100291010171 100291010401 1 MVIS
100291010181 100291010401 1 MVIS
100291010221 100291010411 1 MVIS
100291010221 100291010421 1 MVIS
100291010221 100291010431 1 MVIS
100291010221 100291010441 1 MVIS
100291010231 100291010411 1 MVIS
100291010231 100291010421 1 MVIS
100291010231 100291010431 1 MVIS
100291010231 100291010441 1 MVIS
100291010241 100291010451 1 MVIS
100291010251 100291010461 3 EROM
100291010261 100291010471 3 EROM
100291010571 100291010711 1 MVIS
100291010571 100291010721 1 MVIS
100291010571 100291010731 1 MVIS
100291010571 100291010741 1 MVIS
100291020031 100291020071 3 EROM
100291020031 100291020081 3 EROM
100311020011 100311020071 1 MVIS
100311020011 100311020081 1 MVIS
100311020011 100311020091 1 MVIS
100311020011 100311020101 1 MVIS
100311020111 100311020181 1 MVIS
100311020111 100311020191 1 MVIS
100311020111 100311020201 1 MVIS
100311020141 100311020211 1 MVIS
100311020151 100311020221 2 OPAT
100311020601 100311020711 2 OPAT
100311020601 100311020721 2 OPAT
100341010041 100341010051 1 MVIS
100341010041 100341010061 1 MVIS
100341010041 100341010071 1 MVIS
100341010041 100341010081 1 MVIS
100341010091 100341010171 1 MVIS
100341010091 100341010181 1 MVIS
100341010091 100341010191 1 MVIS


HC-188I
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
100791010301 100791010391 1 MVIS
100791010301 100791010421 1 MVIS
100791010911 100791011671 1 MVIS
101141010071 101141010151 1 MVIS
101141010071 101141010161 1 MVIS
102431010021 102431010051 1 MVIS
102431010091 102431010141 1 MVIS
102962020012 102962020042 1 MVIS
102962020012 102962020052 1 MVIS
102962020022 102962020052 1 MVIS
104611030012 104611030052 1 MVIS
104611030012 104611030062 1 MVIS
105691020011 105691020021 1 MVIS
106041040021 106041040031 1 MVIS
106041040021 106041040041 1 MVIS
106311040081 106311040091 1 MVIS
106311040101 106311040121 1 MVIS
107011010571 107011010721 1 MVIS
107011010571 107011010731 1 MVIS
107011010571 107011010741 1 MVIS
107011010571 107011010751 1 MVIS
107011010571 107011010761 1 MVIS
107011010571 107011010771 1 MVIS
107011010571 107011010821 1 MVIS
107011030051 107011030081 1 MVIS
107501030021 107501030031 1 MVIS
107591010021 107591010051 1 MVIS
107591010021 107591010061 1 MVIS
107591010021 107591010071 1 MVIS
107591010021 107591010081 1 MVIS
107831030582 107831030572 1 MVIS
107932020012 107932020092 1 MVIS
107932020012 107932020102 1 MVIS
107932020012 107932020112 1 MVIS
107932020012 107932020122 1 MVIS
108501040011 108501040031 1 MVIS
108801010101 108801010261 1 MVIS
108801010101 108801010271 1 MVIS
108801010101 108801010281 1 MVIS
108801010101 108801010291 1 MVIS
108801010101 108801010301 1 MVIS
108801010101 108801010311 1 MVIS
108801010101 108801010321 1 MVIS
108801010101 108801010331 1 MVIS
109391030012 109391030032 1 MVIS
109521010011 109521010021 1 MVIS
109521010011 109521010031 1 MVIS
109521010011 109521010041 1 MVIS
109521010011 109521010051 1 MVIS
109521010011 109521010061 1 MVIS


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

Obs EVNTIDX LINKIDX EVENTYPE
1 100791010301 100791010391 1 MVIS
2 100791010301 100791010421 1 MVIS
3 100791010911 100791011671 1 MVIS
4 101141010071 101141010151 1 MVIS
5 101141010071 101141010161 1 MVIS
6 102431010021 102431010051 1 MVIS
7 102431010091 102431010141 1 MVIS
8 102962020012 102962020042 1 MVIS
9 102962020012 102962020052 1 MVIS
10 102962020022 102962020052 1 MVIS
11 104611030012 104611030052 1 MVIS
12 104611030012 104611030062 1 MVIS
13 105691020011 105691020021 1 MVIS
14 106041040021 106041040031 1 MVIS
15 106041040021 106041040041 1 MVIS
16 106311040081 106311040091 1 MVIS
17 106311040101 106311040121 1 MVIS
18 107011010571 107011010721 1 MVIS
19 107011010571 107011010731 1 MVIS
20 107011010571 107011010741 1 MVIS
21 107011010571 107011010751 1 MVIS
22 107011010571 107011010761 1 MVIS
23 107011010571 107011010771 1 MVIS
24 107011010571 107011010821 1 MVIS
25 107011030051 107011030081 1 MVIS
26 107501030021 107501030031 1 MVIS
27 107591010021 107591010051 1 MVIS
28 107591010021 107591010061 1 MVIS
29 107591010021 107591010071 1 MVIS
30 107591010021 107591010081 1 MVIS
31 107831030582 107831030572 1 MVIS
32 107932020012 107932020092 1 MVIS
33 107932020012 107932020102 1 MVIS
34 107932020012 107932020112 1 MVIS
35 107932020012 107932020122 1 MVIS
36 108501040011 108501040031 1 MVIS
37 108801010101 108801010261 1 MVIS
38 108801010101 108801010271 1 MVIS
39 108801010101 108801010281 1 MVIS
40 108801010101 108801010291 1 MVIS
41 108801010101 108801010301 1 MVIS
42 108801010101 108801010311 1 MVIS
43 108801010101 108801010321 1 MVIS
44 108801010101 108801010331 1 MVIS
45 109391030012 109391030032 1 MVIS
46 109521010011 109521010021 1 MVIS
47 109521010011 109521010031 1 MVIS
48 109521010011 109521010041 1 MVIS
49 109521010011 109521010051 1 MVIS
50 109521010011 109521010061 1 MVIS


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

Obs LINKIDX
1 100791010391
2 100791010421
3 100791011671
4 101141010151
5 101141010161
6 102431010051
7 102431010141
8 102962020042
9 102962020052
10 104611030052
11 104611030062
12 105691020021
13 106041040031
14 106041040041
15 106311040091
16 106311040121
17 107011010721
18 107011010731
19 107011010741
20 107011010751
21 107011010761
22 107011010771
23 107011010821
24 107011030081
25 107501030031
26 107591010051
27 107591010061
28 107591010071
29 107591010081
30 107831030572
31 107932020092
32 107932020102
33 107932020112
34 107932020122
35 108501040031
36 108801010261
37 108801010271
38 108801010281
39 108801010291
40 108801010301
41 108801010311
42 108801010321
43 108801010331
44 109391030032
45 109521010021
46 109521010031
47 109521010041
48 109521010051
49 109521010061
50 109521010071


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

LINKIDX RXRECIDX RXNAME RXXP16X PERWT16F
100791010391 100791010391001 FLUCONAZOLE 169.70 12227.437090
100791010391 100791010391002 FLUCONAZOLE 169.70 12227.437090
100791010421 100791010421001 XOLAIR 898.46 12227.437090
100791010421 100791010421002 XOLAIR 898.46 12227.437090
100791010421 100791010421003 XOLAIR 898.46 12227.437090
100791011671 100791011671001 ADVAIR HFA 333.49 12227.437090
101141010151 101141010151001 PREDNISONE 1.96 11003.338494
101141010161 101141010161001 DOXYCYC MONO 11.39 11003.338494
102431010051 102431010051001 FLUTICASONE 28.26 5931.088062
102431010141 102431010141001 DULERA 280.09 5931.088062
102431010141 102431010141002 DULERA 280.09 5931.088062
102962020042 102962020042001 Proventil HFA 75.02 3608.903468
102962020052 102962020052001 Montelukast 15.93 3608.903468
104611030052 104611030052001 QVAR 196.42 13225.222459
104611030062 104611030062001 PROMETHAZINE 11.99 13225.222459
105691020021 105691020021001 QVAR 149.40 2160.841180
105691020021 105691020021002 QVAR 149.40 2160.841180
105691020021 105691020021003 QVAR 156.32 2160.841180
106041040031 106041040031001 VENTOLIN HFA 51.81 3990.784371
106041040041 106041040041001 FLOVENT HFA 161.27 3990.784371
106311040091 106311040091001 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121001 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121002 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121003 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121004 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121005 VENTOLIN HFA 69.99 5282.050345
107011010721 107011010721001 BENZTROPINE 3.65 2013.822043
107011010721 107011010721002 BENZTROPINE 3.65 2013.822043
107011010721 107011010721003 BENZTROPINE 3.65 2013.822043
107011010721 107011010721004 BENZTROPINE 3.65 2013.822043
107011010721 107011010721005 BENZTROPINE 3.65 2013.822043
107011010731 107011010731001 ZOLPIDEM 5.09 2013.822043
107011010731 107011010731002 ZOLPIDEM 5.65 2013.822043
107011010731 107011010731003 ZOLPIDEM 5.65 2013.822043
107011010731 107011010731004 ZOLPIDEM 5.09 2013.822043
107011010731 107011010731005 ZOLPIDEM 5.65 2013.822043
107011010741 107011010741001 BUSPIRONE 41.46 2013.822043
107011010741 107011010741002 BUSPIRONE 41.46 2013.822043
107011010741 107011010741003 BUSPIRONE 41.46 2013.822043
107011010741 107011010741004 BUSPIRONE 41.46 2013.822043
107011010741 107011010741005 BUSPIRONE 41.46 2013.822043
107011010751 107011010751001 CLONAZEPAM 3.58 2013.822043
107011010751 107011010751002 CLONAZEPAM 3.58 2013.822043
107011010751 107011010751003 CLONAZEPAM 3.58 2013.822043
107011010751 107011010751004 CLONAZEPAM 1.78 2013.822043
107011010751 107011010751005 CLONAZEPAM 12.53 2013.822043
107011010761 107011010761001 FLUOXETINE 13.65 2013.822043
107011010761 107011010761002 FLUOXETINE 14.70 2013.822043
107011010761 107011010761003 FLUOXETINE 13.65 2013.822043
107011010761 107011010761004 FLUOXETINE 13.65 2013.822043
107011010761 107011010761005 FLUOXETINE 13.65 2013.822043
107011010771 107011010771001 PERPHENAZINE 61.93 2013.822043
107011010771 107011010771002 PERPHENAZINE 61.93 2013.822043
107011010771 107011010771003 PERPHENAZINE 67.61 2013.822043
107011010771 107011010771004 PERPHENAZINE 67.69 2013.822043
107011010771 107011010771005 PERPHENAZINE 67.61 2013.822043
107011010821 107011010821001 NYSTATIN 62.97 2013.822043
107011030081 107011030081001 FERROUS SULF 1.51 1878.764459
107501030031 107501030031001 SINGULAIR 218.54 1345.088634
107501030031 107501030031002 SINGULAIR 218.54 1345.088634
107591010051 107591010051001 MINOCYCLINE 11.24 7720.680512
107591010061 107591010061001 VITAMIN D 8.29 7720.680512
107591010071 107591010071001 LYRICA 352.01 7720.680512
107591010081 107591010081001 TRAMADOL HCL 254.99 7720.680512
107831030572 107831030572001 PROAIR HFA 53.29 10437.059579
107932020092 107932020092001 OXYCODONE 2.50 9453.253501
107932020102 107932020102001 TRAZODONE 1.19 9453.253501
107932020112 107932020112001 RANITIDINE 4.39 9453.253501
107932020112 107932020112002 RANITIDINE 4.39 9453.253501
107932020122 107932020122001 SPIRIVA 344.56 9453.253501
108501040031 108501040031001 CEFDINIR 48.76 14494.053560
108501040031 108501040031002 CEFDINIR 48.76 14494.053560
108801010261 108801010261001 PRAMIPEXOLE 23.73 10112.518455
108801010261 108801010261002 PRAMIPEXOLE 23.73 10112.518455
108801010261 108801010261003 PRAMIPEXOLE 22.04 10112.518455
108801010261 108801010261004 PRAMIPEXOLE 36.12 10112.518455
108801010271 108801010271001 BISOPROL FUM 7.50 10112.518455
108801010271 108801010271002 BISOPROL FUM 20.10 10112.518455
108801010271 108801010271003 BISOPROL FUM 20.10 10112.518455
108801010271 108801010271004 BISOPROL FUM 20.10 10112.518455
108801010281 108801010281001 VENLAFAXINE 116.76 10112.518455
108801010281 108801010281002 VENLAFAXINE 124.71 10112.518455
108801010281 108801010281003 VENLAFAXINE 124.71 10112.518455
108801010281 108801010281004 VENLAFAXINE 116.76 10112.518455
108801010291 108801010291001 VENLAFAXINE 6.01 10112.518455
108801010291 108801010291002 VENLAFAXINE 6.01 10112.518455
108801010291 108801010291003 VENLAFAXINE 6.01 10112.518455
108801010291 108801010291004 VENLAFAXINE 6.01 10112.518455
108801010301 108801010301001 LAMOTRIGINE 147.99 10112.518455
108801010301 108801010301002 LAMOTRIGINE 147.99 10112.518455
108801010301 108801010301003 LAMOTRIGINE 147.99 10112.518455
108801010301 108801010301004 LAMOTRIGINE 147.99 10112.518455
108801010311 108801010311001 RISPERIDONE 7.00 10112.518455
108801010311 108801010311002 RISPERIDONE 7.00 10112.518455
108801010311 108801010311003 RISPERIDONE 7.00 10112.518455
108801010311 108801010311004 RISPERIDONE 7.00 10112.518455
108801010321 108801010321001 METFORMIN 6.16 10112.518455
108801010321 108801010321002 METFORMIN 6.16 10112.518455
108801010321 108801010321003 METFORMIN 6.16 10112.518455
108801010321 108801010321004 METFORMIN 6.16 10112.518455
108801010331 108801010331001 NIFEDIPINE 80.50 10112.518455
108801010331 108801010331002 NIFEDIPINE 80.50 10112.518455
108801010331 108801010331003 NIFEDIPINE 80.50 10112.518455
108801010331 108801010331004 NIFEDIPINE 80.50 10112.518455
109391030032 109391030032001 VENTOLIN HFA 53.67 5652.752772
109521010021 109521010021001 QUETIAPINE 24.50 3265.397192
109521010031 109521010031001 BISOPRL/HCTZ 17.32 3265.397192
109521010041 109521010041001 QUETIAPINE 9.88 3265.397192
109521010051 109521010051001 GABAPENTIN 26.06 3265.397192
109521010061 109521010061001 HYDROCO/APAP 51.70 3265.397192
109521010071 109521010071001 QUETIAPINE 9.88 3265.397192
109521010081 109521010081001 MELOXICAM 13.32 3265.397192
109521010091 109521010091001 AMLODIPINE 16.34 3265.397192
109521010151 109521010151001 QUETIAPINE 9.88 3265.397192
109521010151 109521010151002 QUETIAPINE 9.88 3265.397192
109521010151 109521010151003 QUETIAPINE 9.88 3265.397192
109521010151 109521010151004 QUETIAPINE 9.88 3265.397192
109521010151 109521010151005 QUETIAPINE 18.72 3265.397192
109521010161 109521010161001 BISOPRL/HCTZ 17.32 3265.397192
109521010161 109521010161002 BISOPRL/HCTZ 17.32 3265.397192
109521010161 109521010161003 BISOPRL/HCTZ 17.32 3265.397192
109521010161 109521010161004 BISOPRL/HCTZ 17.32 3265.397192
109521010161 109521010161005 BISOPRL/HCTZ 17.32 3265.397192
109521010171 109521010171001 QUETIAPINE 24.50 3265.397192
109521010171 109521010171002 QUETIAPINE 24.50 3265.397192
109521010171 109521010171003 QUETIAPINE 24.50 3265.397192
109521010171 109521010171004 QUETIAPINE 24.50 3265.397192
109521010171 109521010171005 QUETIAPINE 24.50 3265.397192
109521010181 109521010181001 GABAPENTIN 26.06 3265.397192
109521010181 109521010181002 GABAPENTIN 26.06 3265.397192
109521010181 109521010181003 GABAPENTIN 26.06 3265.397192
109521010181 109521010181004 GABAPENTIN 26.06 3265.397192
109521010181 109521010181005 GABAPENTIN 26.06 3265.397192
109521010191 109521010191001 HYDROCO/APAP 72.14 3265.397192
109521010191 109521010191002 HYDROCO/APAP 72.14 3265.397192
109521010191 109521010191003 HYDROCO/APAP 72.14 3265.397192
109521010191 109521010191004 HYDROCO/APAP 61.99 3265.397192
109521010191 109521010191005 HYDROCO/APAP 61.99 3265.397192
109521010201 109521010201001 QUETIAPINE 9.88 3265.397192
109521010201 109521010201002 QUETIAPINE 9.88 3265.397192
109521010201 109521010201003 QUETIAPINE 9.88 3265.397192
109521010201 109521010201004 QUETIAPINE 9.88 3265.397192
109521010201 109521010201005 QUETIAPINE 18.72 3265.397192
109521010211 109521010211001 MELOXICAM 13.32 3265.397192
109521010211 109521010211002 MELOXICAM 13.32 3265.397192
109521010211 109521010211003 MELOXICAM 13.32 3265.397192
109521010211 109521010211004 MELOXICAM 13.32 3265.397192
109521010211 109521010211005 MELOXICAM 13.32 3265.397192
109521010221 109521010221001 AMLODIPINE 16.34 3265.397192
109521010221 109521010221002 AMLODIPINE 16.34 3265.397192
109521010221 109521010221003 AMLODIPINE 16.34 3265.397192
109521010221 109521010221004 AMLODIPINE 16.34 3265.397192
109521010221 109521010221005 AMLODIPINE 16.34 3265.397192
109521010373 109521010373001 BISOPRL/HCTZ 17.32 3265.397192
109521010373 109521010373002 BISOPRL/HCTZ 17.32 3265.397192
109521010373 109521010373003 BISOPRL/HCTZ 17.32 3265.397192
109521010373 109521010373004 BISOPRL/HCTZ 17.32 3265.397192
109521010383 109521010383001 GRALISE 547.70 3265.397192
109521010383 109521010383002 GRALISE 547.70 3265.397192
109521010383 109521010383003 GRALISE 547.70 3265.397192
109521010383 109521010383004 GRALISE 547.70 3265.397192
109521010393 109521010393001 QUETIAPINE 18.73 3265.397192
109521010393 109521010393002 QUETIAPINE 9.88 3265.397192
109521010393 109521010393003 QUETIAPINE 9.88 3265.397192
109521010393 109521010393004 QUETIAPINE 9.88 3265.397192
109521010403 109521010403001 MELOXICAM 13.32 3265.397192
109521010403 109521010403002 MELOXICAM 13.32 3265.397192
109521010403 109521010403003 MELOXICAM 13.32 3265.397192
109521010403 109521010403004 MELOXICAM 13.32 3265.397192
109521010413 109521010413001 AMLODIPINE 16.34 3265.397192
109521010413 109521010413002 AMLODIPINE 16.34 3265.397192
109521010413 109521010413003 AMLODIPINE 16.34 3265.397192
109521010413 109521010413004 AMLODIPINE 16.34 3265.397192
110041020061 110041020061001 AMOXICILLIN 2.00 1869.541020
110041020071 110041020071001 VENTOLIN HFA 50.31 1869.541020
110041020071 110041020071002 VENTOLIN HFA 69.99 1869.541020
110041020081 110041020081001 FLONASE ALGY 28.34 1869.541020
110041020091 110041020091001 KETOTIF FUM 9.70 1869.541020
110181010391 110181010391001 MONTELUKAST 11.25 5239.470523
111381040041 111381040041001 Amoxicillan 8.81 6210.586601
111381040051 111381040051001 PREDNISOLONE 1.95 6210.586601
111381040061 111381040061001 ALBUTEROL 87.96 6210.586601
111441010101 111441010101001 PROVENTIL 70.41 1534.466925
111481010071 111481010071001 ADVAIR DISKU 519.99 4032.652137
111481010081 111481010081001 BENICAR 326.00 4032.652137
111481010091 111481010091001 MONTELUKAST 7.65 4032.652137
111481010101 111481010101001 PIOGLITAZONE 899.97 4032.652137
111481010111 111481010111001 GLIMEPIRIDE 8.46 4032.652137
111741020031 111741020031001 HM TRIPLE 8.00 23118.775327
111841020041 111841020041001 DULERA 361.99 2304.061577
111841020051 111841020051001 PROAIR HFA 55.08 2304.061577
111841020061 111841020061001 GLIPIZIDE 22.99 2304.061577
111841020071 111841020071001 METFORMIN 14.33 2304.061577
111841020081 111841020081001 ALPRAZOLAM 2.95 2304.061577
111841020091 111841020091001 MONTELUKAST 15.45 2304.061577
111841020101 111841020101001 ATORVASTATIN 22.25 2304.061577
111841020111 111841020111001 VENTOLIN HFA 50.35 2304.061577
111841020121 111841020121001 DULERA 361.99 2304.061577
111841020131 111841020131001 IBUPROFEN 2.33 2304.061577
111841020141 111841020141001 OMEPRAZOLE 13.23 2304.061577


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

Analysis Variable : RXXP16X SUM OF PAYMENTS RXSF16X-RXOU16X(IMPUTED)

N Sum
4853 521946.60


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

Weighted

Analysis Variable : RXXP16X SUM OF PAYMENTS RXSF16X-RXOU16X(IMPUTED)

N Sum
4853 4636700045

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.24 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 = ‘sampleB.rtf’;
NOTE: Writing RTF Body file: sampleB.rtf
9
10 ods noproctitle;
11
12 OPTIONS LS=132 PS=59;
13
14 %let yr=16;
15 %let evntnum=188; /* BE SURE TO UPDTE FOR CURRENT FY */
16 %let condnum=190; /* BE SURE TO UPDTE FOR CURRENT FY */
17
18 TITLE1 “HC-&evntnum.I”;
19 TITLE2 “Sample SAS Job for Example B”;
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 prescribed medicines 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.00 seconds

37

38
39 * Get condition 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 123100 observations read from the data set IN.H190.
NOTE: The data set WORK.ASCONDS has 2288 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.97 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 2288 observations read from the data set WORK.ASCONDS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCONDS has 2288 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.00 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 363849 observations read from the data set IN.H188IF1.
NOTE: SAS threaded sort was used.
NOTE: The data set WORK.CLNK has 363849 observations and 6 variables.
NOTE: Compressing data set WORK.CLNK increased size by 5.49 percent.
Compressed is 423 pages; un-compressed would require 401 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.60 seconds
cpu time 0.28 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 363849 observations read from the data set WORK.CLNK.
NOTE: There were 2288 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 6752 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-4.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds

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

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

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 5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

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

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

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 6.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
92

93
94 * Get PMED records linked to asthma condition records.
95

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

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

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

NOTE: There were 319685 observations read from the data set WORK.PMED.
NOTE: There were 6724 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASPMEDS has 9604 observations and 5 variables.
NOTE: Compressing data set WORK.ASPMEDS decreased size by 26.67 percent.
Compressed is 11 pages; un-compressed would require 15 pages.
NOTE: DATA statement used (Total process time):
real time 0.11 seconds
cpu time 0.10 seconds

104
105 proc report data=aspmeds (obs=300) nowd headskip;
106 column LINKIDX RXRECIDX RXNAME RXXP&yr.X PERWT&yr.F;
107 define linkidx / ‘LINKIDX’ order;
108 define rxrecidx / ‘RXRECIDX’;
109 define rxname / ‘RXNAME’;
110 define rxxp&yr.x / ‘RXXP16X’ display format=8.2; /*update year*/
111 define perwt&yr.f / ‘PERWT16F’ /*display format=8.2*/; /*update year*/
112 break after linkidx / skip;
113 title3 “sample print of work.aspmeds”;
114 title4 “PMED (HC-&evntnum.A) records which link to condition records coded as asthma”;
115 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 7-15.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds

116
117 PROC MEANS DATA=ASPMEDS N SUM;
118 VAR RXXP&yr.X;
119 TITLE3 “Total Rx expenditures associated with asthma”;
120 RUN;

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

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

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

128
129 ods rtf close;
130

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


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

Obs CONDIDX ICD10CDX
1 100061010021 J45
2 100081020011 J45
3 100081060011 J45
4 100191020051 J45
5 100341010121 J45
6 100791010061 J45
7 100851010021 J45
8 100851030011 J45
9 100911030031 J45
10 100921020051 J45
11 100921050012 J45
12 101071010011 J45
13 101141010031 J45
14 101161010011 J45
15 101351010041 J45
16 101491010011 J45
17 101701030011 J45
18 102171020081 J45
19 102211050011 J45
20 102221030011 J45
21 102231030011 J45
22 102251010011 J45
23 102261040011 J45
24 102331010021 J45
25 102421010071 J45
26 102431010061 J45
27 102551010031 J45
28 102551020011 J45
29 102841010011 J45
30 102961010051 J45
31 102962020012 J45
32 103101010011 J45
33 103161010241 J45
34 103181020011 J45
35 103361010041 J45
36 103631010071 J45
37 104021010021 J45
38 104131010011 J45
39 104161010041 J45
40 104161050011 J45
41 104511020181 J45
42 104611030012 J45
43 104751020011 J45
44 104751030011 J45
45 105011010161 J45
46 105051010051 J45
47 105051020021 J45
48 105252010022 J45
49 105531020051 J45
50 105571010071 J45


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

CONDIDX EVNTIDX EVENTYPE
100191020051 100191020041 8 PMED
100191020051 100191020191 8 PMED
100191020051 100191020341 1 MVIS
100341010121 100341010321 8 PMED
100791010061 100791010061 2 OPAT
100791010061 100791010071 2 OPAT
100791010061 100791010081 2 OPAT
100791010061 100791010091 1 MVIS
100791010061 100791010301 1 MVIS
100791010061 100791010421 8 PMED
100791010061 100791010521 2 OPAT
100791010061 100791010911 1 MVIS
100791010061 100791010921 1 MVIS
100791010061 100791011671 8 PMED
100921020051 100921020171 8 PMED
100921050012 100921050042 8 PMED
100921050012 100921050062 8 PMED
101071010011 101071010031 8 PMED
101141010031 101141010071 1 MVIS
101141010031 101141010081 1 MVIS
101141010031 101141010261 8 PMED
101351010041 101351010321 8 PMED
101351010041 101351010331 8 PMED
101351010041 101351010411 1 MVIS
101351010041 101351010511 8 PMED
101351010041 101351010521 8 PMED
101351010041 101351010541 8 PMED
101491010011 101491010011 8 PMED
101491010011 101491010021 8 PMED
101491010011 101491010041 8 PMED
101491010011 101491010151 8 PMED
101491010011 101491010161 8 PMED
101701030011 101701030011 3 EROM
102171020081 102171020191 8 PMED
102211050011 102211050011 3 EROM
102211050011 102211050021 8 PMED
102211050011 102211050031 3 EROM
102221030011 102221030221 8 PMED
102231030011 102231030051 8 PMED
102261040011 102261040021 8 PMED
102331010021 102331010071 8 PMED
102331010021 102331010081 8 PMED
102331010021 102331010111 8 PMED
102431010061 102431010021 1 MVIS
102431010061 102431010091 1 MVIS
102431010061 102431010141 8 PMED
102551010031 102551010091 8 PMED
102551010031 102551010161 8 PMED
102551020011 102551020011 8 PMED
102551020011 102551020021 8 PMED
102551020011 102551020031 1 MVIS
102551020011 102551020041 8 PMED
102551020011 102551020051 8 PMED
102961010051 102961010011 8 PMED
102962020012 102962020012 1 MVIS
102962020012 102962020022 1 MVIS
102962020012 102962020042 8 PMED
102962020012 102962020052 8 PMED
102962020012 102962020062 2 OPAT
102962020012 102962020072 8 PMED
102962020012 102962020082 8 PMED
103161010241 103161011811 8 PMED
103161010241 103161011821 8 PMED
103631010071 103631010071 8 PMED
103631010071 103631010241 8 PMED
104021010021 104021010521 8 PMED
104131010011 104131010161 8 PMED
104131010011 104131010791 8 PMED
104161010041 104161010051 8 PMED
104161050011 104161050031 8 PMED
104611030012 104611030012 1 MVIS
104611030012 104611030052 8 PMED
104611030012 104611030062 8 PMED
104751020011 104751020041 8 PMED
104751030011 104751030061 8 PMED


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

Obs CONDIDX EVNTIDX EVENTYPE
1 100191020051 100191020041 8 PMED
2 100191020051 100191020191 8 PMED
3 100191020051 100191020341 1 MVIS
4 100341010121 100341010321 8 PMED
5 100791010061 100791010061 2 OPAT
6 100791010061 100791010071 2 OPAT
7 100791010061 100791010081 2 OPAT
8 100791010061 100791010091 1 MVIS
9 100791010061 100791010301 1 MVIS
10 100791010061 100791010421 8 PMED
11 100791010061 100791010521 2 OPAT
12 100791010061 100791010911 1 MVIS
13 100791010061 100791010921 1 MVIS
14 100791010061 100791011671 8 PMED
15 100921020051 100921020171 8 PMED
16 100921050012 100921050042 8 PMED
17 100921050012 100921050062 8 PMED
18 101071010011 101071010031 8 PMED
19 101141010031 101141010071 1 MVIS
20 101141010031 101141010081 1 MVIS
21 101141010031 101141010261 8 PMED
22 101351010041 101351010321 8 PMED
23 101351010041 101351010331 8 PMED
24 101351010041 101351010411 1 MVIS
25 101351010041 101351010511 8 PMED
26 101351010041 101351010521 8 PMED
27 101351010041 101351010541 8 PMED
28 101491010011 101491010011 8 PMED
29 101491010011 101491010021 8 PMED
30 101491010011 101491010041 8 PMED
31 101491010011 101491010151 8 PMED
32 101491010011 101491010161 8 PMED
33 101701030011 101701030011 3 EROM
34 102171020081 102171020191 8 PMED
35 102211050011 102211050011 3 EROM
36 102211050011 102211050021 8 PMED
37 102211050011 102211050031 3 EROM
38 102221030011 102221030221 8 PMED
39 102231030011 102231030051 8 PMED
40 102261040011 102261040021 8 PMED
41 102331010021 102331010071 8 PMED
42 102331010021 102331010081 8 PMED
43 102331010021 102331010111 8 PMED
44 102431010061 102431010021 1 MVIS
45 102431010061 102431010091 1 MVIS
46 102431010061 102431010141 8 PMED
47 102551010031 102551010091 8 PMED
48 102551010031 102551010161 8 PMED
49 102551020011 102551020011 8 PMED
50 102551020011 102551020021 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020041 8 PMED
2 100191020191 8 PMED
3 100191020341 1 MVIS
4 100341010321 8 PMED
5 100791010061 2 OPAT
6 100791010071 2 OPAT
7 100791010081 2 OPAT
8 100791010091 1 MVIS
9 100791010301 1 MVIS
10 100791010421 8 PMED
11 100791010521 2 OPAT
12 100791010911 1 MVIS
13 100791010921 1 MVIS
14 100791011671 8 PMED
15 100921020171 8 PMED
16 100921050042 8 PMED
17 100921050062 8 PMED
18 101071010031 8 PMED
19 101141010071 1 MVIS
20 101141010081 1 MVIS
21 101141010261 8 PMED
22 101351010321 8 PMED
23 101351010331 8 PMED
24 101351010411 1 MVIS
25 101351010511 8 PMED
26 101351010521 8 PMED
27 101351010541 8 PMED
28 101491010011 8 PMED
29 101491010021 8 PMED
30 101491010041 8 PMED
31 101491010151 8 PMED
32 101491010161 8 PMED
33 101701030011 3 EROM
34 102171020191 8 PMED
35 102211050011 3 EROM
36 102211050021 8 PMED
37 102211050031 3 EROM
38 102221030221 8 PMED
39 102231030051 8 PMED
40 102261040021 8 PMED
41 102331010071 8 PMED
42 102331010081 8 PMED
43 102331010111 8 PMED
44 102431010021 1 MVIS
45 102431010091 1 MVIS
46 102431010141 8 PMED
47 102551010091 8 PMED
48 102551010161 8 PMED
49 102551020011 8 PMED
50 102551020021 8 PMED


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

LINKIDX RXRECIDX RXNAME RXXP16X PERWT16F
100191020041 100191020041001 THEOPHYLLINE 21.00 10510.931357
100191020191 100191020191001 THEOPHYLLINE 21.00 10510.931357
100191020191 100191020191002 THEOPHYLLINE 26.15 10510.931357
100341010321 100341010321001 SYMBICORT 346.99 1435.041883
100341010321 100341010321002 SYMBICORT 346.99 1435.041883
100341010321 100341010321003 SYMBICORT 346.99 1435.041883
100341010321 100341010321004 SYMBICORT 346.99 1435.041883
100791010421 100791010421001 XOLAIR 898.46 12227.437090
100791010421 100791010421002 XOLAIR 898.46 12227.437090
100791010421 100791010421003 XOLAIR 898.46 12227.437090
100791011671 100791011671001 ADVAIR HFA 333.49 12227.437090
100921020171 100921020171001 METOPROLOL 125.97 3116.962129
100921020171 100921020171002 METOPROLOL 125.97 3116.962129
100921020171 100921020171003 METOPROLOL 125.97 3116.962129
100921020171 100921020171004 METOPROLOL 30.00 3116.962129
100921020171 100921020171005 METOPROLOL 30.00 3116.962129
100921020171 100921020171006 METOPROLOL 30.00 3116.962129
100921020171 100921020171007 METOPROLOL 30.00 3116.962129
100921050042 100921050042001 ALBUTEROL 51.60 3748.423811
100921050042 100921050042002 ALBUTEROL 50.82 3748.423811
100921050062 100921050062001 ASTEPRO 199.99 3748.423811
100921050062 100921050062002 ASTEPRO 199.99 3748.423811
100921050062 100921050062003 ASTEPRO 199.99 3748.423811
101071010031 101071010031001 PROAIR HFA 55.05 12744.137115
101141010261 101141010261001 VENTOLIN HFA 71.99 11003.338494
101351010321 101351010321001 ADVAIR DISKU 958.72 45881.546805
101351010331 101351010331001 SPIRIVA 976.75 45881.546805
101351010511 101351010511001 ADVAIR DISKU 958.72 45881.546805
101351010521 101351010521001 SPIRIVA 976.75 45881.546805
101351010541 101351010541001 PROAIR HFA 156.18 45881.546805
101491010011 101491010011001 ADVAIR HFA 559.99 5476.320342
101491010021 101491010021001 ADVAIR HFA 559.99 5476.320342
101491010041 101491010041001 THEOPHYLLINE 47.49 5476.320342
101491010151 101491010151001 ADVAIR HFA 559.99 5476.320342
101491010151 101491010151002 ADVAIR HFA 559.99 5476.320342
101491010161 101491010161001 THEOPHYLLINE 47.49 5476.320342
101491010161 101491010161002 THEOPHYLLINE 47.49 5476.320342
102171020191 102171020191001 VENTOLIN HFA 53.14 2650.315370
102211050021 102211050021001 IBUPROFEN 4.00 1445.923972
102221030221 102221030221001 QVAR 237.23 2646.330886
102231030051 102231030051001 NASONEX 253.47 3495.842232
102261040021 102261040021001 PROAIR HFA 53.65 8711.349548
102331010071 102331010071001 PROAIR HFA 54.29 13186.164397
102331010071 102331010071002 PROAIR HFA 54.29 13186.164397
102331010071 102331010071003 PROAIR HFA 54.29 13186.164397
102331010071 102331010071004 PROAIR HFA 54.29 13186.164397
102331010071 102331010071005 PROAIR HFA 54.29 13186.164397
102331010071 102331010071006 PROAIR HFA 54.29 13186.164397
102331010071 102331010071007 PROAIR HFA 54.29 13186.164397
102331010081 102331010081001 TERBINAFINE 203.97 13186.164397
102331010081 102331010081002 TERBINAFINE 203.97 13186.164397
102331010081 102331010081003 TERBINAFINE 203.97 13186.164397
102331010081 102331010081004 TERBINAFINE 203.97 13186.164397
102331010081 102331010081005 TERBINAFINE 203.97 13186.164397
102331010081 102331010081006 TERBINAFINE 203.97 13186.164397
102331010081 102331010081007 TERBINAFINE 203.97 13186.164397
102331010081 102331010081008 TERBINAFINE 203.97 13186.164397
102331010111 102331010111001 PROAIR HFA 54.29 13186.164397
102331010111 102331010111002 PROAIR HFA 54.29 13186.164397
102331010111 102331010111003 PROAIR HFA 54.29 13186.164397
102331010111 102331010111004 PROAIR HFA 53.98 13186.164397
102431010141 102431010141001 DULERA 280.09 5931.088062
102431010141 102431010141002 DULERA 280.09 5931.088062
102551010091 102551010091001 ADVAIR DISKU 272.73 5196.739672
102551010161 102551010161001 ADVAIR DISKU 272.73 5196.739672
102551010161 102551010161002 ADVAIR DISKU 272.73 5196.739672
102551010161 102551010161003 ADVAIR DISKU 272.73 5196.739672
102551010161 102551010161004 ADVAIR DISKU 272.73 5196.739672
102551010161 102551010161005 ADVAIR DISKU 272.73 5196.739672
102551020011 102551020011001 PROAIR HFA 54.05 3399.474527
102551020021 102551020021001 FLUTICASONE 72.54 3399.474527
102551020041 102551020041001 PROAIR HFA 54.05 3399.474527
102551020041 102551020041002 PROAIR HFA 54.05 3399.474527
102551020051 102551020051001 FLUTICASONE 20.00 3399.474527
102551020051 102551020051002 FLUTICASONE 20.00 3399.474527
102961010011 102961010011001 VENTOLIN HFA 49.09 6871.759192
102962020042 102962020042001 Proventil HFA 75.02 3608.903468
102962020052 102962020052001 Montelukast 15.93 3608.903468
102962020072 102962020072001 Montelukast 15.93 3608.903468
102962020082 102962020082001 Montelukast 15.93 3608.903468
103161011811 103161011811001 SYMBICORT 291.26 9301.389839
103161011811 103161011811002 SYMBICORT 291.26 9301.389839
103161011811 103161011811003 SYMBICORT 291.26 9301.389839
103161011811 103161011811004 SYMBICORT 291.26 9301.389839
103161011821 103161011821001 SPIRIVA 353.05 9301.389839
103161011821 103161011821002 SPIRIVA 353.05 9301.389839
103161011821 103161011821003 SPIRIVA 353.05 9301.389839
103161011821 103161011821004 SPIRIVA 353.05 9301.389839
103631010071 103631010071001 Fluticas / Salmeterol 207.82 10761.301263
103631010071 103631010071002 Fluticas / Salmeterol 207.82 10761.301263
103631010071 103631010071003 Fluticas / Salmeterol 368.17 10761.301263
103631010071 103631010071004 Fluticas / Salmeterol 207.82 10761.301263
103631010071 103631010071005 Fluticas / Salmeterol 368.17 10761.301263
103631010241 103631010241001 Flucticas / Salmeterol 368.17 10761.301263
103631010241 103631010241002 Flucticas / Salmeterol 207.82 10761.301263
103631010241 103631010241003 Flucticas / Salmeterol 368.17 10761.301263
103631010241 103631010241004 Flucticas / Salmeterol 368.17 10761.301263
104021010521 104021010521001 VENTOLIN HFA 36.81 6055.979082
104131010161 104131010161001 VENTOLIN HFA 52.17 5847.822882
104131010161 104131010161002 VENTOLIN HFA 52.17 5847.822882
104131010791 104131010791001 VENTOLIN HFA 52.17 5847.822882
104131010791 104131010791002 VENTOLIN HFA 52.17 5847.822882
104131010791 104131010791003 VENTOLIN HFA 52.17 5847.822882
104131010791 104131010791004 VENTOLIN HFA 52.17 5847.822882
104131010791 104131010791005 VENTOLIN HFA 52.17 5847.822882
104161010051 104161010051001 ALBUTEROL 199.96 3482.474159
104161010051 104161010051002 ALBUTEROL 199.96 3482.474159
104161050031 104161050031001 VENTOLIN HFA 52.92 2358.844195
104611030052 104611030052001 QVAR 196.42 13225.222459
104611030062 104611030062001 PROMETHAZINE 11.99 13225.222459
104751020041 104751020041001 ALBUTEROL 19.60 2675.878640
104751030061 104751030061001 ALBUTEROL 8.37 3258.664973
105011010891 105011010891001 CETIRIZINE 9.57 3807.700390
105011010901 105011010901001 ADVAIR DISKU 346.99 3807.700390
105051010271 105051010271001 PROAIR RESPI 73.99 11236.241549
105051010271 105051010271002 PROAIR RESPI 73.99 11236.241549
105051010301 105051010301001 FUROSEMIDE 23.99 11236.241549
105571010291 105571010291001 MONTELUKAST 395.97 12670.325617
105581030011 105581030011001 ALBUTEROL 24.99 3225.264137
105581030021 105581030021001 ADVAIR DISKU 441.39 3225.264137
105641010141 105641010141001 INVOKANA 399.27 3566.754301
105641010141 105641010141002 INVOKANA 399.27 3566.754301
105691020021 105691020021001 QVAR 149.40 2160.841180
105691020021 105691020021002 QVAR 149.40 2160.841180
105691020021 105691020021003 QVAR 156.32 2160.841180
105711040101 105711040101001 FLUOXETINE 4.20 36193.409350
105841020011 105841020011001 DULERA 361.99 4013.180526
105841020031 105841020031001 FLOVENT HFA 634.59 4013.180526
105841020051 105841020051001 ADVAIR HFA 338.76 4013.180526
106041040031 106041040031001 VENTOLIN HFA 51.81 3990.784371
106041040041 106041040041001 FLOVENT HFA 161.27 3990.784371
106041040091 106041040091001 PULMICORT 208.39 3990.784371
106181010221 106181010221001 LORATADINE 8.45 16117.924166
106181010221 106181010221002 LORATADINE 8.45 16117.924166
106181010261 106181010261001 FLOVENT HFA 201.55 16117.924166
106181010261 106181010261002 FLOVENT HFA 201.55 16117.924166
106311040091 106311040091001 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121001 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121002 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121003 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121004 VENTOLIN HFA 69.99 5282.050345
106311040121 106311040121005 VENTOLIN HFA 69.99 5282.050345
106861010441 106861010441001 ALBUTEROL 17.29 9606.341964
106861010451 106861010451001 BREO ELLIPTA 369.99 9606.341964
106971040081 106971040081001 MONTELUKAST 169.99 6146.902481
106971040081 106971040081002 MONTELUKAST 169.99 6146.902481
106971040081 106971040081003 MONTELUKAST 145.00 6146.902481
106971040101 106971040101001 VENTOLIN HFA 69.99 6146.902481
106971040101 106971040101002 VENTOLIN HFA 69.99 6146.902481
106971040101 106971040101003 VENTOLIN HFA 69.99 6146.902481
106971040111 106971040111001 DULERA 257.43 6146.902481
106971040111 106971040111002 DULERA 273.53 6146.902481
106971040111 106971040111003 DULERA 273.53 6146.902481
107491020011 107491020011001 SYMBICORT 269.66 3595.915312
107491020011 107491020011002 SYMBICORT 269.66 3595.915312
107491020021 107491020021001 SYMBICORT 867.12 3595.915312
107491020021 107491020021002 SYMBICORT 867.12 3595.915312
107491020041 107491020041001 SYMBICORT 867.12 3595.915312
107491020041 107491020041002 SYMBICORT 867.12 3595.915312
107491020041 107491020041003 SYMBICORT 867.12 3595.915312
107491020041 107491020041004 SYMBICORT 867.12 3595.915312
107501030011 107501030011001 MONTELUKAST 8.99 1345.088634
107501030011 107501030011002 MONTELUKAST 8.99 1345.088634
107501030031 107501030031001 SINGULAIR 218.54 1345.088634
107501030031 107501030031002 SINGULAIR 218.54 1345.088634
107501030051 107501030051001 LORATADINE 21.99 1345.088634
107501030061 107501030061001 CETIRIZINE 2.37 1345.088634
107521020311 107521020311001 MONTELUKAST 17.59 8383.447677
107521020621 107521020621001 MONTELUKAST 13.96 8383.447677
107521020621 107521020621002 MONTELUKAST 10.06 8383.447677
107521020901 107521020901001 MONTELUKAST 36.49 8383.447677
107831030572 107831030572001 PROAIR HFA 53.29 10437.059579
107861010081 107861010081001 MONTELUKAST 6.65 6178.317135
107861010081 107861010081002 MONTELUKAST 6.65 6178.317135
107861010081 107861010081003 MONTELUKAST 6.65 6178.317135
107861010081 107861010081004 MONTELUKAST 6.65 6178.317135
107861010081 107861010081005 MONTELUKAST 6.65 6178.317135
107861010081 107861010081006 MONTELUKAST 6.65 6178.317135
107932020252 107932020252001 ALBUTEROL 149.99 9453.253501
108381010491 108381010491001 PROAIR HFA 61.96 2209.546193
108381010491 108381010491002 PROAIR HFA 61.96 2209.546193
108381010491 108381010491003 PROAIR HFA 45.91 2209.546193
108381010511 108381010511001 AMLODIPINE 2.39 2209.546193
108381010511 108381010511002 AMLODIPINE 2.39 2209.546193
108381010511 108381010511003 AMLODIPINE 2.39 2209.546193
108381010581 108381010581001 MONTELUKAST 4.94 2209.546193
108381010581 108381010581002 MONTELUKAST 4.94 2209.546193
108381010581 108381010581003 MONTELUKAST 4.94 2209.546193
108801010091 108801010091001 NIFEDIPINE 80.50 10112.518455
108801010301 108801010301001 LAMOTRIGINE 147.99 10112.518455
108801010301 108801010301002 LAMOTRIGINE 147.99 10112.518455
108801010301 108801010301003 LAMOTRIGINE 147.99 10112.518455
108801010301 108801010301004 LAMOTRIGINE 147.99 10112.518455
108801010311 108801010311001 RISPERIDONE 7.00 10112.518455
108801010311 108801010311002 RISPERIDONE 7.00 10112.518455
108801010311 108801010311003 RISPERIDONE 7.00 10112.518455
108801010311 108801010311004 RISPERIDONE 7.00 10112.518455
108801010341 108801010341001 VENTOLIN HFA 70.99 10112.518455
108801010341 108801010341002 VENTOLIN HFA 70.99 10112.518455
108801010831 108801010831001 NIFEDIPINE 80.50 10112.518455
108801010831 108801010831002 NIFEDIPINE 80.50 10112.518455
108801010851 108801010851001 VENTOLIN HFA 70.99 10112.518455
108801010851 108801010851002 VENTOLIN HFA 70.99 10112.518455
108891010031 108891010031001 PROAIR HFA 51.43 19407.640425
108891010061 108891010061001 PROAIR HFA 51.43 19407.640425
108891010061 108891010061002 PROAIR HFA 53.93 19407.640425
108891010111 108891010111001 PROAIR HFA 53.93 19407.640425
108891010131 108891010131001 FLOVENT DISK 165.47 19407.640425
109272010152 109272010152001 VENTOLIN HFA 36.81 10407.529444
109391030032 109391030032001 VENTOLIN HFA 53.67 5652.752772
109501010041 109501010041001 ADVAIR HFA 336.89 4913.082157
109501010041 109501010041002 ADVAIR HFA 336.89 4913.082157
109501010041 109501010041003 ADVAIR HFA 336.89 4913.082157
109501010041 109501010041004 ADVAIR HFA 336.89 4913.082157
109501010041 109501010041005 ADVAIR HFA 336.89 4913.082157
109501010041 109501010041006 ADVAIR HFA 336.89 4913.082157
109511020031 109511020031001 PROAIR HFA 54.44 4210.153322
109561010021 109561010021001 MONTELUKAST 509.97 3933.951956
109561010161 109561010161001 MONTELUKAST 509.97 3933.951956
109561010161 109561010161002 MONTELUKAST 509.97 3933.951956
109561010191 109561010191001 ADVAIR DISKU 445.42 3933.951956
109561010191 109561010191002 ADVAIR DISKU 559.99 3933.951956
109561010191 109561010191003 ADVAIR DISKU 519.99 3933.951956
109561010191 109561010191004 ADVAIR DISKU 559.99 3933.951956
109561010191 109561010191005 ADVAIR DISKU 559.99 3933.951956
109561010191 109561010191006 ADVAIR DISKU 559.99 3933.951956
109561010191 109561010191007 ADVAIR DISKU 559.99 3933.951956
109561010231 109561010231001 PROAIR HFA 54.67 3933.951956
109561010331 109561010331001 MONTELUKAST 509.97 3933.951956
109561010361 109561010361001 ADVAIR DISKU 448.88 3933.951956
109561010361 109561010361002 ADVAIR DISKU 448.88 3933.951956
109561010361 109561010361003 ADVAIR DISKU 559.99 3933.951956
109631020021 109631020021001 PROVENTIL 75.31 5730.750992
109981010121 109981010121001 FLUTICASONE 10.00 10146.734172
109981010121 109981010121002 FLUTICASONE 10.00 10146.734172
110041020011 110041020011001 VENTOLIN HFA 69.99 1869.541020
110041020071 110041020071001 VENTOLIN HFA 50.31 1869.541020
110041020071 110041020071002 VENTOLIN HFA 69.99 1869.541020
110041020151 110041020151001 VENTOLIN HFA 50.31 1869.541020
110041020161 110041020161001 FLONASE ALGY 28.34 1869.541020
110181010121 110181010121001 ADVAIR HFA 341.09 5239.470523
110181010121 110181010121002 ADVAIR HFA 341.09 5239.470523
110181010131 110181010131001 FLUCONAZOLE 1.68 5239.470523
110181010131 110181010131002 FLUCONAZOLE 1.68 5239.470523
110181010141 110181010141001 COMBIVENT 300.60 5239.470523
110181010151 110181010151001 PROAIR HFA 145.98 5239.470523
110181010391 110181010391001 MONTELUKAST 11.25 5239.470523
110321010131 110321010131001 Albuterol 200D Oral 24.00 3697.159202
110321020081 110321020081001 Budesonide / Formoter (120D) 114.07 6533.058423
110321020091 110321020091001 Albuterol (200 Dose) 34.18 6533.058423
110551030051 110551030051001 VENTOLIN HFA 103.11 9439.219430
110551030091 110551030091001 VENTOLIN HFA 103.11 9439.219430
110561030011 110561030011001 MONTELUKAST 15.00 20488.495334
110561030011 110561030011002 MONTELUKAST 15.00 20488.495334
110561040011 110561040011001 MONTELUKAST 15.00 20488.495334
110561040011 110561040011002 MONTELUKAST 15.00 20488.495334
110751010121 110751010121001 ALBUTEROL 39.20 11338.108388
110751010121 110751010121002 ALBUTEROL 39.36 11338.108388
110751010131 110751010131001 INCRUSE ELPT 257.80 11338.108388
110751010141 110751010141001 SYMBICORT 297.17 11338.108388
110751010191 110751010191001 MONTELUKAST 9.80 11338.108388
110751010191 110751010191002 MONTELUKAST 6.61 11338.108388
110751010511 110751010511001 ALBUTEROL 39.36 11338.108388
110751010511 110751010511002 ALBUTEROL 39.66 11338.108388
110751010511 110751010511003 ALBUTEROL 39.66 11338.108388
110751010511 110751010511004 ALBUTEROL 39.66 11338.108388
110751010511 110751010511005 ALBUTEROL 39.51 11338.108388
110751010521 110751010521001 incruse ellipta 257.90 11338.108388
110751010521 110751010521002 INCRUSE ELPT 257.80 11338.108388
110751010521 110751010521003 INCRUSE ELPT 257.80 11338.108388
110751010521 110751010521004 INCRUSE ELPT 257.80 11338.108388
110751010521 110751010521005 INCRUSE ELPT 278.38 11338.108388
110751010531 110751010531001 SYMBICORT 297.17 11338.108388
110751010581 110751010581001 MONTELUKAST 13.22 11338.108388
110751010581 110751010581002 MONTELUKAST 6.61 11338.108388
110751010581 110751010581003 MONTELUKAST 6.61 11338.108388
110751010581 110751010581004 MONTELUKAST 6.61 11338.108388
110751010581 110751010581005 MONTELUKAST 6.61 11338.108388
110751010871 110751010871001 ALBUTEROL 39.51 11338.108388
110751010871 110751010871002 ALBUTEROL 39.51 11338.108388
110751010871 110751010871003 ALBUTEROL 39.51 11338.108388
110751010871 110751010871004 ALBUTEROL 39.51 11338.108388
110751010871 110751010871005 ALBUTEROL 39.51 11338.108388
110751010881 110751010881001 INCRUSE ELPT 278.38 11338.108388
110751010881 110751010881002 INCRUSE ELPT 278.38 11338.108388
110751010881 110751010881003 INCRUSE ELPT 278.38 11338.108388
110751010881 110751010881004 INCRUSE ELPT 278.38 11338.108388
110751010881 110751010881005 INCRUSE ELPT 303.39 11338.108388
110751010891 110751010891001 SYMBICORT 297.17 11338.108388
110751010891 110751010891002 SYMBICORT 297.17 11338.108388
110751010891 110751010891003 SYMBICORT 297.17 11338.108388
110751010891 110751010891004 SYMBICORT 297.17 11338.108388
110751010891 110751010891005 SYMBICORT 297.17 11338.108388
110881020271 110881020271001 ADVAIR DISKU 333.70 3879.448304
110881020301 110881020301001 PROAIR HFA 53.04 3879.448304
110881020401 110881020401001 ADVAIR DISKU 333.70 3879.448304
110881020411 110881020411001 PROAIR HFA 54.30 3879.448304
110951010051 110951010051001 AZITHROMYCIN 5.00 11178.414637
110951010121 110951010121001 ADVAIR HFA 559.99 11178.414637
111041010011 111041010011001 QVAR 208.70 1886.831961


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

Analysis Variable : RXXP16X SUM OF PAYMENTS RXSF16X-RXOU16X(IMPUTED)

N Sum
9604 1550339.39


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

Weighted

Analysis Variable : RXXP16X SUM OF PAYMENTS RXSF16X-RXOU16X(IMPUTED)

N Sum
9604 14132163578

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.50 seconds
cpu time 0.25 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 ods rtf file = ‘sampleC.rtf’ ;
NOTE: Writing RTF Body file: sampleC.rtf
8
9 ods noproctitle;
10
11 OPTIONS LS=132 PS=59;
12
13 %let yr=16;
14 %let evntnum=188; /* BE SURE TO UPDTE FOR CURRENT FY */
15 %let condnum=190; /* BE SURE TO UPDTE FOR CURRENT FY */
16
17 TITLE1 “HC-&evntnum.I”;
18 TITLE2 “Sample SAS Job for Example C”;
19
20 LIBNAME IN “C:\Data”;
NOTE: Libref IN was successfully assigned as follows:
Engine: V9
Physical Name: C:\Data
21

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

25 PROC FORMAT;
26 VALUE EVENTYPE
27 1 = “1 MVIS”
28 2 = “2 OPAT”

29 3 = “3 EROM”
30 4 = “4 STAZ”
31 5 = “5 DVIS”
32 6 = “6 OMED”
33 7 = “7 HVIS”
34 8 = “8 PMED”;
NOTE: Format EVENTYPE has been output.
35 RUN;

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

36

37
38 * Get conditions records coded as asthma.
39

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

NOTE: There were 123100 observations read from the data set IN.H190.
NOTE: The data set WORK.ASCONDS has 2288 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.64 seconds
cpu time 0.07 seconds

44

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

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

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

49
50 proc print data=asconds (obs=50);
51 title3 “sample print of work.asconds - sorted by condidx”;
52 title4 “COND (H&condnum) records where ICD10CDX=J45”;
53 run;

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

real time 0.03 seconds
cpu time 0.04 seconds

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

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

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

NOTE: There were 363849 observations read from the data set WORK.CLNK.
NOTE: There were 2288 observations read from the data set WORK.ASCONDS.
NOTE: The data set WORK.ASCLNKS has 6752 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.08 seconds
cpu time 0.06 seconds

63
64 proc report data=asclnks (obs=75)nowd headskip;
65 define condidx / ‘CONDIDX’ order;
66 define evntidx / ‘EVNTIDX’;
67 define eventype / ‘EVENTYPE’;
68 break after condidx / skip;
69 format eventype eventype.;
70 title3 “sample print of work.asclnks - sorted by condidx”;
71 title4 “events linked to asthma condition records”;
72 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-4.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds

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

NOTE: There were 6752 observations read from the data set WORK.ASCLNKS.
NOTE: SAS sort was used.
NOTE: The data set WORK.ASCLNKS has 6752 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
75
76 proc print data=asclnks (obs=50);
77 format eventype eventype.;
78 title3 “sample print of work.asclnks - sorted by evntidx”;
79 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

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

NOTE: There were 6752 observations read from the data set WORK.ASCLNKS.
NOTE: The data set WORK.ASCLNKS has 6724 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.01 seconds
cpu time 0.01 seconds

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

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

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

95 DATA MVIS;

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

NOTE: There were 165003 observations read from the data set IN.H188G.
NOTE: The data set WORK.MVIS has 160981 observations and 4 variables.
NOTE: Compressing data set WORK.MVIS increased size by 7.07 percent.
Compressed is 106 pages; un-compressed would require 99 pages.
NOTE: DATA statement used (Total process time):
real time 1.53 seconds
cpu time 0.09 seconds
99
100 PROC SORT DATA=MVIS; BY EVNTIDX; RUN;

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

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

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

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

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

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

real time 0.01 seconds
cpu time 0.01 seconds

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

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

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

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

129
130 ods rtf close;
131
132

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



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

Obs CONDIDX ICD10CDX
1 100061010021 J45
2 100081020011 J45
3 100081060011 J45
4 100191020051 J45
5 100341010121 J45
6 100791010061 J45
7 100851010021 J45
8 100851030011 J45
9 100911030031 J45
10 100921020051 J45
11 100921050012 J45
12 101071010011 J45
13 101141010031 J45
14 101161010011 J45
15 101351010041 J45
16 101491010011 J45
17 101701030011 J45
18 102171020081 J45
19 102211050011 J45
20 102221030011 J45
21 102231030011 J45
22 102251010011 J45
23 102261040011 J45
24 102331010021 J45
25 102421010071 J45
26 102431010061 J45
27 102551010031 J45
28 102551020011 J45
29 102841010011 J45
30 102961010051 J45
31 102962020012 J45
32 103101010011 J45
33 103161010241 J45
34 103181020011 J45
35 103361010041 J45
36 103631010071 J45
37 104021010021 J45
38 104131010011 J45
39 104161010041 J45
40 104161050011 J45
41 104511020181 J45
42 104611030012 J45
43 104751020011 J45
44 104751030011 J45
45 105011010161 J45
46 105051010051 J45
47 105051020021 J45
48 105252010022 J45
49 105531020051 J45
50 105571010071 J45


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

CONDIDX EVNTIDX EVENTYPE
100191020051 100191020041 8 PMED
100191020051 100191020191 8 PMED
100191020051 100191020341 1 MVIS
100341010121 100341010321 8 PMED
100791010061 100791010061 2 OPAT
100791010061 100791010071 2 OPAT
100791010061 100791010081 2 OPAT
100791010061 100791010091 1 MVIS
100791010061 100791010301 1 MVIS
100791010061 100791010421 8 PMED
100791010061 100791010521 2 OPAT
100791010061 100791010911 1 MVIS
100791010061 100791010921 1 MVIS
100791010061 100791011671 8 PMED
100921020051 100921020171 8 PMED
100921050012 100921050042 8 PMED
100921050012 100921050062 8 PMED
101071010011 101071010031 8 PMED
101141010031 101141010071 1 MVIS
101141010031 101141010081 1 MVIS
101141010031 101141010261 8 PMED
101351010041 101351010321 8 PMED
101351010041 101351010331 8 PMED
101351010041 101351010411 1 MVIS
101351010041 101351010511 8 PMED
101351010041 101351010521 8 PMED
101351010041 101351010541 8 PMED
101491010011 101491010011 8 PMED
101491010011 101491010021 8 PMED
101491010011 101491010041 8 PMED
101491010011 101491010151 8 PMED
101491010011 101491010161 8 PMED
101701030011 101701030011 3 EROM
102171020081 102171020191 8 PMED
102211050011 102211050011 3 EROM
102211050011 102211050021 8 PMED
102211050011 102211050031 3 EROM
102221030011 102221030221 8 PMED
102231030011 102231030051 8 PMED
102261040011 102261040021 8 PMED
102331010021 102331010071 8 PMED
102331010021 102331010081 8 PMED
102331010021 102331010111 8 PMED
102431010061 102431010021 1 MVIS
102431010061 102431010091 1 MVIS
102431010061 102431010141 8 PMED
102551010031 102551010091 8 PMED
102551010031 102551010161 8 PMED
102551020011 102551020011 8 PMED
102551020011 102551020021 8 PMED
102551020011 102551020031 1 MVIS
102551020011 102551020041 8 PMED
102551020011 102551020051 8 PMED
102961010051 102961010011 8 PMED
102962020012 102962020012 1 MVIS
102962020012 102962020022 1 MVIS
102962020012 102962020042 8 PMED
102962020012 102962020052 8 PMED
102962020012 102962020062 2 OPAT
102962020012 102962020072 8 PMED
102962020012 102962020082 8 PMED
103161010241 103161011811 8 PMED
103161010241 103161011821 8 PMED
103631010071 103631010071 8 PMED
103631010071 103631010241 8 PMED
104021010021 104021010521 8 PMED
104131010011 104131010161 8 PMED
104131010011 104131010791 8 PMED
104161010041 104161010051 8 PMED
104161050011 104161050031 8 PMED
104611030012 104611030012 1 MVIS
104611030012 104611030052 8 PMED
104611030012 104611030062 8 PMED
104751020011 104751020041 8 PMED
104751030011 104751030061 8 PMED


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

Obs CONDIDX EVNTIDX EVENTYPE
1 100191020051 100191020041 8 PMED
2 100191020051 100191020191 8 PMED
3 100191020051 100191020341 1 MVIS
4 100341010121 100341010321 8 PMED
5 100791010061 100791010061 2 OPAT
6 100791010061 100791010071 2 OPAT
7 100791010061 100791010081 2 OPAT
8 100791010061 100791010091 1 MVIS
9 100791010061 100791010301 1 MVIS
10 100791010061 100791010421 8 PMED
11 100791010061 100791010521 2 OPAT
12 100791010061 100791010911 1 MVIS
13 100791010061 100791010921 1 MVIS
14 100791010061 100791011671 8 PMED
15 100921020051 100921020171 8 PMED
16 100921050012 100921050042 8 PMED
17 100921050012 100921050062 8 PMED
18 101071010011 101071010031 8 PMED
19 101141010031 101141010071 1 MVIS
20 101141010031 101141010081 1 MVIS
21 101141010031 101141010261 8 PMED
22 101351010041 101351010321 8 PMED
23 101351010041 101351010331 8 PMED
24 101351010041 101351010411 1 MVIS
25 101351010041 101351010511 8 PMED
26 101351010041 101351010521 8 PMED
27 101351010041 101351010541 8 PMED
28 101491010011 101491010011 8 PMED
29 101491010011 101491010021 8 PMED
30 101491010011 101491010041 8 PMED
31 101491010011 101491010151 8 PMED
32 101491010011 101491010161 8 PMED
33 101701030011 101701030011 3 EROM
34 102171020081 102171020191 8 PMED
35 102211050011 102211050011 3 EROM
36 102211050011 102211050021 8 PMED
37 102211050011 102211050031 3 EROM
38 102221030011 102221030221 8 PMED
39 102231030011 102231030051 8 PMED
40 102261040011 102261040021 8 PMED
41 102331010021 102331010071 8 PMED
42 102331010021 102331010081 8 PMED
43 102331010021 102331010111 8 PMED
44 102431010061 102431010021 1 MVIS
45 102431010061 102431010091 1 MVIS
46 102431010061 102431010141 8 PMED
47 102551010031 102551010091 8 PMED
48 102551010031 102551010161 8 PMED
49 102551020011 102551020011 8 PMED
50 102551020011 102551020021 8 PMED


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

Obs EVNTIDX EVENTYPE
1 100191020041 8 PMED
2 100191020191 8 PMED
3 100191020341 1 MVIS
4 100341010321 8 PMED
5 100791010061 2 OPAT
6 100791010071 2 OPAT
7 100791010081 2 OPAT
8 100791010091 1 MVIS
9 100791010301 1 MVIS
10 100791010421 8 PMED
11 100791010521 2 OPAT
12 100791010911 1 MVIS
13 100791010921 1 MVIS
14 100791011671 8 PMED
15 100921020171 8 PMED
16 100921050042 8 PMED
17 100921050062 8 PMED
18 101071010031 8 PMED
19 101141010071 1 MVIS
20 101141010081 1 MVIS
21 101141010261 8 PMED
22 101351010321 8 PMED
23 101351010331 8 PMED
24 101351010411 1 MVIS
25 101351010511 8 PMED
26 101351010521 8 PMED
27 101351010541 8 PMED
28 101491010011 8 PMED
29 101491010021 8 PMED
30 101491010041 8 PMED
31 101491010151 8 PMED
32 101491010161 8 PMED
33 101701030011 3 EROM
34 102171020191 8 PMED
35 102211050011 3 EROM
36 102211050021 8 PMED
37 102211050031 3 EROM
38 102221030221 8 PMED
39 102231030051 8 PMED
40 102261040021 8 PMED
41 102331010071 8 PMED
42 102331010081 8 PMED
43 102331010111 8 PMED
44 102431010021 1 MVIS
45 102431010091 1 MVIS
46 102431010141 8 PMED
47 102551010091 8 PMED
48 102551010161 8 PMED
49 102551020011 8 PMED
50 102551020021 8 PMED


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

Obs EVNTIDX EVENTYPE SEETLKPV OBXP16X PERWT16F
1 100191020341 1 MVIS 1 198.00 10510.93
2 100791010091 1 MVIS 1 642.05 12227.44
3 100791010301 1 MVIS 1 104.32 12227.44
4 100791010911 1 MVIS 1 134.00 12227.44
5 100791010921 1 MVIS 1 69.00 12227.44
6 101141010071 1 MVIS 1 292.84 11003.34
7 101141010081 1 MVIS 1 229.00 11003.34
8 101351010411 1 MVIS 1 441.00 45881.55
9 102431010021 1 MVIS 1 65.06 5931.09
10 102431010091 1 MVIS 1 54.19 5931.09
11 102551020031 1 MVIS 1 0.00 3399.47
12 102962020012 1 MVIS 1 62.08 3608.90
13 102962020022 1 MVIS 1 62.08 3608.90
14 104611030012 1 MVIS 1 345.00 13225.22
15 105691020011 1 MVIS 1 69.59 2160.84
16 106041040021 1 MVIS 1 77.15 3990.78
17 106311040051 1 MVIS 1 95.83 5282.05
18 106311040081 1 MVIS 1 48.07 5282.05
19 106311040101 1 MVIS 1 19.51 5282.05
20 106511020071 1 MVIS 1 1965.12 12197.49
21 106971040131 1 MVIS 1 6.11 6146.90
22 106971040141 1 MVIS 1 6.11 6146.90
23 106971040151 1 MVIS 1 6.11 6146.90
24 106971040171 1 MVIS 1 7.10 6146.90
25 107011010571 1 MVIS 1 200.90 2013.82
26 107011010581 1 MVIS 1 178.51 2013.82
27 107011010591 1 MVIS 1 200.90 2013.82
28 107011010601 1 MVIS 1 48.13 2013.82
29 107011010611 1 MVIS 1 47.65 2013.82
30 107011010621 1 MVIS 1 375.73 2013.82
31 107011010631 1 MVIS 1 380.31 2013.82
32 107011010641 1 MVIS 1 145.32 2013.82
33 107011010651 1 MVIS 1 122.09 2013.82
34 107011030051 1 MVIS 1 67.62 1878.76
35 107501030021 1 MVIS 1 118.12 1345.09
36 107591010021 1 MVIS 1 178.95 7720.68
37 107591010101 1 MVIS 1 111.90 7720.68
38 107591010111 1 MVIS 1 56.89 7720.68
39 107591010121 1 MVIS 1 111.90 7720.68
40 107591010131 1 MVIS 1 111.90 7720.68
41 107591010141 1 MVIS 1 59.71 7720.68
42 107591010251 1 MVIS 1 243.85 7720.68
43 107591010261 1 MVIS 1 126.08 7720.68
44 107591010271 1 MVIS 1 111.90 7720.68
45 107591010281 1 MVIS 1 75.92 7720.68
46 107591010291 1 MVIS 1 98.21 7720.68
47 107831030582 1 MVIS 1 88.40 10437.06
48 107932020012 1 MVIS 1 64.84 9453.25
49 108501040011 1 MVIS 1 127.47 14494.05
50 108801010101 1 MVIS 1 29.34 10112.52


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

Analysis Variable : OBXP16X SUM OF OBSF16X - OBOT16X (IMPUTED)

N Sum
1901 301092.55


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

Weighted

Analysis Variable : OBXP16X SUM OF OBSF16X - OBOT16X (IMPUTED)

N Sum
1901 2974136754

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