FBAAFSR ;WCIOFO/TCK,SS,DMK,SAB - RBRVS FEE SCHEDULE ;1/14/11 11:07am
;;3.5;FEE BASIS;**4,53,71,84,92,93,99,102,105,109,110,112,118,145,179,184**;JAN 30, 1995;Build 4
;Per VA Directive 6402, this routine should not be modified.
;
Q
;
RBRVS(CPT,MODL,DOS,ZIP,FAC,TIME) ; calculate RBRVS Fee Schedule amount
; Input
; CPT = CPT/HCPCS code (external value)
; MODL = list of CPT/HCPCS modifiers (external values)
; delimited by commas (e.g. "26,51")
; DOS = date of service (fileman format e.g. 2980101)
; ZIP = ZIP code of service (external 5 digit value)
; FAC = facility flag =1 if site of service is facility setting
; TIME = time in minutes, only passed on anesthesia CPT codes
; Returns string
; dollar amount^sched year OR null value if not on RBRVS schedule
; Output
; FBERR( array of error messages OR undefined if none
;
N FBAMT,FBCF,FBCPT0,FBCPTY0,FBCY,FBERR,FBGPCIY0
;
; initialization
S FBAMT=""
K FBERR
;
; check for required input parameters
I $G(CPT)="" D ERR^FBAAFS("CPT missing")
I $G(DOS)'?7N D ERR^FBAAFS("Date of Service missing")
I $D(FBERR) Q FBAMT
;
;if date of service prior to VA implementation, don't use RBRVS
I DOS<2990901 Q FBAMT
;
;if modifier SG present, don't use RBRVS, patch FB*3.5*84
I MODL["SG" Q FBAMT
;
; determine schedule calendar year based on date of service
S FBCY=$E(DOS,1,3)+1700
;
;If date of service in 2003 but prior to Mar 1, 2003 treat as 2002
I $E(DOS,1,3)=303,DOS<3030301 S FBCY=FBCY-1
;
; if year after most recent RBRVS schedule then use prior year schedule
I FBCY>$$LASTCY() S FBCY=FBCY-1
;
; get procedure data from schedule for year
D PROC(CPT,MODL,FBCY)
;
; if procedure:
; - covered
; - payable
; - not for anesthesia
; then calculate amount
I FBCPTY0]"",'$$ANES^FBAAFS(CPT) D
. ;
. ;validate parameters
. I $G(ZIP)="" D ERR^FBAAFS("Missing ZIP Code")
. I $G(FAC)="" D ERR^FBAAFS("Missing Facility Flag")
. I $D(FBERR) Q
. ;
. ; get GPCIs for calendar year
. D ZIP(FBCY,ZIP)
. I FBGPCIY0="" D ERR^FBAAFS("Could not determine GPCIs") Q
. ;
. ; get conversion factor
. S FBCF=$$CF(FBCY,$P(FBCPT0,U,2))
. I FBCF="" D ERR^FBAAFS("Could not determine the conversion factor") Q
. ;
. ; calculate full schedule amount
. D CALC(FBCY,FAC,FBCPTY0,FBGPCIY0,FBCF)
. ;
. ; apply adjustments to calculation
. S FBAMT=$J(FBAMT,0,3) ;FB*3.5*184 - Adjust rounding to match CMS, go to 3 digits first (Anything $0.0045 or above is rounded up to next cent)
. S FBAMT=$J(FBAMT,0,2)*$$ADJ(CPT,DOS)
. ; apply multiplier based on modifier
. I MODL]"" S FBAMT=FBAMT*$$MULT(FBCY,MODL,FBCPT0,FBCPTY0)
;
; return result
Q $S(FBAMT>0:$J(FBAMT,0,2)_U_FBCY,1:"")
;
PROC(CPT,MODL,FBCY,FBNONPBL) ; get procedure data for RBRVS schedule
; Input
; CPT = CPT/HCPCS code (external value)
; MODL = list of CPT/HCPCS modifiers (external value)
; delimited by commas
; FBCY = calendar year (4 digit)
; FBNONPBL ( optional):
; if $G(FBNONPBL)=0 then will make search among payable records only in #162.97
; ignoring those non-payable ones with field #.08 NONPAYABLE = 1
; if $G(FBNONPBL)=1 then will make search among all items in #162.97
;
; Output
; FBCPT0 = zero node from file 162.97 OR "" if not covered
; FBCPTY0 = zero node from subfile 162.971 or "" if not covered
N CPTM,MOD,FBI
S (FBCPT0,FBCPTY0)=""
Q:$G(FBCY)']""!($G(CPT)']"")
;
; if modifier exists try to find entry with modifier
I MODL]"" D
. F FBI=1:1 S MOD=$P(MODL,",",FBI) Q:MOD="" D Q:FBCPTY0]""
. . S CPTM=CPT_"-"_MOD
. . D PROC1(CPTM,FBCY,$G(FBNONPBL))
;
; if not found with modifier, try just CPT code
I FBCPTY0="" D PROC1(CPT,FBCY,$G(FBNONPBL))
;
Q
;
PROC1(CPTM,FBCY,FBNONPBL) ; get procedure data for CPT-Modifier
; input
; CPTM - CPT Code - Modifier (e.g. 57335-TC or 57335)
; FBCY - 4 digit calendar year
; FBNONPBL ( optional):
; if $G(FBNONPBL)=0 then will make search among payable records only in #162.97
; ignoring those non-payable ones with field #.08 NONPAYABLE = 1
; if $G(FBNONPBL)=1 then will make search among all items in #162.97
; output
; FBCPT0 = zero node from file 162.97 OR "" if not covered
; FBCPTY0 = zero node from subfile 162.971 or "" if not covered
N FBDA,FBDA1
S (FBCPT0,FBCPTY0)=""
S FBDA=$O(^FB(162.97,"B",CPTM,0))
S FBDA1=$S(FBDA:$O(^FB(162.97,FBDA,"CY","B",FBCY,0)),1:"")
I $G(FBDA),$G(FBDA1) D
. N FBI,FBSUM,FBY
. S FBY=$G(^FB(162.97,FBDA,"CY",FBDA1,0))
. ;if non-payable records should not be considered
. ;then quit if this is NONPAYBLE
. I +$G(FBNONPBL)=0 Q:$P(FBY,U,8)=1
. ; check if procedure covered by schedule
. I +$G(FBNONPBL)=0,$$ANES^FBAAFS($P(CPTM,"-")),$P(FBY,U,6)']"" Q ; missing anes base
. I +$G(FBNONPBL)=0,'$$ANES^FBAAFS($P(CPTM,"-")) D I FBSUM'>0 Q ; sum of RVUs = 0
. . S FBSUM=0 F FBI=3,4,5,6 S FBSUM=FBSUM+$P(FBY,U,FBI)
. ; passed checks
. S FBCPTY0=FBY
. S FBCPT0=$G(^FB(162.97,FBDA,0))
Q
;
ZIP(FBCY,ZIP) ; get GPCIs
; Input
; FBCY = calendar year (4 digit)
; ZIP = zip code (5 digit external value)
; Output
; FBGPCIY0 = zero node from file 162.96 or "" if not found
S FBGPCIY0=""
Q:$G(FBCY)']""!($G(ZIP)']"")
N FBDA,FBDA1
S FBDA=$O(^FB(162.96,"B",ZIP,0))
S FBDA1=$S(FBDA:$O(^FB(162.96,FBDA,"CY","B",FBCY,0)),1:"")
I FBDA,FBDA1 S FBGPCIY0=$G(^FB(162.96,FBDA,"CY",FBDA1,0))
Q
;
CF(FBCY,FBDA) ; get conversion factor
; Input
; FBCY = calendar year
; FBDA = optional conversion category (internal)
; Returns
; conversion factor from file 162.99
N FBCF,FBDA1
I '$G(FBDA) S FBDA=4 ; use Medicine category if not specified
S FBDA1=$O(^FB(162.99,FBDA,"CY","B",FBCY,0))
S FBCF=$S(FBDA1:$P($G(^FB(162.99,FBDA,"CY",FBDA1,0)),U,2),1:"")
Q +FBCF
;
CALC(FBCY,FAC,FBCPTY0,FBGPCIY0,FBCF) ;
; Input
; FBCY = calendar year (4 digit)
; FAC = facility flag (0 or 1)
; FBCPTY0 = zero node from file 162.71
; FBGPCI0 = zero node from file 162.61
; FBCF = conversion factor (number)
; Returns $ amount
;
N GPCI,RVU,FBI,TMP,TMPRVU
S FBAMT=0
;Old formula for RBRVS pre-2007 payment amounts
I DOS<3070101 D
.S RVU(1)=$P(FBCPTY0,U,3)
I (DOS=3070101!(DOS>3070101)&(DOS<3080101)) D
.;New formula for RBRVS 2007 payment amounts
.;Multiply Work RVU by the Budget Neutrality Adjustor (0.8994)
.S TMP=$P(FBCPTY0,U,3),TMPRVU=$J((TMP*(.8994)),".",2)
.S RVU(1)=TMPRVU
I (DOS=3080101!(DOS>3080101)&(DOS<3090101)) D
.;New formula for the RBRVS 2008 payment amounts
.;Multiply Work RVU by the Budget Neutrality Adjustor (0.8994)
.S TMP=$P(FBCPTY0,U,3),TMPRVU=$J((TMP*(.8806)),".",2)
.S RVU(1)=TMPRVU
;RBRVS 2009 does not have a budget neutrality adjustor.
I (DOS=3090101!(DOS>3090101)) D
.S RVU(1)=$P(FBCPTY0,U,3)
S RVU(2)=$P(FBCPTY0,U,4+FAC)
S RVU(3)=$P(FBCPTY0,U,6)
F FBI=2,3,4 S GPCI(FBI-1)=$P(FBGPCIY0,U,FBI)
S FBAMT=((RVU(1)*GPCI(1))+(RVU(2)*GPCI(2))+(RVU(3)*GPCI(3)))*FBCF
; some procedures can't be performed in a facility setting by
; definition. the facility PE RVU for such a procedure is a null
; value.
; when facility setting - check for a null PE value and don't return amt
I RVU(2)="",FAC S FBAMT=0 Q
Q
;
MULT(FBCY,MODL,FBCPT0,FBCPTY0) ;returns multiplier based on table type
; Input
; FBCY = calendar year (4 digit)
; MODL = list of CPT/HCPCS modifiers (external values)
; delimited by commas
; FBCPT0 = zero node of file 162.7 for procedure
; FBCPTY0 = zero node of subfile 162.71 for year
; Returns
; multiplier value OR 1 if none
N FBDA,FBDA1,FBI,FBML,FBPD,FBRET,FBTBL,MOD
S FBRET=1
S FBML=$P(FBCPTY0,U,2) ; mod level table for procedure
I MODL]"",FBML]"",FBCY]"" D
. S FBTBL=FBCY_"-"_FBML ; mod level table for year
. S FBDA=$O(^FB(162.98,"B",FBTBL,0))
. Q:'FBDA ; table not found
. ; loop thru the modifiers
. F FBI=1:1 S MOD=$P(MODL,",",FBI) Q:MOD="" D
. . I $P($P(FBCPT0,U),"-",2)=MOD Q ; modifier already built in schedule
. . ; look up modifier in mod level table
. . S FBDA1=$O(^FB(162.98,FBDA,"M","B",MOD,0))
. . Q:'FBDA1 ; modifier not found in table
. . S FBPD=$P($G(^FB(162.98,FBDA,"M",FBDA1,0)),U,2) ; percentage
. . I FBPD>0 S FBRET=FBRET*(FBPD/100) ; multiplier
Q FBRET
;
LASTCY() ; Determine last calendar year of RBRVS FEE schedule data
; based on last year for Medicine conversion factor
N YEAR
S YEAR=$O(^FB(162.99,4,"CY","B"," "),-1)
Q YEAR
ADJ(CPT,DOS) ;Apply Adjustments to Fee Amount
;Apply 5% increase based on CR 6208 Adjustment for Medicare Mental Health Services
;Calculate 98% for CPT 98940,98941,98942 (RVU10AR), ends 12/31/2014
N ADJ
S ADJ=1.0
I (DOS>3080630)&(DOS<3120301)&((CPT>90803)&(CPT<90830))&((CPT'=90820)&(CPT'=90825)) S ADJ=1.05
I ((DOS>3091231)&(DOS<3150101)&(CPT>98939)&(CPT<98943)) S ADJ=0.98 ;98% adjustment for codes 98940, 98941, and 98942 no longer in effect as on 01/01/2015, FB*3.5*179
Q ADJ
;FBAAFSR
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBAAFSR 9151 printed Oct 16, 2024@17:56:21 Page 2
FBAAFSR ;WCIOFO/TCK,SS,DMK,SAB - RBRVS FEE SCHEDULE ;1/14/11 11:07am
+1 ;;3.5;FEE BASIS;**4,53,71,84,92,93,99,102,105,109,110,112,118,145,179,184**;JAN 30, 1995;Build 4
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
RBRVS(CPT,MODL,DOS,ZIP,FAC,TIME) ; calculate RBRVS Fee Schedule amount
+1 ; Input
+2 ; CPT = CPT/HCPCS code (external value)
+3 ; MODL = list of CPT/HCPCS modifiers (external values)
+4 ; delimited by commas (e.g. "26,51")
+5 ; DOS = date of service (fileman format e.g. 2980101)
+6 ; ZIP = ZIP code of service (external 5 digit value)
+7 ; FAC = facility flag =1 if site of service is facility setting
+8 ; TIME = time in minutes, only passed on anesthesia CPT codes
+9 ; Returns string
+10 ; dollar amount^sched year OR null value if not on RBRVS schedule
+11 ; Output
+12 ; FBERR( array of error messages OR undefined if none
+13 ;
+14 NEW FBAMT,FBCF,FBCPT0,FBCPTY0,FBCY,FBERR,FBGPCIY0
+15 ;
+16 ; initialization
+17 SET FBAMT=""
+18 KILL FBERR
+19 ;
+20 ; check for required input parameters
+21 IF $GET(CPT)=""
DO ERR^FBAAFS("CPT missing")
+22 IF $GET(DOS)'?7N
DO ERR^FBAAFS("Date of Service missing")
+23 IF $DATA(FBERR)
QUIT FBAMT
+24 ;
+25 ;if date of service prior to VA implementation, don't use RBRVS
+26 IF DOS<2990901
QUIT FBAMT
+27 ;
+28 ;if modifier SG present, don't use RBRVS, patch FB*3.5*84
+29 IF MODL["SG"
QUIT FBAMT
+30 ;
+31 ; determine schedule calendar year based on date of service
+32 SET FBCY=$EXTRACT(DOS,1,3)+1700
+33 ;
+34 ;If date of service in 2003 but prior to Mar 1, 2003 treat as 2002
+35 IF $EXTRACT(DOS,1,3)=303
IF DOS<3030301
SET FBCY=FBCY-1
+36 ;
+37 ; if year after most recent RBRVS schedule then use prior year schedule
+38 IF FBCY>$$LASTCY()
SET FBCY=FBCY-1
+39 ;
+40 ; get procedure data from schedule for year
+41 DO PROC(CPT,MODL,FBCY)
+42 ;
+43 ; if procedure:
+44 ; - covered
+45 ; - payable
+46 ; - not for anesthesia
+47 ; then calculate amount
+48 IF FBCPTY0]""
IF '$$ANES^FBAAFS(CPT)
Begin DoDot:1
+49 ;
+50 ;validate parameters
+51 IF $GET(ZIP)=""
DO ERR^FBAAFS("Missing ZIP Code")
+52 IF $GET(FAC)=""
DO ERR^FBAAFS("Missing Facility Flag")
+53 IF $DATA(FBERR)
QUIT
+54 ;
+55 ; get GPCIs for calendar year
+56 DO ZIP(FBCY,ZIP)
+57 IF FBGPCIY0=""
DO ERR^FBAAFS("Could not determine GPCIs")
QUIT
+58 ;
+59 ; get conversion factor
+60 SET FBCF=$$CF(FBCY,$PIECE(FBCPT0,U,2))
+61 IF FBCF=""
DO ERR^FBAAFS("Could not determine the conversion factor")
QUIT
+62 ;
+63 ; calculate full schedule amount
+64 DO CALC(FBCY,FAC,FBCPTY0,FBGPCIY0,FBCF)
+65 ;
+66 ; apply adjustments to calculation
+67 ;FB*3.5*184 - Adjust rounding to match CMS, go to 3 digits first (Anything $0.0045 or above is rounded up to next cent)
SET FBAMT=$JUSTIFY(FBAMT,0,3)
+68 SET FBAMT=$JUSTIFY(FBAMT,0,2)*$$ADJ(CPT,DOS)
+69 ; apply multiplier based on modifier
+70 IF MODL]""
SET FBAMT=FBAMT*$$MULT(FBCY,MODL,FBCPT0,FBCPTY0)
End DoDot:1
+71 ;
+72 ; return result
+73 QUIT $SELECT(FBAMT>0:$JUSTIFY(FBAMT,0,2)_U_FBCY,1:"")
+74 ;
PROC(CPT,MODL,FBCY,FBNONPBL) ; get procedure data for RBRVS schedule
+1 ; Input
+2 ; CPT = CPT/HCPCS code (external value)
+3 ; MODL = list of CPT/HCPCS modifiers (external value)
+4 ; delimited by commas
+5 ; FBCY = calendar year (4 digit)
+6 ; FBNONPBL ( optional):
+7 ; if $G(FBNONPBL)=0 then will make search among payable records only in #162.97
+8 ; ignoring those non-payable ones with field #.08 NONPAYABLE = 1
+9 ; if $G(FBNONPBL)=1 then will make search among all items in #162.97
+10 ;
+11 ; Output
+12 ; FBCPT0 = zero node from file 162.97 OR "" if not covered
+13 ; FBCPTY0 = zero node from subfile 162.971 or "" if not covered
+14 NEW CPTM,MOD,FBI
+15 SET (FBCPT0,FBCPTY0)=""
+16 if $GET(FBCY)']""!($GET(CPT)']"")
QUIT
+17 ;
+18 ; if modifier exists try to find entry with modifier
+19 IF MODL]""
Begin DoDot:1
+20 FOR FBI=1:1
SET MOD=$PIECE(MODL,",",FBI)
if MOD=""
QUIT
Begin DoDot:2
+21 SET CPTM=CPT_"-"_MOD
+22 DO PROC1(CPTM,FBCY,$GET(FBNONPBL))
End DoDot:2
if FBCPTY0]""
QUIT
End DoDot:1
+23 ;
+24 ; if not found with modifier, try just CPT code
+25 IF FBCPTY0=""
DO PROC1(CPT,FBCY,$GET(FBNONPBL))
+26 ;
+27 QUIT
+28 ;
PROC1(CPTM,FBCY,FBNONPBL) ; get procedure data for CPT-Modifier
+1 ; input
+2 ; CPTM - CPT Code - Modifier (e.g. 57335-TC or 57335)
+3 ; FBCY - 4 digit calendar year
+4 ; FBNONPBL ( optional):
+5 ; if $G(FBNONPBL)=0 then will make search among payable records only in #162.97
+6 ; ignoring those non-payable ones with field #.08 NONPAYABLE = 1
+7 ; if $G(FBNONPBL)=1 then will make search among all items in #162.97
+8 ; output
+9 ; FBCPT0 = zero node from file 162.97 OR "" if not covered
+10 ; FBCPTY0 = zero node from subfile 162.971 or "" if not covered
+11 NEW FBDA,FBDA1
+12 SET (FBCPT0,FBCPTY0)=""
+13 SET FBDA=$ORDER(^FB(162.97,"B",CPTM,0))
+14 SET FBDA1=$SELECT(FBDA:$ORDER(^FB(162.97,FBDA,"CY","B",FBCY,0)),1:"")
+15 IF $GET(FBDA)
IF $GET(FBDA1)
Begin DoDot:1
+16 NEW FBI,FBSUM,FBY
+17 SET FBY=$GET(^FB(162.97,FBDA,"CY",FBDA1,0))
+18 ;if non-payable records should not be considered
+19 ;then quit if this is NONPAYBLE
+20 IF +$GET(FBNONPBL)=0
if $PIECE(FBY,U,8)=1
QUIT
+21 ; check if procedure covered by schedule
+22 ; missing anes base
IF +$GET(FBNONPBL)=0
IF $$ANES^FBAAFS($PIECE(CPTM,"-"))
IF $PIECE(FBY,U,6)']""
QUIT
+23 ; sum of RVUs = 0
IF +$GET(FBNONPBL)=0
IF '$$ANES^FBAAFS($PIECE(CPTM,"-"))
Begin DoDot:2
+24 SET FBSUM=0
FOR FBI=3,4,5,6
SET FBSUM=FBSUM+$PIECE(FBY,U,FBI)
End DoDot:2
IF FBSUM'>0
QUIT
+25 ; passed checks
+26 SET FBCPTY0=FBY
+27 SET FBCPT0=$GET(^FB(162.97,FBDA,0))
End DoDot:1
+28 QUIT
+29 ;
ZIP(FBCY,ZIP) ; get GPCIs
+1 ; Input
+2 ; FBCY = calendar year (4 digit)
+3 ; ZIP = zip code (5 digit external value)
+4 ; Output
+5 ; FBGPCIY0 = zero node from file 162.96 or "" if not found
+6 SET FBGPCIY0=""
+7 if $GET(FBCY)']""!($GET(ZIP)']"")
QUIT
+8 NEW FBDA,FBDA1
+9 SET FBDA=$ORDER(^FB(162.96,"B",ZIP,0))
+10 SET FBDA1=$SELECT(FBDA:$ORDER(^FB(162.96,FBDA,"CY","B",FBCY,0)),1:"")
+11 IF FBDA
IF FBDA1
SET FBGPCIY0=$GET(^FB(162.96,FBDA,"CY",FBDA1,0))
+12 QUIT
+13 ;
CF(FBCY,FBDA) ; get conversion factor
+1 ; Input
+2 ; FBCY = calendar year
+3 ; FBDA = optional conversion category (internal)
+4 ; Returns
+5 ; conversion factor from file 162.99
+6 NEW FBCF,FBDA1
+7 ; use Medicine category if not specified
IF '$GET(FBDA)
SET FBDA=4
+8 SET FBDA1=$ORDER(^FB(162.99,FBDA,"CY","B",FBCY,0))
+9 SET FBCF=$SELECT(FBDA1:$PIECE($GET(^FB(162.99,FBDA,"CY",FBDA1,0)),U,2),1:"")
+10 QUIT +FBCF
+11 ;
CALC(FBCY,FAC,FBCPTY0,FBGPCIY0,FBCF) ;
+1 ; Input
+2 ; FBCY = calendar year (4 digit)
+3 ; FAC = facility flag (0 or 1)
+4 ; FBCPTY0 = zero node from file 162.71
+5 ; FBGPCI0 = zero node from file 162.61
+6 ; FBCF = conversion factor (number)
+7 ; Returns $ amount
+8 ;
+9 NEW GPCI,RVU,FBI,TMP,TMPRVU
+10 SET FBAMT=0
+11 ;Old formula for RBRVS pre-2007 payment amounts
+12 IF DOS<3070101
Begin DoDot:1
+13 SET RVU(1)=$PIECE(FBCPTY0,U,3)
End DoDot:1
+14 IF (DOS=3070101!(DOS>3070101)&(DOS<3080101))
Begin DoDot:1
+15 ;New formula for RBRVS 2007 payment amounts
+16 ;Multiply Work RVU by the Budget Neutrality Adjustor (0.8994)
+17 SET TMP=$PIECE(FBCPTY0,U,3)
SET TMPRVU=$JUSTIFY((TMP*(.8994)),".",2)
+18 SET RVU(1)=TMPRVU
End DoDot:1
+19 IF (DOS=3080101!(DOS>3080101)&(DOS<3090101))
Begin DoDot:1
+20 ;New formula for the RBRVS 2008 payment amounts
+21 ;Multiply Work RVU by the Budget Neutrality Adjustor (0.8994)
+22 SET TMP=$PIECE(FBCPTY0,U,3)
SET TMPRVU=$JUSTIFY((TMP*(.8806)),".",2)
+23 SET RVU(1)=TMPRVU
End DoDot:1
+24 ;RBRVS 2009 does not have a budget neutrality adjustor.
+25 IF (DOS=3090101!(DOS>3090101))
Begin DoDot:1
+26 SET RVU(1)=$PIECE(FBCPTY0,U,3)
End DoDot:1
+27 SET RVU(2)=$PIECE(FBCPTY0,U,4+FAC)
+28 SET RVU(3)=$PIECE(FBCPTY0,U,6)
+29 FOR FBI=2,3,4
SET GPCI(FBI-1)=$PIECE(FBGPCIY0,U,FBI)
+30 SET FBAMT=((RVU(1)*GPCI(1))+(RVU(2)*GPCI(2))+(RVU(3)*GPCI(3)))*FBCF
+31 ; some procedures can't be performed in a facility setting by
+32 ; definition. the facility PE RVU for such a procedure is a null
+33 ; value.
+34 ; when facility setting - check for a null PE value and don't return amt
+35 IF RVU(2)=""
IF FAC
SET FBAMT=0
QUIT
+36 QUIT
+37 ;
MULT(FBCY,MODL,FBCPT0,FBCPTY0) ;returns multiplier based on table type
+1 ; Input
+2 ; FBCY = calendar year (4 digit)
+3 ; MODL = list of CPT/HCPCS modifiers (external values)
+4 ; delimited by commas
+5 ; FBCPT0 = zero node of file 162.7 for procedure
+6 ; FBCPTY0 = zero node of subfile 162.71 for year
+7 ; Returns
+8 ; multiplier value OR 1 if none
+9 NEW FBDA,FBDA1,FBI,FBML,FBPD,FBRET,FBTBL,MOD
+10 SET FBRET=1
+11 ; mod level table for procedure
SET FBML=$PIECE(FBCPTY0,U,2)
+12 IF MODL]""
IF FBML]""
IF FBCY]""
Begin DoDot:1
+13 ; mod level table for year
SET FBTBL=FBCY_"-"_FBML
+14 SET FBDA=$ORDER(^FB(162.98,"B",FBTBL,0))
+15 ; table not found
if 'FBDA
QUIT
+16 ; loop thru the modifiers
+17 FOR FBI=1:1
SET MOD=$PIECE(MODL,",",FBI)
if MOD=""
QUIT
Begin DoDot:2
+18 ; modifier already built in schedule
IF $PIECE($PIECE(FBCPT0,U),"-",2)=MOD
QUIT
+19 ; look up modifier in mod level table
+20 SET FBDA1=$ORDER(^FB(162.98,FBDA,"M","B",MOD,0))
+21 ; modifier not found in table
if 'FBDA1
QUIT
+22 ; percentage
SET FBPD=$PIECE($GET(^FB(162.98,FBDA,"M",FBDA1,0)),U,2)
+23 ; multiplier
IF FBPD>0
SET FBRET=FBRET*(FBPD/100)
End DoDot:2
End DoDot:1
+24 QUIT FBRET
+25 ;
LASTCY() ; Determine last calendar year of RBRVS FEE schedule data
+1 ; based on last year for Medicine conversion factor
+2 NEW YEAR
+3 SET YEAR=$ORDER(^FB(162.99,4,"CY","B"," "),-1)
+4 QUIT YEAR
ADJ(CPT,DOS) ;Apply Adjustments to Fee Amount
+1 ;Apply 5% increase based on CR 6208 Adjustment for Medicare Mental Health Services
+2 ;Calculate 98% for CPT 98940,98941,98942 (RVU10AR), ends 12/31/2014
+3 NEW ADJ
+4 SET ADJ=1.0
+5 IF (DOS>3080630)&(DOS<3120301)&((CPT>90803)&(CPT<90830))&((CPT'=90820)&(CPT'=90825))
SET ADJ=1.05
+6 ;98% adjustment for codes 98940, 98941, and 98942 no longer in effect as on 01/01/2015, FB*3.5*179
IF ((DOS>3091231)&(DOS<3150101)&(CPT>98939)&(CPT<98943))
SET ADJ=0.98
+7 QUIT ADJ
+8 ;FBAAFSR