/* Published: 11/1/2017 */ /************************** COMMENTS *******************************/ /* THIS INPUT STATMENT IS FOR THE 2017 CAHPS-MEDICARE LINKAGE. */ /* IF YOU RECEIVED DME FILES BEFORE NOVEMBER 2017 THEN YOU WILL */ /* NEED A DIFFERENT INPUT STATEMENT. PLEASE CONTACT IMS VIA E-MAIL AT */ /* SEER-MEDICARE@IMSWEB.COM AND AN INPUT STATEMENT WILL BE SENT TO YOU */ /***********************************************************************/ /*************** IMPORTANT PROGRAMING NOTES ************************/ /* TO IDENTIFY CLAIMS PER PATIENT */ /* */ /* The Patient ID and Claim ID (column 623) should be used to identify */ /* all the records for each claim per patient. Both are needed to */ /* identify a claim. */ /***********************************************************************/ /* If you are using PC SAS to read in these files you will have to */ /* un-zip the files first and use the un-zipped filename statement, */ /* rather than using the zipped files and statement. */ /***********************************************************************/ *filename dmein '/directory/dme15.txt'; /*reading in an un-zipped file*/ filename dmein pipe 'gunzip -c /directory/dme15.txt.gz'; /*reading in a zipped file*/ *filename dmein pipe 'gunzip -c /directory/dme*.txt.gz'; /*using wildcard to match multiple files */ options nocenter validvarname=upcase; data dme; infile dmein lrecl=635 missover pad; input @001 PHIC $char11. /* Patient ID (for either PEDSF or non-PEDSF Patients) */ @012 bic $char2. @014 state_cd $char2. @016 cnty_cd $char3. @019 bene_zip $char9. /*****Special Permission Required*****/ @028 ms_cd $char2. @030 clm_type $char2. @032 from_dtm $char2. @034 from_dtd $char2. @036 from_dty $char4. @040 thru_dtm $char2. @042 thru_dtd $char2. @044 thru_dty $char4. @048 fi_num $char5. @053 entry_cd $char1. @055 asgmntcd $char1. @056 ord_upin $char6. @062 ord_npi $char10. @072 hcfaspec $char2. @074 prtcptg $char1. @075 proindcd $char2. @077 pay80cd $char1. @078 dedind $char1. @079 payindcd $char1. @080 mtuscnt 12.3 @092 mtusind $char1. @093 hcpcs $char5. @098 mf1 $char2. @100 mf2 $char2. @102 mf3 $char2. @104 mf4 $char2. @106 lsubmamt 15.2 @121 lalowamt 15.2 @136 hcfatype $char1. @137 plcsrvc $char2. @139 frexpenm $char2. @141 frexpend $char2. @143 frexpeny $char4. @147 lsexpenm $char2. @149 lsexpend $char2. @151 lsexpeny $char4. @155 srvc_cnt 12. @167 linediag $char7. @174 linepmt 15.2 @189 ldedamt 15.2 @204 lprpayat 15.2 @219 lprpaycd $char1. @220 lbenpmt 15.2 @235 lprvpmt 15.2 @250 coinamt 15.2 @265 lintamt 15.2 @280 dedapply 15.2 @295 prpayamt 15.2 @310 pmt_amt 15.2 @325 allowamt 15.2 @340 sbmtamt 15.2 @355 prov_pmt 15.2 @370 prpyalow 15.2 @385 hcpcs_yr $char1. @386 sup_type $char1. @387 suplrnum $char10. @397 sup_npi $char10. @407 prvstate $char2. @409 ndc_cd $char11. @420 clinecnt $char2. @440 pdgns_cd $char7. @447 cdgncnt $char2. @449 (dgn_cd1-dgn_cd12) ($char7.) @536 benepaid 15.2 @559 nchben_pmt 15.2 @574 docindcd $char1. @575 eq_bic $char2. @577 clm_type2 $char2. @579 prov_liab $char1. @580 dmepcamt 15.2 @595 tax_num $char10. @605 price_cd $char2. @607 prcngzip $char9. @616 year $char4. @620 rec_count $char3. @623 claim_id 10. @633 pmtdnlcd $char2. ; label PHIC ='Patient ID' bic = 'Beneficiary Identification Code' state_cd = 'Beneficiary Residence SSA Standard State Code' cnty_cd = 'Beneficiary Residence SSA Standard County Code' bene_zip = 'Beneficiary Mailing Contact ZIP Code' /*****Encrypted*****/ ms_cd = 'CWF Beneficiary Medicare Status Code' clm_type = 'NCH Claim Type Code' from_dtm = 'Claim From Month' from_dtd = 'Claim From Day' from_dty = 'Claim From Year' thru_dtm = 'Claim Through Month' thru_dtd = 'Claim Through Day' thru_dty = 'Claim Through Year' fi_num = 'Carrier Number' entry_cd = 'Carrier Claim Entry Code' asgmntcd = 'Carrier Claim Provider Assignment Indicator Switch' ord_upin = 'DMERC Claim Ordering Physician UPIN Number' ord_npi = 'DMERC Claim Ordering Physician NPI Number' hcfaspec = 'Line HCFA Provider Specialty Code' prtcptg = 'Line Provider Participating Indicator Code' proindcd = 'Line Processing Indicator Code' pay80cd = 'Line Payment 80%/100% Code' dedind = 'Line Service deductible indicator Switch' payindcd = 'Line Payment Indicator Code' mtuscnt = 'DMERC Line Miles/Time/Units/Services Count' mtusind = 'DMERC Line Miles/Time/Units/Services Indicator Code' hcpcs = 'Line HCPCS Code' mf1 = 'Line HCPCS Initial Modifier Code' mf2 = 'Line HCPCS Second Modifier Code' mf3 = 'DMERC Line HCPCS Third Modifier Code' mf4 = 'DMERC Line HCPCS Fourth Modifier Code' lsubmamt = 'Line Submitted Charge Amount' lalowamt = 'Line Allowed Charge Amount' hcfatype = 'Line HCFA Type Service Code' plcsrvc = 'Line Place of Service Code' frexpenm = 'Line First Expense Month' frexpend = 'Line First Expense Day' frexpeny = 'Line First Expense Year' lsexpenm = 'Line Last Expense Month' lsexpend = 'Line Last Expense Day' lsexpeny = 'Line Last Expense Year' srvc_cnt = 'Line Service Count' linediag = 'Line Diagnosis Code' linepmt = 'Line NCH Payment Amount' ldedamt = 'Line Beneficiary Part B Deductible Amount' lprpayat = 'Line Beneficiary Primay Payer Paid Amount' lprpaycd = 'Line Beneficiary Primay Payer Code' lbenpmt = 'Line Beneficiary Payment Amount' lprvpmt = 'Line Provider Payment Amount' coinamt = 'Line Coinsurance Amount' lintamt = 'Line Interest Amount' prpyalow = 'Line Primary Payer Allowed Charge Amount' sup_type = 'DMERC Line Supplier Type Code' suplrnum = 'DMERC Line Supplier Provider Number' sup_npi = 'DMERC Line Item Supplier NPI Number' prvstate = 'DMERC Line Provider State Code' ndc_cd = 'Line National Drug Code' cdgncnt = 'laim Diagnosis Code Count' docindcd = 'Line Additional Claim Documentation Indicator Code' dgn_cd1 = 'Claim Diagnosis Code #1' dgn_cd2 = 'Claim Diagnosis Code #2' dgn_cd3 = 'Claim Diagnosis Code #3' dgn_cd4 = 'Claim Diagnosis Code #4' dgn_cd5 = 'Claim Diagnosis Code #5' dgn_cd6 = 'Claim Diagnosis Code #6' dgn_cd7 = 'Claim Diagnosis Code #7' dgn_cd8 = 'Claim Diagnosis Code #8' dgn_cd9 = 'Claim Diagnosis Code #9' dgn_cd10 = 'Claim Diagnosis Code #10' dgn_cd11 = 'Claim Diagnosis Code #11' dgn_cd12 = 'Claim Diagnosis Code #12' year = 'Year' pdgns_cd = 'Principal Diagnosis Code' clinecnt = 'Claim Total Line Count' benepaid = 'Carrier Claim Beneficiary Paid Amount' dedapply = 'Carrier Claim Cash Deductible Applied Amount' hcpcs_yr = 'Carrier Claim HCPCS Year Code' prpayamt = 'Carrier Claim Primary Payer Paid Amount' pmt_amt = 'Claim Payment Amount' allowamt = 'NCH Claim Allowed Charge Amount' sbmtamt = 'NCH Carrier Claim Submitted Charge Amount' eq_bic = 'NCH Category Equatable Beneficiary Identification Code' nchben_pmt = 'NCH Claim Beneficiary Payment Amount' prov_pmt = 'NCH Claim Provider Payment Amount' clm_type2 = 'M Type (same as clm_type)' prov_liab = 'Line Waiver Of Provider Liability Switch' dmepcamt = 'Line DME Purchase Price Amount' tax_num = 'Line Provider Tax Number' price_cd = 'Line Pricing State Code' prcngzip = 'Line Pricing Zip Code' /******Encrypted******/ rec_count = 'Record Count for Claim' claim_id = 'Claim ID' pmtdnlcd = 'Carrier Claim Payment Denial Code' ; run; proc contents data=dme position; run;