FBRVU ;;WOIFO/SS-RVU UTILITIES ;09-OCT-05
;;3.5;FEE BASIS;**93**;JAN 30, 1995
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
;/*
;Integration Agreement #4799
;The API to retrieve Work Relative Value Units (RVU)
;from FeeBasis file #162.97 by CPT code, CPT modifier and a date
;
;Input:
; FBCPT (Required) CPT code, external value
; FBMOD (Optional) CPT modifier. Can be a string of CPT code specific
; modifiers delimited by commas.
; FBDATE (Optional) Exam date/time in FileMan format. If null then today's date
; becomes the assumed date.
;
;Output:
; returns a string RETSTATUS^VALUE^MESSAGE
; where
;
; If the CPT/CPT+CPT modifier was found for the date or date/time specified then:
; RETSTATUS = 1,
; VALUE = (#.03) WORK RELATIVE VALUE UNIT of file #162.97,
; MESSAGE = null.
;
; If the CPT/CPT+CPT modifier was NOT found for the date or date/time specified then:
; RETSTATUS = 0,
; VALUE = null,
; MESSAGE = "CPT/MOD not found"
;
; If the date specified in FBDATE is invalid then:
; RETSTATUS = 0,
; VALUE = null,
; MESSAGE = "Valid date not specified"
;
; If the CPT modifiers listed in FBMOD cannot be used together
; to determine correct RVU value then:
; RETSTATUS = 0,
; VALUE = null,
; MESSAGE = "Wrong CPT modifiers combination"
;
; If the database is not available at the time of the request then:
; RETSTATUS = -1,
; VALUE = null,
; MESSAGE = "Database Unavailable"
;
RVU(FBCPT,FBMOD,FBDATE) ;
N FBYEAR,FBCPT0,FBCPTY0
I '$D(^FB(162.97,0)) Q "-1^^Database Unavailable"
I $$CHKMOD($G(FBMOD)) Q "0^^Wrong CPT modifiers combination"
I $G(FBDATE)="" S FBDATE=DT
S FBDATE=$G(FBDATE)\1
I FBDATE'?7N Q "0^^Valid date not specified"
S FBYEAR=$E(FBDATE,1,3)+1700
D PROC^FBAAFSR(FBCPT,$G(FBMOD),FBYEAR,1)
I $G(FBCPT0)="" Q "0^^CPT/MOD not found"
Q "1^"_$P($G(FBCPTY0),U,3)_U
;
;check if FBMOD contains any combination of "TC",26 and 53
CHKMOD(FBMODLST) ;
N FBM,FBCNT
S FBCNT=0,FBMODLST=","_FBMODLST_","
F FBM=",TC,",",26,",",53," S:FBMODLST[FBM FBCNT=FBCNT+1
Q FBCNT>1
;
;FBRVU
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBRVU 2143 printed Dec 13, 2024@01:59:51 Page 2
FBRVU ;;WOIFO/SS-RVU UTILITIES ;09-OCT-05
+1 ;;3.5;FEE BASIS;**93**;JAN 30, 1995
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
+4 ;/*
+5 ;Integration Agreement #4799
+6 ;The API to retrieve Work Relative Value Units (RVU)
+7 ;from FeeBasis file #162.97 by CPT code, CPT modifier and a date
+8 ;
+9 ;Input:
+10 ; FBCPT (Required) CPT code, external value
+11 ; FBMOD (Optional) CPT modifier. Can be a string of CPT code specific
+12 ; modifiers delimited by commas.
+13 ; FBDATE (Optional) Exam date/time in FileMan format. If null then today's date
+14 ; becomes the assumed date.
+15 ;
+16 ;Output:
+17 ; returns a string RETSTATUS^VALUE^MESSAGE
+18 ; where
+19 ;
+20 ; If the CPT/CPT+CPT modifier was found for the date or date/time specified then:
+21 ; RETSTATUS = 1,
+22 ; VALUE = (#.03) WORK RELATIVE VALUE UNIT of file #162.97,
+23 ; MESSAGE = null.
+24 ;
+25 ; If the CPT/CPT+CPT modifier was NOT found for the date or date/time specified then:
+26 ; RETSTATUS = 0,
+27 ; VALUE = null,
+28 ; MESSAGE = "CPT/MOD not found"
+29 ;
+30 ; If the date specified in FBDATE is invalid then:
+31 ; RETSTATUS = 0,
+32 ; VALUE = null,
+33 ; MESSAGE = "Valid date not specified"
+34 ;
+35 ; If the CPT modifiers listed in FBMOD cannot be used together
+36 ; to determine correct RVU value then:
+37 ; RETSTATUS = 0,
+38 ; VALUE = null,
+39 ; MESSAGE = "Wrong CPT modifiers combination"
+40 ;
+41 ; If the database is not available at the time of the request then:
+42 ; RETSTATUS = -1,
+43 ; VALUE = null,
+44 ; MESSAGE = "Database Unavailable"
+45 ;
RVU(FBCPT,FBMOD,FBDATE) ;
+1 NEW FBYEAR,FBCPT0,FBCPTY0
+2 IF '$DATA(^FB(162.97,0))
QUIT "-1^^Database Unavailable"
+3 IF $$CHKMOD($GET(FBMOD))
QUIT "0^^Wrong CPT modifiers combination"
+4 IF $GET(FBDATE)=""
SET FBDATE=DT
+5 SET FBDATE=$GET(FBDATE)\1
+6 IF FBDATE'?7N
QUIT "0^^Valid date not specified"
+7 SET FBYEAR=$EXTRACT(FBDATE,1,3)+1700
+8 DO PROC^FBAAFSR(FBCPT,$GET(FBMOD),FBYEAR,1)
+9 IF $GET(FBCPT0)=""
QUIT "0^^CPT/MOD not found"
+10 QUIT "1^"_$PIECE($GET(FBCPTY0),U,3)_U
+11 ;
+12 ;check if FBMOD contains any combination of "TC",26 and 53
CHKMOD(FBMODLST) ;
+1 NEW FBM,FBCNT
+2 SET FBCNT=0
SET FBMODLST=","_FBMODLST_","
+3 FOR FBM=",TC,",",26,",",53,"
if FBMODLST[FBM
SET FBCNT=FBCNT+1
+4 QUIT FBCNT>1
+5 ;
+6 ;FBRVU