2005-06 INPATIENT Cost Data Edits * DHS PRELIMINARY INPATIENT COST DATA EDITS; * CODE 1 - NEGATIVE COSTS OF LESS THAN $1.00 CONTAINED IN COST CATEGORIES; if allied < (-1) then eflag1 = 'E'; if ccu < (-1) then eflag1 = 'E'; if emerg < (-1) then eflag1 = 'E'; if icu < (-1) then eflag1 = 'E'; if imaging < (-1) then eflag1 = 'E'; if medsurg < (-1) then eflag1 = 'E'; if mednon < (-1) then eflag1 = 'E'; if nursing < (-1) then eflag1 = 'E'; if path < (-1) then eflag1 = 'E'; if pharm < (-1) then eflag1 = 'E'; if theator < (-1) then eflag1 = 'E'; if theatnor < (-1) then eflag1 = 'E'; if other < (-1) then eflag1 = 'E'; if prosth < (-1) then eflag1 = 'E'; if s100 < (-1) then eflag1 = 'E'; if hithcost < (-1) then eflag1 = 'E'; * CODE 2 - RECORD CONTAINS INVALID OR NULL DRG; if w13vicdrg in ('') then eflag2 = 'E'; * CODE 3 - NEGATIVE TOTAL COST; if totcost < 0 then eflag3 = 'E'; * CODE 4 - ZERO TOTAL COST; if totcost eq 0 then eflag4 = 'E'; * CODE 5 - SAME DAY EPISODE WITH TOTAL COST LESS THAN $50; if sameday in ('Y') and (0 < totcost < 50) then do; if sepmode not in ('D','T') then eflag5 = 'E'; * ie, if patient did not die or was not transferred, then flag as error; if sepmode in ('D','T') and totcost lt 40 then eflag5 = 'E'; * ie, if patient died or was transferred, then flag if cost is less than $40; end; * CODE 6 - NON SAMEDAY EPISODES WITH TOTAL COST LESS THAN $300; mds_cpd = totcost / los; * ie, calculate cost per day for non-sameday episodes with total cost < $300; if sameday in ('N') and (0 < totcost < 300) then do; if sepmode not in ('D','T') and w13vicdrg not in ('P66D','P67D') then do; if mds_cpd lt 100 then eflag6 = 'E'; end; * ie, flag non-died, non-transferred, non normal birth episodes with < $100 per day; if sepmode not in ('D','T') and w13vicdrg in ('P66D','P67D') then do; if mds_cpd lt 50 then eflag6 = 'E'; end; * ie, flag non-died, non-transferred normal birth episodes with < $50 per day; if sepmode in ('D','T') and w13vicdrg not in ('P66D','P67D') then do; if mds_cpd lt 70 then eflag6 = 'E'; end; * ie, flag died or transferred, non normal birth episodes with < $70 per day; if sepmode in ('D','T') and w13vicdrg in ('P66D','P67D') then do; if mds_cpd lt 50 then eflag6 = 'E'; end; * ie, flag died or transferred normal birth episodes with < $50 per day; end; * CODE 7 - TOTAL COST > $200,000; if totcost > 200000 then eflag7 = 'E'; * CODE 8 - DAILY AVERAGE COST > (5 x DRG DAILY AVERAGE); if (avetot not in ('','.')) and (avetot > 0) then do; if ((totcost/los) > (5*avetot)) then eflag8 = 'E'; end; * CODE 9 - TOTAL COST PER DAY FOR REHABILITATION EPISODES > $3,000 per day; if care in ('2','6','7') then do; avetotcost = totcost / los; if avetotcost > 3000 then eflag9 = 'E'; end; * CODE 10 - TOTAL COST BALANCES WITH SUM OF COST CATEGORIES (+/- $30); diff = totcost - totbuckets; if ((diff > 30) or (diff < -30)) then eflag10 = 'E'; * CODE 11 - ICU Costs: Flag if ICU hours > 0 & ICU costs = $0; if icuhrs gt 0 and icu eq 0 then eflag11 = 'E'; * CODE 12 - ICU Costs: Flag if ICU hours = 0 & ICU costs > $0; if icuhrs eq 0 and icu gt 0 then eflag12 = 'E'; * CODE 13 - CCU Costs: Flag if CCU hours > 0 & CCU costs = $0; if ccuhrs gt 0 and ccu eq 0 then eflag13 = 'E'; * CODE 14 - CCU Costs: Flag if CCU hours = 0 & CCU costs > $0; if ccuhrs eq 0 and ccu gt 0 then eflag14 = 'E';