/*************************** COMMENTS ********************************/ /* */ /* IF YOU RECEIVED HOSPICE FILES BEFORE JANUARY 2009 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 @01 REGCASE $char10. */ /* For non-cancer files, Patient Identifier is @01 HICBIC $char11. */ /* */ /*************************************************************************/ /*************** IMPORTANT PROGRAMING NOTES **************************/ /* TO IDENTIFY CLAIMS PER PATIENT */ /* */ /* The REGCASE/HICBIC, daily date in column 266 and the link number in */ /* column 256 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 64. This variable is present only when */ /* record count (column 278) is equal to 1. This is to help eliminate */ /* duplicate counting. */ /*************************************************************************/ /***********************************************************************/ /* */ /* Please Note: 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 inout '/directory/hspsaf98.txt'; /*reading in an un-zipped file*/ filename inout pipe 'gunzip -c /directory/hspsaf98.txt.gz'; /*reading in a zipped file*/ *filename inout pipe 'gunzip -c /directory/hspsaf*.txt.gz'; /*using wildcard to match multiple files */ options nocenter validvarname=upcase; data hospice(drop=filler j inc2); infile inout lrecl=352 recfm=f missover pad; input @001 patient_id $char11. /*@001 REGCASE $char10.*/ /*ID for Cancer Patients*/ /*@001 HICBIC $char11.*/ /*ID for Non Cancer 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. /*New in 2008 linkage*/ @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 provider $char6. @059 query_cd $char1. @060 fac_type $char1. @061 typesrvc $char1. @062 freq_cd $char1. @063 nopay_cd $char1. /*New in 2008 linkage*/ @064 pmt_amt 15.2 @079 tot_chrg 15.2 @094 prpay_cd $char1. @095 prpayamt 15.2 @110 actioncd $char1. @111 prvstate $char2. @123 at_upin $char6. @139 op_upin $char6. @155 ot_upin $char6. @171 stus_cd $char2. @173 pps_ind $char1. @174 hsrevcnt $char3. @177 center $char4. @181 cen_dtm $char2. @183 cen_dtd $char2. @185 cen_dty $char4. @189 hcpcs $char5. @194 mf1 $char2. @196 mf2 $char2. @198 unit 8. @206 rate 15.2 @221 charge 15.2 @236 pay 15.2 @251 ded $char1. @252 year $char4. @256 link_num $char10. /*use daily date and link number to identify a claim for each patient*/ @266 daily_dtm $char2. /*use daily date and link number to identify a claim for each patient*/ @268 daily_dtd $char2. @270 daily_dty $char4. @274 tot_seg $char2. @276 seg_num $char2. @278 rec_count $char3. @281 util_day 4. @285 hspstrtm $char2. @287 hspstrtd $char2. @289 hspstrty $char4. @293 exhs_dtm $char2. @295 exhs_dtd $char2. @297 exhs_dty $char4. @301 hospcprd $char1. @352 filler $char1. @; array dgn(10) $ dgn_cd1-dgn_cd10; inc2=302; do j = 1 to 10; input @inc2 dgn(j) $char5. @; inc2=inc2+5; end; input; label patient_id= 'Patient ID' /*regcase = 'SEER Registry Case Number - Cancer Patients'*/ /*shufhic = 'Patient ID for the Non Cancer Patients'*/ bic = '8 - BIC' state_cd = '10 - State code' cnty_cd = '36 - County code' bene_zip = '43 - Zip code (Special Permission Required)' 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' fi_num = '40 - Ficarr id number' 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' pmt_amt = '56 - Claim payment amount' tot_chrg = '91 - Claim total charge amt.' prpay_cd = '58 - Primary payer code' prpayamt = '57 - Primary payer payment amt.' actioncd = '60 - Claim action' at_upin = '64 - Claim attending physician UPIN' stus_cd = '87 - Patient discharge status code' util_day = '110 - Utilization days count' hspstrty = '107 - Year of start date' hspstrtm = '107 - Month of start date' hspstrtd = '107 - Day of start date' exhs_dty = '108 - Year of exhausted' exhs_dtm = '108 - Month of exhausted' exhs_dtd = '108 - Day of exhausted' hospcprd = '111 - Hospice period count' hsrevcnt = '24 - Revenue center code count' center = '150 - Revenue center code' mf1 = '158 - Initial modifier code' mf2 = '159 - Second modifier code' hcpcs = '157 - Hcpcs code' unit = '170 - Revenue center unit count' rate = '171 - Revenue center rate amount' charge = '183 - Revenue center total amount' ded = '185 - Deductible coinsurance code' dgn_cd1 = '131 - ICD-9-CM code #1' dgn_cd2 = '131 - ICD-9-CM code #2' dgn_cd3 = '131 - ICD-9-CM code #3' dgn_cd4 = '131 - ICD-9-CM code #4' dgn_cd5 = '131 - ICD-9-CM code #5' dgn_cd6 = '131 - ICD-9-CM code #6' dgn_cd7 = '131 - ICD-9-CM code #7' dgn_cd8 = '131 - ICD-9-CM code #8' dgn_cd9 = '131 - ICD-9-CM code #9' dgn_cd10 = '131 - ICD-9-CM code #10' year = 'Claim Year' link_num = 'Link Number' tot_seg = 'Total Segment Count' seg_num = 'Segment Number' rec_count = 'Record Count for Claim' clm_type = '5 - NCH claim type code' nopay_cd = '54 - Claim Medicare non payment reason code' prvstate = '62 - NCH provider state code' op_upin = '69 - Claim operating physician upin number' ot_upin = '74 - Claim Other physician upin number' pay = '179 - Revenue Center Payment Amount' cen_dtm = '148 - Revenue Center Month' cen_dtd = '148 - Revenue Center Day' cen_dty = '148 - Revenue Center Year' pps_ind = '90 - Claim PPS Indicator Code' ; run; proc contents data=hospice position; run;