Desktop productivity for business analysts and programmers

ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 135
Accepted Solution

ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

 

 This is my log below;

 

Not sure what ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase. this means:

 

 

53 proc sql ;

54 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

55 CREATE TABLE &NAME..CLMEXT01 AS

56 SELECT * FROM CONNECTION TO tera

57 (SELECT

58 INST_CLM_LN.REND_PROVIDER AS RENDPROV,

59 INST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

60 INST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

61 INST_CLM_LN.PROV_TYPE AS PROVTYPE,

62 INST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

63 INST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

64 INST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT ,

65 INST_CLM_LN.CLM_END_SRVC_DT AS HENDDT ,

66 INST_CLM_HDR.CLM_FRM_CD AS CLMFORM,

67 INST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

68 INST_CLM_HDR.SETTLE_CUTOFF_DATE AS ORIGSTLM,

69 INST_CLM_HDR.T3_CNTRCT_IND AS T3IND

70

71 FROM

72 INST_CLM_LN INNER JOIN INST_CLM_HDR ON (INST_CLM_LN.CLM_BASE_ID=INST_CLM_HDR.CLM_BASE_ID and

73 INST_CLM_LN.CLM_ADJ_ID=INST_CLM_HDR.CLM_ADJ_ID and INST_CLM_LN.CLM_TRANS_TYP=INST_CLM_HDR.CLM_TRANS_TYP

74 and INST_CLM_LN.CHAP_CLM_SUB_NO=INST_CLM_HDR.CHAP_CLM_SUB_NO)

75

76 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

77 AND

78 INST_CLM_LN.CLM_ADJ_ID = '099'

79 AND

80 INST_CLM_HDR.T3_CNTRCT_IND = 'T7'

81 );

NOTE: Table THRUINC.CLMEXT01 created, with 24797 rows and 12 columns.

82

83 %PUT &SQLXMSG &SQLXRC;

0

84

NOTE: PROCEDURE SQL used (Total process time):

real time 3.62 seconds

cpu time 0.05 seconds

 

85 PROC PRINT UNIFORM DATA=&NAME..CLMEXT01 (OBS=10);

86 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT01.THRU1712.SASS";

87 TITLE2

88 "T7 ORIGINAL INST CLAIMS SETTLED DURING THE MONTH ENDING &DATE2";

89 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA10";

90 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT01.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

91

92

3 The SAS System

93 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA15 -*/

94

95 /*- USE THE HISTORICAL ZIP AREA ASSIGNMENT TABLE -*/

96 /*- NO LONGER NEED TO CREATE MY OWN -*/

97

98 /*- READ IN CURRENT MARKET AREA, MARKET & AREA FROM -*/

99 /*- THE HISTORICAL ZIP AREA ASSIGNMENT TABLE -*;*/

100

101 proc sql ;

102 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

103 CREATE TABLE ZIPAREA AS

104 SELECT * FROM CONNECTION TO tera

105 (SELECT

106 ZIP_AREA_ASGNMT.ZIP_CD AS ZIP,

107 ZIP_AREA_ASGNMT.EFCTV_DT AS STARTDT,

108 ZIP_AREA_ASGNMT.AREA_TYP_DESC AS AREATYP,

109 ZIP_AREA_ASGNMT.AREA_NAME AS AREA,

110 ZIP_AREA_ASGNMT.NTWRK_AREA_NAME AS NETAREA,

111 ZIP_AREA_ASGNMT.TRMNTN_DT AS ENDDT

112 FROM

113 ZIP_AREA_ASGNMT

114

115 );

NOTE: Table WORK.ZIPAREA created, with 12659 rows and 6 columns.

116

117 %PUT &SQLXMSG &SQLXRC;

0

118 /*-NONE SHOULD DUPE OUT -*/

119

NOTE: PROCEDURE SQL used (Total process time):

real time 0.11 seconds

cpu time 0.03 seconds

 

120 PROC SORT NODUPKEY DATA=ZIPAREA OUT=ZIPAREA;

121 BY ZIP STARTDT ENDDT; /*REMOVED MARKET, NO LONGER IN T2017*/

122 RUN;

NOTE: There were 12659 observations read from the data set WORK.ZIPAREA.

NOTE: 0 observations with duplicate key values were deleted.

NOTE: The data set WORK.ZIPAREA has 12659 observations and 6 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

 

123

124 PROC PRINT UNIFORM DATA=ZIPAREA (OBS=10);

125 TITLE1 "10 OBS FROM FACT003.A082633.ZIPAREA.THRU1712.SASS";

126 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA15";

127 RUN;

NOTE: There were 10 observations read from the data set WORK.ZIPAREA.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

4 The SAS System

 

128

129

130 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20 -*/

131

132 %LET DATE1 = 31JAN2018; /*- SETTLEMENT THROUGH DATE*/

133

134 %LET DATE1A = 01JAN2018; /*- FIRST PERIOD START DATE */

135 %LET DATE1B = 31MAR2018; /*- FIRST PERIOD END DATE -*/

136 %LET DATE2A = 01APR2018; /*- SECOND PERIOD START DATE -*/

137 %LET DATE2B = 30JUN2018; /*- SECOND PERIOD END DATE -*/

138 %LET DATE3A = 01JUL2018; /*- THIRD QUARTER START DATE -*/

139 %LET DATE3B = 30SEP2018; /*- THIRD QUARTER END DATE -*/

140 %LET DATE4A = 01OCT2018; /*- FOURTH QUARTER START DATE -*/

141 %LET DATE4B = 31DEC2018; /*- FOURTH QUARTER END DATE -*/

142

143

144 /*- COMBINE THIS MONTH'S CLMEXT01 TO LAST MONTH'S CLMEXT03 -*/

145 /*- TO GET THE ENTIRE OPTION PERIOD INST ORIGINAL CLAIMS -*/

146

147 DATA &NAME..CLMEXT02;

148 SET &NAME..CLMEXT01; /*REMOVED PRVMTH03*/

149 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT01.

NOTE: The data set THRUINC.CLMEXT02 has 24797 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

150

151 PROC SORT DATA=&NAME..CLMEXT02 OUT=CLMEXT03;

152 BY RENDPROV;

153 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT02.

NOTE: The data set WORK.CLMEXT03 has 24797 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

 

154

155 *- ADD RENDERING PROVIDER NAME & PCM INDICATOR TO THE INST FILE -*;

156

157 *- ADD RENDERING PROVIDER NAME FROM PROVIDER TABLES-*;

158 *- PROVIDER ADDRESS TYPE = 01 IS A BUSINESS LOCATION ADDRESS -*;

159 *- THIS SQL WAS WRITTEN WITH KAREN JACKSON TO ONLY GET ONE -*;

160 *- OBSERVATION PER PROVIDER ID. THIS SHOULD GIVE THE CURRENT -*;

161 *- DATA FOR EACH VALID ID - SEE EMAIL FROM JENNIFER ON 6/23/2010 -*;

162

163 proc sql ;

164 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

165 CREATE TABLE &NAME..PROV AS

166 SELECT * FROM CONNECTION TO tera

5 The SAS System

167 (SELECT

168 PRVDR_LOC_ID.LOC_PIMS_TYPE_12_NUM AS RENDPROV,

169 PRVDR_LOC.LOC_NAME AS RENDNAME,

170 PRVDR_LOC.ROLETYPE AS RENDROLE,

171 PRVDR_LOC_SPCLTY.LOC_SPCLTY_STRT_DT AS ROLEBEG,

172 PRVDR_LOC_SPCLTY.LOC_SPCLTY_END_DT AS ROLEEND

173 FROM

174 PRVDR_LOC_ID RIGHT OUTER JOIN PRVDR_LOC ON (PRVDR_LOC.LOC_UNIQ_ID=PRVDR_LOC_ID.LOC_UNIQ_ID)

175 LEFT OUTER JOIN PRVDR_LOC_SPCLTY ON (PRVDR_LOC.LOC_UNIQ_ID=PRVDR_LOC_SPCLTY.LOC_UNIQ_ID)

176

177 WHERE

178 PRVDR_LOC_SPCLTY.LOC_SPCLTY_END_DT IS NULL);

NOTE: Table THRUINC.PROV created, with 2937637 rows and 5 columns.

179

180

181 %PUT &SQLXMSG &SQLXRC;

0

NOTE: PROCEDURE SQL used (Total process time):

real time 4.94 seconds

cpu time 3.00 seconds

 

182 PROC PRINT UNIFORM DATA=&NAME..PROV (OBS=10); /*CHANGE BACK TO PROVNAME ONCE DONE TESTING*/

183 TITLE1 "PROVIDER TESTING";

184 TITLE2 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20";

185 RUN;

NOTE: There were 10 observations read from the data set THRUINC.PROV.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

186

187 /*- CREATE FILE WITH PCM INDICATOR TO BE ADDED TO PROVIDER FILE -*;*/

188 /*- CONSIDER PCM IF ROLE 01 OR 02 AS OF END OF REPORTING PERIOD -*;*/

189

190 DATA PROVPCM;

191 SET &NAME..PROV;

192

193 IF RENDROLE IN ('2' '3');

194 /*REMOVED ROLEEND >= "&DATE1"D AND ROLEBEG <= "&DATE1"D;*/

195 KEEP RENDPROV;

196 RUN;

NOTE: There were 2937637 observations read from the data set THRUINC.PROV.

NOTE: The data set WORK.PROVPCM has 2661463 observations and 1 variables.

NOTE: DATA statement used (Total process time):

real time 0.34 seconds

cpu time 0.35 seconds

 

197

198 PROC SORT NODUPKEY DATA=PROVPCM;

199 BY RENDPROV;

200 RUN;

6 The SAS System

 

NOTE: There were 2661463 observations read from the data set WORK.PROVPCM.

NOTE: 2661453 observations with duplicate key values were deleted.

NOTE: The data set WORK.PROVPCM has 10 observations and 1 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.41 seconds

cpu time 1.04 seconds

 

201

202 PROC SORT NODUPKEY DATA=&NAME..PROV;

203 BY RENDPROV;

204 RUN;

NOTE: There were 2937637 observations read from the data set THRUINC.PROV.

NOTE: 2937027 observations with duplicate key values were deleted.

NOTE: The data set THRUINC.PROV has 610 observations and 5 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.87 seconds

cpu time 1.53 seconds

 

205

206 DATA PROVNAME;

207 LENGTH PCMIND $1.;

208 MERGE &NAME..PROV (IN=INA) PROVPCM (IN=INB);

209 BY RENDPROV;

210 IF INA;

211

212 IF INA AND INB THEN PCMIND = 'Y';

213 ELSE

214 PCMIND = 'N';

215

216 KEEP RENDPROV RENDNAME PCMIND;

217

218 RUN;

NOTE: There were 610 observations read from the data set THRUINC.PROV.

NOTE: There were 10 observations read from the data set WORK.PROVPCM.

NOTE: The data set WORK.PROVNAME has 610 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

219

220 PROC PRINT UNIFORM DATA=PROVNAME (OBS=10); /*CHANGE BACK TO PROVNAME ONCE DONE TESTING*/

221 TITLE1 "10 OBS FROM FACT003.A082633.PROVNAME.THRU1712.SASS";

222 TITLE2 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20";

223 RUN;

NOTE: There were 10 observations read from the data set WORK.PROVNAME.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

7 The SAS System

224

225 /* MERGE TO ADD RENDERING PROVIDER NAME & PCM INDICATOR */

226

227 DATA &NAME..CLMEXT04;

228 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

229 MERGE CLMEXT03 (IN=INA) PROVNAME (IN=INB);

230

231 BY RENDPROV;

232

233 IF INA;

234

235 IF INA AND NOT INB THEN DO;

236 RENDNAME = 'UNKNOWN';

237 PCMIND = 'N';

238 END;

239

240 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 24797 observations read from the data set WORK.CLMEXT03.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set THRUINC.CLMEXT04 has 24797 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

241

242 /*- NEED WHEN FILES GET TOO BIG -*/

243

244 /*- SPLIT INST FILE TO MANAGABLE SIZES -*/

245

246 DATA &NAME..CLMEXT05 &NAME..CLMEXT06 &NAME..CLMEXT07 &NAME..CLMEXT08

247 CHECK;

248

249 SET &NAME..CLMEXT04;

250

251 IF "&DATE1A"D LE ORIGSTLM LE "&DATE1B"D

252 THEN OUTPUT &NAME..CLMEXT05;

253 ELSE

254 IF "&DATE2A"D LE ORIGSTLM LE "&DATE2B"D

255 THEN OUTPUT &NAME..CLMEXT06;

256 ELSE

257 IF "&DATE3A"D LE ORIGSTLM LE "&DATE3B"D

258 THEN OUTPUT &NAME..CLMEXT07;

259 ELSE

260 IF "&DATE4A"D LE ORIGSTLM LE "&DATE4B"D

261 THEN OUTPUT &NAME..CLMEXT08;

262 ELSE

263 OUTPUT CHECK;

264

265 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT04.

NOTE: The data set THRUINC.CLMEXT05 has 24797 observations and 14 variables.

8 The SAS System

NOTE: The data set THRUINC.CLMEXT06 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT07 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT08 has 0 observations and 14 variables.

NOTE: The data set WORK.CHECK has 0 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

 

266

267 /* ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE */

268 /* ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP */

269 /* FOR POSSIBLE FUTURE USE -*;

270 /* USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI")*/

271

272 PROC SQL;

273 CREATE TABLE &NAME..CLMEXT09 (SORTEDBY=_NULL_) AS

274 SELECT A.*, B.NETAREA AS PROVMANM, /*REMOVED B.MARKET AS PROVMKNM,*/

275 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

276 FROM &NAME..CLMEXT05 AS A LEFT JOIN ZIPAREA AS B

277 ON A.PROVZIP = B.ZIP AND

278 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT09 created, with 24797 rows and 17 columns.

279

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

280 PROC SQL;

281 CREATE TABLE &NAME..CLMEXT10(SORTEDBY=_NULL_) AS

282 SELECT A.*, B.NETAREA AS PROVMANM,

283 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

284 FROM &NAME..CLMEXT06 AS A LEFT JOIN ZIPAREA AS B

285 ON A.PROVZIP = B.ZIP AND

286 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT10 created, with 0 rows and 17 columns.

287

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

288 PROC SQL;

289 CREATE TABLE &NAME..CLMEXT11(SORTEDBY=_NULL_) AS

290 SELECT A.*, B.NETAREA AS PROVMANM,

291 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

292 FROM &NAME..CLMEXT07 AS A LEFT JOIN ZIPAREA AS B

293 ON A.PROVZIP = B.ZIP AND

294 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT11 created, with 0 rows and 17 columns.

295

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

9 The SAS System

cpu time 0.02 seconds

 

296 PROC SQL;

297 CREATE TABLE &NAME..CLMEXT12 (SORTEDBY=_NULL_) AS

298 SELECT A.*, B.NETAREA AS PROVMANM,

299 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

300 FROM &NAME..CLMEXT08 AS A LEFT JOIN ZIPAREA AS B

301 ON A.PROVZIP = B.ZIP AND

302 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT12 created, with 0 rows and 17 columns.

303

304

305 /*- SET BACK TOGETHER TO CREATE A COMPLETE INST FILE -*/

306 /*- SET CATEGORIES -*/

307 /*- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXT03.DATA -*/

308

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

309 DATA &NAME..CLMEXT13;

310 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.;

311 SET &NAME..CLMEXT09 &NAME..CLMEXT10 &NAME..CLMEXT11 &NAME..CLMEXT12;

312 IF PROVMANM = "" THEN DO;

313 PROVMANM = 'OUT OF REGION';

314 PROVARNM = 'OUT OF REGION';

315 PROVZPCT = 'OUT OF REGION';

316 END;

317 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT09.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT10.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT11.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT12.

NOTE: The data set THRUINC.CLMEXT13 has 24797 observations and 17 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

318

319 PROC PRINT UNIFORM DATA=&NAME..CLMEXT13 (OBS=10);

320 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT13.THRU1712.SASS";

321 TITLE2 "ORIGINAL CLAIM FROM INST CLAIMS SETTLED DURING PERIOD";

322 TITLE3 "WITH RENDPROV NAME";

323 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20";

324 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT13.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

10 The SAS System

 

325

326

327 /*FACT003.ROUTINE.T7-OP8(THRU1712) - JSA30 */

328

329 /*EXTRACT ALL NON-INST CLAIMS PROCESSED DURING THE PERIOD */

330 /*ORIGINAL CLAIMS ONLY (ADJ 099)*/

331

332 /*THIS DATASET IS FOR EDI AND CLAIM SELECTION FOR*/

333 /*DISCOUNT AND USAGE */

334

335

336 /*- CURRENT MONTH ONLY -*/

337

338 %LET DATE1 = '2018-01-01' ; /*- SETTLEMENT FROM DATE -*/

339 %LET DATE2 = '2018-01-31' ; /*- SETTLEMENT THRU DATE -*/

340

341 proc sql ;

342 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

343 CREATE TABLE &NAME..CLMEXT14 AS

344 SELECT * FROM CONNECTION TO tera

345 (SELECT

346 NINST_CLM_LN.REND_PROVIDER AS RENDPROV,

347 NINST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

348 NINST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

349 NINST_CLM_LN.PROV_TYPE AS PROVTYPE,

350 NINST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

351 NINST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

352 NINST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT,

353 NINST_CLM_LN.CLM_END_SRVC_DT AS HENDDT,

354 NINST_CLM_HDR.CLM_FRM_CD AS CLMFORM,

355 NINST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

356 NINST_CLM_HDR.SETTLE_CUTOFF_DATE AS ORIGSTLM,

357 NINST_CLM_HDR.T3_CNTRCT_IND AS T3IND

358

359 FROM

360 NINST_CLM_LN INNER JOIN NINST_CLM_HDR ON (NINST_CLM_LN.CLM_BASE_ID=NINST_CLM_HDR.CLM_BASE_ID and

361 NINST_CLM_LN.CLM_ADJ_ID=NINST_CLM_HDR.CLM_ADJ_ID and NINST_CLM_LN.CLM_TRANS_TYP=NINST_CLM_HDR.CLM_TRANS_TYP

362 and NINST_CLM_LN.CHAP_CLM_SUB_NO=NINST_CLM_HDR.CHAP_CLM_SUB_NO)

363

364 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

365 AND

366 NINST_CLM_LN.CLM_ADJ_ID = '099'

367 AND

368 NINST_CLM_HDR.T3_CNTRCT_IND = 'T7'

369 );

NOTE: Table THRUINC.CLMEXT14 created, with 547091 rows and 12 columns.

370

371 %PUT &SQLXMSG &SQLXRC;

0

372

373

NOTE: PROCEDURE SQL used (Total process time):

real time 12.69 seconds

cpu time 0.59 seconds

11 The SAS System

 

374 PROC PRINT UNIFORM DATA=&NAME..CLMEXT14 (OBS=10);

375 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT14.THRU1712.SASS";

376 TITLE2

377 "T7 ORIGINAL NON-INST CLAIMS SETTLED DURING THE MONTH ENDING &DATE2";

378 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA30";

379 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT14.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

380

381

382

383 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA40 -*/

384

385 %LET DATE1A = 01JAN2018 ; /*- FIRST PERIOD START DATE -*/

386 %LET DATE1B = 31MAR2018 ; /*- FIRST PERIOD END DATE -*/

387 %LET DATE2A = 01APR2018 ; /*- SECOND PERIOD START DATE -*/

388 %LET DATE2B = 30JUN2018 ; /*- SECOND PERIOD END DATE -*/

389 %LET DATE3A = 01JUL2018 ; /*- THIRD PERIOD START DATE -*/

390 %LET DATE3B = 30SEP2018 ; /*- THIRD PERIOD END DATE -*/

391 %LET DATE4A = 01OCT2018 ; /*- FOURTH PERIOD START DATE -*/

392 %LET DATE4B = 31DEC2018 ; /*- FOURTH PERIOD END DATE -*/

393 %LET DATE5A = 01JAN2019 ; /*- FIFTH PERIOD START DATE -*/

394 %LET DATE5B = 31MAR2019 ; /*- FIFTH PERIOD END DATE -*/

395 %LET DATE6A = 01APR2019 ; /*- SIXTH PERIOD START DATE -*/

396 %LET DATE6B = 30JUN2019 ; /*- SIXTH PERIOD END DATE -*/

397

398

399 /*- COMBINE THIS MONTH'S CLMEXT14 TO LAST MONTH'S CLMEXT16 -*/

400 /*- TO GET THE ENTIRE OPTION PERIOD INST ORIGINAL CLAIMS -*/

401

402 DATA CLMEXT15;

403 SET &NAME..CLMEXT14; /*REMOVED PRVMTH16*/

404 RUN;

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXT14.

NOTE: The data set WORK.CLMEXT15 has 547091 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.07 seconds

cpu time 0.07 seconds

 

405

406 PROC SORT DATA=CLMEXT15 OUT=CLMEXT16;

407 BY RENDPROV;

408 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXT15.

NOTE: The data set WORK.CLMEXT16 has 547091 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.15 seconds

12 The SAS System

cpu time 0.43 seconds

 

409

410 /*- ADD RENDERING PROVIDER NAME & PCM IND TO THE NON-INST FILE -*/

411

412 DATA CLMEXT17;

413 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

414 MERGE CLMEXT16 (IN=INA) PROVNAME (IN=INB);

415

416 BY RENDPROV;

417

418 IF INA;

419

420 IF INA AND NOT INB THEN DO;

421 RENDNAME = 'UNKNOWN';

422 PCMIND = 'N';

423 END;

424

425 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 547091 observations read from the data set WORK.CLMEXT16.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set WORK.CLMEXT17 has 547091 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.12 seconds

cpu time 0.12 seconds

 

426

427 /*- NEED WHEN FILES GET TOO BIG -*/

428

429 /*- SPLIT NON-INST FILE TO MANAGABLE SIZES -*/

430

431 DATA &NAME..CLMEXT18 &NAME..CLMEXT19

432 &NAME..CLMEXT20 &NAME..CLMEXT21

433 &NAME..CLMEXT22 &NAME..CLMEXT23 CHECK;

434

435 SET CLMEXT17;

436

437 IF "&DATE1A"D LE ORIGSTLM LE "&DATE1B"D

438 THEN OUTPUT &NAME..CLMEXT18;

439 ELSE

440 IF "&DATE2A"D LE ORIGSTLM LE "&DATE2B"D

441 THEN OUTPUT &NAME..CLMEXT19;

442 ELSE

443 IF "&DATE3A"D LE ORIGSTLM LE "&DATE3B"D

444 THEN OUTPUT &NAME..CLMEXT20;

445 ELSE

446 IF "&DATE4A"D LE ORIGSTLM LE "&DATE4B"D

447 THEN OUTPUT &NAME..CLMEXT21;

448 ELSE

449 IF "&DATE5A"D LE ORIGSTLM LE "&DATE5B"D

450 THEN OUTPUT &NAME..CLMEXT22;

13 The SAS System

451 ELSE

452 IF "&DATE6A"D LE ORIGSTLM LE "&DATE6B"D

453 THEN OUTPUT &NAME..CLMEXT23;

454 ELSE

455 OUTPUT CHECK;

456

457 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXT17.

NOTE: The data set THRUINC.CLMEXT18 has 547091 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT19 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT20 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT21 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT22 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT23 has 0 observations and 14 variables.

NOTE: The data set WORK.CHECK has 0 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.10 seconds

cpu time 0.10 seconds

 

458

459 /*- ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE -*/

460 /*- ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP -*/

461 /*- FOR POSSIBLE FUTURE USE -*/

462 /*- USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI") -*/

463

464 PROC SQL;

465 CREATE TABLE &NAME..CLMEXT24 (SORTEDBY=_NULL_) AS

466 SELECT A.*, B.NETAREA AS PROVMANM,

467 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

468 FROM &NAME..CLMEXT18 AS A LEFT JOIN ZIPAREA AS B

469 ON A.PROVZIP = B.ZIP AND

470 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT24 created, with 547091 rows and 17 columns.

471

NOTE: PROCEDURE SQL used (Total process time):

real time 0.38 seconds

cpu time 0.59 seconds

 

472 PROC SQL;

473 CREATE TABLE &NAME..CLMEXT25 (SORTEDBY=_NULL_) AS

474 SELECT A.*, B.NETAREA AS PROVMANM,

475 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

476 FROM &NAME..CLMEXT19 AS A LEFT JOIN ZIPAREA AS B

477 ON A.PROVZIP = B.ZIP AND

478 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT25 created, with 0 rows and 17 columns.

479

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

480 PROC SQL;

14 The SAS System

 

481 CREATE TABLE &NAME..CLMEXT26 (SORTEDBY=_NULL_) AS

482 SELECT A.*, B. NETAREA AS PROVMANM,

483 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

484 FROM &NAME..CLMEXT20 AS A LEFT JOIN ZIPAREA AS B

485 ON A.PROVZIP = B.ZIP AND

486 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT26 created, with 0 rows and 17 columns.

487

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

488 PROC SQL;

489 CREATE TABLE &NAME..CLMEXT27 (SORTEDBY=_NULL_) AS

490 SELECT A.*, B.NETAREA AS PROVMANM,

491 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

492 FROM &NAME..CLMEXT21 AS A LEFT JOIN ZIPAREA AS B

493 ON A.PROVZIP = B.ZIP AND

494 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT27 created, with 0 rows and 17 columns.

495

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.02 seconds

 

496 PROC SQL;

497 CREATE TABLE &NAME..CLMEXT28 (SORTEDBY=_NULL_) AS

498 SELECT A.*, B.NETAREA AS PROVMANM,

499 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

500 FROM &NAME..CLMEXT22 AS A LEFT JOIN ZIPAREA AS B

501 ON A.PROVZIP = B.ZIP AND

502 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT28 created, with 0 rows and 17 columns.

503

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

504 PROC SQL;

505 CREATE TABLE &NAME..CLMEXT29 (SORTEDBY=_NULL_) AS

506 SELECT A.*, B.NETAREA AS PROVMANM,

507 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

508 FROM &NAME..CLMEXT23 AS A LEFT JOIN ZIPAREA AS B

509 ON A.PROVZIP = B.ZIP AND

510 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT29 created, with 0 rows and 17 columns.

511

512

513 /*- SET BACK TOGETHER TO CREATE A COMPLETE NON-INST FILE -*/

15 The SAS System

514 /*- SET CATEGORIES -*/

515 /*- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXT16.DATA -*/

516

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

517 DATA &NAME..CLMEXT70;

518 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.;

519 SET &NAME..CLMEXT24 &NAME..CLMEXT25

520 &NAME..CLMEXT26 &NAME..CLMEXT27

521 &NAME..CLMEXT28 &NAME..CLMEXT29;

522

523 IF PROVMANM = "" THEN DO;

524 PROVMANM = 'OUT OF REGION';

525 PROVARNM = 'OUT OF REGION';

526 PROVZPCT = 'OUT OF REGION';

527 END;

528 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXT24.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT25.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT26.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT27.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT28.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT29.

NOTE: The data set THRUINC.CLMEXT70 has 547091 observations and 17 variables.

NOTE: DATA statement used (Total process time):

real time 0.14 seconds

cpu time 0.15 seconds

 

529

530 PROC PRINT UNIFORM DATA=&NAME..CLMEXT70 (OBS=10);

531 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT70.THRU1712.SASS";

532 TITLE2 "ORIGINAL CLAIM FROM NINST CLAIMS SETTLED DURING PERIOD";

533 TITLE3 "WITH RENDPROV NAME";

534 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA40";

535 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT70.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

536

537

538 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA50 -*/

539

540 /*- CREATE A DATASET OF ALL CLAIM NUMBERS FROM JSA20 & JSA40 -*/

541 /*- TO BE USED IN THE EXTRACTS FOR DISCOUNTS & USAGE -*/

542

543 DATA TEMP;

16 The SAS System

544 SET &NAME..CLMEXT13 (KEEP=CLMNBR ORIGSTLM)

545 &NAME..CLMEXT70 (KEEP=CLMNBR ORIGSTLM);

546 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT13.

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXT70.

NOTE: The data set WORK.TEMP has 571888 observations and 2 variables.

NOTE: DATA statement used (Total process time):

real time 0.07 seconds

cpu time 0.07 seconds

 

547

548 PROC SORT NODUPKEY DATA=TEMP OUT=CLMEXT71;

549 BY CLMNBR;

550 RUN;

NOTE: There were 571888 observations read from the data set WORK.TEMP.

NOTE: 270462 observations with duplicate key values were deleted.

NOTE: The data set WORK.CLMEXT71 has 301426 observations and 2 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.09 seconds

cpu time 0.32 seconds

 

551

552

553

554 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ10 -*/

555

556 /*- CLAIMS EXTRACT FOR DISCOUNT & USAGE INCENTIVE -*/

557

558 /*- GET THE MOST RECENT ADJUSTMENTS FOR INSTITUTIONAL -*/

559 /*- CLAIMS SETTLED DURING THE CURRENT MONTH -*/

560

561 /*- CURRENT MONTH ONLY -*/

562 %LET DATE1 = '2018-01-01' ; /*- SETTLEMENT START DATE -*/

563 %LET DATE3 = '2018-01-31' ; /*- SETTLEMENT THRU DATE -*/

564

565 proc sql ;

566 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

567 CREATE TABLE &NAME..CLMEXZ01 AS

568 SELECT * FROM CONNECTION TO tera

569 (SELECT

570 INST_CLM_LN.CLM_LINE_ID AS CLMLN,

571 INST_CLM_LN.CLM_BGN_SRVC_DT AS LBEGDT,

572 INST_CLM_LN.CLM_END_SRVC_DT AS LENDDT,

573 INST_CLM_LN.MCS_AT_RISK AS RISKIND,

574 INST_CLM_LN.PROV_TOT_CHRG AS LBILL,

575 INST_CLM_LN.ALLOWED_CHRG AS LALLOW,

576 INST_CLM_LN.PAYMENT_AMT AS LPAID,

577 INST_CLM_LN.PRE_DSCNT_ALWD_AMT AS LPREDSC,

578 INST_CLM_LN.TMA_NET_PRVDR_DSCNT_AMT AS LTMAANPD,

579 INST_CLM_LN.ADJ_PRE_DSCNT_ALWD_AMT AS LADJPREDSC,

580 INST_CLM_LN.TMA_OHI_AMT AS LTMAOHI,

581 INST_CLM_LN.NO_SERVICES AS LNOSVCS,

582 INST_CLM_LN.REND_PROVIDER AS RENDPROV,

17 The SAS System

583 INST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

584 INST_CLM_LN.PROVIDER_ID AS PROVID,

585 INST_CLM_LN.PRVDR_NAME AS BILLNAME,

586 INST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

587 INST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

588 INST_CLM_LN.PROV_TYPE AS PROVTYPE,

589 INST_CLM_LN.TMA_ENRLMT_HLTH_CD AS TMAENRCD,

590 INST_CLM_LN.HOSP_PROF_SERV AS HOSOPSVC,

591 INST_CLM_LN.PLAN_CVRG_OPTN_CD AS PLANCOPT,

592 INST_CLM_LN.MCS_SYSTEM_IND AS INOUTREG,

593 INST_CLM_LN.DRVD_MCS_OPTN_IND AS CLMCLS,

594 INST_CLM_LN.TMA_PLACE_TRTMT_CD AS TMAPOS,

595 INST_CLM_LN.HCSR_SPC_PRCS_1_CD AS SSPPROC1,

596 INST_CLM_LN.HCSR_SPC_PRCS_2_CD AS SSPPROC2,

597 INST_CLM_LN.HCSR_SPC_PRCS_3_CD AS SSPPROC3,

598 INST_CLM_LN.HCSR_SPC_PRCS_4_CD AS SSPPROC4,

599 INST_CLM_LN.PRVDR_TXMY_CD AS PROVTXMY,

600 INST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

601 INST_CLM_HDR.CHAP_CLM_SUB_NO AS SUBNBR,

602 INST_CLM_HDR.CLM_ADJ_ID AS CLMADJ,

603 INST_CLM_HDR.CLM_TRANS_TYP AS TRANSTYP,

604 INST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT,

605 INST_CLM_HDR.CLM_END_SRVC_DT AS HENDDT,

606 INST_CLM_HDR.DRG_DIAG1_CD AS DIAG1,

607 INST_CLM_HDR.SPON_STATUS AS SPSTAT,

608 INST_CLM_HDR.PATNT_SEX_REL_CODE AS PTSXREL,

609 INST_CLM_HDR.SETTLE_CUTOFF_DATE AS DTPROC,

610 INST_CLM_HDR.ADMIT_SRVC_DT AS ADMITDT,

611 INST_CLM_HDR.PROV_TOT_CHRG AS HBILL,

612 INST_CLM_HDR.ALLOWED_CHRG AS HALLOW,

613 INST_CLM_HDR.PAYMENT_AMT AS HPAID,

614 INST_CLM_HDR.OTH_CARR_PAY AS HOHIPAID,

615 INST_CLM_HDR.PRE_DSCNT_ALWD_AMT AS HPREDSC,

616 INST_CLM_LN.PB_ADJ_PRE_DSCNT_ALWD_AMT AS LPBADJPREDSC,

617 INST_CLM_HDR.DEBIT_CREDIT_CD AS HDEBITCREDIT,

618 INST_CLM_HDR.T3_CRED_ADJST_RFND_RSN_CD AS HCREDADJCD,

619 INST_CLM_HDR.TMA_NET_PRVDR_DSCNT_AMT AS HTMAANPD,

620 INST_CLM_HDR.ADJ_PRE_DSCNT_ALWD_AMT AS HADJPREDSC,

621 INST_CLM_HDR.ROOM_BRD_IND AS ROOMBRD,

622 INST_CLM_HDR.PATNT_STATE AS BENEST,

623 INST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

624 INST_CLM_HDR.T3_CNTRCT_IND AS T3IND

625

626 FROM

627 INST_CLM_LN INNER JOIN INST_CLM_HDR ON (INST_CLM_LN.CLM_BASE_ID=INST_CLM_HDR.CLM_BASE_ID

628 and INST_CLM_LN.CLM_ADJ_ID=INST_CLM_HDR.CLM_ADJ_ID and

629 INST_CLM_LN.CLM_TRANS_TYP=INST_CLM_HDR.CLM_TRANS_TYP and

630 INST_CLM_LN.CHAP_CLM_SUB_NO=INST_CLM_HDR.CHAP_CLM_SUB_NO)

631

632 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

633 AND

634 INST_CLM_LN.CLM_ADJ_ID = '099'

635 AND

636 INST_CLM_HDR.T3_CNTRCT_IND = 'T7'

637 );

NOTE: Table THRUINC.CLMEXZ01 created, with 24797 rows and 55 columns.

18 The SAS System

638

639 %PUT &SQLXMSG &SQLXRC;

0

641

NOTE: PROCEDURE SQL used (Total process time):

real time 5.89 seconds

cpu time 0.08 seconds

 

642 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ01 (OBS=10);

643 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ01.THRU1712.SASS";

644 TITLE2

645 "MOST RECENT ADJ OF ALL INST CLAIMS SETTLED DURING PERIOD";

646 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ10";

647 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXZ01.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

648

649

650

651 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ20 -*/

652

653 /*- COMBINE THIS MONTH'S CLMEXZ01 TO LAST MONTH'S CLMEXZ02 -*/

654 /*- TO GET THE ENTIRE OPTION PERIOD INST ORIGINAL CLAIMS -*/

655

656 DATA &NAME..CLMEXZ02;

657 SET &NAME..CLMEXZ01; /*REMOVED PRVMNTH4*/

658 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXZ01.

NOTE: The data set THRUINC.CLMEXZ02 has 24797 observations and 55 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

659

660 PROC SORT DATA=&NAME..CLMEXZ02 OUT=CLMEXZ03;

661 BY CLMNBR CLMLN CLMADJ;

662 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXZ02.

NOTE: The data set WORK.CLMEXZ03 has 24797 observations and 55 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

663

664 /*- KEEP ONLY T7 MINIUM ADJUSTMENT -*/

665 /*- TO BE USED IN QUARTERLY DISCOUNT & OHI REPORTS -*/

666

19 The SAS System

667 DATA CLMEXZ04;

668 SET CLMEXZ03;

669 BY CLMNBR CLMLN CLMADJ;

670 IF FIRST.CLMLN AND T3IND = 'T7';

671 RUN;

NOTE: There were 24797 observations read from the data set WORK.CLMEXZ03.

NOTE: The data set WORK.CLMEXZ04 has 24797 observations and 55 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

672

673 /*- KEEP ONLY ALLOWED > $0 & UNDERWRITTEN FOR DISCOUNT & USAGE -*/

674 /*- CHANGED FROM PAID > $0 BASED ON EMAIL FROM RYAN CURRIER OF -*/

675 /*- TMA ON 08/08/2012 -*/

676

677 DATA &NAME..CLMEXZ05;

678 SET CLMEXZ04;

679 WHERE HALLOW > 0 AND

680 RISKIND = 'Y';

681 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ04.

WHERE (HALLOW>0) and (RISKIND='Y');

NOTE: The data set THRUINC.CLMEXZ05 has 13478 observations and 55 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

 

682

683 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ05 (OBS=20);

684 TITLE1 "20 OBS FROM FACT003.A082633.CLMEXZ05.THRU1712.SASS";

685 TITLE2 "MOST RECENT ADJ OF INST CLAIMS SETTLED DURING OP";

686 TITLE3 "T7 - ALLOWED - UNDERWRITTEN - SORTED BY CLAIM NUMBER";

687 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ20";

688 RUN;

NOTE: There were 20 observations read from the data set THRUINC.CLMEXZ05.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.05 seconds

cpu time 0.06 seconds

 

689

690

691 *- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ30 -*;

692

693 *- MERGE TO DATASET FROM JSA50 TO KEEP ONLY CLAIMS -*;

694 *- ORIGINALLY SETTLED DURING PERIOD WITH A T7 INDICATOR -*;

695

696 DATA CLMEXZ06;

697 MERGE CLMEXT71 (IN=INA) &NAME..CLMEXZ05 (IN=INB);

698 BY CLMNBR;

699 IF INA AND INB;

20 The SAS System

700

701 ORGMOP = PUT(ORIGSTLM,YYMMD7.);

702

703 RUN;

NOTE: There were 301426 observations read from the data set WORK.CLMEXT71.

NOTE: There were 13478 observations read from the data set THRUINC.CLMEXZ05.

NOTE: The data set WORK.CLMEXZ06 has 13478 observations and 57 variables.

NOTE: DATA statement used (Total process time):

real time 0.06 seconds

cpu time 0.06 seconds

 

704

705 *- SORT BY RENDPROV FOR NEXT STEP -*;

706

707 PROC SORT DATA=CLMEXZ06 OUT=CLMEXZ07;

708 BY RENDPROV;

709 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ06.

NOTE: The data set WORK.CLMEXZ07 has 13478 observations and 57 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

 

710

711 PROC PRINT UNIFORM DATA=CLMEXZ07 (OBS=10);

712 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ07.THRU1712.SASS";

713 TITLE2 "MOST RECENT ADJ OF T7 INST CLAIMS SETTLED DURING PERIOD";

714 TITLE3 "PAID - UNDERWRITTEN - IN JSA50";

715 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ30";

716 RUN;

NOTE: There were 10 observations read from the data set WORK.CLMEXZ07.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

717

718

719 *- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ40 -*;

720

721 %LET DATE1A = 01JAN2018 ; *- FIRST PERIOD START DATE -*;

722 %LET DATE1B = 31MAR2018 ; *- FIRST PERIOD END DATE -*;

723 %LET DATE2A = 01APR2018 ; *- SECOND PERIOD START DATE -*;

724 %LET DATE2B = 30JUN2018 ; *- SECOND PERIOD END DATE -*;

725 %LET DATE3A = 01JUL2018 ; *- THIRD PERIOD START DATE -*;

726 %LET DATE3B = 30SEP2018 ; *- THIRD PERIOD END DATE -*;

727 %LET DATE4A = 01OCT2018 ; *- FOURTH PERIOD START DATE -*;

728 %LET DATE4B = 31DEC2018 ; *- FOURTH PERIOD END DATE -*;

729 %LET DATE5A = 01JAN2019 ; *- FIFTH PERIOD START DATE -*;

730 %LET DATE5B = 31MAR2019 ; *- FIFTH PERIOD END DATE -*;

731

732 %LET SPECCD= ('261Q00000X' '261QA0005X' '261QA0006X' '261QA0600X'

21 The SAS System

733 '261QA0900X' '261QA1903X' '261QA3000X' '261QC0050X'

734 '261QC1500X' '261QC1800X' '261QD1600X' '261QE0002X'

735 '261QE0700X' '261QE0800X' '261QF0050X' '261QG0250X'

736 '261QH0100X' '261QH0700X' '261QI0500X' '261QL0400X'

737 '261QM0850X' '261QM0855X' '261QM1103X' '261QM2500X'

738 '261QM2800X' '261QM3000X' '261QP2400X' '261QX0200X'

739 '273100000X' '273R00000X' '273Y00000X' '275N00000X'

740 '276400000X' '281P00000X' '281PC2000X' '282N00000X'

741 '282NC0060X' '282NC2000X' '282NR1301X' '282NW0100X'

742 '283Q00000X' '283X00000X' '283XC2000X' '284300000X'

743 '286500000X' '2865C1500X' '2865M2000X' '2865X1600X'

744 '310400000X' '3104A0625X' '3104A0630X' '310500000X'

745 '311500000X' '311Z00000X' '311ZA0620X' '313M00000X'

746 '314000000X' '3140N1450X' '315D00000X' '315P00000X'

747 '317400000X' '320600000X' '320700000X' '320800000X'

748 '320900000X' '322D00000X' '323P00000X' '324500000X'

749 '3245S0500X' '385H00000X' '385HR2050X' '385HR2055X'

750 '385HR2060X' '385HR2065X');

751

752

753 *- ADD RENDERING PROVIDER NAME TO THE INST FILE -*;

754 *- ADD RENDERING PROVIDER MARKET -*;

755

756 *- MERGE TO ADD RENDERING PROVIDER NAME -*;

757

758 DATA &NAME..CLMEXZ08;

759 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

760 MERGE CLMEXZ07 (IN=INA) PROVNAME (IN=INB);

761

762 BY RENDPROV;

763

764 IF INA;

765

766 IF INA AND NOT INB THEN DO;

767 RENDNAME = 'UNKNOWN';

768 PCMIND = 'N';

769 END;

770

771 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ07.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set THRUINC.CLMEXZ08 has 13478 observations and 59 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

772

773 *- NEED WHEN FILES GET TOO BIG -*;

774

775 *- SPLIT INST FILE TO MANAGABLE SIZES -*;

776

777 DATA &NAME..CLMEXZ09 &NAME..CLMEXZ10 &NAME..CLMEXZ11 &NAME..CLMEXZ12

22 The SAS System

778 &NAME..CLMEXZ13 CHECK;

779

780 SET &NAME..CLMEXZ08;

781

782 IF "&DATE1A"D LE DTPROC LE "&DATE1B"D

783 THEN OUTPUT &NAME..CLMEXZ09;

784 ELSE

785 IF "&DATE2A"D LE DTPROC LE "&DATE2B"D

786 THEN OUTPUT &NAME..CLMEXZ10;

787 ELSE

788 IF "&DATE3A"D LE DTPROC LE "&DATE3B"D

789 THEN OUTPUT &NAME..CLMEXZ11;

790 ELSE

791 IF "&DATE4A"D LE DTPROC LE "&DATE4B"D

792 THEN OUTPUT &NAME..CLMEXZ12;

793 ELSE

794 IF "&DATE5A"D LE DTPROC LE "&DATE5B"D

795 THEN OUTPUT &NAME..CLMEXZ13;

796 ELSE

797 OUTPUT CHECK;

798

799 RUN;

NOTE: There were 13478 observations read from the data set THRUINC.CLMEXZ08.

NOTE: The data set THRUINC.CLMEXZ09 has 13478 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ10 has 0 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ11 has 0 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ12 has 0 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ13 has 0 observations and 59 variables.

NOTE: The data set WORK.CHECK has 0 observations and 59 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

800

801 *- ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE -*;

802 *- ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP -*;

803 *- FOR POSSIBLE FUTURE USE -*;

804 *- USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI") -*;

805

806 PROC SQL;

807 CREATE TABLE &NAME..CLMEXZ14 (SORTEDBY=_NULL_) AS

808 SELECT A.*, B.NETAREA AS PROVMANM,

809 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

810 FROM &NAME..CLMEXZ09 AS A LEFT JOIN ZIPAREA AS B

811 ON A.PROVZIP = B.ZIP AND

812 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ14 created, with 13478 rows and 62 columns.

813

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

814 PROC SQL;

23 The SAS System

815 CREATE TABLE &NAME..CLMEXZ15 (SORTEDBY=_NULL_) AS

816 SELECT A.*, B.NETAREA AS PROVMANM,

817 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

818 FROM &NAME..CLMEXZ10 AS A LEFT JOIN ZIPAREA AS B

819 ON A.PROVZIP = B.ZIP AND

820 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ15 created, with 0 rows and 62 columns.

821

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

822 PROC SQL;

823 CREATE TABLE &NAME..CLMEXZ16 (SORTEDBY=_NULL_) AS

824 SELECT A.*, B.NETAREA AS PROVMANM,

825 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

826 FROM &NAME..CLMEXZ11 AS A LEFT JOIN ZIPAREA AS B

827 ON A.PROVZIP = B.ZIP AND

828 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ16 created, with 0 rows and 62 columns.

829

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

830 PROC SQL;

831 CREATE TABLE &NAME..CLMEXZ17(SORTEDBY=_NULL_) AS

832 SELECT A.*, B.NETAREA AS PROVMANM,

833 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

834 FROM &NAME..CLMEXZ12 AS A LEFT JOIN ZIPAREA AS B

835 ON A.PROVZIP = B.ZIP AND

836 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ17 created, with 0 rows and 62 columns.

837

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

838 PROC SQL;

839 CREATE TABLE &NAME..CLMEXZ18 (SORTEDBY=_NULL_) AS

840 SELECT A.*, B.NETAREA AS PROVMANM,

841 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

842 FROM &NAME..CLMEXZ13 AS A LEFT JOIN ZIPAREA AS B

843 ON A.PROVZIP = B.ZIP AND

844 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ18 created, with 0 rows and 62 columns.

845

846 *- SET BACK TOGETHER TO CREATE A COMPLETE INST FILE -*;

847 *- SET CATEGORIES -*;

848 *- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXZ05.DATA -*;

24 The SAS System

849

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

850 DATA &NAME..CLMEXZ19;

851 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.

852 FILE $17. LINK $9. NET $11. MD $1.;

853 SET &NAME..CLMEXZ14 &NAME..CLMEXZ15 &NAME..CLMEXZ16

854 &NAME..CLMEXZ17 &NAME..CLMEXZ18;

855

856 IF PROVMANM = "" THEN DO;

857 PROVMANM = 'OUT OF REGION';

858 PROVARNM = 'OUT OF REGION';

859 PROVZPCT = 'OUT OF REGION';

860 END;

861

862 FILE='INSTITUTIONAL';

863

864 IF HOSOPSVC = '1' AND TEDPRVST = 'MD' THEN MD='Y';

865 ELSE

866 IF PROVTXMY IN &SPECCD AND TEDPRVST = 'MD' THEN MD='Y';

867 ELSE

868 MD='N';

869

870 IF TMAENRCD = 'U' THEN LINK = 'CIVILIAN';

871 ELSE

872 IF TMAENRCD = 'Z' THEN LINK = 'MTF';

873 ELSE

874 LINK = TMAENRCD;

875

876 IF INOUTREG='I' THEN NET = 'NETWORK';

877 ELSE

878 IF INOUTREG='O' THEN NET = 'NON-NETWORK';

879 ELSE

880 NET = INOUTREG;

881

882 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 13478 observations read from the data set THRUINC.CLMEXZ14.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ15.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ16.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ17.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ18.

NOTE: The data set THRUINC.CLMEXZ19 has 13478 observations and 66 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

883

884 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ19 (OBS=10);

885 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ19.THRU1712.SASS";

886 TITLE2 "MOST RECENT ADJ OF T7 INST CLAIMS SETTLED DURING PERIOD";

25 The SAS System

887 TITLE3 "PAID - UNDERWRITTEN - W/CATEGORIES & RENDPROV NAME";

888 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ40";

889 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXZ19.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

890

891

892 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ50 -*/

893

894 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ60 -*\

895

896 /*- CLAIMS EXTRACT FOR DISCOUNT & USAGE INCENTIVE*\

897

898 /*- GET THE MOST RECENT ADJUSTMENTS FOR ALL NON-INSTITUTIONAL*/

899 /*- CLAIMS SETTLED DURING THE CURRENT MONTH*/

900

901 /*- CURRENT MONTH ONLY*/

902

903 %LET DATE1 = '2018-01-01' ; /*- SETTLEMENT FROM DATE*/

904 %LET DATE3 = '2018-01-31' ; /*- SETTLEMENT THRU DATE*/

905

906

907 proc sql ;

908 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

909 CREATE TABLE &NAME..CLMEXZ21 AS

910 SELECT * FROM CONNECTION TO tera

911 (SELECT

912 NINST_CLM_LN.CLM_LINE_ID AS CLMLN,

913 NINST_CLM_LN.CLM_BGN_SRVC_DT AS LBEGDT,

914 NINST_CLM_LN.CLM_END_SRVC_DT AS LENDDT,

915 NINST_CLM_LN.MCS_AT_RISK AS RISKIND,

916 NINST_CLM_LN.PROV_TOT_CHRG AS LBILL,

917 NINST_CLM_LN.ALLOWED_CHRG AS LALLOW,

918 NINST_CLM_LN.PAYMENT_AMT AS LPAID,

919 NINST_CLM_LN.PRE_DSCNT_ALWD_AMT AS LPREDSC,

920 NINST_CLM_LN.TMA_NET_PRVDR_DSCNT_AMT AS LTMAANPD,

921 NINST_CLM_LN.ADJ_PRE_DSCNT_ALWD_AMT AS LADJPREDSC,

922 NINST_CLM_LN.TMA_OHI_AMT AS LTMAOHI,

923 NINST_CLM_LN.NO_SERVICES AS LNOSVCS,

924 NINST_CLM_LN.REND_PROVIDER AS RENDPROV,

925 NINST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

926 NINST_CLM_LN.PROVIDER_ID AS PROVID,

927 NINST_CLM_LN.PRVDR_NAME AS BILLNAME,

928 NINST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

929 NINST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

930 NINST_CLM_LN.PROV_TYPE AS PROVTYPE,

931 NINST_CLM_LN.TMA_ENRLMT_HLTH_CD AS TMAENRCD,

932 NINST_CLM_LN.HOSP_PROF_SERV AS HOSOPSVC,

933 NINST_CLM_LN.PLAN_CVRG_OPTN_CD AS PLANCOPT,

934 NINST_CLM_LN.MCS_SYSTEM_IND AS INOUTREG,

935 NINST_CLM_LN.DRVD_MCS_OPTN_IND AS CLMCLS,

936 NINST_CLM_LN.TMA_PLACE_TRTMT_CD AS TMAPOS,

26 The SAS System

937 NINST_CLM_LN.HCSR_SPC_PRCS_1_CD AS SSPPROC1,

938 NINST_CLM_LN.HCSR_SPC_PRCS_2_CD AS SSPPROC2,

939 NINST_CLM_LN.HCSR_SPC_PRCS_3_CD AS SSPPROC3,

940 NINST_CLM_LN.HCSR_SPC_PRCS_4_CD AS SSPPROC4,

941 NINST_CLM_LN.PRVDR_TXMY_CD AS PROVTXMY,

942 NINST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

943 NINST_CLM_HDR.CHAP_CLM_SUB_NO AS SUBNBR,

944 NINST_CLM_HDR.CLM_ADJ_ID AS CLMADJ,

945 NINST_CLM_HDR.CLM_TRANS_TYP AS TRANSTYP,

946 NINST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT,

947 NINST_CLM_HDR.CLM_END_SRVC_DT AS HENDDT,

948 NINST_CLM_HDR.DRG_DIAG1_CD AS DIAG1,

949 NINST_CLM_HDR.SPON_STATUS AS SPSTAT,

950 NINST_CLM_HDR.PATNT_SEX_REL_CODE AS PTSXREL,

951 NINST_CLM_HDR.SETTLE_CUTOFF_DATE AS DTPROC,

952 NINST_CLM_HDR.PROV_TOT_CHRG AS HBILL,

953 NINST_CLM_HDR.ALLOWED_CHRG AS HALLOW,

954 NINST_CLM_HDR.PAYMENT_AMT AS HPAID,

955 NINST_CLM_HDR.OTH_CARR_PAY AS HOHIPAID,

956 NINST_CLM_HDR.PRE_DSCNT_ALWD_AMT AS HPREDSC,

957 NINST_CLM_LN.PB_ADJ_PRE_DSCNT_ALWD_AMT AS LPBADJPREDSC,

958 NINST_CLM_HDR.DEBIT_CREDIT_CD AS HDEBITCREDIT,

959 NINST_CLM_HDR.T3_CRED_ADJST_RFND_RSN_CD AS HCREDADJCD,

960 NINST_CLM_HDR.TMA_NET_PRVDR_DSCNT_AMT AS HTMAANPD,

961 NINST_CLM_HDR.ADJ_PRE_DSCNT_ALWD_AMT AS HADJPREDSC,

962 NINST_CLM_HDR.ROOM_BRD_IND AS ROOMBRD,

963 NINST_CLM_HDR.PATNT_STATE AS BENEST,

964 NINST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

965 NINST_CLM_HDR.T3_CNTRCT_IND AS T3IND

966

967 FROM

968 NINST_CLM_HDR INNER JOIN NINST_CLM_LN ON

969 (NINST_CLM_HDR.CLM_BASE_ID=NINST_CLM_LN.CLM_BASE_ID and NINST_CLM_HDR.CLM_ADJ_ID=NINST_CLM_LN.CLM_ADJ_ID

970 and NINST_CLM_HDR.CLM_TRANS_TYP=NINST_CLM_LN.CLM_TRANS_TYP and

971 NINST_CLM_HDR.CHAP_CLM_SUB_NO=NINST_CLM_LN.CHAP_CLM_SUB_NO)

972

973

974

975 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

976 AND

977 NINST_CLM_LN.CLM_ADJ_ID = '099'

978 AND

979 NINST_CLM_HDR.T3_CNTRCT_IND = 'T7'

980 );

NOTE: Table THRUINC.CLMEXZ21 created, with 547091 rows and 54 columns.

981

982 %PUT &SQLXMSG &SQLXRC;

0

983

984

985

NOTE: PROCEDURE SQL used (Total process time):

real time 17.18 seconds

cpu time 1.42 seconds

 

986 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ21 (OBS=20);

27 The SAS System

 

987 TITLE1 "20 OBS FROM FACT003.A082633.CLMEXZ21.THRU1712.SASS";

988 TITLE2 "MOST RECENT ADJ NINST CLMS SETTLED &DATE1 - &DATE3";

989 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ60";

990 RUN;

NOTE: There were 20 observations read from the data set THRUINC.CLMEXZ21.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.05 seconds

cpu time 0.06 seconds

 

991

992

993 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ70 -*/

994

995 /*- COMBINE THIS MONTH'S CLMEXZ21 TO LAST MONTH'S CLMEXZ24 -*/

996 /*- TO GET THE ENTIRE OPTION PERIOD NON-INST ORIGINAL CLAIMS -*/

997

998 DATA CLMEXZ22;

999 SET &NAME..CLMEXZ21; /*REMOVED PRVMTH24*/

1000 RUN;

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXZ21.

NOTE: The data set WORK.CLMEXZ22 has 547091 observations and 54 variables.

NOTE: DATA statement used (Total process time):

real time 0.21 seconds

cpu time 0.22 seconds

 

1001

1002 PROC SORT DATA=CLMEXZ22 OUT=CLMEXZ23;

1003 BY CLMNBR CLMLN CLMADJ;

1004 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXZ22.

NOTE: The data set WORK.CLMEXZ23 has 547091 observations and 54 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.30 seconds

cpu time 0.71 seconds

 

1005

1006 /*- KEEP ONLY MINIUM ADJUSTMENT -*/

1007 /*- TO BE USED IN QUARTERLY DISCOUNT & OHI REPORTS -*/

1008

1009 DATA &NAME..CLMEXZ24;

1010 SET CLMEXZ23;

1011 BY CLMNBR CLMLN CLMADJ;

1012 IF FIRST.CLMLN AND T3IND = 'T7';

1013 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXZ23.

NOTE: The data set THRUINC.CLMEXZ24 has 547091 observations and 54 variables.

NOTE: DATA statement used (Total process time):

real time 0.28 seconds

cpu time 0.27 seconds

28 The SAS System

 

1014

1015 /*- KEEP ONLY ALLOWED > $0 & UNDERWRITTEN FOR DISCOUNT & USAGE -*/

1016 /*- CHANGED FROM PAID > $0 BASED ON EMAIL FROM RYAN CURRIER OF -*/

1017 /*- TMA ON 08/08/2012 -*/

1018

1019 DATA CLMEXZ25;

1020 SET &NAME..CLMEXZ24;

1021 IF HALLOW > 0 AND

1022 RISKIND = 'Y';

1023 RUN;

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXZ24.

NOTE: The data set WORK.CLMEXZ25 has 404864 observations and 54 variables.

NOTE: DATA statement used (Total process time):

real time 0.17 seconds

cpu time 0.18 seconds

 

1024

1025 PROC PRINT UNIFORM DATA=CLMEXZ25 (OBS=20);

1026 TITLE1 "20 OBS FROM FACT003.A082633.CLMEXZ25.THRU1712.SASS";

1027 TITLE2 "MOST RECENT ADJ OF NINST CLAIMS SETTLED DURING PERIOD";

1028 TITLE3 "T7 - ALLOWED - UNDERWRITTEN - SORTED BY CLAIM NUMBER";

1029 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ70";

1030 RUN;

NOTE: There were 20 observations read from the data set WORK.CLMEXZ25.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.05 seconds

cpu time 0.06 seconds

 

1031

1032

1033 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ80 -*/

1034

1035 /*- MERGE TO DATASET FROM JSA50 TO KEEP ONLY CLAIMS -*/

1036 /*- ORIGINALLY SETTLED DURING PERIOD WITH A T7 INDICATOR -*/

1037

1038 DATA &NAME..CLMEXZ26;

1039 MERGE CLMEXT71 (IN=INA) CLMEXZ25 (IN=INB);

1040 BY CLMNBR;

1041 IF INA AND INB;

1042

1043 ORGMOP = PUT(ORIGSTLM,YYMMD7.);

1044

1045 RUN;

NOTE: There were 301426 observations read from the data set WORK.CLMEXT71.

NOTE: There were 404864 observations read from the data set WORK.CLMEXZ25.

NOTE: The data set THRUINC.CLMEXZ26 has 404864 observations and 56 variables.

NOTE: DATA statement used (Total process time):

real time 0.28 seconds

cpu time 0.28 seconds

 

29 The SAS System

 

1046

1047 /*- SORT BY RENDPROV FOR NEXT STEP -*/

1048

1049 PROC SORT DATA=&NAME..CLMEXZ26 OUT=CLMEXZ27;

1050 BY RENDPROV;

1051 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ26.

NOTE: The data set WORK.CLMEXZ27 has 404864 observations and 56 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.23 seconds

cpu time 0.48 seconds

 

1052

1053 PROC PRINT UNIFORM DATA=CLMEXZ27 (OBS=10);

1054 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ27.THRU1712.SASS";

1055 TITLE2 "MOST RECENT ADJ OF NINST CLAIMS SETTLED DURING PERIOD";

1056 TITLE3 "T7 - PAID - UNDERWRITTEN - IN JSA50";

1057 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ80";

1058 RUN;

NOTE: There were 10 observations read from the data set WORK.CLMEXZ27.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

1059

1060

1061 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ90 -*/

1062

1063 %LET DATE1A = 01JAN2018 ; /*- FIRST PERIOD START DATE*/

1064 %LET DATE1B = 31MAR2018 ; /*- FIRST PERIOD END DATE*/

1065 %LET DATE2A = 01APR2018 ; /*- SECOND PERIOD START DATE*/

1066 %LET DATE2B = 30JUN2018 ; /*- SECOND PERIOD END DATE*/

1067 %LET DATE3A = 01JUL2018 ; /*- THIRD PERIOD START DATE*/

1068 %LET DATE3B = 30SEP2018 ; /*- THIRD PERIOD END DATE*/

1069 %LET DATE4A = 01OCT2018 ; /*- FOURTH PERIOD START DATE*/

1070 %LET DATE4B = 31DEC2018 ; /*- FOURTH PERIOD END DATE*/

1071 %LET DATE5A = 01JAN2019 ; /*- FIFTH PERIOD START DATE*/

1072 %LET DATE5B = 31MAR2019 ; /*- FIFTH PERIOD END DATE*/

1073 %LET DATE6A = 01APR2019 ; /*- SIXTH PERIOD START DATE*/

1074 %LET DATE6B = 30JUN2019 ; /*- SIXTH PERIOD END DATE*/

1075

1076 /*- ADD RENDERING PROVIDER NAME TO THE NON-INST FILE */

1077 /*- ADD RENDERING PROVIDER MARKET */

1078

1079 /*- MERGE TO ADD RENDERING PROVIDER NAME & ZIP */

1080

1081 DATA &NAME..CLMEXZ28;

1082 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

1083 MERGE CLMEXZ27 (IN=INA) PROVNAME (IN=INB);

1084

1085 BY RENDPROV;

1086

30 The SAS System

1087 IF INA;

1088

1089 IF INA AND NOT INB THEN DO;

1090 RENDNAME = 'UNKNOWN';

1091 PCMIND = 'N';

1092 END;

1093

1094 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 404864 observations read from the data set WORK.CLMEXZ27.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set THRUINC.CLMEXZ28 has 404864 observations and 58 variables.

NOTE: DATA statement used (Total process time):

real time 0.20 seconds

cpu time 0.21 seconds

 

1095

1096 /*- NEED WHEN FILES GET TOO BIG -*/

1097

1098 /*- SPLIT NON-INST FILE TO MANAGABLE SIZES */

1099

1100 DATA &NAME..CLMEXZ29 &NAME..CLMEXZ30

1101 &NAME..CLMEXZ31 &NAME..CLMEXZ32

1102 &NAME..CLMEXZ33 &NAME..CLMEXZ34 CHECK;

1103 SET &NAME..CLMEXZ28;

1104

1105 IF "&DATE1A"D LE DTPROC LE "&DATE1B"D

1106 THEN OUTPUT &NAME..CLMEXZ29;

1107 ELSE

1108 IF "&DATE2A"D LE DTPROC LE "&DATE2B"D

1109 THEN OUTPUT &NAME..CLMEXZ30;

1110 ELSE

1111 IF "&DATE3A"D LE DTPROC LE "&DATE3B"D

1112 THEN OUTPUT &NAME..CLMEXZ31;

1113 ELSE

1114 IF "&DATE4A"D LE DTPROC LE "&DATE4B"D

1115 THEN OUTPUT &NAME..CLMEXZ32;

1116 ELSE

1117 IF "&DATE5A"D LE DTPROC LE "&DATE5B"D

1118 THEN OUTPUT &NAME..CLMEXZ33;

1119 ELSE

1120 IF "&DATE6A"D LE DTPROC LE "&DATE6B"D

1121 THEN OUTPUT &NAME..CLMEXZ34;

1122 ELSE

1123 OUTPUT CHECK;

1124

1125 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ28.

NOTE: The data set THRUINC.CLMEXZ29 has 404864 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ30 has 0 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ31 has 0 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ32 has 0 observations and 58 variables.

31 The SAS System

NOTE: The data set THRUINC.CLMEXZ33 has 0 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ34 has 0 observations and 58 variables.

NOTE: The data set WORK.CHECK has 0 observations and 58 variables.

NOTE: DATA statement used (Total process time):

real time 0.19 seconds

cpu time 0.20 seconds

 

1126

1127 /*- ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE */

1128 /*- ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP */

1129 /*- FOR POSSIBLE FUTURE USE -*/

1130 /*- USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI") */

1131

1132 PROC SQL;

1133 CREATE TABLE &NAME..CLMEXZ35 (SORTEDBY=_NULL_) AS

1134 SELECT A.*, B.NETAREA AS PROVMANM,

1135 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1136 FROM &NAME..CLMEXZ29 AS A LEFT JOIN ZIPAREA AS B

1137 ON A.PROVZIP = B.ZIP AND

1138 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ35 created, with 404864 rows and 61 columns.

1139

NOTE: PROCEDURE SQL used (Total process time):

real time 0.62 seconds

cpu time 0.86 seconds

 

1140 PROC SQL;

1141 CREATE TABLE &NAME..CLMEXZ36 (SORTEDBY=_NULL_) AS

1142 SELECT A.*, B.NETAREA AS PROVMANM,

1143 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1144 FROM &NAME..CLMEXZ30 AS A LEFT JOIN ZIPAREA AS B

1145 ON A.PROVZIP = B.ZIP AND

1146 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ36 created, with 0 rows and 61 columns.

1147

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

1148 PROC SQL;

1149 CREATE TABLE &NAME..CLMEXZ37 (SORTEDBY=_NULL_) AS

1150 SELECT A.*, B.NETAREA AS PROVMANM,

1151 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1152 FROM &NAME..CLMEXZ31 AS A LEFT JOIN ZIPAREA AS B

1153 ON A.PROVZIP = B.ZIP AND

1154 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ37 created, with 0 rows and 61 columns.

1155

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

32 The SAS System

 

1156 PROC SQL;

1157 CREATE TABLE &NAME..CLMEXZ38 (SORTEDBY=_NULL_) AS

1158 SELECT A.*, B.NETAREA AS PROVMANM,

1159 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1160 FROM &NAME..CLMEXZ32 AS A LEFT JOIN ZIPAREA AS B

1161 ON A.PROVZIP = B.ZIP AND

1162 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ38 created, with 0 rows and 61 columns.

1163

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1164 PROC SQL;

1165 CREATE TABLE &NAME..CLMEXZ39 (SORTEDBY=_NULL_) AS

1166 SELECT A.*, B.NETAREA AS PROVMANM,

1167 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1168 FROM &NAME..CLMEXZ33 AS A LEFT JOIN ZIPAREA AS B

1169 ON A.PROVZIP = B.ZIP AND

1170 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ39 created, with 0 rows and 61 columns.

1171

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1172 PROC SQL;

1173 CREATE TABLE &NAME..CLMEXZ40 (SORTEDBY=_NULL_) AS

1174 SELECT A.*, B.NETAREA AS PROVMANM,

1175 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1176 FROM &NAME..CLMEXZ34 AS A LEFT JOIN ZIPAREA AS B

1177 ON A.PROVZIP = B.ZIP AND

1178 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ40 created, with 0 rows and 61 columns.

1179

1180 /*- MERGE BACK TOGETHER TO CREATE A COMPLETE NON-INST FILE -*/

1181 /*- SET CATEGORIES -*/

1182 /*- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXZ27.DATA -*/

1183

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.02 seconds

 

1184 DATA &NAME..CLMEXZ41;

1185 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.

1186 FILE $17. LINK $9. NET $11. MD $1.;

1187 SET &NAME..CLMEXZ35 &NAME..CLMEXZ36

1188 &NAME..CLMEXZ37 &NAME..CLMEXZ38

1189 &NAME..CLMEXZ39 &NAME..CLMEXZ40;

33 The SAS System

1190

1191 IF PROVMANM = "" THEN DO;

1192 PROVMANM = 'OUT OF REGION';

1193 PROVARNM = 'OUT OF REGION';

1194 PROVZPCT = 'OUT OF REGION';

1195 END;

1196

1197 FILE='NON-INSTITUTIONAL';

1198

1199 MD='N';

1200

1201 IF TMAENRCD = 'U' THEN LINK = 'CIVILIAN';

1202 ELSE

1203 IF TMAENRCD = 'Z' THEN LINK = 'MTF';

1204 ELSE

1205 LINK = TMAENRCD;

1206

1207 IF INOUTREG='I' THEN NET = 'NETWORK';

1208 ELSE

1209 IF INOUTREG='O' THEN NET = 'NON-NETWORK';

1210 ELSE

1211 NET = INOUTREG;

1212

1213 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ35.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ36.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ37.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ38.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ39.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ40.

NOTE: The data set THRUINC.CLMEXZ41 has 404864 observations and 65 variables.

NOTE: DATA statement used (Total process time):

real time 0.24 seconds

cpu time 0.24 seconds

 

1214

1215 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ41 (OBS=10);

1216 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ41.THRU1712.SASS";

1217 TITLE2

1218 "MOST RECENT ADJ OF NON-INST CLAIMS SETTLED DURING PERIOD";

1219 TITLE3 "T7 - PAID - UNDERWRITTEN - W/CATEGORIES & RENDPROV NAME";

1220 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ90";

1221 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXZ41.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

1222

1223

1224 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ100 -*/

34 The SAS System

1225

1226 /*- SORT NON-INSTITUTIONAL ALLOWED/UNDERWRITTEN FILE -*/

1227

1228 PROC SORT DATA=&NAME..CLMEXZ41 OUT=&NAME..CLMEXZ42;

1229 BY CLMNBR CLMLN;

1230 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ41.

NOTE: The data set THRUINC.CLMEXZ42 has 404864 observations and 65 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.33 seconds

cpu time 0.62 seconds

 

1231

1232

1233 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSB10 -*/

1234

1235 /*- START WITH PAID/UNDERWRITTEN/SORTED FILE -*/

1236 /*- EXCLUDE OHI PAID, MARYLAND PROVIDERS -*/

1237 /*- AND AS OF THRU1305 RUN, EXCLUDE ADSMS TOO (PER DAN) -*/

1238

1239 /*- IDENTIFY CLAIMS TO BE EXCLUDED -*/

1240 /*- OHI PAID CLAIMS, MARYLAND PROVIDERS & ADSMS -*/

1241

1242 DATA EXC;

1243 SET CLMEXZ20;

1244

1245 IF LTMAOHI GT 0 OR

1246 MD = 'Y' OR

1247 INOUTREG = 'O' OR

1248 ( SPSTAT = '1' AND

1249 PTSXREL IN ('1' '2') )

1250 THEN OUTPUT;

1251 ELSE

1252 DELETE;

1253

1254 KEEP CLMNBR;

1255 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ20.

NOTE: The data set WORK.EXC has 4889 observations and 1 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1256

1257 PROC SORT NODUPKEY DATA=EXC;

1258 BY CLMNBR;

1259 RUN;

NOTE: There were 4889 observations read from the data set WORK.EXC.

NOTE: 3395 observations with duplicate key values were deleted.

NOTE: The data set WORK.EXC has 1494 observations and 1 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

35 The SAS System

cpu time 0.00 seconds

 

1260

1261 /*- MERGE THE T7, PAID, UNDERWRITTEN INST FILE TO THE LIST OF -*/

1262 /*- CLAIMS THAT SHOULD BE EXCLUDED TO ELIMINATE THOSE CLAIMS -*/

1263

1264 DATA &NAME..DISC01;

1265 MERGE CLMEXZ20 (IN=INA) EXC (IN=INB);

1266 BY CLMNBR;

1267

1268 IF INA AND NOT INB;

1269

1270 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ20.

NOTE: There were 1494 observations read from the data set WORK.EXC.

NOTE: The data set THRUINC.DISC01 has 8589 observations and 66 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.02 seconds

 

1271

1272 /*- DO THE SAME FOR THE NON-INST FILE -*/

1273

1274 DATA EXC;

1275 SET &NAME..CLMEXZ42;

1276

1277 IF LTMAOHI GT 0 OR

1278 MD = 'Y' OR

1279 INOUTREG = 'O' OR

1280 ( SPSTAT = '1' AND

1281 PTSXREL IN ('1' '2') )

1282 THEN OUTPUT;

1283 ELSE

1284 DELETE;

1285

1286 KEEP CLMNBR;

1287 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ42.

NOTE: The data set WORK.EXC has 155190 observations and 1 variables.

NOTE: DATA statement used (Total process time):

real time 0.07 seconds

cpu time 0.08 seconds

 

1288

1289 PROC SORT NODUPKEY DATA=EXC;

1290 BY CLMNBR;

1291 RUN;

NOTE: There were 155190 observations read from the data set WORK.EXC.

NOTE: 65671 observations with duplicate key values were deleted.

NOTE: The data set WORK.EXC has 89519 observations and 1 variables.

NOTE: PROCEDURE SORT used (Total process time):

36 The SAS System

real time 0.03 seconds

cpu time 0.03 seconds

 

1292

1293 /*- MERGE THE T7, PAID, UNDERWRITTEN NON-INST FILE TO THE LIST -*/

1294 /*- OF CLAIMS THAT SHOULD BE EXCLUDED TO ELIMINATE THOSE CLAIMS -*/

1295

1296 DATA &NAME..DISC02;

1297 MERGE &NAME..CLMEXZ42 (IN=INA) EXC (IN=INB);

1298 BY CLMNBR;

1299

1300 IF INA AND NOT INB;

1301

1302 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ42.

NOTE: There were 89519 observations read from the data set WORK.EXC.

NOTE: The data set THRUINC.DISC02 has 249630 observations and 65 variables.

NOTE: DATA statement used (Total process time):

real time 0.20 seconds

cpu time 0.21 seconds

 

1303

1304 DATA &NAME..DISC03;

1305 SET &NAME..DISC01 &NAME..DISC02;

1306 RUN;

NOTE: There were 8589 observations read from the data set THRUINC.DISC01.

NOTE: There were 249630 observations read from the data set THRUINC.DISC02.

NOTE: The data set THRUINC.DISC03 has 258219 observations and 66 variables.

NOTE: DATA statement used (Total process time):

real time 0.15 seconds

cpu time 0.15 seconds

 

1307

1308 PROC PRINT UNIFORM DATA=&NAME..DISC03 (OBS=20);

1309 TITLE1 "20 OBS FROM FACT003.A082633.DISC03.THRU1712.SASS";

1310 TITLE2 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSB10";

1311 RUN;

NOTE: There were 20 observations read from the data set THRUINC.DISC03.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.06 seconds

cpu time 0.07 seconds

 

1312

1313

1314 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSB20 -*/

1315

1316 /*- SPLIT INTO CLAIMS WITH DISCOUNTS CALCULATED AT HEADER LEVEL -*/

1317 /*- AND THOSE AT LINE LEVEL -*/

1318 /*- CREATE SUMMARIZED OUTPUT FILES -*/

1319

37 The SAS System

1320 *- SPLIT INTO 2 CATEGORIES -*;

1321

1322 DATA DISC04 DISC05;

1323 &NAME..SET DISC03;

NOTE: Line generated by the macro variable "NAME".

1323 THRUINC

___________

557

ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

ERROR 557-185: Variable THRUINC is not an object.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1324

1325 IF ROOMBRD = 'Y' THEN

1326 DO;

1327 IF HALLOW = 0 THEN DELETE;

1328 ALLOW = HALLOW;

1329 PREDSC = HPREDSC;

1330 TMAANPD = HTMAANPD;

1331

1332 IF LPBADJPREDSC = '1' OR

1333 HDEBITCREDIT = 'C' AND

1334 HCREDADJCD = '' THEN

1335 DO;

1336 IF HADJPREDSC < HALLOW THEN

1337 DO;

1338 CALCDISC = 0;

1339 USEPRE = HALLOW;

1340 END;

1341 ELSE

1342 DO;

1343 CALCDISC = HADJPREDSC - HALLOW;

1344 USEPRE = HADJPREDSC;

1345 END;

1346 END;

1347 ELSE

1348 DO;

1349 IF PREDSC < HALLOW THEN

1350 DO;

1351 CALCDISC = 0;

1352 USEPRE = HALLOW;

1353 END;

1354 ELSE

1355 DO;

1356 CALCDISC = HPREDSC - HALLOW;

1357 USEPRE = HPREDSC;

1358 END;

1359 END;

1360 OUTPUT DISC04;

1361 END;

1362 ELSE

1363 DO;

1364 IF LALLOW = 0 THEN DELETE;

38 The SAS System

1365 ALLOW = LALLOW;

1366 PREDSC = LADJPREDSC;

1367 TMAANPD = LTMAANPD;

1368

1369 IF LADJPREDSC < LALLOW THEN

1370 DO;

1371 CALCDISC = 0;

1372 USEPRE = LALLOW;

1373 END;

1374 ELSE

1375 DO;

1376 CALCDISC = LADJPREDSC - LALLOW;

1377 USEPRE = LADJPREDSC;

1378 END;

1379

1380 OUTPUT DISC05;

1381 END;

1382 RUN;

1383

1384

1385 GOPTIONS NOACCESSIBLE;

1386 %LET _CLIENTTASKLABEL=;

1387 %LET _CLIENTPROCESSFLOWNAME=;

1388 %LET _CLIENTPROJECTPATH=;

1389 %LET _CLIENTPROJECTN

 

 

53 proc sql ;

54 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

55 CREATE TABLE &NAME..CLMEXT01 AS

56 SELECT * FROM CONNECTION TO tera

57 (SELECT

58 INST_CLM_LN.REND_PROVIDER AS RENDPROV,

59 INST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

60 INST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

61 INST_CLM_LN.PROV_TYPE AS PROVTYPE,

62 INST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

63 INST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

64 INST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT ,

65 INST_CLM_LN.CLM_END_SRVC_DT AS HENDDT ,

66 INST_CLM_HDR.CLM_FRM_CD AS CLMFORM,

67 INST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

68 INST_CLM_HDR.SETTLE_CUTOFF_DATE AS ORIGSTLM,

69 INST_CLM_HDR.T3_CNTRCT_IND AS T3IND

70

71 FROM

72 INST_CLM_LN INNER JOIN INST_CLM_HDR ON (INST_CLM_LN.CLM_BASE_ID=INST_CLM_HDR.CLM_BASE_ID and

73 INST_CLM_LN.CLM_ADJ_ID=INST_CLM_HDR.CLM_ADJ_ID and INST_CLM_LN.CLM_TRANS_TYP=INST_CLM_HDR.CLM_TRANS_TYP

74 and INST_CLM_LN.CHAP_CLM_SUB_NO=INST_CLM_HDR.CHAP_CLM_SUB_NO)

75

76 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

77 AND

78 INST_CLM_LN.CLM_ADJ_ID = '099'

79 AND

80 INST_CLM_HDR.T3_CNTRCT_IND = 'T7'

81 );

NOTE: Table THRUINC.CLMEXT01 created, with 24797 rows and 12 columns.

82

83 %PUT &SQLXMSG &SQLXRC;

0

84

NOTE: PROCEDURE SQL used (Total process time):

real time 3.62 seconds

cpu time 0.05 seconds

 

85 PROC PRINT UNIFORM DATA=&NAME..CLMEXT01 (OBS=10);

86 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT01.THRU1712.SASS";

87 TITLE2

88 "T7 ORIGINAL INST CLAIMS SETTLED DURING THE MONTH ENDING &DATE2";

89 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA10";

90 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT01.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

91

92

3 The SAS System

93 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA15 -*/

94

95 /*- USE THE HISTORICAL ZIP AREA ASSIGNMENT TABLE -*/

96 /*- NO LONGER NEED TO CREATE MY OWN -*/

97

98 /*- READ IN CURRENT MARKET AREA, MARKET & AREA FROM -*/

99 /*- THE HISTORICAL ZIP AREA ASSIGNMENT TABLE -*;*/

100

101 proc sql ;

102 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

103 CREATE TABLE ZIPAREA AS

104 SELECT * FROM CONNECTION TO tera

105 (SELECT

106 ZIP_AREA_ASGNMT.ZIP_CD AS ZIP,

107 ZIP_AREA_ASGNMT.EFCTV_DT AS STARTDT,

108 ZIP_AREA_ASGNMT.AREA_TYP_DESC AS AREATYP,

109 ZIP_AREA_ASGNMT.AREA_NAME AS AREA,

110 ZIP_AREA_ASGNMT.NTWRK_AREA_NAME AS NETAREA,

111 ZIP_AREA_ASGNMT.TRMNTN_DT AS ENDDT

112 FROM

113 ZIP_AREA_ASGNMT

114

115 );

NOTE: Table WORK.ZIPAREA created, with 12659 rows and 6 columns.

116

117 %PUT &SQLXMSG &SQLXRC;

0

118 /*-NONE SHOULD DUPE OUT -*/

119

NOTE: PROCEDURE SQL used (Total process time):

real time 0.11 seconds

cpu time 0.03 seconds

 

120 PROC SORT NODUPKEY DATA=ZIPAREA OUT=ZIPAREA;

121 BY ZIP STARTDT ENDDT; /*REMOVED MARKET, NO LONGER IN T2017*/

122 RUN;

NOTE: There were 12659 observations read from the data set WORK.ZIPAREA.

NOTE: 0 observations with duplicate key values were deleted.

NOTE: The data set WORK.ZIPAREA has 12659 observations and 6 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

 

123

124 PROC PRINT UNIFORM DATA=ZIPAREA (OBS=10);

125 TITLE1 "10 OBS FROM FACT003.A082633.ZIPAREA.THRU1712.SASS";

126 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA15";

127 RUN;

NOTE: There were 10 observations read from the data set WORK.ZIPAREA.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

4 The SAS System

 

128

129

130 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20 -*/

131

132 %LET DATE1 = 31JAN2018; /*- SETTLEMENT THROUGH DATE*/

133

134 %LET DATE1A = 01JAN2018; /*- FIRST PERIOD START DATE */

135 %LET DATE1B = 31MAR2018; /*- FIRST PERIOD END DATE -*/

136 %LET DATE2A = 01APR2018; /*- SECOND PERIOD START DATE -*/

137 %LET DATE2B = 30JUN2018; /*- SECOND PERIOD END DATE -*/

138 %LET DATE3A = 01JUL2018; /*- THIRD QUARTER START DATE -*/

139 %LET DATE3B = 30SEP2018; /*- THIRD QUARTER END DATE -*/

140 %LET DATE4A = 01OCT2018; /*- FOURTH QUARTER START DATE -*/

141 %LET DATE4B = 31DEC2018; /*- FOURTH QUARTER END DATE -*/

142

143

144 /*- COMBINE THIS MONTH'S CLMEXT01 TO LAST MONTH'S CLMEXT03 -*/

145 /*- TO GET THE ENTIRE OPTION PERIOD INST ORIGINAL CLAIMS -*/

146

147 DATA &NAME..CLMEXT02;

148 SET &NAME..CLMEXT01; /*REMOVED PRVMTH03*/

149 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT01.

NOTE: The data set THRUINC.CLMEXT02 has 24797 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

150

151 PROC SORT DATA=&NAME..CLMEXT02 OUT=CLMEXT03;

152 BY RENDPROV;

153 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT02.

NOTE: The data set WORK.CLMEXT03 has 24797 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

 

154

155 *- ADD RENDERING PROVIDER NAME & PCM INDICATOR TO THE INST FILE -*;

156

157 *- ADD RENDERING PROVIDER NAME FROM PROVIDER TABLES-*;

158 *- PROVIDER ADDRESS TYPE = 01 IS A BUSINESS LOCATION ADDRESS -*;

159 *- THIS SQL WAS WRITTEN WITH KAREN JACKSON TO ONLY GET ONE -*;

160 *- OBSERVATION PER PROVIDER ID. THIS SHOULD GIVE THE CURRENT -*;

161 *- DATA FOR EACH VALID ID - SEE EMAIL FROM JENNIFER ON 6/23/2010 -*;

162

163 proc sql ;

164 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

165 CREATE TABLE &NAME..PROV AS

166 SELECT * FROM CONNECTION TO tera

5 The SAS System

167 (SELECT

168 PRVDR_LOC_ID.LOC_PIMS_TYPE_12_NUM AS RENDPROV,

169 PRVDR_LOC.LOC_NAME AS RENDNAME,

170 PRVDR_LOC.ROLETYPE AS RENDROLE,

171 PRVDR_LOC_SPCLTY.LOC_SPCLTY_STRT_DT AS ROLEBEG,

172 PRVDR_LOC_SPCLTY.LOC_SPCLTY_END_DT AS ROLEEND

173 FROM

174 PRVDR_LOC_ID RIGHT OUTER JOIN PRVDR_LOC ON (PRVDR_LOC.LOC_UNIQ_ID=PRVDR_LOC_ID.LOC_UNIQ_ID)

175 LEFT OUTER JOIN PRVDR_LOC_SPCLTY ON (PRVDR_LOC.LOC_UNIQ_ID=PRVDR_LOC_SPCLTY.LOC_UNIQ_ID)

176

177 WHERE

178 PRVDR_LOC_SPCLTY.LOC_SPCLTY_END_DT IS NULL);

NOTE: Table THRUINC.PROV created, with 2937637 rows and 5 columns.

179

180

181 %PUT &SQLXMSG &SQLXRC;

0

NOTE: PROCEDURE SQL used (Total process time):

real time 4.94 seconds

cpu time 3.00 seconds

 

182 PROC PRINT UNIFORM DATA=&NAME..PROV (OBS=10); /*CHANGE BACK TO PROVNAME ONCE DONE TESTING*/

183 TITLE1 "PROVIDER TESTING";

184 TITLE2 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20";

185 RUN;

NOTE: There were 10 observations read from the data set THRUINC.PROV.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

186

187 /*- CREATE FILE WITH PCM INDICATOR TO BE ADDED TO PROVIDER FILE -*;*/

188 /*- CONSIDER PCM IF ROLE 01 OR 02 AS OF END OF REPORTING PERIOD -*;*/

189

190 DATA PROVPCM;

191 SET &NAME..PROV;

192

193 IF RENDROLE IN ('2' '3');

194 /*REMOVED ROLEEND >= "&DATE1"D AND ROLEBEG <= "&DATE1"D;*/

195 KEEP RENDPROV;

196 RUN;

NOTE: There were 2937637 observations read from the data set THRUINC.PROV.

NOTE: The data set WORK.PROVPCM has 2661463 observations and 1 variables.

NOTE: DATA statement used (Total process time):

real time 0.34 seconds

cpu time 0.35 seconds

 

197

198 PROC SORT NODUPKEY DATA=PROVPCM;

199 BY RENDPROV;

200 RUN;

6 The SAS System

 

NOTE: There were 2661463 observations read from the data set WORK.PROVPCM.

NOTE: 2661453 observations with duplicate key values were deleted.

NOTE: The data set WORK.PROVPCM has 10 observations and 1 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.41 seconds

cpu time 1.04 seconds

 

201

202 PROC SORT NODUPKEY DATA=&NAME..PROV;

203 BY RENDPROV;

204 RUN;

NOTE: There were 2937637 observations read from the data set THRUINC.PROV.

NOTE: 2937027 observations with duplicate key values were deleted.

NOTE: The data set THRUINC.PROV has 610 observations and 5 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.87 seconds

cpu time 1.53 seconds

 

205

206 DATA PROVNAME;

207 LENGTH PCMIND $1.;

208 MERGE &NAME..PROV (IN=INA) PROVPCM (IN=INB);

209 BY RENDPROV;

210 IF INA;

211

212 IF INA AND INB THEN PCMIND = 'Y';

213 ELSE

214 PCMIND = 'N';

215

216 KEEP RENDPROV RENDNAME PCMIND;

217

218 RUN;

NOTE: There were 610 observations read from the data set THRUINC.PROV.

NOTE: There were 10 observations read from the data set WORK.PROVPCM.

NOTE: The data set WORK.PROVNAME has 610 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

219

220 PROC PRINT UNIFORM DATA=PROVNAME (OBS=10); /*CHANGE BACK TO PROVNAME ONCE DONE TESTING*/

221 TITLE1 "10 OBS FROM FACT003.A082633.PROVNAME.THRU1712.SASS";

222 TITLE2 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20";

223 RUN;

NOTE: There were 10 observations read from the data set WORK.PROVNAME.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

7 The SAS System

224

225 /* MERGE TO ADD RENDERING PROVIDER NAME & PCM INDICATOR */

226

227 DATA &NAME..CLMEXT04;

228 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

229 MERGE CLMEXT03 (IN=INA) PROVNAME (IN=INB);

230

231 BY RENDPROV;

232

233 IF INA;

234

235 IF INA AND NOT INB THEN DO;

236 RENDNAME = 'UNKNOWN';

237 PCMIND = 'N';

238 END;

239

240 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 24797 observations read from the data set WORK.CLMEXT03.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set THRUINC.CLMEXT04 has 24797 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

241

242 /*- NEED WHEN FILES GET TOO BIG -*/

243

244 /*- SPLIT INST FILE TO MANAGABLE SIZES -*/

245

246 DATA &NAME..CLMEXT05 &NAME..CLMEXT06 &NAME..CLMEXT07 &NAME..CLMEXT08

247 CHECK;

248

249 SET &NAME..CLMEXT04;

250

251 IF "&DATE1A"D LE ORIGSTLM LE "&DATE1B"D

252 THEN OUTPUT &NAME..CLMEXT05;

253 ELSE

254 IF "&DATE2A"D LE ORIGSTLM LE "&DATE2B"D

255 THEN OUTPUT &NAME..CLMEXT06;

256 ELSE

257 IF "&DATE3A"D LE ORIGSTLM LE "&DATE3B"D

258 THEN OUTPUT &NAME..CLMEXT07;

259 ELSE

260 IF "&DATE4A"D LE ORIGSTLM LE "&DATE4B"D

261 THEN OUTPUT &NAME..CLMEXT08;

262 ELSE

263 OUTPUT CHECK;

264

265 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT04.

NOTE: The data set THRUINC.CLMEXT05 has 24797 observations and 14 variables.

8 The SAS System

NOTE: The data set THRUINC.CLMEXT06 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT07 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT08 has 0 observations and 14 variables.

NOTE: The data set WORK.CHECK has 0 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

 

266

267 /* ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE */

268 /* ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP */

269 /* FOR POSSIBLE FUTURE USE -*;

270 /* USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI")*/

271

272 PROC SQL;

273 CREATE TABLE &NAME..CLMEXT09 (SORTEDBY=_NULL_) AS

274 SELECT A.*, B.NETAREA AS PROVMANM, /*REMOVED B.MARKET AS PROVMKNM,*/

275 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

276 FROM &NAME..CLMEXT05 AS A LEFT JOIN ZIPAREA AS B

277 ON A.PROVZIP = B.ZIP AND

278 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT09 created, with 24797 rows and 17 columns.

279

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

280 PROC SQL;

281 CREATE TABLE &NAME..CLMEXT10(SORTEDBY=_NULL_) AS

282 SELECT A.*, B.NETAREA AS PROVMANM,

283 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

284 FROM &NAME..CLMEXT06 AS A LEFT JOIN ZIPAREA AS B

285 ON A.PROVZIP = B.ZIP AND

286 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT10 created, with 0 rows and 17 columns.

287

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

288 PROC SQL;

289 CREATE TABLE &NAME..CLMEXT11(SORTEDBY=_NULL_) AS

290 SELECT A.*, B.NETAREA AS PROVMANM,

291 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

292 FROM &NAME..CLMEXT07 AS A LEFT JOIN ZIPAREA AS B

293 ON A.PROVZIP = B.ZIP AND

294 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT11 created, with 0 rows and 17 columns.

295

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

9 The SAS System

cpu time 0.02 seconds

 

296 PROC SQL;

297 CREATE TABLE &NAME..CLMEXT12 (SORTEDBY=_NULL_) AS

298 SELECT A.*, B.NETAREA AS PROVMANM,

299 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

300 FROM &NAME..CLMEXT08 AS A LEFT JOIN ZIPAREA AS B

301 ON A.PROVZIP = B.ZIP AND

302 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT12 created, with 0 rows and 17 columns.

303

304

305 /*- SET BACK TOGETHER TO CREATE A COMPLETE INST FILE -*/

306 /*- SET CATEGORIES -*/

307 /*- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXT03.DATA -*/

308

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

309 DATA &NAME..CLMEXT13;

310 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.;

311 SET &NAME..CLMEXT09 &NAME..CLMEXT10 &NAME..CLMEXT11 &NAME..CLMEXT12;

312 IF PROVMANM = "" THEN DO;

313 PROVMANM = 'OUT OF REGION';

314 PROVARNM = 'OUT OF REGION';

315 PROVZPCT = 'OUT OF REGION';

316 END;

317 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT09.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT10.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT11.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT12.

NOTE: The data set THRUINC.CLMEXT13 has 24797 observations and 17 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

318

319 PROC PRINT UNIFORM DATA=&NAME..CLMEXT13 (OBS=10);

320 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT13.THRU1712.SASS";

321 TITLE2 "ORIGINAL CLAIM FROM INST CLAIMS SETTLED DURING PERIOD";

322 TITLE3 "WITH RENDPROV NAME";

323 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA20";

324 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT13.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

10 The SAS System

 

325

326

327 /*FACT003.ROUTINE.T7-OP8(THRU1712) - JSA30 */

328

329 /*EXTRACT ALL NON-INST CLAIMS PROCESSED DURING THE PERIOD */

330 /*ORIGINAL CLAIMS ONLY (ADJ 099)*/

331

332 /*THIS DATASET IS FOR EDI AND CLAIM SELECTION FOR*/

333 /*DISCOUNT AND USAGE */

334

335

336 /*- CURRENT MONTH ONLY -*/

337

338 %LET DATE1 = '2018-01-01' ; /*- SETTLEMENT FROM DATE -*/

339 %LET DATE2 = '2018-01-31' ; /*- SETTLEMENT THRU DATE -*/

340

341 proc sql ;

342 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

343 CREATE TABLE &NAME..CLMEXT14 AS

344 SELECT * FROM CONNECTION TO tera

345 (SELECT

346 NINST_CLM_LN.REND_PROVIDER AS RENDPROV,

347 NINST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

348 NINST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

349 NINST_CLM_LN.PROV_TYPE AS PROVTYPE,

350 NINST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

351 NINST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

352 NINST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT,

353 NINST_CLM_LN.CLM_END_SRVC_DT AS HENDDT,

354 NINST_CLM_HDR.CLM_FRM_CD AS CLMFORM,

355 NINST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

356 NINST_CLM_HDR.SETTLE_CUTOFF_DATE AS ORIGSTLM,

357 NINST_CLM_HDR.T3_CNTRCT_IND AS T3IND

358

359 FROM

360 NINST_CLM_LN INNER JOIN NINST_CLM_HDR ON (NINST_CLM_LN.CLM_BASE_ID=NINST_CLM_HDR.CLM_BASE_ID and

361 NINST_CLM_LN.CLM_ADJ_ID=NINST_CLM_HDR.CLM_ADJ_ID and NINST_CLM_LN.CLM_TRANS_TYP=NINST_CLM_HDR.CLM_TRANS_TYP

362 and NINST_CLM_LN.CHAP_CLM_SUB_NO=NINST_CLM_HDR.CHAP_CLM_SUB_NO)

363

364 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

365 AND

366 NINST_CLM_LN.CLM_ADJ_ID = '099'

367 AND

368 NINST_CLM_HDR.T3_CNTRCT_IND = 'T7'

369 );

NOTE: Table THRUINC.CLMEXT14 created, with 547091 rows and 12 columns.

370

371 %PUT &SQLXMSG &SQLXRC;

0

372

373

NOTE: PROCEDURE SQL used (Total process time):

real time 12.69 seconds

cpu time 0.59 seconds

11 The SAS System

 

374 PROC PRINT UNIFORM DATA=&NAME..CLMEXT14 (OBS=10);

375 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT14.THRU1712.SASS";

376 TITLE2

377 "T7 ORIGINAL NON-INST CLAIMS SETTLED DURING THE MONTH ENDING &DATE2";

378 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA30";

379 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT14.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

380

381

382

383 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA40 -*/

384

385 %LET DATE1A = 01JAN2018 ; /*- FIRST PERIOD START DATE -*/

386 %LET DATE1B = 31MAR2018 ; /*- FIRST PERIOD END DATE -*/

387 %LET DATE2A = 01APR2018 ; /*- SECOND PERIOD START DATE -*/

388 %LET DATE2B = 30JUN2018 ; /*- SECOND PERIOD END DATE -*/

389 %LET DATE3A = 01JUL2018 ; /*- THIRD PERIOD START DATE -*/

390 %LET DATE3B = 30SEP2018 ; /*- THIRD PERIOD END DATE -*/

391 %LET DATE4A = 01OCT2018 ; /*- FOURTH PERIOD START DATE -*/

392 %LET DATE4B = 31DEC2018 ; /*- FOURTH PERIOD END DATE -*/

393 %LET DATE5A = 01JAN2019 ; /*- FIFTH PERIOD START DATE -*/

394 %LET DATE5B = 31MAR2019 ; /*- FIFTH PERIOD END DATE -*/

395 %LET DATE6A = 01APR2019 ; /*- SIXTH PERIOD START DATE -*/

396 %LET DATE6B = 30JUN2019 ; /*- SIXTH PERIOD END DATE -*/

397

398

399 /*- COMBINE THIS MONTH'S CLMEXT14 TO LAST MONTH'S CLMEXT16 -*/

400 /*- TO GET THE ENTIRE OPTION PERIOD INST ORIGINAL CLAIMS -*/

401

402 DATA CLMEXT15;

403 SET &NAME..CLMEXT14; /*REMOVED PRVMTH16*/

404 RUN;

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXT14.

NOTE: The data set WORK.CLMEXT15 has 547091 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.07 seconds

cpu time 0.07 seconds

 

405

406 PROC SORT DATA=CLMEXT15 OUT=CLMEXT16;

407 BY RENDPROV;

408 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXT15.

NOTE: The data set WORK.CLMEXT16 has 547091 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.15 seconds

12 The SAS System

cpu time 0.43 seconds

 

409

410 /*- ADD RENDERING PROVIDER NAME & PCM IND TO THE NON-INST FILE -*/

411

412 DATA CLMEXT17;

413 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

414 MERGE CLMEXT16 (IN=INA) PROVNAME (IN=INB);

415

416 BY RENDPROV;

417

418 IF INA;

419

420 IF INA AND NOT INB THEN DO;

421 RENDNAME = 'UNKNOWN';

422 PCMIND = 'N';

423 END;

424

425 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 547091 observations read from the data set WORK.CLMEXT16.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set WORK.CLMEXT17 has 547091 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.12 seconds

cpu time 0.12 seconds

 

426

427 /*- NEED WHEN FILES GET TOO BIG -*/

428

429 /*- SPLIT NON-INST FILE TO MANAGABLE SIZES -*/

430

431 DATA &NAME..CLMEXT18 &NAME..CLMEXT19

432 &NAME..CLMEXT20 &NAME..CLMEXT21

433 &NAME..CLMEXT22 &NAME..CLMEXT23 CHECK;

434

435 SET CLMEXT17;

436

437 IF "&DATE1A"D LE ORIGSTLM LE "&DATE1B"D

438 THEN OUTPUT &NAME..CLMEXT18;

439 ELSE

440 IF "&DATE2A"D LE ORIGSTLM LE "&DATE2B"D

441 THEN OUTPUT &NAME..CLMEXT19;

442 ELSE

443 IF "&DATE3A"D LE ORIGSTLM LE "&DATE3B"D

444 THEN OUTPUT &NAME..CLMEXT20;

445 ELSE

446 IF "&DATE4A"D LE ORIGSTLM LE "&DATE4B"D

447 THEN OUTPUT &NAME..CLMEXT21;

448 ELSE

449 IF "&DATE5A"D LE ORIGSTLM LE "&DATE5B"D

450 THEN OUTPUT &NAME..CLMEXT22;

13 The SAS System

451 ELSE

452 IF "&DATE6A"D LE ORIGSTLM LE "&DATE6B"D

453 THEN OUTPUT &NAME..CLMEXT23;

454 ELSE

455 OUTPUT CHECK;

456

457 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXT17.

NOTE: The data set THRUINC.CLMEXT18 has 547091 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT19 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT20 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT21 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT22 has 0 observations and 14 variables.

NOTE: The data set THRUINC.CLMEXT23 has 0 observations and 14 variables.

NOTE: The data set WORK.CHECK has 0 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.10 seconds

cpu time 0.10 seconds

 

458

459 /*- ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE -*/

460 /*- ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP -*/

461 /*- FOR POSSIBLE FUTURE USE -*/

462 /*- USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI") -*/

463

464 PROC SQL;

465 CREATE TABLE &NAME..CLMEXT24 (SORTEDBY=_NULL_) AS

466 SELECT A.*, B.NETAREA AS PROVMANM,

467 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

468 FROM &NAME..CLMEXT18 AS A LEFT JOIN ZIPAREA AS B

469 ON A.PROVZIP = B.ZIP AND

470 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT24 created, with 547091 rows and 17 columns.

471

NOTE: PROCEDURE SQL used (Total process time):

real time 0.38 seconds

cpu time 0.59 seconds

 

472 PROC SQL;

473 CREATE TABLE &NAME..CLMEXT25 (SORTEDBY=_NULL_) AS

474 SELECT A.*, B.NETAREA AS PROVMANM,

475 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

476 FROM &NAME..CLMEXT19 AS A LEFT JOIN ZIPAREA AS B

477 ON A.PROVZIP = B.ZIP AND

478 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT25 created, with 0 rows and 17 columns.

479

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

480 PROC SQL;

14 The SAS System

 

481 CREATE TABLE &NAME..CLMEXT26 (SORTEDBY=_NULL_) AS

482 SELECT A.*, B. NETAREA AS PROVMANM,

483 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

484 FROM &NAME..CLMEXT20 AS A LEFT JOIN ZIPAREA AS B

485 ON A.PROVZIP = B.ZIP AND

486 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT26 created, with 0 rows and 17 columns.

487

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

488 PROC SQL;

489 CREATE TABLE &NAME..CLMEXT27 (SORTEDBY=_NULL_) AS

490 SELECT A.*, B.NETAREA AS PROVMANM,

491 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

492 FROM &NAME..CLMEXT21 AS A LEFT JOIN ZIPAREA AS B

493 ON A.PROVZIP = B.ZIP AND

494 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT27 created, with 0 rows and 17 columns.

495

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.02 seconds

 

496 PROC SQL;

497 CREATE TABLE &NAME..CLMEXT28 (SORTEDBY=_NULL_) AS

498 SELECT A.*, B.NETAREA AS PROVMANM,

499 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

500 FROM &NAME..CLMEXT22 AS A LEFT JOIN ZIPAREA AS B

501 ON A.PROVZIP = B.ZIP AND

502 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT28 created, with 0 rows and 17 columns.

503

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

504 PROC SQL;

505 CREATE TABLE &NAME..CLMEXT29 (SORTEDBY=_NULL_) AS

506 SELECT A.*, B.NETAREA AS PROVMANM,

507 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

508 FROM &NAME..CLMEXT23 AS A LEFT JOIN ZIPAREA AS B

509 ON A.PROVZIP = B.ZIP AND

510 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXT29 created, with 0 rows and 17 columns.

511

512

513 /*- SET BACK TOGETHER TO CREATE A COMPLETE NON-INST FILE -*/

15 The SAS System

514 /*- SET CATEGORIES -*/

515 /*- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXT16.DATA -*/

516

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

517 DATA &NAME..CLMEXT70;

518 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.;

519 SET &NAME..CLMEXT24 &NAME..CLMEXT25

520 &NAME..CLMEXT26 &NAME..CLMEXT27

521 &NAME..CLMEXT28 &NAME..CLMEXT29;

522

523 IF PROVMANM = "" THEN DO;

524 PROVMANM = 'OUT OF REGION';

525 PROVARNM = 'OUT OF REGION';

526 PROVZPCT = 'OUT OF REGION';

527 END;

528 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXT24.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT25.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT26.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT27.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT28.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXT29.

NOTE: The data set THRUINC.CLMEXT70 has 547091 observations and 17 variables.

NOTE: DATA statement used (Total process time):

real time 0.14 seconds

cpu time 0.15 seconds

 

529

530 PROC PRINT UNIFORM DATA=&NAME..CLMEXT70 (OBS=10);

531 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXT70.THRU1712.SASS";

532 TITLE2 "ORIGINAL CLAIM FROM NINST CLAIMS SETTLED DURING PERIOD";

533 TITLE3 "WITH RENDPROV NAME";

534 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSA40";

535 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXT70.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

536

537

538 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSA50 -*/

539

540 /*- CREATE A DATASET OF ALL CLAIM NUMBERS FROM JSA20 & JSA40 -*/

541 /*- TO BE USED IN THE EXTRACTS FOR DISCOUNTS & USAGE -*/

542

543 DATA TEMP;

16 The SAS System

544 SET &NAME..CLMEXT13 (KEEP=CLMNBR ORIGSTLM)

545 &NAME..CLMEXT70 (KEEP=CLMNBR ORIGSTLM);

546 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXT13.

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXT70.

NOTE: The data set WORK.TEMP has 571888 observations and 2 variables.

NOTE: DATA statement used (Total process time):

real time 0.07 seconds

cpu time 0.07 seconds

 

547

548 PROC SORT NODUPKEY DATA=TEMP OUT=CLMEXT71;

549 BY CLMNBR;

550 RUN;

NOTE: There were 571888 observations read from the data set WORK.TEMP.

NOTE: 270462 observations with duplicate key values were deleted.

NOTE: The data set WORK.CLMEXT71 has 301426 observations and 2 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.09 seconds

cpu time 0.32 seconds

 

551

552

553

554 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ10 -*/

555

556 /*- CLAIMS EXTRACT FOR DISCOUNT & USAGE INCENTIVE -*/

557

558 /*- GET THE MOST RECENT ADJUSTMENTS FOR INSTITUTIONAL -*/

559 /*- CLAIMS SETTLED DURING THE CURRENT MONTH -*/

560

561 /*- CURRENT MONTH ONLY -*/

562 %LET DATE1 = '2018-01-01' ; /*- SETTLEMENT START DATE -*/

563 %LET DATE3 = '2018-01-31' ; /*- SETTLEMENT THRU DATE -*/

564

565 proc sql ;

566 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

567 CREATE TABLE &NAME..CLMEXZ01 AS

568 SELECT * FROM CONNECTION TO tera

569 (SELECT

570 INST_CLM_LN.CLM_LINE_ID AS CLMLN,

571 INST_CLM_LN.CLM_BGN_SRVC_DT AS LBEGDT,

572 INST_CLM_LN.CLM_END_SRVC_DT AS LENDDT,

573 INST_CLM_LN.MCS_AT_RISK AS RISKIND,

574 INST_CLM_LN.PROV_TOT_CHRG AS LBILL,

575 INST_CLM_LN.ALLOWED_CHRG AS LALLOW,

576 INST_CLM_LN.PAYMENT_AMT AS LPAID,

577 INST_CLM_LN.PRE_DSCNT_ALWD_AMT AS LPREDSC,

578 INST_CLM_LN.TMA_NET_PRVDR_DSCNT_AMT AS LTMAANPD,

579 INST_CLM_LN.ADJ_PRE_DSCNT_ALWD_AMT AS LADJPREDSC,

580 INST_CLM_LN.TMA_OHI_AMT AS LTMAOHI,

581 INST_CLM_LN.NO_SERVICES AS LNOSVCS,

582 INST_CLM_LN.REND_PROVIDER AS RENDPROV,

17 The SAS System

583 INST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

584 INST_CLM_LN.PROVIDER_ID AS PROVID,

585 INST_CLM_LN.PRVDR_NAME AS BILLNAME,

586 INST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

587 INST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

588 INST_CLM_LN.PROV_TYPE AS PROVTYPE,

589 INST_CLM_LN.TMA_ENRLMT_HLTH_CD AS TMAENRCD,

590 INST_CLM_LN.HOSP_PROF_SERV AS HOSOPSVC,

591 INST_CLM_LN.PLAN_CVRG_OPTN_CD AS PLANCOPT,

592 INST_CLM_LN.MCS_SYSTEM_IND AS INOUTREG,

593 INST_CLM_LN.DRVD_MCS_OPTN_IND AS CLMCLS,

594 INST_CLM_LN.TMA_PLACE_TRTMT_CD AS TMAPOS,

595 INST_CLM_LN.HCSR_SPC_PRCS_1_CD AS SSPPROC1,

596 INST_CLM_LN.HCSR_SPC_PRCS_2_CD AS SSPPROC2,

597 INST_CLM_LN.HCSR_SPC_PRCS_3_CD AS SSPPROC3,

598 INST_CLM_LN.HCSR_SPC_PRCS_4_CD AS SSPPROC4,

599 INST_CLM_LN.PRVDR_TXMY_CD AS PROVTXMY,

600 INST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

601 INST_CLM_HDR.CHAP_CLM_SUB_NO AS SUBNBR,

602 INST_CLM_HDR.CLM_ADJ_ID AS CLMADJ,

603 INST_CLM_HDR.CLM_TRANS_TYP AS TRANSTYP,

604 INST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT,

605 INST_CLM_HDR.CLM_END_SRVC_DT AS HENDDT,

606 INST_CLM_HDR.DRG_DIAG1_CD AS DIAG1,

607 INST_CLM_HDR.SPON_STATUS AS SPSTAT,

608 INST_CLM_HDR.PATNT_SEX_REL_CODE AS PTSXREL,

609 INST_CLM_HDR.SETTLE_CUTOFF_DATE AS DTPROC,

610 INST_CLM_HDR.ADMIT_SRVC_DT AS ADMITDT,

611 INST_CLM_HDR.PROV_TOT_CHRG AS HBILL,

612 INST_CLM_HDR.ALLOWED_CHRG AS HALLOW,

613 INST_CLM_HDR.PAYMENT_AMT AS HPAID,

614 INST_CLM_HDR.OTH_CARR_PAY AS HOHIPAID,

615 INST_CLM_HDR.PRE_DSCNT_ALWD_AMT AS HPREDSC,

616 INST_CLM_LN.PB_ADJ_PRE_DSCNT_ALWD_AMT AS LPBADJPREDSC,

617 INST_CLM_HDR.DEBIT_CREDIT_CD AS HDEBITCREDIT,

618 INST_CLM_HDR.T3_CRED_ADJST_RFND_RSN_CD AS HCREDADJCD,

619 INST_CLM_HDR.TMA_NET_PRVDR_DSCNT_AMT AS HTMAANPD,

620 INST_CLM_HDR.ADJ_PRE_DSCNT_ALWD_AMT AS HADJPREDSC,

621 INST_CLM_HDR.ROOM_BRD_IND AS ROOMBRD,

622 INST_CLM_HDR.PATNT_STATE AS BENEST,

623 INST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

624 INST_CLM_HDR.T3_CNTRCT_IND AS T3IND

625

626 FROM

627 INST_CLM_LN INNER JOIN INST_CLM_HDR ON (INST_CLM_LN.CLM_BASE_ID=INST_CLM_HDR.CLM_BASE_ID

628 and INST_CLM_LN.CLM_ADJ_ID=INST_CLM_HDR.CLM_ADJ_ID and

629 INST_CLM_LN.CLM_TRANS_TYP=INST_CLM_HDR.CLM_TRANS_TYP and

630 INST_CLM_LN.CHAP_CLM_SUB_NO=INST_CLM_HDR.CHAP_CLM_SUB_NO)

631

632 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

633 AND

634 INST_CLM_LN.CLM_ADJ_ID = '099'

635 AND

636 INST_CLM_HDR.T3_CNTRCT_IND = 'T7'

637 );

NOTE: Table THRUINC.CLMEXZ01 created, with 24797 rows and 55 columns.

18 The SAS System

638

639 %PUT &SQLXMSG &SQLXRC;

0

641

NOTE: PROCEDURE SQL used (Total process time):

real time 5.89 seconds

cpu time 0.08 seconds

 

642 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ01 (OBS=10);

643 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ01.THRU1712.SASS";

644 TITLE2

645 "MOST RECENT ADJ OF ALL INST CLAIMS SETTLED DURING PERIOD";

646 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ10";

647 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXZ01.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

648

649

650

651 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ20 -*/

652

653 /*- COMBINE THIS MONTH'S CLMEXZ01 TO LAST MONTH'S CLMEXZ02 -*/

654 /*- TO GET THE ENTIRE OPTION PERIOD INST ORIGINAL CLAIMS -*/

655

656 DATA &NAME..CLMEXZ02;

657 SET &NAME..CLMEXZ01; /*REMOVED PRVMNTH4*/

658 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXZ01.

NOTE: The data set THRUINC.CLMEXZ02 has 24797 observations and 55 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

659

660 PROC SORT DATA=&NAME..CLMEXZ02 OUT=CLMEXZ03;

661 BY CLMNBR CLMLN CLMADJ;

662 RUN;

NOTE: There were 24797 observations read from the data set THRUINC.CLMEXZ02.

NOTE: The data set WORK.CLMEXZ03 has 24797 observations and 55 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

663

664 /*- KEEP ONLY T7 MINIUM ADJUSTMENT -*/

665 /*- TO BE USED IN QUARTERLY DISCOUNT & OHI REPORTS -*/

666

19 The SAS System

667 DATA CLMEXZ04;

668 SET CLMEXZ03;

669 BY CLMNBR CLMLN CLMADJ;

670 IF FIRST.CLMLN AND T3IND = 'T7';

671 RUN;

NOTE: There were 24797 observations read from the data set WORK.CLMEXZ03.

NOTE: The data set WORK.CLMEXZ04 has 24797 observations and 55 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

672

673 /*- KEEP ONLY ALLOWED > $0 & UNDERWRITTEN FOR DISCOUNT & USAGE -*/

674 /*- CHANGED FROM PAID > $0 BASED ON EMAIL FROM RYAN CURRIER OF -*/

675 /*- TMA ON 08/08/2012 -*/

676

677 DATA &NAME..CLMEXZ05;

678 SET CLMEXZ04;

679 WHERE HALLOW > 0 AND

680 RISKIND = 'Y';

681 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ04.

WHERE (HALLOW>0) and (RISKIND='Y');

NOTE: The data set THRUINC.CLMEXZ05 has 13478 observations and 55 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

 

682

683 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ05 (OBS=20);

684 TITLE1 "20 OBS FROM FACT003.A082633.CLMEXZ05.THRU1712.SASS";

685 TITLE2 "MOST RECENT ADJ OF INST CLAIMS SETTLED DURING OP";

686 TITLE3 "T7 - ALLOWED - UNDERWRITTEN - SORTED BY CLAIM NUMBER";

687 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ20";

688 RUN;

NOTE: There were 20 observations read from the data set THRUINC.CLMEXZ05.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.05 seconds

cpu time 0.06 seconds

 

689

690

691 *- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ30 -*;

692

693 *- MERGE TO DATASET FROM JSA50 TO KEEP ONLY CLAIMS -*;

694 *- ORIGINALLY SETTLED DURING PERIOD WITH A T7 INDICATOR -*;

695

696 DATA CLMEXZ06;

697 MERGE CLMEXT71 (IN=INA) &NAME..CLMEXZ05 (IN=INB);

698 BY CLMNBR;

699 IF INA AND INB;

20 The SAS System

700

701 ORGMOP = PUT(ORIGSTLM,YYMMD7.);

702

703 RUN;

NOTE: There were 301426 observations read from the data set WORK.CLMEXT71.

NOTE: There were 13478 observations read from the data set THRUINC.CLMEXZ05.

NOTE: The data set WORK.CLMEXZ06 has 13478 observations and 57 variables.

NOTE: DATA statement used (Total process time):

real time 0.06 seconds

cpu time 0.06 seconds

 

704

705 *- SORT BY RENDPROV FOR NEXT STEP -*;

706

707 PROC SORT DATA=CLMEXZ06 OUT=CLMEXZ07;

708 BY RENDPROV;

709 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ06.

NOTE: The data set WORK.CLMEXZ07 has 13478 observations and 57 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.02 seconds

 

710

711 PROC PRINT UNIFORM DATA=CLMEXZ07 (OBS=10);

712 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ07.THRU1712.SASS";

713 TITLE2 "MOST RECENT ADJ OF T7 INST CLAIMS SETTLED DURING PERIOD";

714 TITLE3 "PAID - UNDERWRITTEN - IN JSA50";

715 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ30";

716 RUN;

NOTE: There were 10 observations read from the data set WORK.CLMEXZ07.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

717

718

719 *- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ40 -*;

720

721 %LET DATE1A = 01JAN2018 ; *- FIRST PERIOD START DATE -*;

722 %LET DATE1B = 31MAR2018 ; *- FIRST PERIOD END DATE -*;

723 %LET DATE2A = 01APR2018 ; *- SECOND PERIOD START DATE -*;

724 %LET DATE2B = 30JUN2018 ; *- SECOND PERIOD END DATE -*;

725 %LET DATE3A = 01JUL2018 ; *- THIRD PERIOD START DATE -*;

726 %LET DATE3B = 30SEP2018 ; *- THIRD PERIOD END DATE -*;

727 %LET DATE4A = 01OCT2018 ; *- FOURTH PERIOD START DATE -*;

728 %LET DATE4B = 31DEC2018 ; *- FOURTH PERIOD END DATE -*;

729 %LET DATE5A = 01JAN2019 ; *- FIFTH PERIOD START DATE -*;

730 %LET DATE5B = 31MAR2019 ; *- FIFTH PERIOD END DATE -*;

731

732 %LET SPECCD= ('261Q00000X' '261QA0005X' '261QA0006X' '261QA0600X'

21 The SAS System

733 '261QA0900X' '261QA1903X' '261QA3000X' '261QC0050X'

734 '261QC1500X' '261QC1800X' '261QD1600X' '261QE0002X'

735 '261QE0700X' '261QE0800X' '261QF0050X' '261QG0250X'

736 '261QH0100X' '261QH0700X' '261QI0500X' '261QL0400X'

737 '261QM0850X' '261QM0855X' '261QM1103X' '261QM2500X'

738 '261QM2800X' '261QM3000X' '261QP2400X' '261QX0200X'

739 '273100000X' '273R00000X' '273Y00000X' '275N00000X'

740 '276400000X' '281P00000X' '281PC2000X' '282N00000X'

741 '282NC0060X' '282NC2000X' '282NR1301X' '282NW0100X'

742 '283Q00000X' '283X00000X' '283XC2000X' '284300000X'

743 '286500000X' '2865C1500X' '2865M2000X' '2865X1600X'

744 '310400000X' '3104A0625X' '3104A0630X' '310500000X'

745 '311500000X' '311Z00000X' '311ZA0620X' '313M00000X'

746 '314000000X' '3140N1450X' '315D00000X' '315P00000X'

747 '317400000X' '320600000X' '320700000X' '320800000X'

748 '320900000X' '322D00000X' '323P00000X' '324500000X'

749 '3245S0500X' '385H00000X' '385HR2050X' '385HR2055X'

750 '385HR2060X' '385HR2065X');

751

752

753 *- ADD RENDERING PROVIDER NAME TO THE INST FILE -*;

754 *- ADD RENDERING PROVIDER MARKET -*;

755

756 *- MERGE TO ADD RENDERING PROVIDER NAME -*;

757

758 DATA &NAME..CLMEXZ08;

759 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

760 MERGE CLMEXZ07 (IN=INA) PROVNAME (IN=INB);

761

762 BY RENDPROV;

763

764 IF INA;

765

766 IF INA AND NOT INB THEN DO;

767 RENDNAME = 'UNKNOWN';

768 PCMIND = 'N';

769 END;

770

771 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ07.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set THRUINC.CLMEXZ08 has 13478 observations and 59 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

772

773 *- NEED WHEN FILES GET TOO BIG -*;

774

775 *- SPLIT INST FILE TO MANAGABLE SIZES -*;

776

777 DATA &NAME..CLMEXZ09 &NAME..CLMEXZ10 &NAME..CLMEXZ11 &NAME..CLMEXZ12

22 The SAS System

778 &NAME..CLMEXZ13 CHECK;

779

780 SET &NAME..CLMEXZ08;

781

782 IF "&DATE1A"D LE DTPROC LE "&DATE1B"D

783 THEN OUTPUT &NAME..CLMEXZ09;

784 ELSE

785 IF "&DATE2A"D LE DTPROC LE "&DATE2B"D

786 THEN OUTPUT &NAME..CLMEXZ10;

787 ELSE

788 IF "&DATE3A"D LE DTPROC LE "&DATE3B"D

789 THEN OUTPUT &NAME..CLMEXZ11;

790 ELSE

791 IF "&DATE4A"D LE DTPROC LE "&DATE4B"D

792 THEN OUTPUT &NAME..CLMEXZ12;

793 ELSE

794 IF "&DATE5A"D LE DTPROC LE "&DATE5B"D

795 THEN OUTPUT &NAME..CLMEXZ13;

796 ELSE

797 OUTPUT CHECK;

798

799 RUN;

NOTE: There were 13478 observations read from the data set THRUINC.CLMEXZ08.

NOTE: The data set THRUINC.CLMEXZ09 has 13478 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ10 has 0 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ11 has 0 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ12 has 0 observations and 59 variables.

NOTE: The data set THRUINC.CLMEXZ13 has 0 observations and 59 variables.

NOTE: The data set WORK.CHECK has 0 observations and 59 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

800

801 *- ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE -*;

802 *- ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP -*;

803 *- FOR POSSIBLE FUTURE USE -*;

804 *- USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI") -*;

805

806 PROC SQL;

807 CREATE TABLE &NAME..CLMEXZ14 (SORTEDBY=_NULL_) AS

808 SELECT A.*, B.NETAREA AS PROVMANM,

809 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

810 FROM &NAME..CLMEXZ09 AS A LEFT JOIN ZIPAREA AS B

811 ON A.PROVZIP = B.ZIP AND

812 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ14 created, with 13478 rows and 62 columns.

813

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

814 PROC SQL;

23 The SAS System

815 CREATE TABLE &NAME..CLMEXZ15 (SORTEDBY=_NULL_) AS

816 SELECT A.*, B.NETAREA AS PROVMANM,

817 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

818 FROM &NAME..CLMEXZ10 AS A LEFT JOIN ZIPAREA AS B

819 ON A.PROVZIP = B.ZIP AND

820 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ15 created, with 0 rows and 62 columns.

821

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

822 PROC SQL;

823 CREATE TABLE &NAME..CLMEXZ16 (SORTEDBY=_NULL_) AS

824 SELECT A.*, B.NETAREA AS PROVMANM,

825 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

826 FROM &NAME..CLMEXZ11 AS A LEFT JOIN ZIPAREA AS B

827 ON A.PROVZIP = B.ZIP AND

828 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ16 created, with 0 rows and 62 columns.

829

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

830 PROC SQL;

831 CREATE TABLE &NAME..CLMEXZ17(SORTEDBY=_NULL_) AS

832 SELECT A.*, B.NETAREA AS PROVMANM,

833 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

834 FROM &NAME..CLMEXZ12 AS A LEFT JOIN ZIPAREA AS B

835 ON A.PROVZIP = B.ZIP AND

836 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ17 created, with 0 rows and 62 columns.

837

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

838 PROC SQL;

839 CREATE TABLE &NAME..CLMEXZ18 (SORTEDBY=_NULL_) AS

840 SELECT A.*, B.NETAREA AS PROVMANM,

841 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

842 FROM &NAME..CLMEXZ13 AS A LEFT JOIN ZIPAREA AS B

843 ON A.PROVZIP = B.ZIP AND

844 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ18 created, with 0 rows and 62 columns.

845

846 *- SET BACK TOGETHER TO CREATE A COMPLETE INST FILE -*;

847 *- SET CATEGORIES -*;

848 *- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXZ05.DATA -*;

24 The SAS System

849

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

850 DATA &NAME..CLMEXZ19;

851 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.

852 FILE $17. LINK $9. NET $11. MD $1.;

853 SET &NAME..CLMEXZ14 &NAME..CLMEXZ15 &NAME..CLMEXZ16

854 &NAME..CLMEXZ17 &NAME..CLMEXZ18;

855

856 IF PROVMANM = "" THEN DO;

857 PROVMANM = 'OUT OF REGION';

858 PROVARNM = 'OUT OF REGION';

859 PROVZPCT = 'OUT OF REGION';

860 END;

861

862 FILE='INSTITUTIONAL';

863

864 IF HOSOPSVC = '1' AND TEDPRVST = 'MD' THEN MD='Y';

865 ELSE

866 IF PROVTXMY IN &SPECCD AND TEDPRVST = 'MD' THEN MD='Y';

867 ELSE

868 MD='N';

869

870 IF TMAENRCD = 'U' THEN LINK = 'CIVILIAN';

871 ELSE

872 IF TMAENRCD = 'Z' THEN LINK = 'MTF';

873 ELSE

874 LINK = TMAENRCD;

875

876 IF INOUTREG='I' THEN NET = 'NETWORK';

877 ELSE

878 IF INOUTREG='O' THEN NET = 'NON-NETWORK';

879 ELSE

880 NET = INOUTREG;

881

882 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 13478 observations read from the data set THRUINC.CLMEXZ14.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ15.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ16.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ17.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ18.

NOTE: The data set THRUINC.CLMEXZ19 has 13478 observations and 66 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

 

883

884 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ19 (OBS=10);

885 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ19.THRU1712.SASS";

886 TITLE2 "MOST RECENT ADJ OF T7 INST CLAIMS SETTLED DURING PERIOD";

25 The SAS System

887 TITLE3 "PAID - UNDERWRITTEN - W/CATEGORIES & RENDPROV NAME";

888 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ40";

889 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXZ19.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

890

891

892 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ50 -*/

893

894 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ60 -*\

895

896 /*- CLAIMS EXTRACT FOR DISCOUNT & USAGE INCENTIVE*\

897

898 /*- GET THE MOST RECENT ADJUSTMENTS FOR ALL NON-INSTITUTIONAL*/

899 /*- CLAIMS SETTLED DURING THE CURRENT MONTH*/

900

901 /*- CURRENT MONTH ONLY*/

902

903 %LET DATE1 = '2018-01-01' ; /*- SETTLEMENT FROM DATE*/

904 %LET DATE3 = '2018-01-31' ; /*- SETTLEMENT THRU DATE*/

905

906

907 proc sql ;

908 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.centene.com");

909 CREATE TABLE &NAME..CLMEXZ21 AS

910 SELECT * FROM CONNECTION TO tera

911 (SELECT

912 NINST_CLM_LN.CLM_LINE_ID AS CLMLN,

913 NINST_CLM_LN.CLM_BGN_SRVC_DT AS LBEGDT,

914 NINST_CLM_LN.CLM_END_SRVC_DT AS LENDDT,

915 NINST_CLM_LN.MCS_AT_RISK AS RISKIND,

916 NINST_CLM_LN.PROV_TOT_CHRG AS LBILL,

917 NINST_CLM_LN.ALLOWED_CHRG AS LALLOW,

918 NINST_CLM_LN.PAYMENT_AMT AS LPAID,

919 NINST_CLM_LN.PRE_DSCNT_ALWD_AMT AS LPREDSC,

920 NINST_CLM_LN.TMA_NET_PRVDR_DSCNT_AMT AS LTMAANPD,

921 NINST_CLM_LN.ADJ_PRE_DSCNT_ALWD_AMT AS LADJPREDSC,

922 NINST_CLM_LN.TMA_OHI_AMT AS LTMAOHI,

923 NINST_CLM_LN.NO_SERVICES AS LNOSVCS,

924 NINST_CLM_LN.REND_PROVIDER AS RENDPROV,

925 NINST_CLM_LN.TED_PRVDR_ST_CD AS TEDPRVST,

926 NINST_CLM_LN.PROVIDER_ID AS PROVID,

927 NINST_CLM_LN.PRVDR_NAME AS BILLNAME,

928 NINST_CLM_LN.PROV_ZIP_CODE AS PROVZIP,

929 NINST_CLM_LN.PROV_SPECIALTY AS PROVSPEC,

930 NINST_CLM_LN.PROV_TYPE AS PROVTYPE,

931 NINST_CLM_LN.TMA_ENRLMT_HLTH_CD AS TMAENRCD,

932 NINST_CLM_LN.HOSP_PROF_SERV AS HOSOPSVC,

933 NINST_CLM_LN.PLAN_CVRG_OPTN_CD AS PLANCOPT,

934 NINST_CLM_LN.MCS_SYSTEM_IND AS INOUTREG,

935 NINST_CLM_LN.DRVD_MCS_OPTN_IND AS CLMCLS,

936 NINST_CLM_LN.TMA_PLACE_TRTMT_CD AS TMAPOS,

26 The SAS System

937 NINST_CLM_LN.HCSR_SPC_PRCS_1_CD AS SSPPROC1,

938 NINST_CLM_LN.HCSR_SPC_PRCS_2_CD AS SSPPROC2,

939 NINST_CLM_LN.HCSR_SPC_PRCS_3_CD AS SSPPROC3,

940 NINST_CLM_LN.HCSR_SPC_PRCS_4_CD AS SSPPROC4,

941 NINST_CLM_LN.PRVDR_TXMY_CD AS PROVTXMY,

942 NINST_CLM_HDR.CLM_BASE_ID AS CLMNBR,

943 NINST_CLM_HDR.CHAP_CLM_SUB_NO AS SUBNBR,

944 NINST_CLM_HDR.CLM_ADJ_ID AS CLMADJ,

945 NINST_CLM_HDR.CLM_TRANS_TYP AS TRANSTYP,

946 NINST_CLM_HDR.CLM_BGN_SRVC_DT AS HBEGDT,

947 NINST_CLM_HDR.CLM_END_SRVC_DT AS HENDDT,

948 NINST_CLM_HDR.DRG_DIAG1_CD AS DIAG1,

949 NINST_CLM_HDR.SPON_STATUS AS SPSTAT,

950 NINST_CLM_HDR.PATNT_SEX_REL_CODE AS PTSXREL,

951 NINST_CLM_HDR.SETTLE_CUTOFF_DATE AS DTPROC,

952 NINST_CLM_HDR.PROV_TOT_CHRG AS HBILL,

953 NINST_CLM_HDR.ALLOWED_CHRG AS HALLOW,

954 NINST_CLM_HDR.PAYMENT_AMT AS HPAID,

955 NINST_CLM_HDR.OTH_CARR_PAY AS HOHIPAID,

956 NINST_CLM_HDR.PRE_DSCNT_ALWD_AMT AS HPREDSC,

957 NINST_CLM_LN.PB_ADJ_PRE_DSCNT_ALWD_AMT AS LPBADJPREDSC,

958 NINST_CLM_HDR.DEBIT_CREDIT_CD AS HDEBITCREDIT,

959 NINST_CLM_HDR.T3_CRED_ADJST_RFND_RSN_CD AS HCREDADJCD,

960 NINST_CLM_HDR.TMA_NET_PRVDR_DSCNT_AMT AS HTMAANPD,

961 NINST_CLM_HDR.ADJ_PRE_DSCNT_ALWD_AMT AS HADJPREDSC,

962 NINST_CLM_HDR.ROOM_BRD_IND AS ROOMBRD,

963 NINST_CLM_HDR.PATNT_STATE AS BENEST,

964 NINST_CLM_HDR.PATNT_ZIP_CODE AS BENEZIP,

965 NINST_CLM_HDR.T3_CNTRCT_IND AS T3IND

966

967 FROM

968 NINST_CLM_HDR INNER JOIN NINST_CLM_LN ON

969 (NINST_CLM_HDR.CLM_BASE_ID=NINST_CLM_LN.CLM_BASE_ID and NINST_CLM_HDR.CLM_ADJ_ID=NINST_CLM_LN.CLM_ADJ_ID

970 and NINST_CLM_HDR.CLM_TRANS_TYP=NINST_CLM_LN.CLM_TRANS_TYP and

971 NINST_CLM_HDR.CHAP_CLM_SUB_NO=NINST_CLM_LN.CHAP_CLM_SUB_NO)

972

973

974

975 WHERE (SETTLE_CUTOFF_DATE BETWEEN &DATE1 AND &DATE2)

976 AND

977 NINST_CLM_LN.CLM_ADJ_ID = '099'

978 AND

979 NINST_CLM_HDR.T3_CNTRCT_IND = 'T7'

980 );

NOTE: Table THRUINC.CLMEXZ21 created, with 547091 rows and 54 columns.

981

982 %PUT &SQLXMSG &SQLXRC;

0

983

984

985

NOTE: PROCEDURE SQL used (Total process time):

real time 17.18 seconds

cpu time 1.42 seconds

 

986 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ21 (OBS=20);

27 The SAS System

 

987 TITLE1 "20 OBS FROM FACT003.A082633.CLMEXZ21.THRU1712.SASS";

988 TITLE2 "MOST RECENT ADJ NINST CLMS SETTLED &DATE1 - &DATE3";

989 TITLE3 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ60";

990 RUN;

NOTE: There were 20 observations read from the data set THRUINC.CLMEXZ21.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.05 seconds

cpu time 0.06 seconds

 

991

992

993 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ70 -*/

994

995 /*- COMBINE THIS MONTH'S CLMEXZ21 TO LAST MONTH'S CLMEXZ24 -*/

996 /*- TO GET THE ENTIRE OPTION PERIOD NON-INST ORIGINAL CLAIMS -*/

997

998 DATA CLMEXZ22;

999 SET &NAME..CLMEXZ21; /*REMOVED PRVMTH24*/

1000 RUN;

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXZ21.

NOTE: The data set WORK.CLMEXZ22 has 547091 observations and 54 variables.

NOTE: DATA statement used (Total process time):

real time 0.21 seconds

cpu time 0.22 seconds

 

1001

1002 PROC SORT DATA=CLMEXZ22 OUT=CLMEXZ23;

1003 BY CLMNBR CLMLN CLMADJ;

1004 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXZ22.

NOTE: The data set WORK.CLMEXZ23 has 547091 observations and 54 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.30 seconds

cpu time 0.71 seconds

 

1005

1006 /*- KEEP ONLY MINIUM ADJUSTMENT -*/

1007 /*- TO BE USED IN QUARTERLY DISCOUNT & OHI REPORTS -*/

1008

1009 DATA &NAME..CLMEXZ24;

1010 SET CLMEXZ23;

1011 BY CLMNBR CLMLN CLMADJ;

1012 IF FIRST.CLMLN AND T3IND = 'T7';

1013 RUN;

NOTE: There were 547091 observations read from the data set WORK.CLMEXZ23.

NOTE: The data set THRUINC.CLMEXZ24 has 547091 observations and 54 variables.

NOTE: DATA statement used (Total process time):

real time 0.28 seconds

cpu time 0.27 seconds

28 The SAS System

 

1014

1015 /*- KEEP ONLY ALLOWED > $0 & UNDERWRITTEN FOR DISCOUNT & USAGE -*/

1016 /*- CHANGED FROM PAID > $0 BASED ON EMAIL FROM RYAN CURRIER OF -*/

1017 /*- TMA ON 08/08/2012 -*/

1018

1019 DATA CLMEXZ25;

1020 SET &NAME..CLMEXZ24;

1021 IF HALLOW > 0 AND

1022 RISKIND = 'Y';

1023 RUN;

NOTE: There were 547091 observations read from the data set THRUINC.CLMEXZ24.

NOTE: The data set WORK.CLMEXZ25 has 404864 observations and 54 variables.

NOTE: DATA statement used (Total process time):

real time 0.17 seconds

cpu time 0.18 seconds

 

1024

1025 PROC PRINT UNIFORM DATA=CLMEXZ25 (OBS=20);

1026 TITLE1 "20 OBS FROM FACT003.A082633.CLMEXZ25.THRU1712.SASS";

1027 TITLE2 "MOST RECENT ADJ OF NINST CLAIMS SETTLED DURING PERIOD";

1028 TITLE3 "T7 - ALLOWED - UNDERWRITTEN - SORTED BY CLAIM NUMBER";

1029 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ70";

1030 RUN;

NOTE: There were 20 observations read from the data set WORK.CLMEXZ25.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.05 seconds

cpu time 0.06 seconds

 

1031

1032

1033 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ80 -*/

1034

1035 /*- MERGE TO DATASET FROM JSA50 TO KEEP ONLY CLAIMS -*/

1036 /*- ORIGINALLY SETTLED DURING PERIOD WITH A T7 INDICATOR -*/

1037

1038 DATA &NAME..CLMEXZ26;

1039 MERGE CLMEXT71 (IN=INA) CLMEXZ25 (IN=INB);

1040 BY CLMNBR;

1041 IF INA AND INB;

1042

1043 ORGMOP = PUT(ORIGSTLM,YYMMD7.);

1044

1045 RUN;

NOTE: There were 301426 observations read from the data set WORK.CLMEXT71.

NOTE: There were 404864 observations read from the data set WORK.CLMEXZ25.

NOTE: The data set THRUINC.CLMEXZ26 has 404864 observations and 56 variables.

NOTE: DATA statement used (Total process time):

real time 0.28 seconds

cpu time 0.28 seconds

 

29 The SAS System

 

1046

1047 /*- SORT BY RENDPROV FOR NEXT STEP -*/

1048

1049 PROC SORT DATA=&NAME..CLMEXZ26 OUT=CLMEXZ27;

1050 BY RENDPROV;

1051 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ26.

NOTE: The data set WORK.CLMEXZ27 has 404864 observations and 56 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.23 seconds

cpu time 0.48 seconds

 

1052

1053 PROC PRINT UNIFORM DATA=CLMEXZ27 (OBS=10);

1054 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ27.THRU1712.SASS";

1055 TITLE2 "MOST RECENT ADJ OF NINST CLAIMS SETTLED DURING PERIOD";

1056 TITLE3 "T7 - PAID - UNDERWRITTEN - IN JSA50";

1057 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ80";

1058 RUN;

NOTE: There were 10 observations read from the data set WORK.CLMEXZ27.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

 

1059

1060

1061 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ90 -*/

1062

1063 %LET DATE1A = 01JAN2018 ; /*- FIRST PERIOD START DATE*/

1064 %LET DATE1B = 31MAR2018 ; /*- FIRST PERIOD END DATE*/

1065 %LET DATE2A = 01APR2018 ; /*- SECOND PERIOD START DATE*/

1066 %LET DATE2B = 30JUN2018 ; /*- SECOND PERIOD END DATE*/

1067 %LET DATE3A = 01JUL2018 ; /*- THIRD PERIOD START DATE*/

1068 %LET DATE3B = 30SEP2018 ; /*- THIRD PERIOD END DATE*/

1069 %LET DATE4A = 01OCT2018 ; /*- FOURTH PERIOD START DATE*/

1070 %LET DATE4B = 31DEC2018 ; /*- FOURTH PERIOD END DATE*/

1071 %LET DATE5A = 01JAN2019 ; /*- FIFTH PERIOD START DATE*/

1072 %LET DATE5B = 31MAR2019 ; /*- FIFTH PERIOD END DATE*/

1073 %LET DATE6A = 01APR2019 ; /*- SIXTH PERIOD START DATE*/

1074 %LET DATE6B = 30JUN2019 ; /*- SIXTH PERIOD END DATE*/

1075

1076 /*- ADD RENDERING PROVIDER NAME TO THE NON-INST FILE */

1077 /*- ADD RENDERING PROVIDER MARKET */

1078

1079 /*- MERGE TO ADD RENDERING PROVIDER NAME & ZIP */

1080

1081 DATA &NAME..CLMEXZ28;

1082 LENGTH RENDPROV $12. RENDNAME $40. PCMIND $1.;

1083 MERGE CLMEXZ27 (IN=INA) PROVNAME (IN=INB);

1084

1085 BY RENDPROV;

1086

30 The SAS System

1087 IF INA;

1088

1089 IF INA AND NOT INB THEN DO;

1090 RENDNAME = 'UNKNOWN';

1091 PCMIND = 'N';

1092 END;

1093

1094 RUN;

WARNING: Multiple lengths were specified for the BY variable RENDPROV by input data sets and LENGTH, FORMAT, INFORMAT, or ATTRIB

statements. This might cause unexpected results.

WARNING: Multiple lengths were specified for the variable RENDNAME by input data set(s). This can cause truncation of data.

NOTE: There were 404864 observations read from the data set WORK.CLMEXZ27.

NOTE: There were 610 observations read from the data set WORK.PROVNAME.

NOTE: The data set THRUINC.CLMEXZ28 has 404864 observations and 58 variables.

NOTE: DATA statement used (Total process time):

real time 0.20 seconds

cpu time 0.21 seconds

 

1095

1096 /*- NEED WHEN FILES GET TOO BIG -*/

1097

1098 /*- SPLIT NON-INST FILE TO MANAGABLE SIZES */

1099

1100 DATA &NAME..CLMEXZ29 &NAME..CLMEXZ30

1101 &NAME..CLMEXZ31 &NAME..CLMEXZ32

1102 &NAME..CLMEXZ33 &NAME..CLMEXZ34 CHECK;

1103 SET &NAME..CLMEXZ28;

1104

1105 IF "&DATE1A"D LE DTPROC LE "&DATE1B"D

1106 THEN OUTPUT &NAME..CLMEXZ29;

1107 ELSE

1108 IF "&DATE2A"D LE DTPROC LE "&DATE2B"D

1109 THEN OUTPUT &NAME..CLMEXZ30;

1110 ELSE

1111 IF "&DATE3A"D LE DTPROC LE "&DATE3B"D

1112 THEN OUTPUT &NAME..CLMEXZ31;

1113 ELSE

1114 IF "&DATE4A"D LE DTPROC LE "&DATE4B"D

1115 THEN OUTPUT &NAME..CLMEXZ32;

1116 ELSE

1117 IF "&DATE5A"D LE DTPROC LE "&DATE5B"D

1118 THEN OUTPUT &NAME..CLMEXZ33;

1119 ELSE

1120 IF "&DATE6A"D LE DTPROC LE "&DATE6B"D

1121 THEN OUTPUT &NAME..CLMEXZ34;

1122 ELSE

1123 OUTPUT CHECK;

1124

1125 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ28.

NOTE: The data set THRUINC.CLMEXZ29 has 404864 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ30 has 0 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ31 has 0 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ32 has 0 observations and 58 variables.

31 The SAS System

NOTE: The data set THRUINC.CLMEXZ33 has 0 observations and 58 variables.

NOTE: The data set THRUINC.CLMEXZ34 has 0 observations and 58 variables.

NOTE: The data set WORK.CHECK has 0 observations and 58 variables.

NOTE: DATA statement used (Total process time):

real time 0.19 seconds

cpu time 0.20 seconds

 

1126

1127 /*- ADD BILLING PROVIDER MARKET AREA/MARKET/AREA/ZIP TYPE */

1128 /*- ONLY NEED BILLING PROVIDER MARKET AT THIS TIME, BUT KEEP */

1129 /*- FOR POSSIBLE FUTURE USE -*/

1130 /*- USE CLAIM HEADER BEGIN DATE (SEE EMAIL-CELESTE 1/6/11 "EDI") */

1131

1132 PROC SQL;

1133 CREATE TABLE &NAME..CLMEXZ35 (SORTEDBY=_NULL_) AS

1134 SELECT A.*, B.NETAREA AS PROVMANM,

1135 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1136 FROM &NAME..CLMEXZ29 AS A LEFT JOIN ZIPAREA AS B

1137 ON A.PROVZIP = B.ZIP AND

1138 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ35 created, with 404864 rows and 61 columns.

1139

NOTE: PROCEDURE SQL used (Total process time):

real time 0.62 seconds

cpu time 0.86 seconds

 

1140 PROC SQL;

1141 CREATE TABLE &NAME..CLMEXZ36 (SORTEDBY=_NULL_) AS

1142 SELECT A.*, B.NETAREA AS PROVMANM,

1143 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1144 FROM &NAME..CLMEXZ30 AS A LEFT JOIN ZIPAREA AS B

1145 ON A.PROVZIP = B.ZIP AND

1146 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ36 created, with 0 rows and 61 columns.

1147

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

1148 PROC SQL;

1149 CREATE TABLE &NAME..CLMEXZ37 (SORTEDBY=_NULL_) AS

1150 SELECT A.*, B.NETAREA AS PROVMANM,

1151 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1152 FROM &NAME..CLMEXZ31 AS A LEFT JOIN ZIPAREA AS B

1153 ON A.PROVZIP = B.ZIP AND

1154 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ37 created, with 0 rows and 61 columns.

1155

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

32 The SAS System

 

1156 PROC SQL;

1157 CREATE TABLE &NAME..CLMEXZ38 (SORTEDBY=_NULL_) AS

1158 SELECT A.*, B.NETAREA AS PROVMANM,

1159 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1160 FROM &NAME..CLMEXZ32 AS A LEFT JOIN ZIPAREA AS B

1161 ON A.PROVZIP = B.ZIP AND

1162 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ38 created, with 0 rows and 61 columns.

1163

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1164 PROC SQL;

1165 CREATE TABLE &NAME..CLMEXZ39 (SORTEDBY=_NULL_) AS

1166 SELECT A.*, B.NETAREA AS PROVMANM,

1167 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1168 FROM &NAME..CLMEXZ33 AS A LEFT JOIN ZIPAREA AS B

1169 ON A.PROVZIP = B.ZIP AND

1170 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ39 created, with 0 rows and 61 columns.

1171

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1172 PROC SQL;

1173 CREATE TABLE &NAME..CLMEXZ40 (SORTEDBY=_NULL_) AS

1174 SELECT A.*, B.NETAREA AS PROVMANM,

1175 B.AREA AS PROVARNM, B.AREATYP AS PROVZPCT

1176 FROM &NAME..CLMEXZ34 AS A LEFT JOIN ZIPAREA AS B

1177 ON A.PROVZIP = B.ZIP AND

1178 B.STARTDT LE A.HBEGDT LE B.ENDDT;

NOTE: Table THRUINC.CLMEXZ40 created, with 0 rows and 61 columns.

1179

1180 /*- MERGE BACK TOGETHER TO CREATE A COMPLETE NON-INST FILE -*/

1181 /*- SET CATEGORIES -*/

1182 /*- SHOULD HAVE SAME NUMBER OF OBS AS CLMEXZ27.DATA -*/

1183

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.02 seconds

 

1184 DATA &NAME..CLMEXZ41;

1185 LENGTH PROVMANM $15. PROVARNM $31. PROVZPCT $30.

1186 FILE $17. LINK $9. NET $11. MD $1.;

1187 SET &NAME..CLMEXZ35 &NAME..CLMEXZ36

1188 &NAME..CLMEXZ37 &NAME..CLMEXZ38

1189 &NAME..CLMEXZ39 &NAME..CLMEXZ40;

33 The SAS System

1190

1191 IF PROVMANM = "" THEN DO;

1192 PROVMANM = 'OUT OF REGION';

1193 PROVARNM = 'OUT OF REGION';

1194 PROVZPCT = 'OUT OF REGION';

1195 END;

1196

1197 FILE='NON-INSTITUTIONAL';

1198

1199 MD='N';

1200

1201 IF TMAENRCD = 'U' THEN LINK = 'CIVILIAN';

1202 ELSE

1203 IF TMAENRCD = 'Z' THEN LINK = 'MTF';

1204 ELSE

1205 LINK = TMAENRCD;

1206

1207 IF INOUTREG='I' THEN NET = 'NETWORK';

1208 ELSE

1209 IF INOUTREG='O' THEN NET = 'NON-NETWORK';

1210 ELSE

1211 NET = INOUTREG;

1212

1213 RUN;

WARNING: Multiple lengths were specified for the variable PROVMANM by input data set(s). This can cause truncation of data.

WARNING: Multiple lengths were specified for the variable PROVARNM by input data set(s). This can cause truncation of data.

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ35.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ36.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ37.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ38.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ39.

NOTE: There were 0 observations read from the data set THRUINC.CLMEXZ40.

NOTE: The data set THRUINC.CLMEXZ41 has 404864 observations and 65 variables.

NOTE: DATA statement used (Total process time):

real time 0.24 seconds

cpu time 0.24 seconds

 

1214

1215 PROC PRINT UNIFORM DATA=&NAME..CLMEXZ41 (OBS=10);

1216 TITLE1 "10 OBS FROM FACT003.A082633.CLMEXZ41.THRU1712.SASS";

1217 TITLE2

1218 "MOST RECENT ADJ OF NON-INST CLAIMS SETTLED DURING PERIOD";

1219 TITLE3 "T7 - PAID - UNDERWRITTEN - W/CATEGORIES & RENDPROV NAME";

1220 TITLE4 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ90";

1221 RUN;

NOTE: There were 10 observations read from the data set THRUINC.CLMEXZ41.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.04 seconds

 

1222

1223

1224 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSZ100 -*/

34 The SAS System

1225

1226 /*- SORT NON-INSTITUTIONAL ALLOWED/UNDERWRITTEN FILE -*/

1227

1228 PROC SORT DATA=&NAME..CLMEXZ41 OUT=&NAME..CLMEXZ42;

1229 BY CLMNBR CLMLN;

1230 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ41.

NOTE: The data set THRUINC.CLMEXZ42 has 404864 observations and 65 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.33 seconds

cpu time 0.62 seconds

 

1231

1232

1233 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSB10 -*/

1234

1235 /*- START WITH PAID/UNDERWRITTEN/SORTED FILE -*/

1236 /*- EXCLUDE OHI PAID, MARYLAND PROVIDERS -*/

1237 /*- AND AS OF THRU1305 RUN, EXCLUDE ADSMS TOO (PER DAN) -*/

1238

1239 /*- IDENTIFY CLAIMS TO BE EXCLUDED -*/

1240 /*- OHI PAID CLAIMS, MARYLAND PROVIDERS & ADSMS -*/

1241

1242 DATA EXC;

1243 SET CLMEXZ20;

1244

1245 IF LTMAOHI GT 0 OR

1246 MD = 'Y' OR

1247 INOUTREG = 'O' OR

1248 ( SPSTAT = '1' AND

1249 PTSXREL IN ('1' '2') )

1250 THEN OUTPUT;

1251 ELSE

1252 DELETE;

1253

1254 KEEP CLMNBR;

1255 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ20.

NOTE: The data set WORK.EXC has 4889 observations and 1 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1256

1257 PROC SORT NODUPKEY DATA=EXC;

1258 BY CLMNBR;

1259 RUN;

NOTE: There were 4889 observations read from the data set WORK.EXC.

NOTE: 3395 observations with duplicate key values were deleted.

NOTE: The data set WORK.EXC has 1494 observations and 1 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

35 The SAS System

cpu time 0.00 seconds

 

1260

1261 /*- MERGE THE T7, PAID, UNDERWRITTEN INST FILE TO THE LIST OF -*/

1262 /*- CLAIMS THAT SHOULD BE EXCLUDED TO ELIMINATE THOSE CLAIMS -*/

1263

1264 DATA &NAME..DISC01;

1265 MERGE CLMEXZ20 (IN=INA) EXC (IN=INB);

1266 BY CLMNBR;

1267

1268 IF INA AND NOT INB;

1269

1270 RUN;

NOTE: There were 13478 observations read from the data set WORK.CLMEXZ20.

NOTE: There were 1494 observations read from the data set WORK.EXC.

NOTE: The data set THRUINC.DISC01 has 8589 observations and 66 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.02 seconds

 

1271

1272 /*- DO THE SAME FOR THE NON-INST FILE -*/

1273

1274 DATA EXC;

1275 SET &NAME..CLMEXZ42;

1276

1277 IF LTMAOHI GT 0 OR

1278 MD = 'Y' OR

1279 INOUTREG = 'O' OR

1280 ( SPSTAT = '1' AND

1281 PTSXREL IN ('1' '2') )

1282 THEN OUTPUT;

1283 ELSE

1284 DELETE;

1285

1286 KEEP CLMNBR;

1287 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ42.

NOTE: The data set WORK.EXC has 155190 observations and 1 variables.

NOTE: DATA statement used (Total process time):

real time 0.07 seconds

cpu time 0.08 seconds

 

1288

1289 PROC SORT NODUPKEY DATA=EXC;

1290 BY CLMNBR;

1291 RUN;

NOTE: There were 155190 observations read from the data set WORK.EXC.

NOTE: 65671 observations with duplicate key values were deleted.

NOTE: The data set WORK.EXC has 89519 observations and 1 variables.

NOTE: PROCEDURE SORT used (Total process time):

36 The SAS System

real time 0.03 seconds

cpu time 0.03 seconds

 

1292

1293 /*- MERGE THE T7, PAID, UNDERWRITTEN NON-INST FILE TO THE LIST -*/

1294 /*- OF CLAIMS THAT SHOULD BE EXCLUDED TO ELIMINATE THOSE CLAIMS -*/

1295

1296 DATA &NAME..DISC02;

1297 MERGE &NAME..CLMEXZ42 (IN=INA) EXC (IN=INB);

1298 BY CLMNBR;

1299

1300 IF INA AND NOT INB;

1301

1302 RUN;

NOTE: There were 404864 observations read from the data set THRUINC.CLMEXZ42.

NOTE: There were 89519 observations read from the data set WORK.EXC.

NOTE: The data set THRUINC.DISC02 has 249630 observations and 65 variables.

NOTE: DATA statement used (Total process time):

real time 0.20 seconds

cpu time 0.21 seconds

 

1303

1304 DATA &NAME..DISC03;

1305 SET &NAME..DISC01 &NAME..DISC02;

1306 RUN;

NOTE: There were 8589 observations read from the data set THRUINC.DISC01.

NOTE: There were 249630 observations read from the data set THRUINC.DISC02.

NOTE: The data set THRUINC.DISC03 has 258219 observations and 66 variables.

NOTE: DATA statement used (Total process time):

real time 0.15 seconds

cpu time 0.15 seconds

 

1307

1308 PROC PRINT UNIFORM DATA=&NAME..DISC03 (OBS=20);

1309 TITLE1 "20 OBS FROM FACT003.A082633.DISC03.THRU1712.SASS";

1310 TITLE2 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSB10";

1311 RUN;

NOTE: There were 20 observations read from the data set THRUINC.DISC03.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.06 seconds

cpu time 0.07 seconds

 

1312

1313

1314 /*- FACT003.ROUTINE.T7-OP8(THRU1712) - JSB20 -*/

1315

1316 /*- SPLIT INTO CLAIMS WITH DISCOUNTS CALCULATED AT HEADER LEVEL -*/

1317 /*- AND THOSE AT LINE LEVEL -*/

1318 /*- CREATE SUMMARIZED OUTPUT FILES -*/

1319

37 The SAS System

1320 *- SPLIT INTO 2 CATEGORIES -*;

1321

1322 DATA DISC04 DISC05;

1323 &NAME..SET DISC03;

NOTE: Line generated by the macro variable "NAME".

1323 THRUINC

___________

557

ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

ERROR 557-185: Variable THRUINC is not an object.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

1324

1325 IF ROOMBRD = 'Y' THEN

1326 DO;

1327 IF HALLOW = 0 THEN DELETE;

1328 ALLOW = HALLOW;

1329 PREDSC = HPREDSC;

1330 TMAANPD = HTMAANPD;

1331

1332 IF LPBADJPREDSC = '1' OR

1333 HDEBITCREDIT = 'C' AND

1334 HCREDADJCD = '' THEN

1335 DO;

1336 IF HADJPREDSC < HALLOW THEN

1337 DO;

1338 CALCDISC = 0;

1339 USEPRE = HALLOW;

1340 END;

1341 ELSE

1342 DO;

1343 CALCDISC = HADJPREDSC - HALLOW;

1344 USEPRE = HADJPREDSC;

1345 END;

1346 END;

1347 ELSE

1348 DO;

1349 IF PREDSC < HALLOW THEN

1350 DO;

1351 CALCDISC = 0;

1352 USEPRE = HALLOW;

1353 END;

1354 ELSE

1355 DO;

1356 CALCDISC = HPREDSC - HALLOW;

1357 USEPRE = HPREDSC;

1358 END;

1359 END;

1360 OUTPUT DISC04;

1361 END;

1362 ELSE

1363 DO;

1364 IF LALLOW = 0 THEN DELETE;

38 The SAS System

1365 ALLOW = LALLOW;

1366 PREDSC = LADJPREDSC;

1367 TMAANPD = LTMAANPD;

1368

1369 IF LADJPREDSC < LALLOW THEN

1370 DO;

1371 CALCDISC = 0;

1372 USEPRE = LALLOW;

1373 END;

1374 ELSE

1375 DO;

1376 CALCDISC = LADJPREDSC - LALLOW;

1377 USEPRE = LADJPREDSC;

1378 END;

1379

1380 OUTPUT DISC05;

1381 END;

1382 RUN;

1383

1384

1385 GOPTIONS NOACCESSIBLE;

1386 %LET _CLIENTTASKLABEL=;

1387 %LET _CLIENTPROCESSFLOWNAME=;

1388 %LET _CLIENTPROJECTPATH=;

1389 %LET _CLIENTPROJECTNAME=;

1390 %LET _SASPROGRAMFILE=;

1391

1392 ;*';*";*/;quit;run;

1393 ODS _ALL_ CLOSE;

1394

1395

1396 QUIT; RUN;

1397

 

AME=;

1390 %LET _SASPROGRAMFILE=;

1391

1392 ;*';*";*/;quit;run;

1393 ODS _ALL_ CLOSE;

1394

1395

1396 QUIT; RUN;

1397

 


Accepted Solutions
Solution
‎02-17-2018 01:38 AM
PROC Star
Posts: 549

Re: ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

here is the problem 

 

1322 DATA DISC04 DISC05;

1323 &NAME..SET DISC03

 

change it to 

 DATA DISC04 DISC05;

 SET  &NAME..DISC03;

 

View solution in original post


All Replies
Solution
‎02-17-2018 01:38 AM
PROC Star
Posts: 549

Re: ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

here is the problem 

 

1322 DATA DISC04 DISC05;

1323 &NAME..SET DISC03

 

change it to 

 DATA DISC04 DISC05;

 SET  &NAME..DISC03;

 

Super User
Posts: 24,003

Re: ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.

@essdee In the future please post the section that has the error, not the whole code. The error is at line 1300 and your log starts at 53. That's more than 1000 lines of codes that aren't needed. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 837 views
  • 1 like
  • 3 in conversation