/************************** COMMENTS *******************************/ /* */ /* IF YOU RECEIVED HHA FILES BEFORE JANUARY 2006 THEN YOU WILL */ /* NEED A DIFFERENT INPUT STATEMENT. PLEASE CONTACT ANGELA MEEKINS VIA */ /* E-MAIL MEEKINSA@IMSWEB.COM AND AN INPUT STATEMENT WILL BE SENT TO */ /* YOU. */ /***********************************************************************/ /* */ /* For cancer files, Patient Identifier is @03 REGCASE $char10. */ /* For non-cancer files, Patient Identifier is @03 HICBIC $char11. */ /* */ /***********************************************************************/ /*************** IMPORTANT PROGRAMING NOTES ************************/ /* TO IDENTIFY CLAIMS PER PATIENT */ /* */ /* The REGCASE/HICBIC, daily date in column 43 and the link number in */ /* column 357 should be used to identify all the records for each */ /* claim per patient. All are needed to identify a claim. */ /***********************************************************************/ /***********************************************************************/ /* TO CALCULATE COSTS PER PATIENT */ /* */ /* When calculating costs per patient you will need to use the payment */ /* amount variable in column 136. This variable is present only when */ /* record count (column 371) is equal to 1. This is to help eliminate */ /* duplicate counting. */ /***********************************************************************/ *filename hhafixed '/directory/hhasaf91.txt'; /*reading in an un-zipped file*/ filename hhafixed pipe 'gunzip -c /directory/hhasaf91.txt.gz'; /*reading in a zipped file*/ options nocenter validvarname=upcase; data hha; infile hhafixed lrecl=374 missover pad; input @1 ric_cd $char1. @2 rec_lvl $char1. @3 regcase $char10. /*@3 HICBIC $char11.*/ /*Non Cancer ID*/ @14 bic $char2. @16 state_cd $char2. @18 cnty_cd $char3. @21 st_sgmt $char1. @22 bene_zip $char9. /****************Special Permission Required****************/ @31 sex $char1. @32 race $char1. @41 ms_cd $char2. @43 daily_dtm $char2. /*use daily date and link number to identify a claim for each patient*/ @45 daily_dtd $char2. @47 daily_dty $char4. @51 from_dtm $char2. @53 from_dtd $char2. @55 from_dty $char4. @59 thru_dtm $char2. @61 thru_dtd $char2. @63 thru_dty $char4. @67 cwfloccd $char1. @68 acrt_dtm $char2. @70 acrt_dtd $char2. @72 acrt_dty $char4. @76 acrtn_nm 4. @80 disp_cd $char2. @82 fi_num $char5. @87 rcpt_dtm $char2. @89 rcpt_dtd $char2. @91 rcpt_dty $char4. @95 aprv_dtm $char2. @97 aprv_dtd $char2. @99 aprv_dty $char4. @103 schl_dtm $char2. @105 schl_dtd $char2. @107 schl_dty $char4. @111 provider $char6. @117 query_cd $char1. @118 fac_type $char1. @119 typesrvc $char1. @120 freq_cd $char1. @121 pe_ric $char1. @122 trans_cd $char1. @136 pmt_amt 15.2 @151 tot_chrg 15.2 @203 authrztn $char18. @221 prpay_cd $char1. @222 prpayamt 15.2 @237 actioncd $char1. @238 cancelcd $char1. @239 at_upin $char6. @245 stus_cd $char2. @247 hhrevcnt $char3. @250 center $char4. @254 hcpcs $char5. @259 mf1 $char2. @261 mf2 $char2. @263 unit 8. @271 rate 15.2 @286 charge 15.2 @301 ded $char1. @302 dgn_cd1 $char5. @307 dgn_cd2 $char5. @312 dgn_cd3 $char5. @317 dgn_cd4 $char5. @322 dgn_cd5 $char5. @327 dgn_cd6 $char5. @332 dgn_cd7 $char5. @337 dgn_cd8 $char5. @342 dgn_cd9 $char5. @347 dgn_cd10 $char5. @352 year $char4. @356 saf_ind $char1. @357 link_num $char10. /*use daily date and link number to identify a claim for each patient*/ @367 tot_seg $char2. @369 seg_num $char2. @371 rec_count $char3. @374 filler $char1. ; label rec_lvl = '2 - Near-line rec. version' ric_cd = '3 - NCH Near-line RIC' bic = '8 - BIC' state_cd = '10 - State code' cnty_cd = '36 - County code' st_sgmt = '9 - St. segment near-line code' bene_zip = '43 - Zip code (Special Permission Required)' sex = '44 - Sex code' race = '45 - Race code' ms_cd = '47 - Medicare Status code' daily_dty = '20 - Year of Daily processing' daily_dtm = '20 - Month of Daily processing' daily_dtd = '20 - Day of Daily processing' from_dty = '11 - Year of From date' from_dtm = '11 - Month of From date' from_dtd = '11 - Day of From date' thru_dty = '12 - Year of Thru date' thru_dtm = '12 - Month of Thru date' thru_dtd = '12 - Day of Thru date' cwfloccd = '51 - CWF location' acrt_dty = '14 - Year of Accretion' acrt_dtm = '14 - Month of Accretion' acrt_dtd = '14 - Day of Accretion' acrtn_nm = '15 - Accretion number' disp_cd = '33 - Claim disposition code' fi_num = '40 - Ficarr id number' rcpt_dty = '37 - Year of receipt date' rcpt_dtm = '37 - Month of receipt date' rcpt_dtd = '37 - Day of receipt date' aprv_dty = '61 - Year of processing date' aprv_dtm = '61 - Month of processing date' aprv_dtd = '61 - Day of processing date' schl_dty = '38 - Year of payment date' schl_dtm = '38 - Month of payment date' schl_dtd = '38 - Day of payment date' provider = '19 - Provider number' query_cd = '18 - Claim query' fac_type = '28 - Claim facility type' typesrvc = '29 - Classification type code' freq_cd = '30 - Claim frequency code' pe_ric = '26 - Payment and edit ric' trans_cd = '27 - Claim transaction' pmt_amt = '56 - Claim payment amount' authrztn = '82 - Claims Treatment Authorization number' tot_chrg = '91 - Claim total charge amt.' prpay_cd = '58 - Primary payer code' prpayamt = '57 - Primary payer payment amt.' actioncd = '60 - Claim action' cancelcd = '59 - Cancel reason' at_upin = '64 - Claim Attending physician UPIN' stus_cd = '87 - Patient discharge status code' hhrevcnt = '24 - Revenue center code count' center = '147 - Revenue center code' mf1 = '155 - Initial modifier code' mf2 = '156 - Second modifier code' hcpcs = '154 - Hcpcs code' unit = '167 - Revenue center unit count' rate = '168 - Revenue center rate amount' charge = '180 - Revenue center total amount' ded = '182 - Deductible coinsurance code' dgn_cd1 = '132 - ICD-9-CM code #1' dgn_cd2 = '132 - ICD-9-CM code #2' dgn_cd3 = '132 - ICD-9-CM code #3' dgn_cd4 = '132 - ICD-9-CM code #4' dgn_cd5 = '132 - ICD-9-CM code #5' dgn_cd6 = '132 - ICD-9-CM code #6' dgn_cd7 = '132 - ICD-9-CM code #7' dgn_cd8 = '132 - ICD-9-CM code #8' dgn_cd9 = '132 - ICD-9-CM code #9' dgn_cd10 = '132 - ICD-9-CM code #10' link_num = '21 - Segment Link Number' tot_seg = '22 - Total Segment Count' seg_num = '23 - Segment Number' saf_ind = 'SAF Indicator' year = 'Claim Year' rec_count = 'Record Count for Claim' ; run; proc contents data=hha position; run;